opencode-devin 0.2.7 → 0.2.9

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 CHANGED
@@ -110,8 +110,12 @@ All settings are optional:
110
110
  | `guardChars` | `700` | Head-window size the refusal guard scans before releasing text. |
111
111
  | `guardFull` | `false` | Buffer and scan the whole reply instead — catches comply-then-pivot refusals at the cost of streaming. |
112
112
  | `maxRetries` | `3` | Resample attempts after the first one. |
113
- | `overrideFile` | bundled EN | Override prompt: a filesystem path, or `"en"` / `"es"` for the bundled variants. `~/.devin-proxy/override-compact.txt` is picked up too, same as the standalone proxy. |
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. |
114
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. |
115
119
 
116
120
  The plugin forwards these options into the published provider settings, so
117
121
  they can also be set — or overridden per-install — through a classic provider
package/dist/index.js CHANGED
@@ -31,7 +31,18 @@ export { createDevinProvider } from "./provider.js";
31
31
  * merges user settings over the published ones — but the plugin-options form
32
32
  * is the documented path: it does not masquerade as a provider declaration.
33
33
  */
34
- const PLUGIN_OPTION_KEYS = ["mode", "guardChars", "guardFull", "maxRetries", "overrideFile", "keepClientSystem"];
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
+ ];
35
46
  export default Plugin.define({
36
47
  id: PROVIDER_ID,
37
48
  async setup(ctx) {
@@ -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;
@@ -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
  },
@@ -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,58 +1,58 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/package.json",
3
- "name": "opencode-devin",
4
- "version": "0.2.7",
5
- "description": "OpenCode v2 plugin: connect your Devin subscription to opencode with native /connect login and devin/* models",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "default": "./dist/index.js"
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "opencode-devin",
4
+ "version": "0.2.9",
5
+ "description": "OpenCode v2 plugin: connect your Devin subscription to opencode with native /connect login and devin/* models",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./provider": {
14
+ "types": "./dist/provider.d.ts",
15
+ "default": "./dist/provider.js"
16
+ }
12
17
  },
13
- "./provider": {
14
- "types": "./dist/provider.d.ts",
15
- "default": "./dist/provider.js"
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "build": "node scripts/build.mjs",
23
+ "build:clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc",
24
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
25
+ "test": "bun test",
26
+ "prepublishOnly": "npm run build:clean"
27
+ },
28
+ "keywords": [
29
+ "opencode",
30
+ "opencode-plugin",
31
+ "opencode-v2",
32
+ "devin",
33
+ "cognition",
34
+ "windsurf"
35
+ ],
36
+ "license": "MIT",
37
+ "author": {
38
+ "name": "JoShMiQueL",
39
+ "email": "joshmiquel.cs@gmail.com"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/JoShMiQueL/opencode-devin.git"
44
+ },
45
+ "homepage": "https://github.com/JoShMiQueL/opencode-devin#readme",
46
+ "bugs": "https://github.com/JoShMiQueL/opencode-devin/issues",
47
+ "dependencies": {
48
+ "@ai-sdk/provider": "3.0.8",
49
+ "@opencode/plugin": "2.4.1",
50
+ "devin-core": "^0.0.7",
51
+ "devin-engine": "^0.0.9"
52
+ },
53
+ "devDependencies": {
54
+ "@types/bun": "1.4.4",
55
+ "protobufjs": "8.8.1",
56
+ "typescript": "7.0.2"
16
57
  }
17
- },
18
- "files": [
19
- "dist"
20
- ],
21
- "scripts": {
22
- "build": "node scripts/build.mjs",
23
- "build:clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsc",
24
- "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
25
- "test": "bun test",
26
- "prepublishOnly": "npm run build:clean"
27
- },
28
- "keywords": [
29
- "opencode",
30
- "opencode-plugin",
31
- "opencode-v2",
32
- "devin",
33
- "cognition",
34
- "windsurf"
35
- ],
36
- "license": "MIT",
37
- "author": {
38
- "name": "JoShMiQueL",
39
- "email": "joshmiquel.cs@gmail.com"
40
- },
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/JoShMiQueL/opencode-devin.git"
44
- },
45
- "homepage": "https://github.com/JoShMiQueL/opencode-devin#readme",
46
- "bugs": "https://github.com/JoShMiQueL/opencode-devin/issues",
47
- "dependencies": {
48
- "@ai-sdk/provider": "3.0.8",
49
- "@opencode/plugin": "2.4.1",
50
- "devin-core": "^0.0.5",
51
- "devin-engine": "^0.0.5"
52
- },
53
- "devDependencies": {
54
- "@types/bun": "1.4.4",
55
- "protobufjs": "8.8.1",
56
- "typescript": "7.0.2"
57
- }
58
58
  }