@octocodeai/octocode-engine 16.5.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 (95) hide show
  1. package/README.md +558 -0
  2. package/dist/lsp/client.d.ts +28 -0
  3. package/dist/lsp/client.js +98 -0
  4. package/dist/lsp/config.d.ts +3 -0
  5. package/dist/lsp/config.js +7 -0
  6. package/dist/lsp/evidence.d.ts +4 -0
  7. package/dist/lsp/evidence.js +28 -0
  8. package/dist/lsp/index.d.ts +7 -0
  9. package/dist/lsp/index.js +6 -0
  10. package/dist/lsp/initConstants.d.ts +4 -0
  11. package/dist/lsp/initConstants.js +27 -0
  12. package/dist/lsp/lspClientPool.d.ts +27 -0
  13. package/dist/lsp/lspClientPool.js +87 -0
  14. package/dist/lsp/lspErrorCodes.d.ts +12 -0
  15. package/dist/lsp/lspErrorCodes.js +12 -0
  16. package/dist/lsp/manager.d.ts +23 -0
  17. package/dist/lsp/manager.js +94 -0
  18. package/dist/lsp/native.d.ts +35 -0
  19. package/dist/lsp/native.js +3 -0
  20. package/dist/lsp/resolver.d.ts +26 -0
  21. package/dist/lsp/resolver.js +73 -0
  22. package/dist/lsp/schemas.d.ts +9 -0
  23. package/dist/lsp/schemas.js +30 -0
  24. package/dist/lsp/types.d.ts +85 -0
  25. package/dist/lsp/types.js +1 -0
  26. package/dist/lsp/uri.d.ts +15 -0
  27. package/dist/lsp/uri.js +24 -0
  28. package/dist/lsp/validation.d.ts +6 -0
  29. package/dist/lsp/validation.js +23 -0
  30. package/dist/lsp/workspaceRoot.d.ts +2 -0
  31. package/dist/lsp/workspaceRoot.js +7 -0
  32. package/dist/security/commandUtils.d.ts +1 -0
  33. package/dist/security/commandUtils.js +7 -0
  34. package/dist/security/commandValidator.d.ts +7 -0
  35. package/dist/security/commandValidator.js +472 -0
  36. package/dist/security/contentSanitizer.d.ts +2 -0
  37. package/dist/security/contentSanitizer.js +181 -0
  38. package/dist/security/filePatterns.d.ts +1 -0
  39. package/dist/security/filePatterns.js +209 -0
  40. package/dist/security/ignoredPathFilter.d.ts +3 -0
  41. package/dist/security/ignoredPathFilter.js +72 -0
  42. package/dist/security/index.d.ts +16 -0
  43. package/dist/security/index.js +13 -0
  44. package/dist/security/mask.d.ts +1 -0
  45. package/dist/security/mask.js +49 -0
  46. package/dist/security/maskUtils.d.ts +1 -0
  47. package/dist/security/maskUtils.js +7 -0
  48. package/dist/security/native.d.ts +9 -0
  49. package/dist/security/native.js +161 -0
  50. package/dist/security/paramExtractors.d.ts +7 -0
  51. package/dist/security/paramExtractors.js +75 -0
  52. package/dist/security/pathPatterns.d.ts +1 -0
  53. package/dist/security/pathPatterns.js +26 -0
  54. package/dist/security/pathUtils.d.ts +1 -0
  55. package/dist/security/pathUtils.js +37 -0
  56. package/dist/security/pathValidator.d.ts +22 -0
  57. package/dist/security/pathValidator.js +229 -0
  58. package/dist/security/regexes/ai-providers.d.ts +2 -0
  59. package/dist/security/regexes/ai-providers.js +177 -0
  60. package/dist/security/regexes/analytics.d.ts +2 -0
  61. package/dist/security/regexes/analytics.js +50 -0
  62. package/dist/security/regexes/auth-crypto.d.ts +6 -0
  63. package/dist/security/regexes/auth-crypto.js +255 -0
  64. package/dist/security/regexes/aws.d.ts +2 -0
  65. package/dist/security/regexes/aws.js +68 -0
  66. package/dist/security/regexes/cloudProviders.d.ts +2 -0
  67. package/dist/security/regexes/cloudProviders.js +328 -0
  68. package/dist/security/regexes/communications.d.ts +4 -0
  69. package/dist/security/regexes/communications.js +260 -0
  70. package/dist/security/regexes/databases.d.ts +2 -0
  71. package/dist/security/regexes/databases.js +135 -0
  72. package/dist/security/regexes/devTools.d.ts +2 -0
  73. package/dist/security/regexes/devTools.js +236 -0
  74. package/dist/security/regexes/index.d.ts +3 -0
  75. package/dist/security/regexes/index.js +31 -0
  76. package/dist/security/regexes/monitoring.d.ts +2 -0
  77. package/dist/security/regexes/monitoring.js +92 -0
  78. package/dist/security/regexes/payments-commerce.d.ts +3 -0
  79. package/dist/security/regexes/payments-commerce.js +197 -0
  80. package/dist/security/regexes/types.d.ts +2 -0
  81. package/dist/security/regexes/types.js +1 -0
  82. package/dist/security/regexes/vcs.d.ts +2 -0
  83. package/dist/security/regexes/vcs.js +105 -0
  84. package/dist/security/registry.d.ts +48 -0
  85. package/dist/security/registry.js +156 -0
  86. package/dist/security/securityConstants.d.ts +3 -0
  87. package/dist/security/securityConstants.js +12 -0
  88. package/dist/security/types.d.ts +35 -0
  89. package/dist/security/types.js +1 -0
  90. package/dist/security/withSecurityValidation.d.ts +21 -0
  91. package/dist/security/withSecurityValidation.js +107 -0
  92. package/index.cjs +97 -0
  93. package/index.d.ts +934 -0
  94. package/index.js +652 -0
  95. package/package.json +311 -0
package/package.json ADDED
@@ -0,0 +1,311 @@
1
+ {
2
+ "name": "@octocodeai/octocode-engine",
3
+ "version": "16.5.0",
4
+ "description": "Rust native Octocode engine for context compression, structural search, and LSP semantic navigation",
5
+ "type": "module",
6
+ "main": "index.cjs",
7
+ "types": "index.d.ts",
8
+ "license": "MIT",
9
+ "author": "Guy Bary <bgauryy@octocodeai.com>",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/bgauryy/octocode-mcp.git",
13
+ "directory": "packages/octocode-engine"
14
+ },
15
+ "exports": {
16
+ ".": {
17
+ "types": "./index.d.ts",
18
+ "import": "./index.js",
19
+ "require": "./index.cjs",
20
+ "default": "./index.js"
21
+ },
22
+ "./security": {
23
+ "types": "./dist/security/index.d.ts",
24
+ "import": "./dist/security/index.js",
25
+ "default": "./dist/security/index.js"
26
+ },
27
+ "./contentSanitizer": {
28
+ "types": "./dist/security/contentSanitizer.d.ts",
29
+ "import": "./dist/security/contentSanitizer.js",
30
+ "default": "./dist/security/contentSanitizer.js"
31
+ },
32
+ "./mask": {
33
+ "types": "./dist/security/mask.d.ts",
34
+ "import": "./dist/security/mask.js",
35
+ "default": "./dist/security/mask.js"
36
+ },
37
+ "./pathValidator": {
38
+ "types": "./dist/security/pathValidator.d.ts",
39
+ "import": "./dist/security/pathValidator.js",
40
+ "default": "./dist/security/pathValidator.js"
41
+ },
42
+ "./commandValidator": {
43
+ "types": "./dist/security/commandValidator.d.ts",
44
+ "import": "./dist/security/commandValidator.js",
45
+ "default": "./dist/security/commandValidator.js"
46
+ },
47
+ "./withSecurityValidation": {
48
+ "types": "./dist/security/withSecurityValidation.d.ts",
49
+ "import": "./dist/security/withSecurityValidation.js",
50
+ "default": "./dist/security/withSecurityValidation.js"
51
+ },
52
+ "./registry": {
53
+ "types": "./dist/security/registry.d.ts",
54
+ "import": "./dist/security/registry.js",
55
+ "default": "./dist/security/registry.js"
56
+ },
57
+ "./pathUtils": {
58
+ "types": "./dist/security/pathUtils.d.ts",
59
+ "import": "./dist/security/pathUtils.js",
60
+ "default": "./dist/security/pathUtils.js"
61
+ },
62
+ "./paramExtractors": {
63
+ "types": "./dist/security/paramExtractors.d.ts",
64
+ "import": "./dist/security/paramExtractors.js",
65
+ "default": "./dist/security/paramExtractors.js"
66
+ },
67
+ "./ignoredPathFilter": {
68
+ "types": "./dist/security/ignoredPathFilter.d.ts",
69
+ "import": "./dist/security/ignoredPathFilter.js",
70
+ "default": "./dist/security/ignoredPathFilter.js"
71
+ },
72
+ "./regexes": {
73
+ "types": "./dist/security/regexes/index.d.ts",
74
+ "import": "./dist/security/regexes/index.js",
75
+ "default": "./dist/security/regexes/index.js"
76
+ },
77
+ "./lsp/client": {
78
+ "types": "./dist/lsp/client.d.ts",
79
+ "import": "./dist/lsp/client.js",
80
+ "default": "./dist/lsp/client.js"
81
+ },
82
+ "./lsp/config": {
83
+ "types": "./dist/lsp/config.d.ts",
84
+ "import": "./dist/lsp/config.js",
85
+ "default": "./dist/lsp/config.js"
86
+ },
87
+ "./lsp/evidence": {
88
+ "types": "./dist/lsp/evidence.d.ts",
89
+ "import": "./dist/lsp/evidence.js",
90
+ "default": "./dist/lsp/evidence.js"
91
+ },
92
+ "./lsp/initConstants": {
93
+ "types": "./dist/lsp/initConstants.d.ts",
94
+ "import": "./dist/lsp/initConstants.js",
95
+ "default": "./dist/lsp/initConstants.js"
96
+ },
97
+ "./lsp/lspClientPool": {
98
+ "types": "./dist/lsp/lspClientPool.d.ts",
99
+ "import": "./dist/lsp/lspClientPool.js",
100
+ "default": "./dist/lsp/lspClientPool.js"
101
+ },
102
+ "./lsp/lspErrorCodes": {
103
+ "types": "./dist/lsp/lspErrorCodes.d.ts",
104
+ "import": "./dist/lsp/lspErrorCodes.js",
105
+ "default": "./dist/lsp/lspErrorCodes.js"
106
+ },
107
+ "./lsp/manager": {
108
+ "types": "./dist/lsp/manager.d.ts",
109
+ "import": "./dist/lsp/manager.js",
110
+ "default": "./dist/lsp/manager.js"
111
+ },
112
+ "./lsp/resolver": {
113
+ "types": "./dist/lsp/resolver.d.ts",
114
+ "import": "./dist/lsp/resolver.js",
115
+ "default": "./dist/lsp/resolver.js"
116
+ },
117
+ "./lsp/schemas": {
118
+ "types": "./dist/lsp/schemas.d.ts",
119
+ "import": "./dist/lsp/schemas.js",
120
+ "default": "./dist/lsp/schemas.js"
121
+ },
122
+ "./lsp/types": {
123
+ "types": "./dist/lsp/types.d.ts",
124
+ "import": "./dist/lsp/types.js",
125
+ "default": "./dist/lsp/types.js"
126
+ },
127
+ "./lsp/uri": {
128
+ "types": "./dist/lsp/uri.d.ts",
129
+ "import": "./dist/lsp/uri.js",
130
+ "default": "./dist/lsp/uri.js"
131
+ },
132
+ "./lsp/validation": {
133
+ "types": "./dist/lsp/validation.d.ts",
134
+ "import": "./dist/lsp/validation.js",
135
+ "default": "./dist/lsp/validation.js"
136
+ },
137
+ "./lsp/workspaceRoot": {
138
+ "types": "./dist/lsp/workspaceRoot.d.ts",
139
+ "import": "./dist/lsp/workspaceRoot.js",
140
+ "default": "./dist/lsp/workspaceRoot.js"
141
+ }
142
+ },
143
+ "typesVersions": {
144
+ "*": {
145
+ "security": [
146
+ "./dist/security/index.d.ts"
147
+ ],
148
+ "contentSanitizer": [
149
+ "./dist/security/contentSanitizer.d.ts"
150
+ ],
151
+ "mask": [
152
+ "./dist/security/mask.d.ts"
153
+ ],
154
+ "pathValidator": [
155
+ "./dist/security/pathValidator.d.ts"
156
+ ],
157
+ "commandValidator": [
158
+ "./dist/security/commandValidator.d.ts"
159
+ ],
160
+ "withSecurityValidation": [
161
+ "./dist/security/withSecurityValidation.d.ts"
162
+ ],
163
+ "registry": [
164
+ "./dist/security/registry.d.ts"
165
+ ],
166
+ "pathUtils": [
167
+ "./dist/security/pathUtils.d.ts"
168
+ ],
169
+ "paramExtractors": [
170
+ "./dist/security/paramExtractors.d.ts"
171
+ ],
172
+ "ignoredPathFilter": [
173
+ "./dist/security/ignoredPathFilter.d.ts"
174
+ ],
175
+ "regexes": [
176
+ "./dist/security/regexes/index.d.ts"
177
+ ],
178
+ "lsp/client": [
179
+ "./dist/lsp/client.d.ts"
180
+ ],
181
+ "lsp/config": [
182
+ "./dist/lsp/config.d.ts"
183
+ ],
184
+ "lsp/evidence": [
185
+ "./dist/lsp/evidence.d.ts"
186
+ ],
187
+ "lsp/initConstants": [
188
+ "./dist/lsp/initConstants.d.ts"
189
+ ],
190
+ "lsp/lspClientPool": [
191
+ "./dist/lsp/lspClientPool.d.ts"
192
+ ],
193
+ "lsp/lspErrorCodes": [
194
+ "./dist/lsp/lspErrorCodes.d.ts"
195
+ ],
196
+ "lsp/manager": [
197
+ "./dist/lsp/manager.d.ts"
198
+ ],
199
+ "lsp/resolver": [
200
+ "./dist/lsp/resolver.d.ts"
201
+ ],
202
+ "lsp/schemas": [
203
+ "./dist/lsp/schemas.d.ts"
204
+ ],
205
+ "lsp/types": [
206
+ "./dist/lsp/types.d.ts"
207
+ ],
208
+ "lsp/uri": [
209
+ "./dist/lsp/uri.d.ts"
210
+ ],
211
+ "lsp/validation": [
212
+ "./dist/lsp/validation.d.ts"
213
+ ],
214
+ "lsp/workspaceRoot": [
215
+ "./dist/lsp/workspaceRoot.d.ts"
216
+ ],
217
+ "*": [
218
+ "./index.d.ts"
219
+ ]
220
+ }
221
+ },
222
+ "files": [
223
+ "dist",
224
+ "index.cjs",
225
+ "index.js",
226
+ "index.d.ts",
227
+ "README.md"
228
+ ],
229
+ "optionalDependencies": {
230
+ "@octocodeai/octocode-engine-darwin-arm64": "16.5.0",
231
+ "@octocodeai/octocode-engine-darwin-x64": "16.5.0",
232
+ "@octocodeai/octocode-engine-linux-arm64-gnu": "16.5.0",
233
+ "@octocodeai/octocode-engine-linux-x64-gnu": "16.5.0",
234
+ "@octocodeai/octocode-engine-linux-x64-musl": "16.5.0",
235
+ "@octocodeai/octocode-engine-win32-x64-msvc": "16.5.0"
236
+ },
237
+ "engines": {
238
+ "node": ">=20.0.0"
239
+ },
240
+ "napi": {
241
+ "binaryName": "octocode-engine",
242
+ "targets": [
243
+ "aarch64-apple-darwin",
244
+ "x86_64-apple-darwin",
245
+ "x86_64-unknown-linux-gnu",
246
+ "x86_64-unknown-linux-musl",
247
+ "aarch64-unknown-linux-gnu",
248
+ "x86_64-pc-windows-msvc"
249
+ ]
250
+ },
251
+ "scripts": {
252
+ "build": "yarn readme:sync && node scripts/prebuild.cjs && napi build --platform --release && node scripts/postbuild.cjs && tsc -p tsconfig.build.json",
253
+ "build:darwin-arm64": "node scripts/prebuild.cjs && napi build --platform --release --target aarch64-apple-darwin && node scripts/postbuild.cjs",
254
+ "build:darwin-x64": "node scripts/prebuild.cjs && napi build --platform --release --target x86_64-apple-darwin && node scripts/postbuild.cjs",
255
+ "build:linux-x64-gnu": "node scripts/prebuild.cjs && napi build --platform --release --cross-compile --target x86_64-unknown-linux-gnu && node scripts/postbuild.cjs",
256
+ "build:linux-x64-musl": "node scripts/prebuild.cjs && napi build --platform --release --cross-compile --target x86_64-unknown-linux-musl && node scripts/postbuild.cjs",
257
+ "build:linux-arm64-gnu": "node scripts/prebuild.cjs && napi build --platform --release --cross-compile --target aarch64-unknown-linux-gnu && node scripts/postbuild.cjs",
258
+ "build:windows-x64": "node scripts/prebuild.cjs && napi build --platform --release --cross-compile --target x86_64-pc-windows-msvc && node scripts/postbuild.cjs",
259
+ "build:all": "yarn build:darwin-arm64 && yarn build:darwin-x64 && yarn build:linux-x64-gnu && yarn build:linux-x64-musl && yarn build:linux-arm64-gnu && yarn build:windows-x64 && yarn build:ts",
260
+ "build:dev": "yarn readme:sync && node scripts/prebuild.cjs && napi build --platform && node scripts/postbuild.cjs && tsc -p tsconfig.build.json",
261
+ "build:ts": "yarn readme:sync && rm -rf dist && tsc -p tsconfig.build.json",
262
+ "clean": "rm -rf dist/ && rm -f *.node",
263
+ "gen": "node scripts/gen-patterns.mjs",
264
+ "verify:patterns": "node scripts/gen-patterns.mjs && git diff --exit-code src/security/patterns.rs || (echo 'ERROR: src/security/patterns.rs is out of sync with the TS source — run yarn gen and commit the result' && exit 1)",
265
+ "pack:check": "node scripts/check-pack-size.cjs",
266
+ "platforms:check": "node scripts/check-platform-binaries.cjs",
267
+ "version:check": "node scripts/check-version-consistency.cjs",
268
+ "binary-size:check": "node scripts/check-binary-size.cjs",
269
+ "ast:check": "yarn workspace @octocodeai/octocode-benchmark ast:check",
270
+ "lsp:check": "yarn workspace @octocodeai/octocode-benchmark lsp:check",
271
+ "lsp:live": "yarn workspace @octocodeai/octocode-benchmark lsp:live",
272
+ "minify:check": "yarn workspace @octocodeai/octocode-benchmark minify:check",
273
+ "matrix:check": "yarn workspace @octocodeai/octocode-benchmark matrix:check",
274
+ "support:gen": "yarn workspace @octocodeai/octocode-benchmark support:gen",
275
+ "benchmark": "yarn workspace @octocodeai/octocode-benchmark benchmark",
276
+ "test": "vitest run --coverage",
277
+ "check:rust": "cargo check --all-targets --all-features",
278
+ "fmt:rust": "cargo fmt --all",
279
+ "fmt:rust:check": "cargo fmt --all -- --check",
280
+ "test:rust": "cargo test --all-targets --all-features",
281
+ "test:node": "vitest run",
282
+ "test:node:coverage": "vitest run --coverage",
283
+ "test:watch": "vitest watch",
284
+ "test:quiet": "vitest run",
285
+ "lint": "echo 'No TS source files to lint'",
286
+ "lint:rust": "cargo clippy --all-targets --all-features -- -D warnings",
287
+ "typecheck": "tsc --noEmit",
288
+ "deps:rust": "cargo tree --duplicates",
289
+ "deps:dedupe": "node ../../scripts/dedupe-deps.mjs",
290
+ "deps:dedupe:fix": "node ../../scripts/dedupe-deps.mjs --fix",
291
+ "audit:rust": "cargo audit -D unmaintained -D unsound -D yanked",
292
+ "audit": "yarn audit:rust",
293
+ "verify:rust": "yarn check:rust && yarn fmt:rust:check && yarn lint:rust && yarn test:rust && yarn deps:rust && yarn audit:rust",
294
+ "verify": "yarn verify:patterns && yarn typecheck && yarn verify:rust && yarn test && yarn benchmark && yarn pack:check && yarn version:check && yarn binary-size:check",
295
+ "readme:sync": "node ../../scripts/sync-package-readmes.mjs .",
296
+ "prepack": "yarn readme:sync"
297
+ },
298
+ "dependencies": {
299
+ "typescript": "^5.9.3",
300
+ "typescript-language-server": "^4.4.0",
301
+ "zod": "^4.4.3"
302
+ },
303
+ "devDependencies": {
304
+ "@napi-rs/cli": "^3.7.2",
305
+ "@types/node": "^25.9.3",
306
+ "@vitest/coverage-v8": "^4.1.9",
307
+ "esbuild": "^0.28.1",
308
+ "typescript": "^5.9.3",
309
+ "vitest": "^4.1.9"
310
+ }
311
+ }