@comate/zulu 1.1.0 → 1.2.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.
Files changed (88) hide show
  1. package/README.md +8 -0
  2. package/comate-engine/assets/skills/auto-commit/SKILL.md +386 -0
  3. package/comate-engine/assets/skills/auto-commit/references/issue_type_mapping.json +19 -0
  4. package/comate-engine/assets/skills/auto-commit/references/new_version_instruction.md +196 -0
  5. package/comate-engine/assets/skills/auto-commit/references/old_version_instruction.md +189 -0
  6. package/comate-engine/assets/skills/auto-commit/references/query_reference.md +176 -0
  7. package/comate-engine/assets/skills/auto-commit/scripts/compat.py +86 -0
  8. package/comate-engine/assets/skills/auto-commit/scripts/create_card_cli.py +67 -0
  9. package/comate-engine/assets/skills/auto-commit/scripts/git_diff_cli.py +195 -0
  10. package/comate-engine/assets/skills/auto-commit/scripts/git_utils.py +225 -0
  11. package/comate-engine/assets/skills/auto-commit/scripts/icafe/__init__.py +66 -0
  12. package/comate-engine/assets/skills/auto-commit/scripts/icafe/client.py +444 -0
  13. package/comate-engine/assets/skills/auto-commit/scripts/icafe/farseer.py +53 -0
  14. package/comate-engine/assets/skills/auto-commit/scripts/icafe/matching.py +778 -0
  15. package/comate-engine/assets/skills/auto-commit/scripts/logger.py +32 -0
  16. package/comate-engine/assets/skills/auto-commit/scripts/recognize_card_cli.py +63 -0
  17. package/comate-engine/assets/skills/automation-browser-comate/SKILL.md +193 -90
  18. package/comate-engine/assets/skills/figma2code-comate/SKILL.md +2 -2
  19. package/comate-engine/assets/skills/figma2code-comate/references/codeConnect.md +7 -10
  20. package/comate-engine/assets/skills/smart-commit/SKILL.md +646 -0
  21. package/comate-engine/assets/skills/smart-commit/references/issue_type_mapping.json +19 -0
  22. package/comate-engine/assets/skills/smart-commit/references/query_reference.md +176 -0
  23. package/comate-engine/assets/skills/smart-commit/scripts/compat.py +86 -0
  24. package/comate-engine/assets/skills/smart-commit/scripts/create_card_cli.py +67 -0
  25. package/comate-engine/assets/skills/smart-commit/scripts/git_utils.py +220 -0
  26. package/comate-engine/assets/skills/smart-commit/scripts/icafe/__init__.py +66 -0
  27. package/comate-engine/assets/skills/smart-commit/scripts/icafe/client.py +444 -0
  28. package/comate-engine/assets/skills/smart-commit/scripts/icafe/farseer.py +53 -0
  29. package/comate-engine/assets/skills/smart-commit/scripts/icafe/matching.py +728 -0
  30. package/comate-engine/assets/skills/smart-commit/scripts/logger.py +32 -0
  31. package/comate-engine/assets/skills/smart-commit/scripts/recognize_card_cli.py +63 -0
  32. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +7 -7
  33. package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -1
  34. package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +1 -1
  35. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +8 -8
  36. package/comate-engine/node_modules/@comate/preview-proxy/package.json +2 -2
  37. package/comate-engine/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  38. package/comate-engine/package.json +2 -2
  39. package/comate-engine/server.js +61 -44
  40. package/dist/bundle/index.js +8 -8
  41. package/package.json +1 -1
  42. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +0 -188
  43. package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +0 -14
  44. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +0 -4817
  45. package/comate-engine/node_modules/better-sqlite3/README.md +0 -99
  46. package/comate-engine/node_modules/bindings/LICENSE.md +0 -22
  47. package/comate-engine/node_modules/bindings/README.md +0 -98
  48. package/comate-engine/node_modules/compare-versions/README.md +0 -133
  49. package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +0 -19
  50. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +0 -8
  51. package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +0 -5
  52. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +0 -14
  53. package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +0 -7
  54. package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +0 -28
  55. package/comate-engine/node_modules/file-uri-to-path/History.md +0 -21
  56. package/comate-engine/node_modules/file-uri-to-path/README.md +0 -74
  57. package/comate-engine/node_modules/file-uri-to-path/index.d.ts +0 -2
  58. package/comate-engine/node_modules/pkce-challenge/README.md +0 -55
  59. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +0 -19
  60. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +0 -19
  61. package/comate-engine/node_modules/sqlite-vec/README.md +0 -1
  62. package/comate-engine/node_modules/sqlite-vec/index.d.ts +0 -17
  63. package/comate-engine/node_modules/sqlite-vec-darwin-arm64/README.md +0 -1
  64. package/comate-engine/node_modules/sqlite-vec-darwin-x64/README.md +0 -1
  65. package/comate-engine/node_modules/sqlite-vec-linux-arm64/README.md +0 -1
  66. package/comate-engine/node_modules/sqlite-vec-linux-x64/README.md +0 -1
  67. package/comate-engine/node_modules/sqlite-vec-windows-x64/README.md +0 -1
  68. package/comate-engine/node_modules/tree-sitter-bash/README.md +0 -44
  69. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/binding_test.js +0 -9
  70. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/index.d.ts +0 -28
  71. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/index.js +0 -11
  72. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/darwin-arm64/tree-sitter-bash.node +0 -0
  73. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/darwin-x64/tree-sitter-bash.node +0 -0
  74. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node +0 -0
  75. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/linux-x64/tree-sitter-bash.node +0 -0
  76. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/win32-arm64/tree-sitter-bash.node +0 -0
  77. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/win32-x64/tree-sitter-bash.node +0 -0
  78. package/comate-engine/node_modules/tree-sitter-bash/src/grammar.json +0 -7145
  79. package/comate-engine/node_modules/tree-sitter-bash/src/node-types.json +0 -2894
  80. package/comate-engine/node_modules/web-streams-polyfill/README.md +0 -119
  81. package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +0 -28
  82. package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +0 -809
  83. package/comate-engine/node_modules/web-tree-sitter/README.md +0 -269
  84. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.cjs +0 -4558
  85. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.js +0 -4516
  86. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
  87. package/comate-engine/node_modules/web-tree-sitter/web-tree-sitter.d.ts +0 -1030
  88. package/comate-engine/node_modules/win-ca/README.md +0 -648
@@ -1,269 +0,0 @@
1
- # Web Tree-sitter
2
-
3
- [![npmjs.com badge]][npmjs.com]
4
-
5
- [npmjs.com]: https://www.npmjs.org/package/web-tree-sitter
6
- [npmjs.com badge]: https://img.shields.io/npm/v/web-tree-sitter.svg?color=%23BF4A4A
7
-
8
- WebAssembly bindings to the [Tree-sitter](https://github.com/tree-sitter/tree-sitter) parsing library.
9
-
10
- ## Setup
11
-
12
- You can download the `tree-sitter.js` and `tree-sitter.wasm` files from [the latest GitHub release][gh release] and load
13
- them using a standalone script:
14
-
15
- ```html
16
- <script src="/the/path/to/tree-sitter.js"></script>
17
-
18
- <script>
19
- const { Parser } = window.TreeSitter;
20
- Parser.init().then(() => { /* the library is ready */ });
21
- </script>
22
- ```
23
-
24
- You can also install [the `web-tree-sitter` module][npm module] from NPM and load it using a system like Webpack:
25
-
26
- ```js
27
- const { Parser } = require('web-tree-sitter');
28
- Parser.init().then(() => { /* the library is ready */ });
29
- ```
30
-
31
- or Vite:
32
-
33
- ```js
34
- import { Parser } from 'web-tree-sitter';
35
- Parser.init().then(() => { /* the library is ready */ });
36
- ```
37
-
38
- With Vite, you also need to make sure your server provides the `tree-sitter.wasm`
39
- file to your `public` directory. You can do this automatically with a `postinstall`
40
- [script](https://docs.npmjs.com/cli/v10/using-npm/scripts) in your `package.json`:
41
-
42
- ```js
43
- "postinstall": "cp node_modules/web-tree-sitter/tree-sitter.wasm public"
44
- ```
45
-
46
- You can also use this module with [deno](https://deno.land/):
47
-
48
- ```js
49
- import Parser from "npm:web-tree-sitter";
50
- await Parser.init();
51
- // the library is ready
52
- ```
53
-
54
- To use the debug version of the library, replace your import of `web-tree-sitter` with `web-tree-sitter/debug`:
55
-
56
- ```js
57
- import { Parser } from 'web-tree-sitter/debug'; // or require('web-tree-sitter/debug')
58
-
59
- Parser.init().then(() => { /* the library is ready */ });
60
- ```
61
-
62
- This will load the debug version of the `.js` and `.wasm` file, which includes debug symbols and assertions.
63
-
64
- > [!NOTE]
65
- > The `tree-sitter.js` file on GH releases is an ES6 module. If you are interested in using a pure CommonJS library, such
66
- > as for Electron, you should note that on our NPM package, we use [conditional exports][cond export] to provide both the
67
- > ES6 and CommonJS modules. If you've set up your project correctly, and need to use CommonJS, your package manager will
68
- > automatically handle this for you. As of writing, we do not host a CommonJS version of the library on GH releases, and
69
- > if you do not use the NPM registry, you'll have to build the library yourself.
70
-
71
- ### Basic Usage
72
-
73
- First, create a parser:
74
-
75
- ```js
76
- const parser = new Parser();
77
- ```
78
-
79
- Then assign a language to the parser. Tree-sitter languages are packaged as individual `.wasm` files (more on this below):
80
-
81
- ```js
82
- const { Language } = require('web-tree-sitter');
83
- const JavaScript = await Language.load('/path/to/tree-sitter-javascript.wasm');
84
- parser.setLanguage(JavaScript);
85
- ```
86
-
87
- Now you can parse source code:
88
-
89
- ```js
90
- const sourceCode = 'let x = 1; console.log(x);';
91
- const tree = parser.parse(sourceCode);
92
- ```
93
-
94
- and inspect the syntax tree.
95
-
96
- ```javascript
97
- console.log(tree.rootNode.toString());
98
-
99
- // (program
100
- // (lexical_declaration
101
- // (variable_declarator (identifier) (number)))
102
- // (expression_statement
103
- // (call_expression
104
- // (member_expression (identifier) (property_identifier))
105
- // (arguments (identifier)))))
106
-
107
- const callExpression = tree.rootNode.child(1).firstChild;
108
- console.log(callExpression);
109
-
110
- // { type: 'call_expression',
111
- // startPosition: {row: 0, column: 16},
112
- // endPosition: {row: 0, column: 30},
113
- // startIndex: 0,
114
- // endIndex: 30 }
115
- ```
116
-
117
- ### Editing
118
-
119
- If your source code *changes*, you can update the syntax tree. This will take less time than the first parse.
120
-
121
- ```javascript
122
- // Replace 'let' with 'const'
123
- const newSourceCode = 'const x = 1; console.log(x);';
124
-
125
- tree.edit({
126
- startIndex: 0,
127
- oldEndIndex: 3,
128
- newEndIndex: 5,
129
- startPosition: {row: 0, column: 0},
130
- oldEndPosition: {row: 0, column: 3},
131
- newEndPosition: {row: 0, column: 5},
132
- });
133
-
134
- const newTree = parser.parse(newSourceCode, tree);
135
- ```
136
-
137
- ### Parsing Text From a Custom Data Structure
138
-
139
- If your text is stored in a data structure other than a single string, you can parse it by supplying a callback to `parse`
140
- instead of a string:
141
-
142
- ```javascript
143
- const sourceLines = [
144
- 'let x = 1;',
145
- 'console.log(x);'
146
- ];
147
-
148
- const tree = parser.parse((index, position) => {
149
- let line = sourceLines[position.row];
150
- if (line) return line.slice(position.column);
151
- });
152
- ```
153
-
154
- ### Getting the `.wasm` language files
155
-
156
- There are several options on how to get the `.wasm` files for the languages you want to parse.
157
-
158
- #### From npmjs.com
159
-
160
- The recommended way is to just install the package from npm. For example, to parse JavaScript, you can install the `tree-sitter-javascript`
161
- package:
162
-
163
- ```sh
164
- npm install tree-sitter-javascript
165
- ```
166
-
167
- Then you can find the `.wasm` file in the `node_modules/tree-sitter-javascript` directory.
168
-
169
- #### From GitHub
170
-
171
- You can also download the `.wasm` files from GitHub releases, so long as the repository uses our reusable workflow to publish
172
- them.
173
- For example, you can download the JavaScript `.wasm` file from the tree-sitter-javascript [releases page][gh release js].
174
-
175
- #### Generating `.wasm` files
176
-
177
- You can also generate the `.wasm` file for your desired grammar. Shown below is an example of how to generate the `.wasm`
178
- file for the JavaScript grammar.
179
-
180
- **IMPORTANT**: [Emscripten][emscripten], [Docker][docker], or [Podman][podman] need to be installed.
181
-
182
- First install `tree-sitter-cli`, and the tree-sitter language for which to generate `.wasm`
183
- (`tree-sitter-javascript` in this example):
184
-
185
- ```sh
186
- npm install --save-dev tree-sitter-cli tree-sitter-javascript
187
- ```
188
-
189
- Then just use tree-sitter cli tool to generate the `.wasm`.
190
-
191
- ```sh
192
- npx tree-sitter build --wasm node_modules/tree-sitter-javascript
193
- ```
194
-
195
- If everything is fine, file `tree-sitter-javascript.wasm` should be generated in current directory.
196
-
197
- ### Running .wasm in Node.js
198
-
199
- Notice that executing `.wasm` files in Node.js is considerably slower than running [Node.js bindings][node bindings].
200
- However, this could be useful for testing purposes:
201
-
202
- ```javascript
203
- const Parser = require('web-tree-sitter');
204
-
205
- (async () => {
206
- await Parser.init();
207
- const parser = new Parser();
208
- const Lang = await Parser.Language.load('tree-sitter-javascript.wasm');
209
- parser.setLanguage(Lang);
210
- const tree = parser.parse('let x = 1;');
211
- console.log(tree.rootNode.toString());
212
- })();
213
- ```
214
-
215
- ### Running .wasm in browser
216
-
217
- `web-tree-sitter` can run in the browser, but there are some common pitfalls.
218
-
219
- #### Loading the .wasm file
220
-
221
- `web-tree-sitter` needs to load the `tree-sitter.wasm` file. By default, it assumes that this file is available in the
222
- same path as the JavaScript code. Therefore, if the code is being served from `http://localhost:3000/bundle.js`, then
223
- the wasm file should be at `http://localhost:3000/tree-sitter.wasm`.
224
-
225
- For server side frameworks like NextJS, this can be tricky as pages are often served from a path such as
226
- `http://localhost:3000/_next/static/chunks/pages/index.js`. The loader will therefore look for the wasm file at
227
- `http://localhost:3000/_next/static/chunks/pages/tree-sitter.wasm`. The solution is to pass a `locateFile` function in
228
- the `moduleOptions` argument to `Parser.init()`:
229
-
230
- ```javascript
231
- await Parser.init({
232
- locateFile(scriptName: string, scriptDirectory: string) {
233
- return scriptName;
234
- },
235
- });
236
- ```
237
-
238
- `locateFile` takes in two parameters, `scriptName`, i.e. the wasm file name, and `scriptDirectory`, i.e. the directory
239
- where the loader expects the script to be. It returns the path where the loader will look for the wasm file. In the NextJS
240
- case, we want to return just the `scriptName` so that the loader will look at `http://localhost:3000/tree-sitter.wasm`
241
- and not `http://localhost:3000/_next/static/chunks/pages/tree-sitter.wasm`.
242
-
243
- For more information on the module options you can pass in, see the [emscripten documentation][emscripten-module-options].
244
-
245
- #### "Can't resolve 'fs' in 'node_modules/web-tree-sitter"
246
-
247
- Most bundlers will notice that the `tree-sitter.js` file is attempting to import `fs`, i.e. node's file system library.
248
- Since this doesn't exist in the browser, the bundlers will get confused. For Webpack, you can fix this by adding the
249
- following to your webpack config:
250
-
251
- ```javascript
252
- {
253
- resolve: {
254
- fallback: {
255
- fs: false
256
- }
257
- }
258
- }
259
- ```
260
-
261
- [cond export]: https://nodejs.org/api/packages.html#conditional-exports
262
- [docker]: https://www.docker.com
263
- [emscripten]: https://emscripten.org
264
- [emscripten-module-options]: https://emscripten.org/docs/api_reference/module.html#affecting-execution
265
- [gh release]: https://github.com/tree-sitter/tree-sitter/releases/latest
266
- [gh release js]: https://github.com/tree-sitter/tree-sitter-javascript/releases/latest
267
- [node bindings]: https://github.com/tree-sitter/node-tree-sitter
268
- [npm module]: https://www.npmjs.com/package/web-tree-sitter
269
- [podman]: https://podman.io