@cortexkit/aft-opencode 0.19.5 → 0.20.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.
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsDjD,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA6JjE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAqCvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAmBrE"}
1
+ {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqEjD,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAuMjE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAqCvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAmBrE"}
@@ -20,13 +20,18 @@ export declare function createReadTool(ctx: PluginContext): ToolDefinition;
20
20
  * Returns hoisted tools keyed by opencode's built-in names.
21
21
  * Overrides: read, write, edit, apply_patch (always when hoisting is on).
22
22
  *
23
- * Bash hoisting is opt-in: `bash`, `bash_status`, and `bash_kill` are only
24
- * registered when at least one `experimental.bash.*` flag is enabled
25
- * (rewrite, compress, or background). When all flags are off, opencode's
26
- * native bash stays in place — users without bash experimentals get zero
27
- * AFT code in their bash path. `bash_status` and `bash_kill` register
28
- * specifically when `experimental.bash.background` is true, since those
29
- * tools only have meaning for background tasks.
23
+ * Bash hoisting is opt-in: `bash`, `bash_status`, and `bash_kill` are
24
+ * registered together when at least one `experimental.bash.*` flag is
25
+ * enabled (rewrite, compress, or background). When all flags are off,
26
+ * opencode's native bash stays in place — users without bash experimentals
27
+ * get zero AFT code in their bash path.
28
+ *
29
+ * `bash_status` and `bash_kill` ride alongside `bash` regardless of which
30
+ * experimental flag enabled it: foreground bash auto-promotes long-running
31
+ * tasks to background after a short wait-window (v0.20+), so the agent
32
+ * always needs a way to inspect or kill those promoted tasks. The
33
+ * `experimental.bash.background` flag only gates explicit
34
+ * `bash({ background: true })` spawning, not promotion.
30
35
  */
31
36
  export declare function hoistedTools(ctx: PluginContext): Record<string, ToolDefinition>;
32
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAkEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAgJjE;AAqgCD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0B/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAmEnF"}
1
+ {"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAmEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAkJjE;AAihCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAwB/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAyEnF"}
@@ -1,4 +1,25 @@
1
1
  import type { ToolContext } from "@opencode-ai/plugin";
2
+ import { Effect } from "effect";
3
+ /**
4
+ * Execute a `ctx.ask(...)` result.
5
+ *
6
+ * Why this exists: OpenCode's plugin contract returns `Effect.Effect<void>`
7
+ * from `ask()` (since v1.14). Plain `await effect` resolves silently to the
8
+ * Effect object without ever executing it — meaning the deny/ask evaluation
9
+ * never runs and the user's `bash: { "*": deny }` (and edit/external_directory)
10
+ * rules are silently ignored. The Effect must be run via `Effect.runPromise`.
11
+ *
12
+ * `effect` is marked external in our bun build and listed as a peerDependency,
13
+ * so this import resolves at runtime to the same `effect` runtime that
14
+ * `@opencode-ai/plugin` is using to construct the Effect. Bundling our own
15
+ * `effect` would create a runtime instance mismatch where
16
+ * `Effect.runPromise(...)` rejects with "Not a valid effect".
17
+ *
18
+ * On deny, `Effect.runPromise` rejects with the underlying defect
19
+ * (DeniedError / RejectedError) so callers can rely on `try/catch` to
20
+ * detect denial.
21
+ */
22
+ export declare function runAsk(maybe: Effect.Effect<void>): Promise<void>;
2
23
  export declare function resolveAbsolutePath(context: ToolContext, target: string): string;
3
24
  export declare function resolveRelativePattern(context: ToolContext, target: string): string;
4
25
  export declare function resolveRelativePatterns(context: ToolContext, targets: string[]): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/tools/permissions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhF;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAazF;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAE9D;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe7B;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOhE"}
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/tools/permissions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhF;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAazF;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAE9D;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAiB7B;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOhE"}
@@ -1,5 +1,17 @@
1
1
  import type { ToolDefinition } from "@opencode-ai/plugin";
2
2
  import type { PluginContext } from "../types.js";
3
+ /**
4
+ * Brace-aware comma split. Allows users to type either of:
5
+ *
6
+ * - "*.ts,*.tsx" (multiple OpenCode-style includes)
7
+ * - "**\/*.{vue,ts,tsx}" (a single glob with a brace alternation)
8
+ * - "*.ts,**\/*.{vue,tsx}" (mix of both)
9
+ *
10
+ * Without brace awareness the naive `String#split(",")` chops the brace
11
+ * group apart and the resulting `**\/*.{vue` glob fails parsing in
12
+ * ripgrep / globset with `unclosed alternate group; missing '}'`.
13
+ */
14
+ export declare function splitIncludeArg(raw: string): string[];
3
15
  /**
4
16
  * Tool definitions for indexed search-backed grep and glob.
5
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwDjD;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAsF9E"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwDjD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BrD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAmF9E"}
package/dist/tui.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // package.json
3
3
  var package_default = {
4
4
  name: "@cortexkit/aft-opencode",
5
- version: "0.19.5",
5
+ version: "0.20.0",
6
6
  type: "module",
7
7
  description: "OpenCode plugin for Agent File Tools (AFT) \u2014 tree-sitter and lsp powered code analysis",
8
8
  main: "dist/index.js",
@@ -20,7 +20,7 @@ var package_default = {
20
20
  "README.md"
21
21
  ],
22
22
  scripts: {
23
- build: "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin && bun build src/tui/index.tsx --outfile dist/tui.js --target bun --format esm --external @opencode-ai/plugin --external @opencode-ai/plugin/tui --external @opentui/solid --external solid-js && tsc --emitDeclarationOnly",
23
+ build: "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin --external effect && bun build src/tui/index.tsx --outfile dist/tui.js --target bun --format esm --external @opencode-ai/plugin --external @opencode-ai/plugin/tui --external @opentui/solid --external solid-js --external effect && tsc --emitDeclarationOnly",
24
24
  typecheck: "tsc --noEmit",
25
25
  pretest: "cd ../.. && cargo build",
26
26
  test: "bun test",
@@ -30,19 +30,19 @@ var package_default = {
30
30
  },
31
31
  dependencies: {
32
32
  "@clack/prompts": "^1.2.0",
33
- "@cortexkit/aft-bridge": "0.19.5",
34
- "@opencode-ai/plugin": "^1.2.26",
35
- "@opencode-ai/sdk": "^1.2.26",
33
+ "@cortexkit/aft-bridge": "0.20.0",
34
+ "@opencode-ai/plugin": "^1.14.39",
35
+ "@opencode-ai/sdk": "^1.14.39",
36
36
  "comment-json": "^4.6.2",
37
37
  undici: "^7.25.0",
38
38
  zod: "^4.1.8"
39
39
  },
40
40
  optionalDependencies: {
41
- "@cortexkit/aft-darwin-arm64": "0.19.5",
42
- "@cortexkit/aft-darwin-x64": "0.19.5",
43
- "@cortexkit/aft-linux-arm64": "0.19.5",
44
- "@cortexkit/aft-linux-x64": "0.19.5",
45
- "@cortexkit/aft-win32-x64": "0.19.5"
41
+ "@cortexkit/aft-darwin-arm64": "0.20.0",
42
+ "@cortexkit/aft-darwin-x64": "0.20.0",
43
+ "@cortexkit/aft-linux-arm64": "0.20.0",
44
+ "@cortexkit/aft-linux-x64": "0.20.0",
45
+ "@cortexkit/aft-win32-x64": "0.20.0"
46
46
  },
47
47
  devDependencies: {
48
48
  "@types/node": "^22.0.0",
@@ -63,7 +63,8 @@ var package_default = {
63
63
  "tui"
64
64
  ],
65
65
  peerDependencies: {
66
- "@opencode-ai/plugin": ">=1.2.0"
66
+ "@opencode-ai/plugin": ">=1.14.0",
67
+ effect: ">=4.0.0-beta.0"
67
68
  }
68
69
  };
69
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA2EzE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQjG"}
1
+ {"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAsEzE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQjG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-opencode",
3
- "version": "0.19.5",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "README.md"
19
19
  ],
20
20
  "scripts": {
21
- "build": "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin && bun build src/tui/index.tsx --outfile dist/tui.js --target bun --format esm --external @opencode-ai/plugin --external @opencode-ai/plugin/tui --external @opentui/solid --external solid-js && tsc --emitDeclarationOnly",
21
+ "build": "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin --external effect && bun build src/tui/index.tsx --outfile dist/tui.js --target bun --format esm --external @opencode-ai/plugin --external @opencode-ai/plugin/tui --external @opentui/solid --external solid-js --external effect && tsc --emitDeclarationOnly",
22
22
  "typecheck": "tsc --noEmit",
23
23
  "pretest": "cd ../.. && cargo build",
24
24
  "test": "bun test",
@@ -28,19 +28,19 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@clack/prompts": "^1.2.0",
31
- "@cortexkit/aft-bridge": "0.19.5",
32
- "@opencode-ai/plugin": "^1.2.26",
33
- "@opencode-ai/sdk": "^1.2.26",
31
+ "@cortexkit/aft-bridge": "0.20.0",
32
+ "@opencode-ai/plugin": "^1.14.39",
33
+ "@opencode-ai/sdk": "^1.14.39",
34
34
  "comment-json": "^4.6.2",
35
35
  "undici": "^7.25.0",
36
36
  "zod": "^4.1.8"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@cortexkit/aft-darwin-arm64": "0.19.5",
40
- "@cortexkit/aft-darwin-x64": "0.19.5",
41
- "@cortexkit/aft-linux-arm64": "0.19.5",
42
- "@cortexkit/aft-linux-x64": "0.19.5",
43
- "@cortexkit/aft-win32-x64": "0.19.5"
39
+ "@cortexkit/aft-darwin-arm64": "0.20.0",
40
+ "@cortexkit/aft-darwin-x64": "0.20.0",
41
+ "@cortexkit/aft-linux-arm64": "0.20.0",
42
+ "@cortexkit/aft-linux-x64": "0.20.0",
43
+ "@cortexkit/aft-win32-x64": "0.20.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^22.0.0",
@@ -61,6 +61,7 @@
61
61
  "tui"
62
62
  ],
63
63
  "peerDependencies": {
64
- "@opencode-ai/plugin": ">=1.2.0"
64
+ "@opencode-ai/plugin": ">=1.14.0",
65
+ "effect": ">=4.0.0-beta.0"
65
66
  }
66
67
  }