@vibgrate/cli 2026.801.1 → 2026.803.1
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/agent-HNV2VUCO.js +24 -0
- package/dist/{agent-4DAECASW.js.map → agent-HNV2VUCO.js.map} +1 -1
- package/dist/baseline-6WTULHM5.js +9 -0
- package/dist/{baseline-4BDH4F2W.js.map → baseline-6WTULHM5.js.map} +1 -1
- package/dist/{chunk-BNEHDLVZ.js → chunk-2TLQDF6C.js} +129 -20
- package/dist/chunk-2TLQDF6C.js.map +1 -0
- package/dist/{chunk-JLWI2JGA.js → chunk-4HFSUIIN.js} +117 -6
- package/dist/chunk-4HFSUIIN.js.map +1 -0
- package/dist/{chunk-IRCYOTRG.js → chunk-536J6HUR.js} +235 -13
- package/dist/chunk-536J6HUR.js.map +1 -0
- package/dist/{chunk-SDG242R4.js → chunk-5VH3Y4QC.js} +63 -361
- package/dist/chunk-5VH3Y4QC.js.map +1 -0
- package/dist/{chunk-E6H2F2XF.js → chunk-6I4TXAI6.js} +3 -3
- package/dist/{chunk-E6H2F2XF.js.map → chunk-6I4TXAI6.js.map} +1 -1
- package/dist/{chunk-FF5ZQ6KI.js → chunk-6JP7HGIF.js} +4 -4
- package/dist/{chunk-FF5ZQ6KI.js.map → chunk-6JP7HGIF.js.map} +1 -1
- package/dist/chunk-AJ2KE3NT.js +446 -0
- package/dist/chunk-AJ2KE3NT.js.map +1 -0
- package/dist/{chunk-V2QK3IUY.js → chunk-B2KLJPFY.js} +4 -4
- package/dist/{chunk-V2QK3IUY.js.map → chunk-B2KLJPFY.js.map} +1 -1
- package/dist/{chunk-B3OMGYZZ.js → chunk-BBFQZ7CA.js} +4 -4
- package/dist/{chunk-B3OMGYZZ.js.map → chunk-BBFQZ7CA.js.map} +1 -1
- package/dist/{chunk-I6RBAIS3.js → chunk-BWMMR5XA.js} +4 -4
- package/dist/{chunk-I6RBAIS3.js.map → chunk-BWMMR5XA.js.map} +1 -1
- package/dist/{chunk-WIDZ5IE7.js → chunk-CC6F75GI.js} +14 -7
- package/dist/chunk-CC6F75GI.js.map +1 -0
- package/dist/{chunk-G7W4MFPZ.js → chunk-CE45STY5.js} +4 -4
- package/dist/{chunk-G7W4MFPZ.js.map → chunk-CE45STY5.js.map} +1 -1
- package/dist/{chunk-T6DRYOMT.js → chunk-DIU3MXB3.js} +4 -4
- package/dist/{chunk-T6DRYOMT.js.map → chunk-DIU3MXB3.js.map} +1 -1
- package/dist/{chunk-KL65SSR7.js → chunk-FKFRASAB.js} +323 -152
- package/dist/chunk-FKFRASAB.js.map +1 -0
- package/dist/{chunk-A43I2AJ4.js → chunk-JUSXLCSE.js} +3 -3
- package/dist/{chunk-A43I2AJ4.js.map → chunk-JUSXLCSE.js.map} +1 -1
- package/dist/{chunk-7G5S5KZN.js → chunk-KUZLILN3.js} +16 -3
- package/dist/chunk-KUZLILN3.js.map +1 -0
- package/dist/{chunk-76TDXGGF.js → chunk-N4IDP2M2.js} +218 -51
- package/dist/chunk-N4IDP2M2.js.map +1 -0
- package/dist/{chunk-XRN7DQGR.js → chunk-NJFQCDGA.js} +3 -3
- package/dist/{chunk-XRN7DQGR.js.map → chunk-NJFQCDGA.js.map} +1 -1
- package/dist/{chunk-XEJJGDGX.js → chunk-O7MTBC52.js} +134 -9
- package/dist/chunk-O7MTBC52.js.map +1 -0
- package/dist/chunk-QT2PMGN3.js +6 -0
- package/dist/{chunk-TGDHOAXX.js.map → chunk-QT2PMGN3.js.map} +1 -1
- package/dist/{chunk-V3X3DBZL.js → chunk-S4NSF5AZ.js} +6 -6
- package/dist/{chunk-V3X3DBZL.js.map → chunk-S4NSF5AZ.js.map} +1 -1
- package/dist/{chunk-G25STLE7.js → chunk-SJFBXCII.js} +30 -3
- package/dist/chunk-SJFBXCII.js.map +1 -0
- package/dist/{chunk-7PVCHLR2.js → chunk-SNKTD23L.js} +109 -10
- package/dist/chunk-SNKTD23L.js.map +1 -0
- package/dist/{chunk-IPICO2RV.js → chunk-VIWZ4QT7.js} +14 -3
- package/dist/chunk-VIWZ4QT7.js.map +1 -0
- package/dist/{chunk-MPP4S4OE.js → chunk-Y7YKUZ3T.js} +8 -7
- package/dist/chunk-Y7YKUZ3T.js.map +1 -0
- package/dist/cli.js +730 -345
- package/dist/cli.js.map +1 -1
- package/dist/ensure-map-5YEI7R7V.js +29 -0
- package/dist/{ensure-map-SMWHKOUY.js.map → ensure-map-5YEI7R7V.js.map} +1 -1
- package/dist/{graph-backend-I4I72J4W.js → graph-backend-CPHLUKUC.js} +5 -5
- package/dist/{graph-backend-I4I72J4W.js.map → graph-backend-CPHLUKUC.js.map} +1 -1
- package/dist/index.d.ts +118 -7
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/dist/{interactive-TMQR6TXM.js → interactive-TNRE4OEK.js} +45 -32
- package/dist/interactive-TNRE4OEK.js.map +1 -0
- package/dist/load-MWG6WZTK.js +10 -0
- package/dist/{load-E3OTM7BS.js.map → load-MWG6WZTK.js.map} +1 -1
- package/dist/model-manager-GJ2YSTSK.js +1 -1
- package/dist/{run-outcome-QWLNBASF.js → run-outcome-375HMSQG.js} +6 -6
- package/dist/{run-outcome-QWLNBASF.js.map → run-outcome-375HMSQG.js.map} +1 -1
- package/dist/runtime-session-3MPWXNRL.js +20 -0
- package/dist/{runtime-session-UQ7UVAPL.js.map → runtime-session-3MPWXNRL.js.map} +1 -1
- package/dist/session-2NGJLI5Y.js +15 -0
- package/dist/{session-MG6BJVAG.js.map → session-2NGJLI5Y.js.map} +1 -1
- package/dist/session-store-F7NX7SZN.js +4 -0
- package/dist/{session-store-SQECEXUU.js.map → session-store-F7NX7SZN.js.map} +1 -1
- package/dist/{stream-json-GM44SP7L.js → stream-json-AUMU3NLV.js} +48 -16
- package/dist/stream-json-AUMU3NLV.js.map +1 -0
- package/dist/{vg-mcp-bridge-3WFC7LGE.js → vg-mcp-bridge-D463EHQI.js} +13 -11
- package/dist/vg-mcp-bridge-D463EHQI.js.map +1 -0
- package/dist/{vgd-ZUSBEVUL.js → vgd-Z23PXSP4.js} +9 -9
- package/dist/{vgd-ZUSBEVUL.js.map → vgd-Z23PXSP4.js.map} +1 -1
- package/package.json +1 -1
- package/dist/agent-4DAECASW.js +0 -22
- package/dist/baseline-4BDH4F2W.js +0 -9
- package/dist/chunk-76TDXGGF.js.map +0 -1
- package/dist/chunk-7G5S5KZN.js.map +0 -1
- package/dist/chunk-7PVCHLR2.js.map +0 -1
- package/dist/chunk-BNEHDLVZ.js.map +0 -1
- package/dist/chunk-G25STLE7.js.map +0 -1
- package/dist/chunk-IPICO2RV.js.map +0 -1
- package/dist/chunk-IRCYOTRG.js.map +0 -1
- package/dist/chunk-JLWI2JGA.js.map +0 -1
- package/dist/chunk-KL65SSR7.js.map +0 -1
- package/dist/chunk-MPP4S4OE.js.map +0 -1
- package/dist/chunk-SDG242R4.js.map +0 -1
- package/dist/chunk-TGDHOAXX.js +0 -6
- package/dist/chunk-WIDZ5IE7.js.map +0 -1
- package/dist/chunk-XEJJGDGX.js.map +0 -1
- package/dist/chunk-ZKNB4YH4.js +0 -102
- package/dist/chunk-ZKNB4YH4.js.map +0 -1
- package/dist/ensure-map-SMWHKOUY.js +0 -28
- package/dist/interactive-TMQR6TXM.js.map +0 -1
- package/dist/load-E3OTM7BS.js +0 -10
- package/dist/runtime-session-UQ7UVAPL.js +0 -20
- package/dist/session-MG6BJVAG.js +0 -13
- package/dist/session-store-SQECEXUU.js +0 -4
- package/dist/stream-json-GM44SP7L.js.map +0 -1
- package/dist/vg-mcp-bridge-3WFC7LGE.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cacheDir } from './chunk-
|
|
1
|
+
import { cacheDir, WEAK_TERMS, expandConcepts } from './chunk-AJ2KE3NT.js';
|
|
2
2
|
import { hashString } from './chunk-JFGYT6BI.js';
|
|
3
3
|
import * as fs2 from 'fs';
|
|
4
4
|
import { createRequire } from 'module';
|
|
@@ -436,350 +436,6 @@ function safe(id) {
|
|
|
436
436
|
return id.replace(/[^a-z0-9.-]+/gi, "_");
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
// src/engine/concepts.ts
|
|
440
|
-
var WEAK_TERMS = /* @__PURE__ */ new Set([
|
|
441
|
-
"add",
|
|
442
|
-
"adds",
|
|
443
|
-
"added",
|
|
444
|
-
"adding",
|
|
445
|
-
"create",
|
|
446
|
-
"creates",
|
|
447
|
-
"created",
|
|
448
|
-
"creating",
|
|
449
|
-
"make",
|
|
450
|
-
"makes",
|
|
451
|
-
"making",
|
|
452
|
-
"made",
|
|
453
|
-
"new",
|
|
454
|
-
"newly",
|
|
455
|
-
"remove",
|
|
456
|
-
"removes",
|
|
457
|
-
"removed",
|
|
458
|
-
"removing",
|
|
459
|
-
"delete",
|
|
460
|
-
"deletes",
|
|
461
|
-
"deleted",
|
|
462
|
-
"deleting",
|
|
463
|
-
"update",
|
|
464
|
-
"updates",
|
|
465
|
-
"updated",
|
|
466
|
-
"updating",
|
|
467
|
-
"change",
|
|
468
|
-
"changes",
|
|
469
|
-
"changed",
|
|
470
|
-
"changing",
|
|
471
|
-
"set",
|
|
472
|
-
"sets",
|
|
473
|
-
"setting",
|
|
474
|
-
"setup",
|
|
475
|
-
"get",
|
|
476
|
-
"gets",
|
|
477
|
-
"getting",
|
|
478
|
-
"use",
|
|
479
|
-
"uses",
|
|
480
|
-
"used",
|
|
481
|
-
"using",
|
|
482
|
-
"want",
|
|
483
|
-
"wants",
|
|
484
|
-
"wanted",
|
|
485
|
-
"do",
|
|
486
|
-
"does",
|
|
487
|
-
"doing",
|
|
488
|
-
"done",
|
|
489
|
-
"support",
|
|
490
|
-
"supports",
|
|
491
|
-
"supported",
|
|
492
|
-
"supporting",
|
|
493
|
-
"enable",
|
|
494
|
-
"enables",
|
|
495
|
-
"enabled",
|
|
496
|
-
"enabling",
|
|
497
|
-
"disable",
|
|
498
|
-
"disables",
|
|
499
|
-
"disabled",
|
|
500
|
-
"disabling",
|
|
501
|
-
"allow",
|
|
502
|
-
"allows",
|
|
503
|
-
"allowed",
|
|
504
|
-
"implement",
|
|
505
|
-
"implements",
|
|
506
|
-
"implemented",
|
|
507
|
-
"implementing",
|
|
508
|
-
"build",
|
|
509
|
-
"builds",
|
|
510
|
-
"building",
|
|
511
|
-
"built",
|
|
512
|
-
"via",
|
|
513
|
-
"through",
|
|
514
|
-
"into",
|
|
515
|
-
"onto",
|
|
516
|
-
"way",
|
|
517
|
-
"ways",
|
|
518
|
-
"thing",
|
|
519
|
-
"things",
|
|
520
|
-
"stuff",
|
|
521
|
-
"feature",
|
|
522
|
-
"features",
|
|
523
|
-
"functionality",
|
|
524
|
-
"method",
|
|
525
|
-
"methods",
|
|
526
|
-
"option",
|
|
527
|
-
"options",
|
|
528
|
-
"ability",
|
|
529
|
-
"help",
|
|
530
|
-
"start",
|
|
531
|
-
"begin",
|
|
532
|
-
"work",
|
|
533
|
-
"works",
|
|
534
|
-
"working",
|
|
535
|
-
"also",
|
|
536
|
-
"currently",
|
|
537
|
-
"properly",
|
|
538
|
-
"correctly",
|
|
539
|
-
"please",
|
|
540
|
-
"happens",
|
|
541
|
-
"happen",
|
|
542
|
-
"something",
|
|
543
|
-
"somewhere",
|
|
544
|
-
"step",
|
|
545
|
-
"steps",
|
|
546
|
-
"flow",
|
|
547
|
-
"process",
|
|
548
|
-
"you",
|
|
549
|
-
"can"
|
|
550
|
-
]);
|
|
551
|
-
var CONCEPTS = {
|
|
552
|
-
// ---- payments / billing ----
|
|
553
|
-
payment: ["stripe", "billing", "invoice", "checkout", "charge", "subscription", "refund", "payout", "card", "debit", "mandate"],
|
|
554
|
-
pay: ["payment", "stripe", "charge", "billing", "invoice"],
|
|
555
|
-
paid: ["payment", "invoice", "charge"],
|
|
556
|
-
billing: ["invoice", "payment", "subscription", "stripe", "charge", "renewal"],
|
|
557
|
-
checkout: ["stripe", "payment", "cart", "session"],
|
|
558
|
-
debit: ["mandate", "sepa", "bacs", "ach", "bank", "payment"],
|
|
559
|
-
mandate: ["sepa", "bacs", "debit"],
|
|
560
|
-
sepa: ["mandate", "debit", "iban", "bank"],
|
|
561
|
-
bacs: ["mandate", "debit", "bank"],
|
|
562
|
-
ach: ["mandate", "debit", "bank"],
|
|
563
|
-
stripe: ["payment", "billing", "checkout", "webhook", "charge", "card"],
|
|
564
|
-
refund: ["payment", "invoice", "stripe", "charge"],
|
|
565
|
-
invoice: ["billing", "payment", "refund", "subscription"],
|
|
566
|
-
subscription: ["billing", "renewal", "invoice", "plan", "recurring"],
|
|
567
|
-
recurring: ["subscription", "renewal", "mandate", "debit"],
|
|
568
|
-
renewal: ["subscription", "billing", "renew"],
|
|
569
|
-
card: ["payment", "charge", "stripe"],
|
|
570
|
-
credit: ["card", "payment", "charge"],
|
|
571
|
-
bank: ["debit", "mandate", "sepa", "iban", "account"],
|
|
572
|
-
charge: ["payment", "card", "stripe"],
|
|
573
|
-
webhook: ["event", "handler", "callback"],
|
|
574
|
-
price: ["payment", "billing", "plan"],
|
|
575
|
-
customer: ["billing", "account", "user"],
|
|
576
|
-
// ---- auth ----
|
|
577
|
-
auth: ["login", "session", "token", "oauth", "password", "credential"],
|
|
578
|
-
authentication: ["auth", "login", "session", "token", "password"],
|
|
579
|
-
authenticated: ["auth", "login", "session"],
|
|
580
|
-
login: ["auth", "session", "password", "signin", "oauth"],
|
|
581
|
-
signin: ["login", "auth", "session"],
|
|
582
|
-
signup: ["register", "onboard", "account"],
|
|
583
|
-
logout: ["session", "auth", "signout"],
|
|
584
|
-
password: ["auth", "login", "credential", "hash"],
|
|
585
|
-
session: ["auth", "login", "token"],
|
|
586
|
-
token: ["session", "auth", "jwt"],
|
|
587
|
-
oauth: ["auth", "login", "callback", "provider"],
|
|
588
|
-
google: ["oauth", "login", "auth"],
|
|
589
|
-
github: ["oauth", "login", "auth"],
|
|
590
|
-
sso: ["oauth", "auth", "saml", "login"],
|
|
591
|
-
credential: ["auth", "password", "token", "secret"],
|
|
592
|
-
// ---- dependencies / supply chain ----
|
|
593
|
-
dependency: ["package", "audit", "vulnerability", "advisory", "lockfile", "version"],
|
|
594
|
-
package: ["dependency", "audit", "vulnerability", "advisory", "lockfile"],
|
|
595
|
-
vulnerability: ["advisory", "cve", "osv", "audit", "vulnerable"],
|
|
596
|
-
vulnerable: ["vulnerability", "advisory", "audit", "cve"],
|
|
597
|
-
advisory: ["vulnerability", "cve", "osv", "audit"],
|
|
598
|
-
cve: ["vulnerability", "advisory", "osv"],
|
|
599
|
-
risk: ["vulnerability", "audit", "advisory"],
|
|
600
|
-
security: ["vulnerability", "audit", "advisory"],
|
|
601
|
-
audit: ["dependency", "vulnerability", "advisory"],
|
|
602
|
-
scan: ["audit", "vulnerability", "scanner"],
|
|
603
|
-
// ---- notifications / messaging ----
|
|
604
|
-
email: ["mail", "smtp", "sender", "template", "message"],
|
|
605
|
-
mail: ["email", "smtp", "sender"],
|
|
606
|
-
notification: ["notify", "email", "sms", "push", "alert"],
|
|
607
|
-
notify: ["notification", "email", "alert"],
|
|
608
|
-
sms: ["notification", "message", "twilio"],
|
|
609
|
-
// ---- e-commerce ----
|
|
610
|
-
cart: ["checkout", "order", "shop", "basket", "discount"],
|
|
611
|
-
basket: ["cart", "checkout", "order"],
|
|
612
|
-
order: ["cart", "shipment", "fulfillment", "shop", "checkout"],
|
|
613
|
-
ship: ["order", "fulfillment", "delivery", "shipment"],
|
|
614
|
-
shipment: ["order", "fulfillment", "delivery", "track"],
|
|
615
|
-
shipping: ["order", "fulfillment", "delivery", "shipment"],
|
|
616
|
-
shipped: ["order", "fulfillment", "shipment"],
|
|
617
|
-
inventory: ["stock", "product", "catalog", "restock"],
|
|
618
|
-
stock: ["inventory", "product", "restock"],
|
|
619
|
-
product: ["catalog", "inventory", "shop"],
|
|
620
|
-
discount: ["coupon", "promo", "cart", "price"],
|
|
621
|
-
coupon: ["discount", "promo", "code"],
|
|
622
|
-
// ---- chat / social ----
|
|
623
|
-
chat: ["message", "room", "conversation", "presence"],
|
|
624
|
-
message: ["chat", "sms", "notification", "thread"],
|
|
625
|
-
conversation: ["chat", "message", "thread"],
|
|
626
|
-
presence: ["online", "typing", "status"],
|
|
627
|
-
online: ["presence", "status"],
|
|
628
|
-
typing: ["presence", "indicator", "broadcast"],
|
|
629
|
-
// ---- media / streaming ----
|
|
630
|
-
video: ["media", "transcode", "playback", "stream", "thumbnail"],
|
|
631
|
-
stream: ["video", "playback", "manifest", "media"],
|
|
632
|
-
streaming: ["video", "playback", "manifest", "media"],
|
|
633
|
-
playback: ["video", "stream", "media", "watch"],
|
|
634
|
-
transcode: ["video", "media", "encode"],
|
|
635
|
-
thumbnail: ["video", "image", "media"],
|
|
636
|
-
media: ["video", "stream", "playback", "asset"],
|
|
637
|
-
// ---- analytics ----
|
|
638
|
-
analytics: ["event", "track", "metric", "funnel", "report"],
|
|
639
|
-
event: ["track", "analytics", "webhook"],
|
|
640
|
-
track: ["event", "analytics"],
|
|
641
|
-
funnel: ["conversion", "analytics", "event"],
|
|
642
|
-
conversion: ["funnel", "analytics"],
|
|
643
|
-
report: ["metrics", "export", "analytics"],
|
|
644
|
-
// ---- content / CMS ----
|
|
645
|
-
article: ["publish", "content", "post", "cms"],
|
|
646
|
-
publish: ["article", "release", "post", "content"],
|
|
647
|
-
post: ["article", "publish", "message"],
|
|
648
|
-
blog: ["article", "publish", "post", "cms"],
|
|
649
|
-
content: ["cms", "article", "markdown"],
|
|
650
|
-
markdown: ["render", "article", "content"],
|
|
651
|
-
cms: ["article", "content", "publish"],
|
|
652
|
-
// ---- CI / deployment ----
|
|
653
|
-
deploy: ["release", "rollback", "pipeline", "deployment"],
|
|
654
|
-
deployment: ["deploy", "release", "rollback", "pipeline"],
|
|
655
|
-
release: ["deploy", "version", "rollback"],
|
|
656
|
-
rollback: ["deploy", "release", "deployment"],
|
|
657
|
-
pipeline: ["stage", "deploy", "runner", "ci"],
|
|
658
|
-
canary: ["deploy", "rollout", "release"],
|
|
659
|
-
// ---- mobile ----
|
|
660
|
-
push: ["notification", "device", "token", "mobile"],
|
|
661
|
-
device: ["push", "token", "mobile", "register"],
|
|
662
|
-
deeplink: ["link", "route", "universal"],
|
|
663
|
-
mobile: ["push", "device", "deeplink", "app"],
|
|
664
|
-
ios: ["mobile", "universal", "link", "app"],
|
|
665
|
-
android: ["mobile", "push", "device", "app"],
|
|
666
|
-
// ---- batch / ETL / mainframe ----
|
|
667
|
-
batch: ["settlement", "job", "etl", "reconcile"],
|
|
668
|
-
settlement: ["batch", "reconcile", "ledger", "clearing"],
|
|
669
|
-
reconcile: ["ledger", "settlement", "batch"],
|
|
670
|
-
ledger: ["settlement", "reconcile", "balance", "journal"],
|
|
671
|
-
mainframe: ["batch", "settlement", "ebcdic", "cobol", "fixed"],
|
|
672
|
-
ebcdic: ["mainframe", "record", "convert", "legacy"],
|
|
673
|
-
cobol: ["mainframe", "batch", "ebcdic"],
|
|
674
|
-
etl: ["batch", "pipeline", "extract", "load", "transform"],
|
|
675
|
-
nightly: ["batch", "cron", "schedule", "job"],
|
|
676
|
-
// ---- geo / maps ----
|
|
677
|
-
geocode: ["address", "location", "map", "geo"],
|
|
678
|
-
address: ["geocode", "location"],
|
|
679
|
-
map: ["geo", "route", "location"],
|
|
680
|
-
route: ["distance", "path", "planner", "geo"],
|
|
681
|
-
distance: ["route", "haversine", "geo"],
|
|
682
|
-
location: ["geo", "geocode", "map"],
|
|
683
|
-
arrival: ["route", "eta", "estimate"],
|
|
684
|
-
// ---- i18n ----
|
|
685
|
-
translation: ["locale", "i18n", "language", "translate"],
|
|
686
|
-
translate: ["translation", "locale", "language"],
|
|
687
|
-
locale: ["translation", "i18n", "language", "format"],
|
|
688
|
-
i18n: ["translation", "locale", "language"],
|
|
689
|
-
language: ["locale", "translation", "i18n"],
|
|
690
|
-
localized: ["locale", "translation", "format"],
|
|
691
|
-
// ---- observability ----
|
|
692
|
-
metric: ["counter", "prometheus", "telemetry", "export"],
|
|
693
|
-
prometheus: ["metric", "exporter", "monitoring"],
|
|
694
|
-
trace: ["span", "telemetry", "observability"],
|
|
695
|
-
span: ["trace", "telemetry"],
|
|
696
|
-
monitoring: ["metric", "trace", "alert", "observability"],
|
|
697
|
-
telemetry: ["metric", "trace", "span"],
|
|
698
|
-
counter: ["metric", "increment"],
|
|
699
|
-
// ---- feature flags / experimentation ----
|
|
700
|
-
flag: ["feature", "rollout", "toggle", "experiment"],
|
|
701
|
-
rollout: ["flag", "percentage", "release", "experiment"],
|
|
702
|
-
toggle: ["flag", "feature", "switch"],
|
|
703
|
-
experiment: ["variant", "assign", "flag", "exposure"],
|
|
704
|
-
variant: ["experiment", "assign"],
|
|
705
|
-
// ---- generic infrastructure ----
|
|
706
|
-
database: ["schema", "migration", "sql", "query", "orm"],
|
|
707
|
-
db: ["database", "schema", "migration", "sql"],
|
|
708
|
-
migration: ["database", "schema", "migrate", "sql"],
|
|
709
|
-
cache: ["redis", "ttl", "store"],
|
|
710
|
-
queue: ["job", "worker", "task", "batch"],
|
|
711
|
-
job: ["queue", "worker", "cron"],
|
|
712
|
-
upload: ["file", "storage", "blob", "asset"],
|
|
713
|
-
storage: ["file", "upload", "bucket", "blob"],
|
|
714
|
-
permission: ["role", "rbac", "acl", "access", "grant"],
|
|
715
|
-
role: ["permission", "rbac", "access"],
|
|
716
|
-
error: ["exception", "failure", "handler"],
|
|
717
|
-
config: ["settings", "env", "configuration"]
|
|
718
|
-
};
|
|
719
|
-
var BIGRAM_CONCEPTS = {
|
|
720
|
-
"direct debit": ["debit", "mandate", "sepa", "bacs", "bank"],
|
|
721
|
-
"direct debits": ["debit", "mandate", "sepa", "bacs", "bank"],
|
|
722
|
-
"sign in": ["login", "signin", "auth", "session"],
|
|
723
|
-
"signs in": ["login", "signin", "auth", "session"],
|
|
724
|
-
"log in": ["login", "auth", "session"],
|
|
725
|
-
"logs in": ["login", "auth", "session"],
|
|
726
|
-
"logged in": ["login", "auth", "session"],
|
|
727
|
-
"sign up": ["signup", "register", "account"],
|
|
728
|
-
"credit card": ["card", "payment", "charge", "stripe"],
|
|
729
|
-
"credit cards": ["card", "payment", "charge", "stripe"],
|
|
730
|
-
"bank transfer": ["bank", "payment", "sepa", "transfer"],
|
|
731
|
-
"rate limit": ["ratelimit", "throttle", "quota"],
|
|
732
|
-
"two factor": ["totp", "mfa", "otp", "auth"],
|
|
733
|
-
"payment method": ["payment", "stripe", "card", "debit"],
|
|
734
|
-
"payment methods": ["payment", "stripe", "card", "debit"],
|
|
735
|
-
"push notification": ["push", "device", "token", "notification"],
|
|
736
|
-
"push notifications": ["push", "device", "token", "notification"],
|
|
737
|
-
"deep link": ["deeplink", "link", "route"],
|
|
738
|
-
"deep links": ["deeplink", "link", "route"],
|
|
739
|
-
"universal link": ["deeplink", "link", "universal"],
|
|
740
|
-
"universal links": ["deeplink", "link", "universal"],
|
|
741
|
-
"feature flag": ["flag", "rollout", "toggle", "experiment"],
|
|
742
|
-
"feature flags": ["flag", "rollout", "toggle", "experiment"],
|
|
743
|
-
"shopping cart": ["cart", "checkout", "order"],
|
|
744
|
-
"roll back": ["rollback", "deploy", "release"],
|
|
745
|
-
"rolled back": ["rollback", "deploy", "release"],
|
|
746
|
-
"ab test": ["experiment", "variant"],
|
|
747
|
-
"sign out": ["logout", "session", "auth"],
|
|
748
|
-
"fixed width": ["record", "export", "mainframe", "batch"]
|
|
749
|
-
};
|
|
750
|
-
function lexiconKey(token) {
|
|
751
|
-
if (token in CONCEPTS) return token;
|
|
752
|
-
if (token.endsWith("ies")) {
|
|
753
|
-
const singular = token.slice(0, -3) + "y";
|
|
754
|
-
if (singular in CONCEPTS) return singular;
|
|
755
|
-
}
|
|
756
|
-
if (token.endsWith("s")) {
|
|
757
|
-
const singular = token.slice(0, -1);
|
|
758
|
-
if (singular in CONCEPTS) return singular;
|
|
759
|
-
}
|
|
760
|
-
return null;
|
|
761
|
-
}
|
|
762
|
-
function expandConcepts(orderedTokens) {
|
|
763
|
-
const present = new Set(orderedTokens);
|
|
764
|
-
const out = [];
|
|
765
|
-
const emitted = /* @__PURE__ */ new Set();
|
|
766
|
-
const emit = (term, from) => {
|
|
767
|
-
if (present.has(term) || emitted.has(term)) return;
|
|
768
|
-
emitted.add(term);
|
|
769
|
-
out.push({ term, from });
|
|
770
|
-
};
|
|
771
|
-
for (let i = 0; i + 1 < orderedTokens.length; i++) {
|
|
772
|
-
const bigram = `${orderedTokens[i]} ${orderedTokens[i + 1]}`;
|
|
773
|
-
const terms = BIGRAM_CONCEPTS[bigram];
|
|
774
|
-
if (terms) for (const t of terms) emit(t, bigram);
|
|
775
|
-
}
|
|
776
|
-
for (const token of orderedTokens) {
|
|
777
|
-
const key = lexiconKey(token);
|
|
778
|
-
if (key) for (const t of CONCEPTS[key]) emit(t, token);
|
|
779
|
-
}
|
|
780
|
-
return out;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
439
|
// src/engine/query.ts
|
|
784
440
|
var STOPWORDS = /* @__PURE__ */ new Set([
|
|
785
441
|
"the",
|
|
@@ -931,7 +587,7 @@ function queryGraph(graph, question, options = {}) {
|
|
|
931
587
|
const limit = options.limit ?? 12;
|
|
932
588
|
const literals = extractLiteralNeedles(question);
|
|
933
589
|
const forTokens = literals.length > 0 ? stripLiteralNeedles(question) : question;
|
|
934
|
-
const prep = prepareTerms(forTokens);
|
|
590
|
+
const prep = prepareTerms(forTokens, options.relevance);
|
|
935
591
|
const weightOf = termWeights(graph, prep.terms.map((t) => t.term));
|
|
936
592
|
const index = indexFor(graph);
|
|
937
593
|
const scored = [];
|
|
@@ -939,7 +595,14 @@ function queryGraph(graph, question, options = {}) {
|
|
|
939
595
|
for (const node of graph.nodes) {
|
|
940
596
|
if (node.kind === "file" || node.kind === "external") continue;
|
|
941
597
|
const { score, why } = scoreNode(node, prep.terms, weightOf);
|
|
942
|
-
if (score > 0)
|
|
598
|
+
if (score > 0) {
|
|
599
|
+
const affinity = topicAffinity(node.id, options.relevance, options.topicTags);
|
|
600
|
+
scored.push({
|
|
601
|
+
node,
|
|
602
|
+
score: round(score * affinity.boost * (1 + IMPORTANCE_WEIGHT * node.importance)),
|
|
603
|
+
why: why + affinity.label
|
|
604
|
+
});
|
|
605
|
+
}
|
|
943
606
|
}
|
|
944
607
|
scored.sort((a, b) => b.score - a.score || a.node.qualifiedName.localeCompare(b.node.qualifiedName));
|
|
945
608
|
}
|
|
@@ -947,18 +610,22 @@ function queryGraph(graph, question, options = {}) {
|
|
|
947
610
|
const { context, tokensEstimate } = buildContext(graph, index, question, seeds, budget, literals);
|
|
948
611
|
return { question, matches: seeds, context, tokensEstimate };
|
|
949
612
|
}
|
|
613
|
+
var RRF_K = 60;
|
|
614
|
+
function ranksOf(scores, nameOf) {
|
|
615
|
+
const ids = [...scores.entries()].filter(([, s]) => s > 0).sort((a, b) => b[1] - a[1] || nameOf(a[0]).localeCompare(nameOf(b[0]))).map(([id]) => id);
|
|
616
|
+
return new Map(ids.map((id, i) => [id, i + 1]));
|
|
617
|
+
}
|
|
950
618
|
async function queryGraphSemantic(graph, question, options) {
|
|
951
619
|
const budget = options.budget ?? 2e3;
|
|
952
620
|
const limit = options.limit ?? 12;
|
|
953
621
|
const literals = extractLiteralNeedles(question);
|
|
954
622
|
const forTokens = literals.length > 0 ? stripLiteralNeedles(question) : question;
|
|
955
|
-
const prep = prepareTerms(forTokens);
|
|
623
|
+
const prep = prepareTerms(forTokens, options.relevance);
|
|
956
624
|
const terms = prep.terms.map((t) => t.term);
|
|
957
625
|
const weightOf = termWeights(graph, terms);
|
|
958
626
|
const index = indexFor(graph);
|
|
959
627
|
const queryVec = await options.embedder.embedQuery(forTokens || question);
|
|
960
628
|
const lexRaw = /* @__PURE__ */ new Map();
|
|
961
|
-
let lexMax = 0;
|
|
962
629
|
const whyById = /* @__PURE__ */ new Map();
|
|
963
630
|
if (prep.hasContent) {
|
|
964
631
|
for (const node of graph.nodes) {
|
|
@@ -966,21 +633,32 @@ async function queryGraphSemantic(graph, question, options) {
|
|
|
966
633
|
const { score, why } = scoreNode(node, prep.terms, weightOf);
|
|
967
634
|
lexRaw.set(node.id, score);
|
|
968
635
|
whyById.set(node.id, why);
|
|
969
|
-
if (score > lexMax) lexMax = score;
|
|
970
636
|
}
|
|
971
637
|
}
|
|
972
638
|
const scored = [];
|
|
973
639
|
if (terms.length > 0 || literals.length === 0) {
|
|
640
|
+
const semRaw = /* @__PURE__ */ new Map();
|
|
641
|
+
const nodeById = /* @__PURE__ */ new Map();
|
|
974
642
|
for (const node of graph.nodes) {
|
|
975
643
|
if (node.kind === "file" || node.kind === "external") continue;
|
|
976
|
-
|
|
644
|
+
nodeById.set(node.id, node);
|
|
977
645
|
const vec = options.nodeVectors.get(node.id);
|
|
978
646
|
const sem = vec && terms.length > 0 ? Math.max(0, cosine(queryVec, vec)) : 0;
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
647
|
+
if (sem > 0) semRaw.set(node.id, sem);
|
|
648
|
+
}
|
|
649
|
+
const nameOf = (id) => nodeById.get(id)?.qualifiedName ?? id;
|
|
650
|
+
const lexRanks = ranksOf(lexRaw, nameOf);
|
|
651
|
+
const semRanks = ranksOf(semRaw, nameOf);
|
|
652
|
+
for (const [id, node] of nodeById) {
|
|
653
|
+
const lr = lexRanks.get(id);
|
|
654
|
+
const sr = semRanks.get(id);
|
|
655
|
+
if (lr === void 0 && sr === void 0) continue;
|
|
656
|
+
const fused = (lr !== void 0 ? 1 / (RRF_K + lr) : 0) + (sr !== void 0 ? 1 / (RRF_K + sr) : 0);
|
|
657
|
+
const sem = semRaw.get(id) ?? 0;
|
|
658
|
+
const lexWhy = whyById.get(id);
|
|
659
|
+
const affinity = topicAffinity(id, options.relevance, options.topicTags);
|
|
660
|
+
const why = (lexWhy || (sem > 0.3 ? `semantic match (${sem.toFixed(2)})` : "weak match")) + affinity.label;
|
|
661
|
+
scored.push({ node, score: round(fused * affinity.boost * (1 + IMPORTANCE_WEIGHT * node.importance)), why });
|
|
984
662
|
}
|
|
985
663
|
scored.sort((a, b) => b.score - a.score || a.node.qualifiedName.localeCompare(b.node.qualifiedName));
|
|
986
664
|
}
|
|
@@ -1001,14 +679,21 @@ function tokenizeOrdered(q) {
|
|
|
1001
679
|
var WEAK_TERM_WEIGHT = 0.25;
|
|
1002
680
|
var EXPANSION_WEIGHT = 0.7;
|
|
1003
681
|
var COVERAGE_BONUS = 0.35;
|
|
1004
|
-
function prepareTerms(forTokens) {
|
|
682
|
+
function prepareTerms(forTokens, relevance) {
|
|
1005
683
|
const base = tokenize(forTokens);
|
|
1006
684
|
const ordered = tokenizeOrdered(forTokens);
|
|
1007
685
|
const baseSet = new Set(base);
|
|
1008
686
|
const terms = base.map((t) => ({ term: t, weak: WEAK_TERMS.has(t) }));
|
|
687
|
+
const have = new Set(base);
|
|
1009
688
|
for (const e of expandConcepts(ordered)) {
|
|
1010
689
|
if (baseSet.has(e.term)) continue;
|
|
1011
690
|
terms.push({ term: e.term, weak: false, from: e.from });
|
|
691
|
+
have.add(e.term);
|
|
692
|
+
}
|
|
693
|
+
for (const e of relevance?.expansions ?? []) {
|
|
694
|
+
if (have.has(e.term)) continue;
|
|
695
|
+
terms.push({ term: e.term, weak: false, from: e.from, providerWeight: e.weight });
|
|
696
|
+
have.add(e.term);
|
|
1012
697
|
}
|
|
1013
698
|
const hasContent = terms.some((t) => !t.weak);
|
|
1014
699
|
return { terms, hasContent };
|
|
@@ -1022,8 +707,9 @@ function scoreNode(node, terms, weightOf = () => 1) {
|
|
|
1022
707
|
const file = node.file.toLowerCase();
|
|
1023
708
|
const dirSegments = new Set(file.split("/").slice(0, -1));
|
|
1024
709
|
const nameParts = identifierParts(node.name);
|
|
1025
|
-
for (const { term: t, weak, from } of terms) {
|
|
1026
|
-
const
|
|
710
|
+
for (const { term: t, weak, from, providerWeight } of terms) {
|
|
711
|
+
const expansionW = providerWeight !== void 0 ? Math.min(providerWeight, EXPANSION_WEIGHT) : from ? EXPANSION_WEIGHT : 1;
|
|
712
|
+
const w = weightOf(t) * (weak ? WEAK_TERM_WEIGHT : 1) * expansionW;
|
|
1027
713
|
const label = from ? `${from}\u2192${t}` : t;
|
|
1028
714
|
let contribution = 0;
|
|
1029
715
|
if (name === t) {
|
|
@@ -1058,6 +744,22 @@ function scoreNode(node, terms, weightOf = () => 1) {
|
|
|
1058
744
|
return { score, why: hits.length ? `matched: ${hits.join(", ")}` : "" };
|
|
1059
745
|
}
|
|
1060
746
|
var IMPORTANCE_WEIGHT = 0.4;
|
|
747
|
+
var TOPIC_AFFINITY_WEIGHT = 0.3;
|
|
748
|
+
function topicAffinity(nodeId, relevance, topicTags) {
|
|
749
|
+
if (!relevance?.topics?.length || !topicTags) return { boost: 1, label: "" };
|
|
750
|
+
const tags = topicTags.get(nodeId);
|
|
751
|
+
if (!tags?.length) return { boost: 1, label: "" };
|
|
752
|
+
let affinity = 0;
|
|
753
|
+
const matched = [];
|
|
754
|
+
for (const t of relevance.topics) {
|
|
755
|
+
if (tags.includes(t.id)) {
|
|
756
|
+
affinity += t.score;
|
|
757
|
+
matched.push(t.id);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if (affinity <= 0) return { boost: 1, label: "" };
|
|
761
|
+
return { boost: 1 + TOPIC_AFFINITY_WEIGHT * Math.min(affinity, 1), label: `, topic:${matched.sort().join("+")}` };
|
|
762
|
+
}
|
|
1061
763
|
function termWeights(graph, terms) {
|
|
1062
764
|
if (terms.length === 0) return () => 1;
|
|
1063
765
|
const df = /* @__PURE__ */ new Map();
|
|
@@ -1194,5 +896,5 @@ function round2(x) {
|
|
|
1194
896
|
}
|
|
1195
897
|
|
|
1196
898
|
export { GraphIndex, acquireLock, clearModelCache, cosine, countPending, embeddingsCached, extractLiteralNeedles, getNodeEmbeddings, identifierParts, impactOf, indexFor, isLocateOnlyInstruction, isModelReady, loadEmbedder, modelCacheInfo, nodeEmbedText, queryGraph, queryGraphSemantic, releaseLock, residualForSymbolSearch, resolveEmbedModel, unavailableMessage, withTimeout };
|
|
1197
|
-
//# sourceMappingURL=chunk-
|
|
1198
|
-
//# sourceMappingURL=chunk-
|
|
899
|
+
//# sourceMappingURL=chunk-5VH3Y4QC.js.map
|
|
900
|
+
//# sourceMappingURL=chunk-5VH3Y4QC.js.map
|