opencode-ascii 0.1.5 → 0.1.7

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
@@ -19,7 +19,11 @@ export type AsciiPluginOptions = SubstitutionConfig;
19
19
  *
20
20
  * Covered hooks:
21
21
  * - `experimental.text.complete` : rewrites completed AI text parts
22
- * - `tool.execute.before` : rewrites `write`, `edit`, `multiedit`, and `apply_patch` tool arguments
22
+ * - `tool.execute.before` : rewrites `write`, `edit`, and `apply_patch` tool arguments
23
23
  */
24
24
  export declare const AsciiPlugin: Plugin;
25
- export default AsciiPlugin;
25
+ declare const _default: {
26
+ id: string;
27
+ server: Plugin;
28
+ };
29
+ export default _default;
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ function resolveConfig(options) {
19
19
  *
20
20
  * Covered hooks:
21
21
  * - `experimental.text.complete` : rewrites completed AI text parts
22
- * - `tool.execute.before` : rewrites `write`, `edit`, `multiedit`, and `apply_patch` tool arguments
22
+ * - `tool.execute.before` : rewrites `write`, `edit`, and `apply_patch` tool arguments
23
23
  */
24
24
  export const AsciiPlugin = async (_ctx, options) => {
25
25
  const config = resolveConfig(options);
@@ -55,7 +55,6 @@ export const AsciiPlugin = async (_ctx, options) => {
55
55
  * Tools handled:
56
56
  * - `write` : `args.content`
57
57
  * - `edit` : `args.newString` (NOT `oldString` -- it must match existing file content)
58
- * - `multiedit` : each `args.edits[].newString`
59
58
  * - `apply_patch` : `args.patchText` (unified diff content)
60
59
  */
61
60
  "tool.execute.before": async (input, output) => {
@@ -72,16 +71,6 @@ export const AsciiPlugin = async (_ctx, options) => {
72
71
  }
73
72
  break;
74
73
  }
75
- case "multiedit": {
76
- if (Array.isArray(output.args?.edits)) {
77
- for (const edit of output.args.edits) {
78
- if (typeof edit?.newString === "string") {
79
- edit.newString = substitute(edit.newString);
80
- }
81
- }
82
- }
83
- break;
84
- }
85
74
  case "apply_patch": {
86
75
  if (typeof output.args?.patchText === "string") {
87
76
  output.args.patchText = substitute(output.args.patchText);
@@ -92,4 +81,7 @@ export const AsciiPlugin = async (_ctx, options) => {
92
81
  },
93
82
  };
94
83
  };
95
- export default AsciiPlugin;
84
+ export default {
85
+ id: "opencode-ascii",
86
+ server: AsciiPlugin,
87
+ };
@@ -25,7 +25,8 @@ export const PUNCTUATION = [
25
25
  ["\u2039", "'"], // single left-pointing angle quotation mark (‹)
26
26
  ["\u203A", "'"], // single right-pointing angle quotation mark (›)
27
27
  // Miscellaneous punctuation
28
- ["\u2022", "-"], // bullet ()
28
+ ["\u2500", "-"], // box drawings light horizontal ()
29
+ ["\u2022", "-"], // bullet (-)
29
30
  ["\u2023", ">"], // triangular bullet (‣)
30
31
  ["\u2043", "-"], // hyphen bullet (⁃)
31
32
  ["\u00B7", "."], // middle dot (·)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ascii",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "OpenCode plugin that substitutes unicode characters with ASCII equivalents in AI responses and file edits",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,7 +10,8 @@
10
10
  ".": {
11
11
  "import": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts"
13
- }
13
+ },
14
+ "./server": "./dist/index.js"
14
15
  },
15
16
  "files": [
16
17
  "dist"