@thelogicatelier/sylva 1.0.11 → 1.0.13

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/constants.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
+ /**
3
+ * Shared programmatic constants and integration registries for Sylva.
4
+ */
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEPENDENCY_MANIFESTS = exports.IGNORED_DIRS = exports.ALLOWED_EXTENSIONS = exports.API_KEY_ENV_VARS = exports.DEFAULT_MINI_MODELS = exports.DEFAULT_MODELS = exports.MODEL_CATALOG = exports.PROVIDER_OPENAI = exports.PROVIDER_ANTHROPIC = exports.PROVIDER_GEMINI = void 0;
6
+ exports.RUST_FRAMEWORKS = exports.GO_FRAMEWORKS = exports.JAVA_FRAMEWORKS = exports.PYTHON_FRAMEWORKS = exports.NPM_FRAMEWORKS = exports.CONFIDENCE_SCORES = exports.MAX_MANIFEST_FILE_SIZE = exports.MANIFEST_EXTENSION_PATTERNS = exports.MANIFEST_EXACT_NAMES = exports.ALWAYS_IGNORE_FILES = exports.SCAN_IGNORE_DIRS = exports.SOURCE_EXTENSIONS = exports.INTEGRATIONS = exports.DEPENDENCY_MANIFESTS = exports.IGNORED_DIRS = exports.ALLOWED_EXTENSIONS = exports.API_KEY_ENV_VARS = exports.DEFAULT_MINI_MODELS = exports.DEFAULT_MODELS = exports.MODEL_CATALOG = exports.PROVIDER_OPENAI = exports.PROVIDER_ANTHROPIC = exports.PROVIDER_GEMINI = void 0;
4
7
  exports.PROVIDER_GEMINI = "gemini";
5
8
  exports.PROVIDER_ANTHROPIC = "anthropic";
6
9
  exports.PROVIDER_OPENAI = "openai";
@@ -131,3 +134,327 @@ exports.DEPENDENCY_MANIFESTS = new Set([
131
134
  "Cargo.lock",
132
135
  "go.mod",
133
136
  ]);
137
+ exports.INTEGRATIONS = [
138
+ // E-commerce & Headless
139
+ {
140
+ id: "wix",
141
+ name: "Wix Headless",
142
+ urlPatterns: ["wixapis.com", "wixstatic.com"],
143
+ envPatterns: ["WIX_API_KEY", "WIX_SITE_ID", "WIX_CLIENT_ID"],
144
+ },
145
+ {
146
+ id: "stripe",
147
+ name: "Stripe",
148
+ importPatterns: ["stripe", "@stripe/stripe-js"],
149
+ urlPatterns: ["api.stripe.com"],
150
+ envPatterns: ["STRIPE_SECRET_KEY", "STRIPE_PUBLISHABLE_KEY"],
151
+ },
152
+ // Cloud Providers
153
+ {
154
+ id: "aws",
155
+ name: "AWS",
156
+ importPatterns: ["boto3", "aws-sdk", "@aws-sdk"],
157
+ envPatterns: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION", "AWS_DEFAULT_REGION"],
158
+ },
159
+ {
160
+ id: "azure",
161
+ name: "Microsoft Azure",
162
+ importPatterns: ["azure", "@azure"],
163
+ urlPatterns: ["windows.net", "azure.com"],
164
+ envPatterns: ["AZURE_CLIENT_ID", "AZURE_TENANT_ID"],
165
+ },
166
+ {
167
+ id: "gcp",
168
+ name: "Google Cloud",
169
+ importPatterns: ["google-cloud", "@google-cloud"],
170
+ urlPatterns: ["googleapis.com"],
171
+ envPatterns: ["GOOGLE_APPLICATION_CREDENTIALS"],
172
+ },
173
+ // Hosting & Edge
174
+ {
175
+ id: "vercel",
176
+ name: "Vercel",
177
+ importPatterns: ["@vercel"],
178
+ envPatterns: ["VERCEL_URL", "VERCEL_PROJECT_ID"],
179
+ },
180
+ {
181
+ id: "netlify",
182
+ name: "Netlify",
183
+ importPatterns: ["@netlify"],
184
+ envPatterns: ["NETLIFY", "URL"],
185
+ },
186
+ {
187
+ id: "cloudflare",
188
+ name: "Cloudflare",
189
+ importPatterns: ["cloudflare", "@cloudflare"],
190
+ envPatterns: ["CLOUDFLARE_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID"],
191
+ },
192
+ // Firebase
193
+ {
194
+ id: "firebase",
195
+ name: "Firebase",
196
+ importPatterns: ["firebase", "firebase-admin"],
197
+ urlPatterns: ["firebaseio.com", "firebasestorage.googleapis.com"],
198
+ envPatterns: ["FIREBASE_API_KEY", "FIREBASE_PROJECT_ID"],
199
+ },
200
+ // Social & Graph
201
+ {
202
+ id: "instagram-api",
203
+ name: "Instagram Graph API",
204
+ urlPatterns: ["graph.instagram.com", "graph.facebook.com"],
205
+ envPatterns: ["INSTAGRAM_ACCESS_TOKEN", "INSTAGRAM_ACCOUNT_ID"],
206
+ },
207
+ // AI & LLMs
208
+ {
209
+ id: "openai",
210
+ name: "OpenAI",
211
+ importPatterns: ["openai"],
212
+ urlPatterns: ["api.openai.com"],
213
+ envPatterns: ["OPENAI_API_KEY"],
214
+ },
215
+ {
216
+ id: "anthropic",
217
+ name: "Anthropic",
218
+ importPatterns: ["@anthropic-ai", "anthropic"],
219
+ urlPatterns: ["api.anthropic.com"],
220
+ envPatterns: ["ANTHROPIC_API_KEY"],
221
+ },
222
+ // Comms
223
+ {
224
+ id: "twilio",
225
+ name: "Twilio",
226
+ importPatterns: ["twilio"],
227
+ urlPatterns: ["api.twilio.com"],
228
+ envPatterns: ["TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"],
229
+ },
230
+ {
231
+ id: "sendgrid",
232
+ name: "SendGrid",
233
+ importPatterns: ["sendgrid", "@sendgrid"],
234
+ envPatterns: ["SENDGRID_API_KEY"],
235
+ },
236
+ // Databases & BaaS
237
+ {
238
+ id: "mongodb",
239
+ name: "MongoDB",
240
+ importPatterns: ["mongoose", "pymongo", "mongodb"],
241
+ urlPatterns: ["mongodb.net", "mongodb+srv"],
242
+ envPatterns: ["MONGO_URI", "MONGODB_URI"],
243
+ },
244
+ {
245
+ id: "redis",
246
+ name: "Redis",
247
+ importPatterns: ["redis", "ioredis"],
248
+ urlPatterns: ["redis://", "rediss://"],
249
+ envPatterns: ["REDIS_URL"],
250
+ },
251
+ {
252
+ id: "supabase",
253
+ name: "Supabase",
254
+ importPatterns: ["supabase", "@supabase/supabase-js"],
255
+ urlPatterns: ["supabase.co"],
256
+ envPatterns: ["SUPABASE_URL", "SUPABASE_ANON_KEY"],
257
+ },
258
+ ];
259
+ // Reusable array of generic source file extensions to scan
260
+ exports.SOURCE_EXTENSIONS = [
261
+ ".py",
262
+ ".ts",
263
+ ".js",
264
+ ".go",
265
+ ".rs",
266
+ ".java",
267
+ ".rb",
268
+ ".php",
269
+ ".tsx",
270
+ ".jsx",
271
+ ".cs",
272
+ ".cpp",
273
+ ".c",
274
+ ".swift",
275
+ ".kt",
276
+ ];
277
+ // Shared directories to skip matching globally (used by manifest and source scanners)
278
+ exports.SCAN_IGNORE_DIRS = [
279
+ ".git",
280
+ "node_modules",
281
+ "__pycache__",
282
+ "venv",
283
+ ".venv",
284
+ "env",
285
+ ".env",
286
+ "dist",
287
+ "build",
288
+ "target",
289
+ "vendor",
290
+ "bin",
291
+ "obj",
292
+ "out",
293
+ ".output",
294
+ "coverage",
295
+ "logs",
296
+ "tmp",
297
+ "temp",
298
+ ".idea",
299
+ ".vscode",
300
+ ".next",
301
+ ".nuxt",
302
+ ".svelte-kit",
303
+ ".angular",
304
+ ".DS_Store",
305
+ "public",
306
+ ];
307
+ // NEVER extract .env files
308
+ exports.ALWAYS_IGNORE_FILES = [
309
+ ".env",
310
+ ".env.local",
311
+ ".env.development",
312
+ ".env.production",
313
+ ".env.test",
314
+ ];
315
+ // Exact filenames to match as manifests
316
+ exports.MANIFEST_EXACT_NAMES = [
317
+ "package.json",
318
+ "package-lock.json",
319
+ "yarn.lock",
320
+ "pnpm-lock.yaml",
321
+ "openclaw.json",
322
+ ".openclaw.json",
323
+ "angular.json",
324
+ "workspace.json",
325
+ "project.json",
326
+ "pyproject.toml",
327
+ "requirements.txt",
328
+ "poetry.lock",
329
+ "Pipfile",
330
+ "Pipfile.lock",
331
+ "setup.cfg",
332
+ "setup.py",
333
+ "pom.xml",
334
+ "build.gradle",
335
+ "build.gradle.kts",
336
+ "settings.gradle",
337
+ "settings.gradle.kts",
338
+ "gradle.properties",
339
+ "go.mod",
340
+ "go.sum",
341
+ "Cargo.toml",
342
+ "Cargo.lock",
343
+ "global.json",
344
+ "packages.lock.json",
345
+ "Dockerfile",
346
+ "docker-compose.yml",
347
+ "docker-compose.yaml",
348
+ "Makefile",
349
+ ".gitlab-ci.yml",
350
+ ];
351
+ // File extension patterns for manifests (e.g. *.csproj)
352
+ exports.MANIFEST_EXTENSION_PATTERNS = [".csproj", ".fsproj", ".vbproj"];
353
+ // Maximum file size in characters to read for manifests
354
+ exports.MAX_MANIFEST_FILE_SIZE = 500_000;
355
+ /** Confidence scoring rules mapped by framework ID */
356
+ exports.CONFIDENCE_SCORES = {
357
+ orchestrator: 95,
358
+ angular: 85,
359
+ react: 80,
360
+ nextjs: 85,
361
+ vue: 80,
362
+ nuxt: 85,
363
+ svelte: 80,
364
+ sveltekit: 85,
365
+ express: 75,
366
+ nestjs: 85,
367
+ fastify: 75,
368
+ django: 85,
369
+ flask: 75,
370
+ fastapi: 80,
371
+ "spring-boot": 90,
372
+ spring: 80,
373
+ "java-maven": 70,
374
+ "java-gradle": 70,
375
+ dotnet: 80,
376
+ "aspnet-core": 85,
377
+ go: 80,
378
+ rust: 80,
379
+ "actix-web": 85,
380
+ axum: 85,
381
+ nodejs: 60,
382
+ python: 60,
383
+ typescript: 65,
384
+ docker: 50,
385
+ };
386
+ exports.NPM_FRAMEWORKS = [
387
+ { depPattern: "@angular/core", frameworkId: "angular", frameworkName: "Angular" },
388
+ { depPattern: "react", frameworkId: "react", frameworkName: "React" },
389
+ { depPattern: "react-dom", frameworkId: "react-dom", frameworkName: "React DOM" },
390
+ { depPattern: "next", frameworkId: "nextjs", frameworkName: "Next.js" },
391
+ { depPattern: "vue", frameworkId: "vue", frameworkName: "Vue.js" },
392
+ { depPattern: "nuxt", frameworkId: "nuxt", frameworkName: "Nuxt" },
393
+ { depPattern: "@sveltejs/kit", frameworkId: "sveltekit", frameworkName: "SvelteKit" },
394
+ { depPattern: "svelte", frameworkId: "svelte", frameworkName: "Svelte" },
395
+ { depPattern: "express", frameworkId: "express", frameworkName: "Express" },
396
+ { depPattern: "@nestjs/core", frameworkId: "nestjs", frameworkName: "NestJS" },
397
+ { depPattern: "fastify", frameworkId: "fastify", frameworkName: "Fastify" },
398
+ { depPattern: "koa", frameworkId: "koa", frameworkName: "Koa" },
399
+ { depPattern: "typescript", frameworkId: "typescript", frameworkName: "TypeScript" },
400
+ { depPattern: "@ax-llm/ax", frameworkId: "ax-llm", frameworkName: "Ax-LLM" },
401
+ { depPattern: "electron", frameworkId: "electron", frameworkName: "Electron" },
402
+ { depPattern: "react-native", frameworkId: "react-native", frameworkName: "React Native" },
403
+ { depPattern: "tailwindcss", frameworkId: "tailwindcss", frameworkName: "Tailwind CSS" },
404
+ { depPattern: "vite", frameworkId: "vite", frameworkName: "Vite" },
405
+ { depPattern: "webpack", frameworkId: "webpack", frameworkName: "Webpack" },
406
+ { depPattern: "esbuild", frameworkId: "esbuild", frameworkName: "esbuild" },
407
+ ];
408
+ exports.PYTHON_FRAMEWORKS = [
409
+ { pkg: "django", frameworkId: "django", frameworkName: "Django" },
410
+ { pkg: "flask", frameworkId: "flask", frameworkName: "Flask" },
411
+ { pkg: "fastapi", frameworkId: "fastapi", frameworkName: "FastAPI" },
412
+ { pkg: "uvicorn", frameworkId: "uvicorn", frameworkName: "Uvicorn" },
413
+ { pkg: "starlette", frameworkId: "starlette", frameworkName: "Starlette" },
414
+ { pkg: "celery", frameworkId: "celery", frameworkName: "Celery" },
415
+ { pkg: "sqlalchemy", frameworkId: "sqlalchemy", frameworkName: "SQLAlchemy" },
416
+ { pkg: "pandas", frameworkId: "pandas", frameworkName: "Pandas" },
417
+ { pkg: "numpy", frameworkId: "numpy", frameworkName: "NumPy" },
418
+ { pkg: "tensorflow", frameworkId: "tensorflow", frameworkName: "TensorFlow" },
419
+ { pkg: "torch", frameworkId: "pytorch", frameworkName: "PyTorch" },
420
+ { pkg: "scikit-learn", frameworkId: "scikit-learn", frameworkName: "scikit-learn" },
421
+ { pkg: "pytest", frameworkId: "pytest", frameworkName: "pytest" },
422
+ { pkg: "gunicorn", frameworkId: "gunicorn", frameworkName: "Gunicorn" },
423
+ ];
424
+ exports.JAVA_FRAMEWORKS = [
425
+ {
426
+ groupArtifact: "org.springframework.boot",
427
+ frameworkId: "spring-boot",
428
+ frameworkName: "Spring Boot",
429
+ },
430
+ {
431
+ groupArtifact: "org.springframework",
432
+ frameworkId: "spring",
433
+ frameworkName: "Spring Framework",
434
+ },
435
+ { groupArtifact: "io.quarkus", frameworkId: "quarkus", frameworkName: "Quarkus" },
436
+ { groupArtifact: "io.micronaut", frameworkId: "micronaut", frameworkName: "Micronaut" },
437
+ { groupArtifact: "org.hibernate", frameworkId: "hibernate", frameworkName: "Hibernate" },
438
+ { groupArtifact: "junit", frameworkId: "junit", frameworkName: "JUnit" },
439
+ { groupArtifact: "org.junit", frameworkId: "junit5", frameworkName: "JUnit 5" },
440
+ { groupArtifact: "org.apache.kafka", frameworkId: "kafka", frameworkName: "Apache Kafka" },
441
+ ];
442
+ exports.GO_FRAMEWORKS = [
443
+ { module: "github.com/gin-gonic/gin", frameworkId: "gin", frameworkName: "Gin" },
444
+ { module: "github.com/labstack/echo", frameworkId: "echo", frameworkName: "Echo" },
445
+ { module: "github.com/gofiber/fiber", frameworkId: "fiber", frameworkName: "Fiber" },
446
+ { module: "github.com/gorilla/mux", frameworkId: "gorilla-mux", frameworkName: "Gorilla Mux" },
447
+ { module: "gorm.io/gorm", frameworkId: "gorm", frameworkName: "GORM" },
448
+ { module: "github.com/stretchr/testify", frameworkId: "testify", frameworkName: "Testify" },
449
+ { module: "google.golang.org/grpc", frameworkId: "grpc-go", frameworkName: "gRPC-Go" },
450
+ ];
451
+ exports.RUST_FRAMEWORKS = [
452
+ { crate: "actix-web", frameworkId: "actix-web", frameworkName: "Actix Web" },
453
+ { crate: "rocket", frameworkId: "rocket", frameworkName: "Rocket" },
454
+ { crate: "axum", frameworkId: "axum", frameworkName: "Axum" },
455
+ { crate: "tokio", frameworkId: "tokio", frameworkName: "Tokio" },
456
+ { crate: "serde", frameworkId: "serde", frameworkName: "Serde" },
457
+ { crate: "diesel", frameworkId: "diesel", frameworkName: "Diesel" },
458
+ { crate: "sqlx", frameworkId: "sqlx", frameworkName: "SQLx" },
459
+ { crate: "warp", frameworkId: "warp", frameworkName: "Warp" },
460
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thelogicatelier/sylva",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Auto-generate AGENTS.md for your repository using Ax-LLM. Analyze the structural backbone, data flow, and day-to-day coding conventions natively.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -50,6 +50,7 @@
50
50
  "@ax-llm/ax": "^19.0.2",
51
51
  "commander": "^14.0.3",
52
52
  "dotenv": "^17.3.1",
53
+ "ignore": "^7.0.5",
53
54
  "ts-node": "^10.9.2",
54
55
  "typescript": "^5.9.3",
55
56
  "vitest": "^4.0.18"
@@ -63,4 +64,4 @@
63
64
  "prettier": "^3.8.1",
64
65
  "typescript-eslint": "^8.56.1"
65
66
  }
66
- }
67
+ }