opencode-devin 0.2.10 → 2.0.0-beta.0
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/CHANGELOG.md +56 -0
- package/LICENSE +1 -1
- package/README.md +118 -228
- package/SECURITY.md +81 -0
- package/package.json +52 -58
- package/scripts/dump-log.ts +22 -0
- package/scripts/login.ts +46 -0
- package/src/index.ts +5 -0
- package/src/plugin.ts +293 -0
- package/src/provider/auth.ts +339 -0
- package/src/provider/cascade.ts +469 -0
- package/src/provider/index.ts +321 -0
- package/src/provider/log.ts +99 -0
- package/src/provider/package.json +6 -0
- package/src/provider/paths.ts +33 -0
- package/src/provider/proto.ts +197 -0
- package/dist/catalog.d.ts +0 -22
- package/dist/catalog.js +0 -111
- package/dist/constants.d.ts +0 -19
- package/dist/constants.js +0 -19
- package/dist/credentials.d.ts +0 -23
- package/dist/credentials.js +0 -57
- package/dist/index.d.ts +0 -17
- package/dist/index.js +0 -135
- package/dist/protocol/model.d.ts +0 -68
- package/dist/protocol/model.js +0 -735
- package/dist/provider.d.ts +0 -43
- package/dist/provider.js +0 -30
package/dist/provider.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider package entrypoint for OpenCode v2.
|
|
3
|
-
*
|
|
4
|
-
* With the `aisdk:` package prefix, opencode's dynamic provider loader imports
|
|
5
|
-
* this module, calls the first `create*` export with the provider settings,
|
|
6
|
-
* and uses `sdk.languageModel(modelID)` as the AI SDK `LanguageModelV3`.
|
|
7
|
-
*
|
|
8
|
-
* The Cascade protocol implementation lives in `src/protocol/` — vendored,
|
|
9
|
-
* audited, and owned in this repository (see `src/protocol/ATTRIBUTION.md`).
|
|
10
|
-
*/
|
|
11
|
-
export interface DevinProviderSettings {
|
|
12
|
-
readonly apiKey?: string;
|
|
13
|
-
readonly baseURL?: string;
|
|
14
|
-
readonly name?: string;
|
|
15
|
-
/**
|
|
16
|
-
* "normal" (default) streams the model's answer through unchanged.
|
|
17
|
-
* "uncensored" runs every request through the devin-engine guarded-retry
|
|
18
|
-
* pipeline: an override system prompt, history sanitizing, and a refusal
|
|
19
|
-
* guard that transparently resamples when the model starts a refusal.
|
|
20
|
-
*/
|
|
21
|
-
readonly mode?: "normal" | "uncensored";
|
|
22
|
-
/** Refusal-detection window in chars (devin-engine default: 700). */
|
|
23
|
-
readonly guardChars?: number;
|
|
24
|
-
/** Guard the full response instead of only the head window. */
|
|
25
|
-
readonly guardFull?: boolean;
|
|
26
|
-
/** Resample attempts after the first one (devin-engine default: 3). */
|
|
27
|
-
readonly maxRetries?: number;
|
|
28
|
-
/** Retry temperatures after the first attempt, comma-separated (default "0.85,1.0,1.1"). */
|
|
29
|
-
readonly retryTemps?: string;
|
|
30
|
-
/** Override prompt file: a path, or "en" / "es" for the bundled variants. */
|
|
31
|
-
readonly overrideFile?: string;
|
|
32
|
-
/** Keep the client system prompt ahead of the override. */
|
|
33
|
-
readonly keepClientSystem?: boolean;
|
|
34
|
-
/** Tell the model to announce briefly what it is about to do before tool calls. */
|
|
35
|
-
readonly planPreamble?: boolean;
|
|
36
|
-
/** Estimated-input-token budget: older history turns are pruned past it. */
|
|
37
|
-
readonly maxInputTokens?: number;
|
|
38
|
-
/** Minimum history turns kept when pruning (default 12). */
|
|
39
|
-
readonly pruneKeepTurns?: number;
|
|
40
|
-
}
|
|
41
|
-
export declare function createDevinProvider(options: DevinProviderSettings): {
|
|
42
|
-
languageModel: (modelID: string) => import("@ai-sdk/provider").LanguageModelV3;
|
|
43
|
-
};
|
package/dist/provider.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider package entrypoint for OpenCode v2.
|
|
3
|
-
*
|
|
4
|
-
* With the `aisdk:` package prefix, opencode's dynamic provider loader imports
|
|
5
|
-
* this module, calls the first `create*` export with the provider settings,
|
|
6
|
-
* and uses `sdk.languageModel(modelID)` as the AI SDK `LanguageModelV3`.
|
|
7
|
-
*
|
|
8
|
-
* The Cascade protocol implementation lives in `src/protocol/` — vendored,
|
|
9
|
-
* audited, and owned in this repository (see `src/protocol/ATTRIBUTION.md`).
|
|
10
|
-
*/
|
|
11
|
-
import { createDevin } from "./protocol/model.js";
|
|
12
|
-
export function createDevinProvider(options) {
|
|
13
|
-
const provider = createDevin({
|
|
14
|
-
apiKey: options.apiKey ?? "",
|
|
15
|
-
baseURL: options.baseURL,
|
|
16
|
-
mode: options.mode,
|
|
17
|
-
guardChars: options.guardChars,
|
|
18
|
-
guardFull: options.guardFull,
|
|
19
|
-
maxRetries: options.maxRetries,
|
|
20
|
-
retryTemps: options.retryTemps,
|
|
21
|
-
overrideFile: options.overrideFile,
|
|
22
|
-
keepClientSystem: options.keepClientSystem,
|
|
23
|
-
planPreamble: options.planPreamble,
|
|
24
|
-
maxInputTokens: options.maxInputTokens,
|
|
25
|
-
pruneKeepTurns: options.pruneKeepTurns,
|
|
26
|
-
});
|
|
27
|
-
return {
|
|
28
|
-
languageModel: (modelID) => provider.languageModel(modelID),
|
|
29
|
-
};
|
|
30
|
-
}
|