@paperclipai/adapter-opencode-local 2026.511.0-canary.8 → 2026.511.0-canary.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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { AdapterModelProfileDefinition } from "@paperclipai/adapter-utils";
2
2
  export declare const type = "opencode_local";
3
3
  export declare const label = "OpenCode (local)";
4
- export declare const SANDBOX_INSTALL_COMMAND = "curl -fsSL https://opencode.ai/install | bash";
4
+ export declare const SANDBOX_INSTALL_COMMAND: string;
5
5
  export declare const DEFAULT_OPENCODE_LOCAL_MODEL = "openai/gpt-5.2-codex";
6
6
  export declare function isValidOpenCodeModelId(value: unknown): value is string;
7
7
  export declare const models: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAEhF,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,eAAO,MAAM,KAAK,qBAAqB,CAAC;AAwBxC,eAAO,MAAM,uBAAuB,kDAAkD,CAAC;AAEvF,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAKtE;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,6BAA6B,EAWxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,2yEAyCjC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAEhF,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,eAAO,MAAM,KAAK,qBAAqB,CAAC;AA8BxC,eAAO,MAAM,uBAAuB,QAW9B,CAAC;AAEP,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAKtE;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,6BAA6B,EAWxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,2yEAyCjC,CAAC"}
package/dist/index.js CHANGED
@@ -5,9 +5,15 @@ export const label = "OpenCode (local)";
5
5
  // (linux-x64, linux-x64-musl, linux-x64-baseline, linux-x64-baseline-musl) in
6
6
  // parallel even though only one matches the sandbox; on bandwidth-constrained
7
7
  // sandboxes (e.g. Cloudflare) that exceeded the 240s install budget. The
8
- // official installer fetches a single arch-specific binary and adds
9
- // `$HOME/.opencode/bin` to PATH via `~/.bashrc`, which sandbox `sh -lc`
10
- // invocations source.
8
+ // official installer fetches a single arch-specific binary into
9
+ // `$HOME/.opencode/bin` and tries to add it to PATH via `~/.bashrc`. That
10
+ // rc-file path is only sourced by interactive/login shells, so non-login
11
+ // `sh -c` probe invocations (used by the runtime PATH check) cannot find the
12
+ // binary. We fix that by symlinking the installed binary into a directory on
13
+ // the non-login `sh -c` PATH: prefer `/usr/local/bin` (universally on the
14
+ // default PATH on Linux distros) when root or passwordless sudo is available,
15
+ // otherwise fall back to `$HOME/.local/bin` (which is on the default PATH on
16
+ // the exe.dev sandbox image and most modern home-managed Linux images).
11
17
  //
12
18
  // Security tradeoff: this is `curl | bash` without a SHA-256 verification of
13
19
  // the install script. We accept this because:
@@ -22,7 +28,17 @@ export const label = "OpenCode (local)";
22
28
  // shell) and `curl -fsSL` give us fail-fast behavior on HTTP errors. If
23
29
  // OpenCode starts publishing a stable checksum/signature, switch to fetching
24
30
  // a versioned tarball + verifying the digest before exec.
25
- export const SANDBOX_INSTALL_COMMAND = "curl -fsSL https://opencode.ai/install | bash";
31
+ export const SANDBOX_INSTALL_COMMAND = 'curl -fsSL https://opencode.ai/install | bash && ' +
32
+ 'if [ -x "$HOME/.opencode/bin/opencode" ]; then ' +
33
+ 'if [ "$(id -u)" -eq 0 ]; then ' +
34
+ 'ln -sf "$HOME/.opencode/bin/opencode" /usr/local/bin/opencode; ' +
35
+ 'elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then ' +
36
+ 'sudo ln -sf "$HOME/.opencode/bin/opencode" /usr/local/bin/opencode; ' +
37
+ 'else ' +
38
+ 'mkdir -p "$HOME/.local/bin" && ' +
39
+ 'ln -sf "$HOME/.opencode/bin/opencode" "$HOME/.local/bin/opencode"; ' +
40
+ 'fi; ' +
41
+ 'fi';
26
42
  export const DEFAULT_OPENCODE_LOCAL_MODEL = "openai/gpt-5.2-codex";
27
43
  export function isValidOpenCodeModelId(value) {
28
44
  if (typeof value !== "string")
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAExC,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,8EAA8E;AAC9E,yEAAyE;AACzE,oEAAoE;AACpE,wEAAwE;AACxE,sBAAsB;AACtB,EAAE;AACF,6EAA6E;AAC7E,8CAA8C;AAC9C,6EAA6E;AAC7E,sDAAsD;AACtD,sEAAsE;AACtE,0EAA0E;AAC1E,2EAA2E;AAC3E,wEAAwE;AACxE,gDAAgD;AAChD,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,uB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EAAE,gBAAgB,EAAE;IACjD,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACjD,EAAE,EAAE,EAAE,0BAA0B,EAAE,KAAK,EAAE,0BAA0B,EAAE;IACrE,EAAE,EAAE,EAAE,2BAA2B,EAAE,KAAK,EAAE,2BAA2B,EAAE;CACxE,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAoC;IAC5D;QACE,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,2DAA2D;QACxE,aAAa,EAAE;YACb,KAAK,EAAE,2BAA2B;YAClC,OAAO,EAAE,KAAK;SACf;QACD,MAAM,EAAE,iBAAiB;KAC1B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperclipai/adapter-opencode-local",
3
- "version": "2026.511.0-canary.8",
3
+ "version": "2026.511.0-canary.9",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/paperclipai/paperclip",
6
6
  "bugs": {
@@ -38,7 +38,7 @@
38
38
  "skills"
39
39
  ],
40
40
  "dependencies": {
41
- "@paperclipai/adapter-utils": "2026.511.0-canary.8",
41
+ "@paperclipai/adapter-utils": "2026.511.0-canary.9",
42
42
  "picocolors": "^1.1.1"
43
43
  },
44
44
  "devDependencies": {