opencode-devin 0.2.6 → 0.2.8
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/README.md +19 -6
- package/dist/index.js +32 -0
- package/dist/protocol/model.d.ts +4 -0
- package/dist/protocol/model.js +8 -0
- package/dist/provider.d.ts +8 -0
- package/dist/provider.js +4 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -89,15 +89,16 @@ pipeline — the same machinery the standalone
|
|
|
89
89
|
through.
|
|
90
90
|
|
|
91
91
|
```jsonc
|
|
92
|
-
// opencode.json
|
|
92
|
+
// opencode.json — object form of the plugins entry
|
|
93
93
|
{
|
|
94
|
-
"
|
|
95
|
-
|
|
94
|
+
"plugins": [
|
|
95
|
+
{
|
|
96
|
+
"package": "opencode-devin",
|
|
96
97
|
"options": {
|
|
97
|
-
"mode": "uncensored"
|
|
98
|
+
"mode": "uncensored"
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
]
|
|
101
102
|
}
|
|
102
103
|
```
|
|
103
104
|
|
|
@@ -109,8 +110,20 @@ All settings are optional:
|
|
|
109
110
|
| `guardChars` | `700` | Head-window size the refusal guard scans before releasing text. |
|
|
110
111
|
| `guardFull` | `false` | Buffer and scan the whole reply instead — catches comply-then-pivot refusals at the cost of streaming. |
|
|
111
112
|
| `maxRetries` | `3` | Resample attempts after the first one. |
|
|
112
|
-
| `
|
|
113
|
+
| `retryTemps` | `"0.85,1.0,1.1"` | Comma-separated retry temperature ladder. |
|
|
114
|
+
| `overrideFile` | bundled EN | Override prompt: a filesystem path, or a bundled language name — `"en"` / `"english"`, `"es"` / `"spanish"`. A file at `~/.devin-proxy/override-compact.txt` is picked up too, same as the standalone proxy. |
|
|
113
115
|
| `keepClientSystem` | `false` | Keep OpenCode's own system prompt ahead of the override instead of replacing it. |
|
|
116
|
+
| `planPreamble` | `false` | Have the model announce briefly what it is about to do before tool calls. |
|
|
117
|
+
| `maxInputTokens` | unset | Estimated-input-token budget — older history turns are pruned past it (system head and newest turns stay). Useful ceiling for long agent sessions. |
|
|
118
|
+
| `pruneKeepTurns` | `12` | Minimum history turns kept when pruning. |
|
|
119
|
+
|
|
120
|
+
The plugin forwards these options into the published provider settings, so
|
|
121
|
+
they can also be set — or overridden per-install — through a classic provider
|
|
122
|
+
stanza, which wins over the plugin options in opencode's settings merge:
|
|
123
|
+
|
|
124
|
+
```jsonc
|
|
125
|
+
{ "provider": { "devin": { "options": { "mode": "uncensored" } } } }
|
|
126
|
+
```
|
|
114
127
|
|
|
115
128
|
The engine is imported dynamically: in normal mode it is never loaded.
|
|
116
129
|
|
package/dist/index.js
CHANGED
|
@@ -18,9 +18,40 @@ import { openBrowser } from "devin-core";
|
|
|
18
18
|
import { loginAuto, loginManual } from "devin-core";
|
|
19
19
|
import { fetchModels } from "./catalog.js";
|
|
20
20
|
export { createDevinProvider } from "./provider.js";
|
|
21
|
+
/**
|
|
22
|
+
* Plugin options accepted under the object form of a `plugins` entry:
|
|
23
|
+
*
|
|
24
|
+
* ```jsonc
|
|
25
|
+
* { "plugins": [{ "package": "opencode-devin", "options": { "mode": "uncensored" } }] }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* They are forwarded verbatim into the published provider settings, where the
|
|
29
|
+
* provider package reads them (see `DevinProviderSettings`). A manual
|
|
30
|
+
* `provider.devin.options` entry in the user config still wins — opencode
|
|
31
|
+
* merges user settings over the published ones — but the plugin-options form
|
|
32
|
+
* is the documented path: it does not masquerade as a provider declaration.
|
|
33
|
+
*/
|
|
34
|
+
const PLUGIN_OPTION_KEYS = [
|
|
35
|
+
"mode",
|
|
36
|
+
"guardChars",
|
|
37
|
+
"guardFull",
|
|
38
|
+
"maxRetries",
|
|
39
|
+
"retryTemps",
|
|
40
|
+
"overrideFile",
|
|
41
|
+
"keepClientSystem",
|
|
42
|
+
"planPreamble",
|
|
43
|
+
"maxInputTokens",
|
|
44
|
+
"pruneKeepTurns",
|
|
45
|
+
];
|
|
21
46
|
export default Plugin.define({
|
|
22
47
|
id: PROVIDER_ID,
|
|
23
48
|
async setup(ctx) {
|
|
49
|
+
const pluginSettings = {};
|
|
50
|
+
for (const key of PLUGIN_OPTION_KEYS) {
|
|
51
|
+
const value = ctx.options?.[key];
|
|
52
|
+
if (value !== undefined)
|
|
53
|
+
pluginSettings[key] = value;
|
|
54
|
+
}
|
|
24
55
|
const publish = async () => {
|
|
25
56
|
const credentials = await resolveCredentials(ctx);
|
|
26
57
|
if (!credentials)
|
|
@@ -41,6 +72,7 @@ export default Plugin.define({
|
|
|
41
72
|
settings: {
|
|
42
73
|
apiKey: credentials.apiKey,
|
|
43
74
|
baseURL: credentials.apiServerUrl ?? DEFAULT_API_SERVER,
|
|
75
|
+
...pluginSettings,
|
|
44
76
|
},
|
|
45
77
|
},
|
|
46
78
|
models,
|
package/dist/protocol/model.d.ts
CHANGED
|
@@ -54,8 +54,12 @@ export interface DevinProviderOptions {
|
|
|
54
54
|
guardChars?: number;
|
|
55
55
|
guardFull?: boolean;
|
|
56
56
|
maxRetries?: number;
|
|
57
|
+
retryTemps?: string;
|
|
57
58
|
overrideFile?: string;
|
|
58
59
|
keepClientSystem?: boolean;
|
|
60
|
+
planPreamble?: boolean;
|
|
61
|
+
maxInputTokens?: number;
|
|
62
|
+
pruneKeepTurns?: number;
|
|
59
63
|
}
|
|
60
64
|
export interface DevinProvider {
|
|
61
65
|
languageModel(modelId: string): LanguageModelV3;
|
package/dist/protocol/model.js
CHANGED
|
@@ -532,8 +532,12 @@ async function* streamThroughPipeline(options, wire) {
|
|
|
532
532
|
guardChars: settings.guardChars,
|
|
533
533
|
guardFull: settings.guardFull,
|
|
534
534
|
maxRetries: settings.maxRetries,
|
|
535
|
+
retryTemps: settings.retryTemps,
|
|
535
536
|
overrideFile: settings.overrideFile,
|
|
536
537
|
keepClientSystem: settings.keepClientSystem,
|
|
538
|
+
planPreamble: settings.planPreamble,
|
|
539
|
+
maxInputTokens: settings.maxInputTokens,
|
|
540
|
+
pruneKeepTurns: settings.pruneKeepTurns,
|
|
537
541
|
}, options.apiKey, options.apiServerUrl ?? DEFAULT_API_SERVER);
|
|
538
542
|
yield* pipeline.stream({
|
|
539
543
|
modelUid: wire.modelUid,
|
|
@@ -718,8 +722,12 @@ export function createDevin(options) {
|
|
|
718
722
|
guardChars: options.guardChars,
|
|
719
723
|
guardFull: options.guardFull,
|
|
720
724
|
maxRetries: options.maxRetries,
|
|
725
|
+
retryTemps: options.retryTemps,
|
|
721
726
|
overrideFile: options.overrideFile,
|
|
722
727
|
keepClientSystem: options.keepClientSystem,
|
|
728
|
+
planPreamble: options.planPreamble,
|
|
729
|
+
maxInputTokens: options.maxInputTokens,
|
|
730
|
+
pruneKeepTurns: options.pruneKeepTurns,
|
|
723
731
|
},
|
|
724
732
|
});
|
|
725
733
|
},
|
package/dist/provider.d.ts
CHANGED
|
@@ -25,10 +25,18 @@ export interface DevinProviderSettings {
|
|
|
25
25
|
readonly guardFull?: boolean;
|
|
26
26
|
/** Resample attempts after the first one (devin-engine default: 3). */
|
|
27
27
|
readonly maxRetries?: number;
|
|
28
|
+
/** Retry temperatures after the first attempt, comma-separated (default "0.85,1.0,1.1"). */
|
|
29
|
+
readonly retryTemps?: string;
|
|
28
30
|
/** Override prompt file: a path, or "en" / "es" for the bundled variants. */
|
|
29
31
|
readonly overrideFile?: string;
|
|
30
32
|
/** Keep the client system prompt ahead of the override. */
|
|
31
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;
|
|
32
40
|
}
|
|
33
41
|
export declare function createDevinProvider(options: DevinProviderSettings): {
|
|
34
42
|
languageModel: (modelID: string) => import("@ai-sdk/provider").LanguageModelV3;
|
package/dist/provider.js
CHANGED
|
@@ -17,8 +17,12 @@ export function createDevinProvider(options) {
|
|
|
17
17
|
guardChars: options.guardChars,
|
|
18
18
|
guardFull: options.guardFull,
|
|
19
19
|
maxRetries: options.maxRetries,
|
|
20
|
+
retryTemps: options.retryTemps,
|
|
20
21
|
overrideFile: options.overrideFile,
|
|
21
22
|
keepClientSystem: options.keepClientSystem,
|
|
23
|
+
planPreamble: options.planPreamble,
|
|
24
|
+
maxInputTokens: options.maxInputTokens,
|
|
25
|
+
pruneKeepTurns: options.pruneKeepTurns,
|
|
22
26
|
});
|
|
23
27
|
return {
|
|
24
28
|
languageModel: (modelID) => provider.languageModel(modelID),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-devin",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8",
|
|
5
5
|
"description": "OpenCode v2 plugin: connect your Devin subscription to opencode with native /connect login and devin/* models",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@ai-sdk/provider": "3.0.8",
|
|
49
49
|
"@opencode/plugin": "2.4.1",
|
|
50
50
|
"devin-core": "^0.0.5",
|
|
51
|
-
"devin-engine": "^0.0.
|
|
51
|
+
"devin-engine": "^0.0.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/bun": "1.4.4",
|