nemo-fabric-adapters-opencode 0.0.0 → 0.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/README.md +86 -0
- package/dist/bun-version.d.ts +1 -0
- package/dist/bun-version.js +34 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +25 -0
- package/dist/configuration.d.ts +13 -0
- package/dist/configuration.js +95 -0
- package/dist/model-endpoint-proxy.d.ts +9 -0
- package/dist/model-endpoint-proxy.js +172 -0
- package/dist/opencode-sdk.d.ts +24 -0
- package/dist/opencode-sdk.js +673 -0
- package/dist/runtime.d.ts +27 -0
- package/dist/runtime.js +106 -0
- package/opencode.fabric-adapter.json +59 -0
- package/package.json +58 -9
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AdapterStartInput } from "nemo-fabric-adapters-common";
|
|
2
|
+
import type { OpenCodePromptOutcome, OpenCodeSessionFactory, OpenCodeSessionHandle } from "./runtime.js";
|
|
3
|
+
type OpenCodeEmbedOptions = {
|
|
4
|
+
overrides?: unknown[];
|
|
5
|
+
};
|
|
6
|
+
type OpenCodeEmbedOptionsLoader = (configContent: string) => Promise<OpenCodeEmbedOptions>;
|
|
7
|
+
type ModuleResolver = (specifier: string) => string;
|
|
8
|
+
type ModuleLoader = (specifier: string) => Promise<unknown>;
|
|
9
|
+
interface EndpointProxy {
|
|
10
|
+
readonly url: string;
|
|
11
|
+
close(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
type EndpointProxyFactory = (baseUrl: string) => Promise<EndpointProxy>;
|
|
14
|
+
/** Extract the terminal assistant outcome after OpenCode reports a session idle. */
|
|
15
|
+
export declare function extractOpenCodePromptOutcome(messages: unknown[], existingMessageIds?: ReadonlySet<string>): OpenCodePromptOutcome;
|
|
16
|
+
export declare function loadOpenCodeSdk(resolveModule?: ModuleResolver, loadModule?: ModuleLoader): Promise<typeof import("@opencode/sdk")>;
|
|
17
|
+
export declare class OpenCodeSdkSessionFactory implements OpenCodeSessionFactory {
|
|
18
|
+
private readonly sdkLoader;
|
|
19
|
+
private readonly embedOptionsLoader;
|
|
20
|
+
private readonly endpointProxyFactory;
|
|
21
|
+
constructor(sdkLoader?: typeof loadOpenCodeSdk, embedOptionsLoader?: OpenCodeEmbedOptionsLoader, endpointProxyFactory?: EndpointProxyFactory);
|
|
22
|
+
create(input: AdapterStartInput): Promise<OpenCodeSessionHandle>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|