@vibe-forge/workspace-assets 2.0.0 → 2.0.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/__tests__/__snapshots__/workspace-assets-rich.snapshot.json +55 -0
- package/__tests__/adapter-asset-plan.spec.ts +220 -6
- package/__tests__/bundle.spec.ts +677 -2
- package/__tests__/prompt-selection.spec.ts +307 -0
- package/__tests__/skill-dependencies-cli.spec.ts +175 -0
- package/__tests__/snapshot.ts +1 -0
- package/__tests__/test-helpers.ts +9 -0
- package/__tests__/workspace-assets.snapshot.spec.ts +2 -2
- package/package.json +5 -5
- package/src/adapter-asset-plan.ts +42 -66
- package/src/asset-source.ts +13 -0
- package/src/bundle-internal.ts +242 -22
- package/src/bundle.ts +4 -0
- package/src/configured-skills.ts +99 -0
- package/src/home-bridge.ts +1 -0
- package/src/index.ts +3 -0
- package/src/prompt-selection.ts +44 -19
- package/src/selection-internal.ts +335 -1
- package/src/skill-dependencies.ts +361 -0
- package/src/skills-cli-dependency.ts +208 -0
- package/src/workspace-config.ts +132 -0
- package/src/workspace-prompt.ts +29 -0
- package/src/workspaces.ts +188 -0
|
@@ -510,12 +510,14 @@
|
|
|
510
510
|
"assetId": "entity:workspace:workspace:architect:<workspace>/.ai/entities/architect/README.md",
|
|
511
511
|
"adapter": "claude-code",
|
|
512
512
|
"status": "prompt",
|
|
513
|
+
"source": "project",
|
|
513
514
|
"reason": "Mapped into the generated system prompt."
|
|
514
515
|
},
|
|
515
516
|
{
|
|
516
517
|
"assetId": "hookPlugin:plugin:0:logger:<workspace>/node_modules/@vibe-forge/plugin-logger",
|
|
517
518
|
"adapter": "claude-code",
|
|
518
519
|
"status": "native",
|
|
520
|
+
"source": "plugin",
|
|
519
521
|
"reason": "Mapped into the Claude Code native hooks bridge.",
|
|
520
522
|
"packageId": "@vibe-forge/plugin-logger"
|
|
521
523
|
},
|
|
@@ -523,6 +525,7 @@
|
|
|
523
525
|
"assetId": "hookPlugin:plugin:1:demo/demo:<workspace>/node_modules/@vibe-forge/plugin-demo",
|
|
524
526
|
"adapter": "claude-code",
|
|
525
527
|
"status": "native",
|
|
528
|
+
"source": "plugin",
|
|
526
529
|
"reason": "Mapped into the Claude Code native hooks bridge.",
|
|
527
530
|
"scope": "demo",
|
|
528
531
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -531,6 +534,7 @@
|
|
|
531
534
|
"assetId": "hookPlugin:plugin:2:telemetry:<workspace>/node_modules/@vibe-forge/plugin-telemetry",
|
|
532
535
|
"adapter": "claude-code",
|
|
533
536
|
"status": "native",
|
|
537
|
+
"source": "plugin",
|
|
534
538
|
"reason": "Mapped into the Claude Code native hooks bridge.",
|
|
535
539
|
"packageId": "@vibe-forge/plugin-telemetry"
|
|
536
540
|
},
|
|
@@ -538,12 +542,14 @@
|
|
|
538
542
|
"assetId": "mcpServer:workspace:workspace:docs:<workspace>/.ai.config.json",
|
|
539
543
|
"adapter": "claude-code",
|
|
540
544
|
"status": "native",
|
|
545
|
+
"source": "project",
|
|
541
546
|
"reason": "Mapped into adapter MCP settings."
|
|
542
547
|
},
|
|
543
548
|
{
|
|
544
549
|
"assetId": "rule:plugin:1:demo/security:<workspace>/node_modules/@vibe-forge/plugin-demo/rules/security.md",
|
|
545
550
|
"adapter": "claude-code",
|
|
546
551
|
"status": "prompt",
|
|
552
|
+
"source": "plugin",
|
|
547
553
|
"reason": "Mapped into the generated system prompt.",
|
|
548
554
|
"scope": "demo",
|
|
549
555
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -552,24 +558,28 @@
|
|
|
552
558
|
"assetId": "rule:workspace:workspace:review:<workspace>/.ai/rules/review.md",
|
|
553
559
|
"adapter": "claude-code",
|
|
554
560
|
"status": "prompt",
|
|
561
|
+
"source": "project",
|
|
555
562
|
"reason": "Mapped into the generated system prompt."
|
|
556
563
|
},
|
|
557
564
|
{
|
|
558
565
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
559
566
|
"adapter": "claude-code",
|
|
560
567
|
"status": "native",
|
|
568
|
+
"source": "project",
|
|
561
569
|
"reason": "Synced into the Claude mock home as a native skill."
|
|
562
570
|
},
|
|
563
571
|
{
|
|
564
572
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
565
573
|
"adapter": "claude-code",
|
|
566
574
|
"status": "prompt",
|
|
575
|
+
"source": "project",
|
|
567
576
|
"reason": "Mapped into the generated system prompt."
|
|
568
577
|
},
|
|
569
578
|
{
|
|
570
579
|
"assetId": "spec:plugin:1:demo/release:<workspace>/node_modules/@vibe-forge/plugin-demo/specs/release/index.md",
|
|
571
580
|
"adapter": "claude-code",
|
|
572
581
|
"status": "prompt",
|
|
582
|
+
"source": "plugin",
|
|
573
583
|
"reason": "Mapped into the generated system prompt.",
|
|
574
584
|
"scope": "demo",
|
|
575
585
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -578,6 +588,7 @@
|
|
|
578
588
|
"assetId": "spec:workspace:workspace:release:<workspace>/.ai/specs/release/index.md",
|
|
579
589
|
"adapter": "claude-code",
|
|
580
590
|
"status": "prompt",
|
|
591
|
+
"source": "project",
|
|
581
592
|
"reason": "Mapped into the generated system prompt."
|
|
582
593
|
}
|
|
583
594
|
]
|
|
@@ -598,6 +609,7 @@
|
|
|
598
609
|
"assetId": "agent:plugin:1:demo/release-helper:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/agents/release-helper.md",
|
|
599
610
|
"adapter": "codex",
|
|
600
611
|
"status": "skipped",
|
|
612
|
+
"source": "plugin",
|
|
601
613
|
"reason": "No stable native Codex mapping exists for this asset kind in V1.",
|
|
602
614
|
"scope": "demo",
|
|
603
615
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -606,6 +618,7 @@
|
|
|
606
618
|
"assetId": "command:plugin:1:demo/review:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/commands/review.md",
|
|
607
619
|
"adapter": "codex",
|
|
608
620
|
"status": "skipped",
|
|
621
|
+
"source": "plugin",
|
|
609
622
|
"reason": "No stable native Codex mapping exists for this asset kind in V1.",
|
|
610
623
|
"scope": "demo",
|
|
611
624
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -614,12 +627,14 @@
|
|
|
614
627
|
"assetId": "entity:workspace:workspace:architect:<workspace>/.ai/entities/architect/README.md",
|
|
615
628
|
"adapter": "codex",
|
|
616
629
|
"status": "prompt",
|
|
630
|
+
"source": "project",
|
|
617
631
|
"reason": "Mapped into the generated system prompt."
|
|
618
632
|
},
|
|
619
633
|
{
|
|
620
634
|
"assetId": "hookPlugin:plugin:0:logger:<workspace>/node_modules/@vibe-forge/plugin-logger",
|
|
621
635
|
"adapter": "codex",
|
|
622
636
|
"status": "native",
|
|
637
|
+
"source": "plugin",
|
|
623
638
|
"reason": "Mapped into the Codex native hooks bridge.",
|
|
624
639
|
"packageId": "@vibe-forge/plugin-logger"
|
|
625
640
|
},
|
|
@@ -627,6 +642,7 @@
|
|
|
627
642
|
"assetId": "hookPlugin:plugin:1:demo/demo:<workspace>/node_modules/@vibe-forge/plugin-demo",
|
|
628
643
|
"adapter": "codex",
|
|
629
644
|
"status": "native",
|
|
645
|
+
"source": "plugin",
|
|
630
646
|
"reason": "Mapped into the Codex native hooks bridge.",
|
|
631
647
|
"scope": "demo",
|
|
632
648
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -635,6 +651,7 @@
|
|
|
635
651
|
"assetId": "hookPlugin:plugin:2:telemetry:<workspace>/node_modules/@vibe-forge/plugin-telemetry",
|
|
636
652
|
"adapter": "codex",
|
|
637
653
|
"status": "native",
|
|
654
|
+
"source": "plugin",
|
|
638
655
|
"reason": "Mapped into the Codex native hooks bridge.",
|
|
639
656
|
"packageId": "@vibe-forge/plugin-telemetry"
|
|
640
657
|
},
|
|
@@ -642,12 +659,14 @@
|
|
|
642
659
|
"assetId": "mcpServer:workspace:workspace:docs:<workspace>/.ai.config.json",
|
|
643
660
|
"adapter": "codex",
|
|
644
661
|
"status": "translated",
|
|
662
|
+
"source": "project",
|
|
645
663
|
"reason": "Translated into adapter-specific MCP configuration."
|
|
646
664
|
},
|
|
647
665
|
{
|
|
648
666
|
"assetId": "mode:plugin:1:demo/strict:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/modes/strict.md",
|
|
649
667
|
"adapter": "codex",
|
|
650
668
|
"status": "skipped",
|
|
669
|
+
"source": "plugin",
|
|
651
670
|
"reason": "No stable native Codex mapping exists for this asset kind in V1.",
|
|
652
671
|
"scope": "demo",
|
|
653
672
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -656,6 +675,7 @@
|
|
|
656
675
|
"assetId": "nativePlugin:plugin:1:demo/demo-plugin:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/plugins/demo-plugin.js",
|
|
657
676
|
"adapter": "codex",
|
|
658
677
|
"status": "skipped",
|
|
678
|
+
"source": "plugin",
|
|
659
679
|
"reason": "No stable native Codex mapping exists for this asset kind in V1.",
|
|
660
680
|
"scope": "demo",
|
|
661
681
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -664,6 +684,7 @@
|
|
|
664
684
|
"assetId": "rule:plugin:1:demo/security:<workspace>/node_modules/@vibe-forge/plugin-demo/rules/security.md",
|
|
665
685
|
"adapter": "codex",
|
|
666
686
|
"status": "prompt",
|
|
687
|
+
"source": "plugin",
|
|
667
688
|
"reason": "Mapped into the generated system prompt.",
|
|
668
689
|
"scope": "demo",
|
|
669
690
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -672,18 +693,21 @@
|
|
|
672
693
|
"assetId": "rule:workspace:workspace:review:<workspace>/.ai/rules/review.md",
|
|
673
694
|
"adapter": "codex",
|
|
674
695
|
"status": "prompt",
|
|
696
|
+
"source": "project",
|
|
675
697
|
"reason": "Mapped into the generated system prompt."
|
|
676
698
|
},
|
|
677
699
|
{
|
|
678
700
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
679
701
|
"adapter": "codex",
|
|
680
702
|
"status": "prompt",
|
|
703
|
+
"source": "project",
|
|
681
704
|
"reason": "Mapped into the generated system prompt."
|
|
682
705
|
},
|
|
683
706
|
{
|
|
684
707
|
"assetId": "spec:plugin:1:demo/release:<workspace>/node_modules/@vibe-forge/plugin-demo/specs/release/index.md",
|
|
685
708
|
"adapter": "codex",
|
|
686
709
|
"status": "prompt",
|
|
710
|
+
"source": "plugin",
|
|
687
711
|
"reason": "Mapped into the generated system prompt.",
|
|
688
712
|
"scope": "demo",
|
|
689
713
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -692,6 +716,7 @@
|
|
|
692
716
|
"assetId": "spec:workspace:workspace:release:<workspace>/.ai/specs/release/index.md",
|
|
693
717
|
"adapter": "codex",
|
|
694
718
|
"status": "prompt",
|
|
719
|
+
"source": "project",
|
|
695
720
|
"reason": "Mapped into the generated system prompt."
|
|
696
721
|
}
|
|
697
722
|
]
|
|
@@ -712,6 +737,7 @@
|
|
|
712
737
|
"assetId": "agent:plugin:1:demo/release-helper:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/agents/release-helper.md",
|
|
713
738
|
"adapter": "gemini",
|
|
714
739
|
"status": "skipped",
|
|
740
|
+
"source": "plugin",
|
|
715
741
|
"reason": "No stable native Gemini mapping exists for this asset kind in V1.",
|
|
716
742
|
"scope": "demo",
|
|
717
743
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -720,6 +746,7 @@
|
|
|
720
746
|
"assetId": "command:plugin:1:demo/review:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/commands/review.md",
|
|
721
747
|
"adapter": "gemini",
|
|
722
748
|
"status": "skipped",
|
|
749
|
+
"source": "plugin",
|
|
723
750
|
"reason": "No stable native Gemini mapping exists for this asset kind in V1.",
|
|
724
751
|
"scope": "demo",
|
|
725
752
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -728,12 +755,14 @@
|
|
|
728
755
|
"assetId": "entity:workspace:workspace:architect:<workspace>/.ai/entities/architect/README.md",
|
|
729
756
|
"adapter": "gemini",
|
|
730
757
|
"status": "prompt",
|
|
758
|
+
"source": "project",
|
|
731
759
|
"reason": "Mapped into the generated system prompt."
|
|
732
760
|
},
|
|
733
761
|
{
|
|
734
762
|
"assetId": "hookPlugin:plugin:0:logger:<workspace>/node_modules/@vibe-forge/plugin-logger",
|
|
735
763
|
"adapter": "gemini",
|
|
736
764
|
"status": "native",
|
|
765
|
+
"source": "plugin",
|
|
737
766
|
"reason": "Mapped into the Gemini native hooks bridge.",
|
|
738
767
|
"packageId": "@vibe-forge/plugin-logger"
|
|
739
768
|
},
|
|
@@ -741,6 +770,7 @@
|
|
|
741
770
|
"assetId": "hookPlugin:plugin:1:demo/demo:<workspace>/node_modules/@vibe-forge/plugin-demo",
|
|
742
771
|
"adapter": "gemini",
|
|
743
772
|
"status": "native",
|
|
773
|
+
"source": "plugin",
|
|
744
774
|
"reason": "Mapped into the Gemini native hooks bridge.",
|
|
745
775
|
"scope": "demo",
|
|
746
776
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -749,6 +779,7 @@
|
|
|
749
779
|
"assetId": "hookPlugin:plugin:2:telemetry:<workspace>/node_modules/@vibe-forge/plugin-telemetry",
|
|
750
780
|
"adapter": "gemini",
|
|
751
781
|
"status": "native",
|
|
782
|
+
"source": "plugin",
|
|
752
783
|
"reason": "Mapped into the Gemini native hooks bridge.",
|
|
753
784
|
"packageId": "@vibe-forge/plugin-telemetry"
|
|
754
785
|
},
|
|
@@ -756,12 +787,14 @@
|
|
|
756
787
|
"assetId": "mcpServer:workspace:workspace:docs:<workspace>/.ai.config.json",
|
|
757
788
|
"adapter": "gemini",
|
|
758
789
|
"status": "translated",
|
|
790
|
+
"source": "project",
|
|
759
791
|
"reason": "Translated into adapter-specific MCP configuration."
|
|
760
792
|
},
|
|
761
793
|
{
|
|
762
794
|
"assetId": "mode:plugin:1:demo/strict:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/modes/strict.md",
|
|
763
795
|
"adapter": "gemini",
|
|
764
796
|
"status": "skipped",
|
|
797
|
+
"source": "plugin",
|
|
765
798
|
"reason": "No stable native Gemini mapping exists for this asset kind in V1.",
|
|
766
799
|
"scope": "demo",
|
|
767
800
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -770,6 +803,7 @@
|
|
|
770
803
|
"assetId": "nativePlugin:plugin:1:demo/demo-plugin:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/plugins/demo-plugin.js",
|
|
771
804
|
"adapter": "gemini",
|
|
772
805
|
"status": "skipped",
|
|
806
|
+
"source": "plugin",
|
|
773
807
|
"reason": "No stable native Gemini mapping exists for this asset kind in V1.",
|
|
774
808
|
"scope": "demo",
|
|
775
809
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -778,6 +812,7 @@
|
|
|
778
812
|
"assetId": "rule:plugin:1:demo/security:<workspace>/node_modules/@vibe-forge/plugin-demo/rules/security.md",
|
|
779
813
|
"adapter": "gemini",
|
|
780
814
|
"status": "prompt",
|
|
815
|
+
"source": "plugin",
|
|
781
816
|
"reason": "Mapped into the generated system prompt.",
|
|
782
817
|
"scope": "demo",
|
|
783
818
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -786,24 +821,28 @@
|
|
|
786
821
|
"assetId": "rule:workspace:workspace:review:<workspace>/.ai/rules/review.md",
|
|
787
822
|
"adapter": "gemini",
|
|
788
823
|
"status": "prompt",
|
|
824
|
+
"source": "project",
|
|
789
825
|
"reason": "Mapped into the generated system prompt."
|
|
790
826
|
},
|
|
791
827
|
{
|
|
792
828
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
793
829
|
"adapter": "gemini",
|
|
794
830
|
"status": "native",
|
|
831
|
+
"source": "project",
|
|
795
832
|
"reason": "Symlinked into GEMINI_CLI_HOME as a native Gemini skill."
|
|
796
833
|
},
|
|
797
834
|
{
|
|
798
835
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
799
836
|
"adapter": "gemini",
|
|
800
837
|
"status": "prompt",
|
|
838
|
+
"source": "project",
|
|
801
839
|
"reason": "Mapped into the generated system prompt."
|
|
802
840
|
},
|
|
803
841
|
{
|
|
804
842
|
"assetId": "spec:plugin:1:demo/release:<workspace>/node_modules/@vibe-forge/plugin-demo/specs/release/index.md",
|
|
805
843
|
"adapter": "gemini",
|
|
806
844
|
"status": "prompt",
|
|
845
|
+
"source": "plugin",
|
|
807
846
|
"reason": "Mapped into the generated system prompt.",
|
|
808
847
|
"scope": "demo",
|
|
809
848
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -812,6 +851,7 @@
|
|
|
812
851
|
"assetId": "spec:workspace:workspace:release:<workspace>/.ai/specs/release/index.md",
|
|
813
852
|
"adapter": "gemini",
|
|
814
853
|
"status": "prompt",
|
|
854
|
+
"source": "project",
|
|
815
855
|
"reason": "Mapped into the generated system prompt."
|
|
816
856
|
}
|
|
817
857
|
]
|
|
@@ -863,6 +903,7 @@
|
|
|
863
903
|
"assetId": "agent:plugin:1:demo/release-helper:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/agents/release-helper.md",
|
|
864
904
|
"adapter": "opencode",
|
|
865
905
|
"status": "native",
|
|
906
|
+
"source": "plugin",
|
|
866
907
|
"reason": "Mirrored into OPENCODE_CONFIG_DIR as a native OpenCode asset.",
|
|
867
908
|
"scope": "demo",
|
|
868
909
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -871,6 +912,7 @@
|
|
|
871
912
|
"assetId": "command:plugin:1:demo/review:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/commands/review.md",
|
|
872
913
|
"adapter": "opencode",
|
|
873
914
|
"status": "native",
|
|
915
|
+
"source": "plugin",
|
|
874
916
|
"reason": "Mirrored into OPENCODE_CONFIG_DIR as a native OpenCode asset.",
|
|
875
917
|
"scope": "demo",
|
|
876
918
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -879,12 +921,14 @@
|
|
|
879
921
|
"assetId": "entity:workspace:workspace:architect:<workspace>/.ai/entities/architect/README.md",
|
|
880
922
|
"adapter": "opencode",
|
|
881
923
|
"status": "prompt",
|
|
924
|
+
"source": "project",
|
|
882
925
|
"reason": "Mapped into the generated system prompt."
|
|
883
926
|
},
|
|
884
927
|
{
|
|
885
928
|
"assetId": "hookPlugin:plugin:0:logger:<workspace>/node_modules/@vibe-forge/plugin-logger",
|
|
886
929
|
"adapter": "opencode",
|
|
887
930
|
"status": "native",
|
|
931
|
+
"source": "plugin",
|
|
888
932
|
"reason": "Mapped into the OpenCode native hooks bridge.",
|
|
889
933
|
"packageId": "@vibe-forge/plugin-logger"
|
|
890
934
|
},
|
|
@@ -892,6 +936,7 @@
|
|
|
892
936
|
"assetId": "hookPlugin:plugin:1:demo/demo:<workspace>/node_modules/@vibe-forge/plugin-demo",
|
|
893
937
|
"adapter": "opencode",
|
|
894
938
|
"status": "native",
|
|
939
|
+
"source": "plugin",
|
|
895
940
|
"reason": "Mapped into the OpenCode native hooks bridge.",
|
|
896
941
|
"scope": "demo",
|
|
897
942
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -900,6 +945,7 @@
|
|
|
900
945
|
"assetId": "hookPlugin:plugin:2:telemetry:<workspace>/node_modules/@vibe-forge/plugin-telemetry",
|
|
901
946
|
"adapter": "opencode",
|
|
902
947
|
"status": "native",
|
|
948
|
+
"source": "plugin",
|
|
903
949
|
"reason": "Mapped into the OpenCode native hooks bridge.",
|
|
904
950
|
"packageId": "@vibe-forge/plugin-telemetry"
|
|
905
951
|
},
|
|
@@ -907,12 +953,14 @@
|
|
|
907
953
|
"assetId": "mcpServer:workspace:workspace:docs:<workspace>/.ai.config.json",
|
|
908
954
|
"adapter": "opencode",
|
|
909
955
|
"status": "translated",
|
|
956
|
+
"source": "project",
|
|
910
957
|
"reason": "Translated into adapter-specific MCP configuration."
|
|
911
958
|
},
|
|
912
959
|
{
|
|
913
960
|
"assetId": "mode:plugin:1:demo/strict:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/modes/strict.md",
|
|
914
961
|
"adapter": "opencode",
|
|
915
962
|
"status": "native",
|
|
963
|
+
"source": "plugin",
|
|
916
964
|
"reason": "Mirrored into OPENCODE_CONFIG_DIR as a native OpenCode asset.",
|
|
917
965
|
"scope": "demo",
|
|
918
966
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -921,6 +969,7 @@
|
|
|
921
969
|
"assetId": "nativePlugin:plugin:1:demo/demo-plugin:<workspace>/node_modules/@vibe-forge/plugin-demo/opencode/plugins/demo-plugin.js",
|
|
922
970
|
"adapter": "opencode",
|
|
923
971
|
"status": "native",
|
|
972
|
+
"source": "plugin",
|
|
924
973
|
"reason": "Mirrored into OPENCODE_CONFIG_DIR as a native OpenCode asset.",
|
|
925
974
|
"scope": "demo",
|
|
926
975
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -929,6 +978,7 @@
|
|
|
929
978
|
"assetId": "rule:plugin:1:demo/security:<workspace>/node_modules/@vibe-forge/plugin-demo/rules/security.md",
|
|
930
979
|
"adapter": "opencode",
|
|
931
980
|
"status": "prompt",
|
|
981
|
+
"source": "plugin",
|
|
932
982
|
"reason": "Mapped into the generated system prompt.",
|
|
933
983
|
"scope": "demo",
|
|
934
984
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -937,24 +987,28 @@
|
|
|
937
987
|
"assetId": "rule:workspace:workspace:review:<workspace>/.ai/rules/review.md",
|
|
938
988
|
"adapter": "opencode",
|
|
939
989
|
"status": "prompt",
|
|
990
|
+
"source": "project",
|
|
940
991
|
"reason": "Mapped into the generated system prompt."
|
|
941
992
|
},
|
|
942
993
|
{
|
|
943
994
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
944
995
|
"adapter": "opencode",
|
|
945
996
|
"status": "native",
|
|
997
|
+
"source": "project",
|
|
946
998
|
"reason": "Mirrored into OPENCODE_CONFIG_DIR as a native skill."
|
|
947
999
|
},
|
|
948
1000
|
{
|
|
949
1001
|
"assetId": "skill:workspace:workspace:research:<workspace>/.ai/skills/research/SKILL.md",
|
|
950
1002
|
"adapter": "opencode",
|
|
951
1003
|
"status": "prompt",
|
|
1004
|
+
"source": "project",
|
|
952
1005
|
"reason": "Mapped into the generated system prompt."
|
|
953
1006
|
},
|
|
954
1007
|
{
|
|
955
1008
|
"assetId": "spec:plugin:1:demo/release:<workspace>/node_modules/@vibe-forge/plugin-demo/specs/release/index.md",
|
|
956
1009
|
"adapter": "opencode",
|
|
957
1010
|
"status": "prompt",
|
|
1011
|
+
"source": "plugin",
|
|
958
1012
|
"reason": "Mapped into the generated system prompt.",
|
|
959
1013
|
"scope": "demo",
|
|
960
1014
|
"packageId": "@vibe-forge/plugin-demo"
|
|
@@ -963,6 +1017,7 @@
|
|
|
963
1017
|
"assetId": "spec:workspace:workspace:release:<workspace>/.ai/specs/release/index.md",
|
|
964
1018
|
"adapter": "opencode",
|
|
965
1019
|
"status": "prompt",
|
|
1020
|
+
"source": "project",
|
|
966
1021
|
"reason": "Mapped into the generated system prompt."
|
|
967
1022
|
}
|
|
968
1023
|
]
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
/* eslint-disable import/first, max-lines -- adapter asset plan scenarios share setup helpers and assertions */
|
|
1
2
|
import { join } from 'node:path'
|
|
2
3
|
|
|
3
|
-
import { describe, expect, it } from 'vitest'
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
5
|
+
|
|
6
|
+
const skillsCliMocks = vi.hoisted(() => ({
|
|
7
|
+
findSkillsCli: vi.fn(),
|
|
8
|
+
installSkillsCliRefToTemp: vi.fn(),
|
|
9
|
+
installSkillsCliSkillToTemp: vi.fn()
|
|
10
|
+
}))
|
|
11
|
+
|
|
12
|
+
vi.mock('@vibe-forge/utils/skills-cli', async () => {
|
|
13
|
+
const actual = await vi.importActual<typeof import('@vibe-forge/utils/skills-cli')>('@vibe-forge/utils/skills-cli')
|
|
14
|
+
return {
|
|
15
|
+
...actual,
|
|
16
|
+
findSkillsCli: skillsCliMocks.findSkillsCli,
|
|
17
|
+
installSkillsCliRefToTemp: skillsCliMocks.installSkillsCliRefToTemp,
|
|
18
|
+
installSkillsCliSkillToTemp: skillsCliMocks.installSkillsCliSkillToTemp
|
|
19
|
+
}
|
|
20
|
+
})
|
|
4
21
|
|
|
5
22
|
import { buildAdapterAssetPlan, resolvePromptAssetSelection, resolveWorkspaceAssetBundle } from '#~/index.js'
|
|
6
23
|
|
|
@@ -78,7 +95,7 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
78
95
|
}
|
|
79
96
|
}
|
|
80
97
|
})
|
|
81
|
-
const plan = buildAdapterAssetPlan({
|
|
98
|
+
const plan = await buildAdapterAssetPlan({
|
|
82
99
|
adapter: 'codex',
|
|
83
100
|
bundle,
|
|
84
101
|
options: {
|
|
@@ -150,7 +167,7 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
150
167
|
}, undefined],
|
|
151
168
|
useDefaultVibeForgeMcpServer: false
|
|
152
169
|
})
|
|
153
|
-
const plan = buildAdapterAssetPlan({
|
|
170
|
+
const plan = await buildAdapterAssetPlan({
|
|
154
171
|
adapter: 'opencode',
|
|
155
172
|
bundle,
|
|
156
173
|
options: {
|
|
@@ -180,6 +197,203 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
180
197
|
]))
|
|
181
198
|
})
|
|
182
199
|
|
|
200
|
+
it('labels home-bridged skill diagnostics with source=home', async () => {
|
|
201
|
+
const workspace = await createWorkspace()
|
|
202
|
+
const realHome = process.env.__VF_PROJECT_REAL_HOME__
|
|
203
|
+
|
|
204
|
+
await writeDocument(
|
|
205
|
+
join(realHome!, '.agents/skills/research/SKILL.md'),
|
|
206
|
+
'---\ndescription: 检索资料\n---\n阅读 README.md'
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
const bundle = await resolveWorkspaceAssetBundle({
|
|
210
|
+
cwd: workspace,
|
|
211
|
+
configs: [undefined, undefined],
|
|
212
|
+
useDefaultVibeForgeMcpServer: false
|
|
213
|
+
})
|
|
214
|
+
const researchSkillId = bundle.skills.find(asset => asset.name === 'research')?.id
|
|
215
|
+
|
|
216
|
+
const plan = await buildAdapterAssetPlan({
|
|
217
|
+
adapter: 'opencode',
|
|
218
|
+
bundle,
|
|
219
|
+
options: {
|
|
220
|
+
skills: {
|
|
221
|
+
include: ['research']
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
expect(plan.diagnostics).toEqual(expect.arrayContaining([
|
|
227
|
+
expect.objectContaining({
|
|
228
|
+
assetId: researchSkillId,
|
|
229
|
+
adapter: 'opencode',
|
|
230
|
+
status: 'native',
|
|
231
|
+
source: 'home'
|
|
232
|
+
})
|
|
233
|
+
]))
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
it('includes transitive skill dependencies in selected native overlays', async () => {
|
|
237
|
+
const workspace = await createWorkspace()
|
|
238
|
+
|
|
239
|
+
await writeDocument(
|
|
240
|
+
join(workspace, '.ai/skills/app-builder/SKILL.md'),
|
|
241
|
+
[
|
|
242
|
+
'---',
|
|
243
|
+
'name: app-builder',
|
|
244
|
+
'description: Build apps',
|
|
245
|
+
'dependencies:',
|
|
246
|
+
' - frontend-design',
|
|
247
|
+
'---',
|
|
248
|
+
'Build the app.'
|
|
249
|
+
].join('\n')
|
|
250
|
+
)
|
|
251
|
+
await writeDocument(
|
|
252
|
+
join(workspace, '.ai/skills/frontend-design/SKILL.md'),
|
|
253
|
+
'---\nname: frontend-design\ndescription: UI design guidance\n---\nDesign the UI.'
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
const bundle = await resolveWorkspaceAssetBundle({
|
|
257
|
+
cwd: workspace,
|
|
258
|
+
configs: [undefined, undefined],
|
|
259
|
+
useDefaultVibeForgeMcpServer: false
|
|
260
|
+
})
|
|
261
|
+
const plan = await buildAdapterAssetPlan({
|
|
262
|
+
adapter: 'opencode',
|
|
263
|
+
bundle,
|
|
264
|
+
options: {
|
|
265
|
+
skills: {
|
|
266
|
+
include: ['app-builder']
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
expect(plan.overlays).toEqual(expect.arrayContaining([
|
|
272
|
+
expect.objectContaining({
|
|
273
|
+
kind: 'skill',
|
|
274
|
+
targetPath: 'skills/app-builder'
|
|
275
|
+
}),
|
|
276
|
+
expect.objectContaining({
|
|
277
|
+
kind: 'skill',
|
|
278
|
+
targetPath: 'skills/frontend-design'
|
|
279
|
+
})
|
|
280
|
+
]))
|
|
281
|
+
})
|
|
282
|
+
|
|
283
|
+
it('keeps explicit skills CLI dependencies ahead of preselected home-bridged skills in overlays', async () => {
|
|
284
|
+
const workspace = await createWorkspace()
|
|
285
|
+
const realHome = process.env.__VF_PROJECT_REAL_HOME__
|
|
286
|
+
const tempInstallDir = join(workspace, '.tmp-install-skills-cli-foo')
|
|
287
|
+
const installedSkillDir = join(tempInstallDir, '.agents', 'skills', 'foo')
|
|
288
|
+
await writeDocument(
|
|
289
|
+
join(installedSkillDir, 'SKILL.md'),
|
|
290
|
+
'---\nname: foo\ndescription: Registry foo\n---\nUse the registry definition.\n'
|
|
291
|
+
)
|
|
292
|
+
skillsCliMocks.installSkillsCliSkillToTemp.mockResolvedValue({
|
|
293
|
+
tempDir: tempInstallDir,
|
|
294
|
+
installedSkill: {
|
|
295
|
+
dirName: 'foo',
|
|
296
|
+
name: 'foo',
|
|
297
|
+
sourcePath: installedSkillDir
|
|
298
|
+
}
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
await writeDocument(
|
|
302
|
+
join(realHome!, '.agents/skills/foo/SKILL.md'),
|
|
303
|
+
'---\ndescription: Home foo\n---\nUse the home definition.\n'
|
|
304
|
+
)
|
|
305
|
+
await writeDocument(
|
|
306
|
+
join(workspace, '.ai/skills/app-builder/SKILL.md'),
|
|
307
|
+
[
|
|
308
|
+
'---',
|
|
309
|
+
'name: app-builder',
|
|
310
|
+
'description: Build apps',
|
|
311
|
+
'dependencies:',
|
|
312
|
+
' - anthropics/skills@foo',
|
|
313
|
+
'---',
|
|
314
|
+
'Build the app.'
|
|
315
|
+
].join('\n')
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
const bundle = await resolveWorkspaceAssetBundle({
|
|
319
|
+
cwd: workspace,
|
|
320
|
+
configs: [undefined, undefined],
|
|
321
|
+
useDefaultVibeForgeMcpServer: false
|
|
322
|
+
})
|
|
323
|
+
const plan = await buildAdapterAssetPlan({
|
|
324
|
+
adapter: 'opencode',
|
|
325
|
+
bundle,
|
|
326
|
+
options: {
|
|
327
|
+
skills: {
|
|
328
|
+
include: ['foo', 'app-builder']
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
})
|
|
332
|
+
|
|
333
|
+
const fooOverlays = plan.overlays.filter(entry => entry.kind === 'skill' && entry.targetPath === 'skills/foo')
|
|
334
|
+
expect(fooOverlays).toHaveLength(1)
|
|
335
|
+
expect(fooOverlays[0]?.sourcePath).toContain(
|
|
336
|
+
'/.ai/caches/skill-dependencies/skills-cli/skills/latest/default/anthropics/skills/foo'
|
|
337
|
+
)
|
|
338
|
+
expect(fooOverlays[0]?.sourcePath).not.toBe(join(realHome!, '.agents/skills/foo'))
|
|
339
|
+
})
|
|
340
|
+
|
|
341
|
+
it('prunes excluded skill dependency subtrees from selected native overlays', async () => {
|
|
342
|
+
const workspace = await createWorkspace()
|
|
343
|
+
|
|
344
|
+
await writeDocument(
|
|
345
|
+
join(workspace, '.ai/skills/app-builder/SKILL.md'),
|
|
346
|
+
[
|
|
347
|
+
'---',
|
|
348
|
+
'name: app-builder',
|
|
349
|
+
'description: Build apps',
|
|
350
|
+
'dependencies:',
|
|
351
|
+
' - frontend-design',
|
|
352
|
+
'---',
|
|
353
|
+
'Build the app.'
|
|
354
|
+
].join('\n')
|
|
355
|
+
)
|
|
356
|
+
await writeDocument(
|
|
357
|
+
join(workspace, '.ai/skills/frontend-design/SKILL.md'),
|
|
358
|
+
[
|
|
359
|
+
'---',
|
|
360
|
+
'name: frontend-design',
|
|
361
|
+
'description: UI design guidance',
|
|
362
|
+
'dependencies:',
|
|
363
|
+
' - color-system',
|
|
364
|
+
'---',
|
|
365
|
+
'Design the UI.'
|
|
366
|
+
].join('\n')
|
|
367
|
+
)
|
|
368
|
+
await writeDocument(
|
|
369
|
+
join(workspace, '.ai/skills/color-system/SKILL.md'),
|
|
370
|
+
'---\nname: color-system\ndescription: Color guidance\n---\nPick accessible colors.'
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
const bundle = await resolveWorkspaceAssetBundle({
|
|
374
|
+
cwd: workspace,
|
|
375
|
+
configs: [undefined, undefined],
|
|
376
|
+
useDefaultVibeForgeMcpServer: false
|
|
377
|
+
})
|
|
378
|
+
const plan = await buildAdapterAssetPlan({
|
|
379
|
+
adapter: 'opencode',
|
|
380
|
+
bundle,
|
|
381
|
+
options: {
|
|
382
|
+
skills: {
|
|
383
|
+
include: ['app-builder'],
|
|
384
|
+
exclude: ['frontend-design']
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
})
|
|
388
|
+
|
|
389
|
+
expect(plan.overlays).toEqual([
|
|
390
|
+
expect.objectContaining({
|
|
391
|
+
kind: 'skill',
|
|
392
|
+
targetPath: 'skills/app-builder'
|
|
393
|
+
})
|
|
394
|
+
])
|
|
395
|
+
})
|
|
396
|
+
|
|
183
397
|
it('builds copilot native skill overlays and translated runtime diagnostics', async () => {
|
|
184
398
|
const workspace = await createWorkspace()
|
|
185
399
|
|
|
@@ -246,7 +460,7 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
246
460
|
}
|
|
247
461
|
}
|
|
248
462
|
})
|
|
249
|
-
const plan = buildAdapterAssetPlan({
|
|
463
|
+
const plan = await buildAdapterAssetPlan({
|
|
250
464
|
adapter: 'copilot',
|
|
251
465
|
bundle,
|
|
252
466
|
options: {
|
|
@@ -346,7 +560,7 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
346
560
|
const loggerHookPluginId = bundle.hookPlugins.find(asset => asset.packageId === '@vibe-forge/plugin-logger')?.id
|
|
347
561
|
const demoCommandId = bundle.opencodeOverlayAssets.find(asset => asset.kind === 'command')?.id
|
|
348
562
|
|
|
349
|
-
const plan = buildAdapterAssetPlan({
|
|
563
|
+
const plan = await buildAdapterAssetPlan({
|
|
350
564
|
adapter: 'kimi',
|
|
351
565
|
bundle,
|
|
352
566
|
options: {
|
|
@@ -400,7 +614,7 @@ describe('buildAdapterAssetPlan', () => {
|
|
|
400
614
|
})
|
|
401
615
|
const loggerHookPluginId = bundle.hookPlugins.find(asset => asset.packageId === '@vibe-forge/plugin-logger')?.id
|
|
402
616
|
|
|
403
|
-
const plan = buildAdapterAssetPlan({
|
|
617
|
+
const plan = await buildAdapterAssetPlan({
|
|
404
618
|
adapter: 'gemini',
|
|
405
619
|
bundle,
|
|
406
620
|
options: {}
|