harnesstap 1.3.2 → 1.6.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.
- package/README.md +4 -0
- package/dist/apply-FTAIL3X3.js +50 -0
- package/dist/{approve-L7IFSYBO.js → approve-R6AWQB3I.js} +12 -16
- package/dist/{approve-L7IFSYBO.js.map → approve-R6AWQB3I.js.map} +1 -1
- package/dist/{audit-PBJDK7A4.js → audit-2HNKFPSU.js} +26 -39
- package/dist/{audit-PBJDK7A4.js.map → audit-2HNKFPSU.js.map} +1 -1
- package/dist/{auth-OM73RLNS.js → auth-C54KRLNF.js} +17 -21
- package/dist/{auth-OM73RLNS.js.map → auth-C54KRLNF.js.map} +1 -1
- package/dist/bin.js +13 -34
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-R4PTE774.js → chunk-2XDYQXP2.js} +34 -41
- package/dist/chunk-2XDYQXP2.js.map +1 -0
- package/dist/{chunk-G5RWVZZ7.js → chunk-3277RVZT.js} +5 -7
- package/dist/{chunk-G5RWVZZ7.js.map → chunk-3277RVZT.js.map} +1 -1
- package/dist/{chunk-6JMVGKMD.js → chunk-3Q72LZPJ.js} +936 -528
- package/dist/chunk-3Q72LZPJ.js.map +1 -0
- package/dist/{chunk-U472S6IB.js → chunk-42E2MPES.js} +19 -27
- package/dist/chunk-42E2MPES.js.map +1 -0
- package/dist/{chunk-CZ4T75PP.js → chunk-5HACBPK2.js} +622 -252
- package/dist/chunk-5HACBPK2.js.map +1 -0
- package/dist/{chunk-IHW4PCDT.js → chunk-6FXJIKEG.js} +6 -6
- package/dist/{chunk-OPVIX7E4.js → chunk-A3TZT4WT.js} +6 -2
- package/dist/chunk-A3TZT4WT.js.map +1 -0
- package/dist/chunk-BUA7WFI4.js +39327 -0
- package/dist/chunk-BUA7WFI4.js.map +1 -0
- package/dist/{chunk-IAZNF35S.js → chunk-CBSDMRMY.js} +2 -2
- package/dist/{chunk-YVJQ2QDG.js → chunk-CR2TYMKC.js} +65 -55
- package/dist/chunk-CR2TYMKC.js.map +1 -0
- package/dist/{chunk-VQVUJYYY.js → chunk-CWXCZBJR.js} +76 -6
- package/dist/chunk-CWXCZBJR.js.map +1 -0
- package/dist/{chunk-AVZOFMJX.js → chunk-D7R577XZ.js} +381 -138
- package/dist/chunk-D7R577XZ.js.map +1 -0
- package/dist/{chunk-3EGM4IUI.js → chunk-EPXAOEBB.js} +6 -6
- package/dist/{chunk-64R32MG2.js → chunk-GZU4LVFF.js} +179 -26
- package/dist/chunk-GZU4LVFF.js.map +1 -0
- package/dist/chunk-HV3ENT2F.js +61 -0
- package/dist/chunk-HV3ENT2F.js.map +1 -0
- package/dist/{chunk-XCPWLGPB.js → chunk-K4UDZUJ2.js} +2 -2
- package/dist/{chunk-OQ4KBUN2.js → chunk-L6BJCRBU.js} +13 -16
- package/dist/chunk-L6BJCRBU.js.map +1 -0
- package/dist/{chunk-AFKCNFPP.js → chunk-M6FEDSHY.js} +16 -15
- package/dist/chunk-M6FEDSHY.js.map +1 -0
- package/dist/chunk-M7PHQ3UC.js +31491 -0
- package/dist/chunk-M7PHQ3UC.js.map +1 -0
- package/dist/{chunk-FBYAIBHP.js → chunk-MHLAIGIM.js} +2 -2
- package/dist/{chunk-ENHDEB7Z.js → chunk-MHMFF6A5.js} +5 -7
- package/dist/{chunk-ENHDEB7Z.js.map → chunk-MHMFF6A5.js.map} +1 -1
- package/dist/chunk-MKLJBW5N.js +14 -0
- package/dist/{chunk-XRXFJTAT.js → chunk-MQCAPCAF.js} +17 -26
- package/dist/chunk-MQCAPCAF.js.map +1 -0
- package/dist/{chunk-UEHDEADL.js → chunk-MQCH3YZ5.js} +15 -13
- package/dist/chunk-MQCH3YZ5.js.map +1 -0
- package/dist/chunk-OHZNDV4A.js +1707 -0
- package/dist/chunk-OHZNDV4A.js.map +1 -0
- package/dist/{chunk-LGWUTV5Q.js → chunk-OWE3OSX6.js} +11 -13
- package/dist/{chunk-LGWUTV5Q.js.map → chunk-OWE3OSX6.js.map} +1 -1
- package/dist/{chunk-EY4ES5MG.js → chunk-PCNHBMBU.js} +3 -5
- package/dist/{chunk-EY4ES5MG.js.map → chunk-PCNHBMBU.js.map} +1 -1
- package/dist/{chunk-YRGM7RAD.js → chunk-QGTDQNVV.js} +7 -11
- package/dist/{chunk-YRGM7RAD.js.map → chunk-QGTDQNVV.js.map} +1 -1
- package/dist/{chunk-BXSS2S4W.js → chunk-R27VZIF6.js} +2 -2
- package/dist/{chunk-TQ2NA4Z4.js → chunk-R4NV3Q7G.js} +8 -2
- package/dist/chunk-R4NV3Q7G.js.map +1 -0
- package/dist/{chunk-FUV7QYBS.js → chunk-R6VFJKZB.js} +86 -319
- package/dist/chunk-R6VFJKZB.js.map +1 -0
- package/dist/{chunk-QNAIDM6W.js → chunk-RQLVXJH2.js} +132 -4
- package/dist/chunk-RQLVXJH2.js.map +1 -0
- package/dist/{chunk-JQOKQKQT.js → chunk-S2D5PWAO.js} +2 -2
- package/dist/{chunk-JJJJ2RAD.js → chunk-T4EKNX2Q.js} +71 -11
- package/dist/chunk-T4EKNX2Q.js.map +1 -0
- package/dist/{chunk-GWQVYGRD.js → chunk-TERYL7JH.js} +118 -78
- package/dist/chunk-TERYL7JH.js.map +1 -0
- package/dist/chunk-UC27MQ3T.js +1920 -0
- package/dist/chunk-UC27MQ3T.js.map +1 -0
- package/dist/chunk-UEA4NCY2.js +106 -0
- package/dist/chunk-UEA4NCY2.js.map +1 -0
- package/dist/{chunk-WXRPQICX.js → chunk-UK2IV2ZQ.js} +2 -2
- package/dist/{chunk-MFCZN253.js → chunk-UZCAYOIQ.js} +8 -10
- package/dist/{chunk-MFCZN253.js.map → chunk-UZCAYOIQ.js.map} +1 -1
- package/dist/{chunk-IKAGGJEO.js → chunk-V4UNYSZO.js} +558 -18
- package/dist/chunk-V4UNYSZO.js.map +1 -0
- package/dist/chunk-VAPCU2FX.js +70 -0
- package/dist/chunk-VAPCU2FX.js.map +1 -0
- package/dist/{chunk-Y2JGMICO.js → chunk-WGVU3LA5.js} +25 -33
- package/dist/chunk-WGVU3LA5.js.map +1 -0
- package/dist/{chunk-UNRR4KH5.js → chunk-WQ3F4O7U.js} +20 -14
- package/dist/chunk-WQ3F4O7U.js.map +1 -0
- package/dist/chunk-XNS4I3W6.js +102 -0
- package/dist/chunk-XNS4I3W6.js.map +1 -0
- package/dist/{chunk-LDVXYN6F.js → chunk-Y4I7ZCAE.js} +178 -135
- package/dist/chunk-Y4I7ZCAE.js.map +1 -0
- package/dist/{chunk-6I3RY6R5.js → chunk-ZKMSHLXP.js} +11 -15
- package/dist/{chunk-6I3RY6R5.js.map → chunk-ZKMSHLXP.js.map} +1 -1
- package/dist/{compile-SDOASKGL.js → compile-B2QG6BAQ.js} +37 -54
- package/dist/{compile-SDOASKGL.js.map → compile-B2QG6BAQ.js.map} +1 -1
- package/dist/{config-4VZTVZKF.js → config-D3F6ICZ2.js} +21 -39
- package/dist/{config-4VZTVZKF.js.map → config-D3F6ICZ2.js.map} +1 -1
- package/dist/cursor-local-install-4HDIBX22.js +94 -0
- package/dist/cursor-local-install-4HDIBX22.js.map +1 -0
- package/dist/cursor-local-install-LL367GZY.js +94 -0
- package/dist/cursor-local-install-LL367GZY.js.map +1 -0
- package/dist/{doctor-HH6CFBRQ.js → doctor-QSGETVDE.js} +19 -23
- package/dist/doctor-QSGETVDE.js.map +1 -0
- package/dist/{environment-K7YMJJYN.js → environment-2JS4RWQA.js} +69 -88
- package/dist/environment-2JS4RWQA.js.map +1 -0
- package/dist/{github-A6TYG7WS.js → github-JXSTHLY2.js} +14 -15
- package/dist/{github-A6TYG7WS.js.map → github-JXSTHLY2.js.map} +1 -1
- package/dist/{harness-772XBFZQ.js → harness-GBI3AMLH.js} +48 -65
- package/dist/{harness-772XBFZQ.js.map → harness-GBI3AMLH.js.map} +1 -1
- package/dist/{help-QR4VTJZU.js → help-EC52ERIE.js} +43 -52
- package/dist/help-EC52ERIE.js.map +1 -0
- package/dist/{help-TLHNRJJ6.js → help-VIRMBOPJ.js} +73 -551
- package/dist/help-VIRMBOPJ.js.map +1 -0
- package/dist/host-plugin-view-kept-XKHD6NGU.js +139 -0
- package/dist/host-plugin-view-kept-XKHD6NGU.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +10 -22
- package/dist/{init-AOKFPZHG.js → init-OK3K6ILG.js} +49 -70
- package/dist/init-OK3K6ILG.js.map +1 -0
- package/dist/live-read-cache-ESQQJBNS.js +13 -0
- package/dist/live-read-cache-WPUFHVMZ.js +12 -0
- package/dist/{lock-INAXNLMC.js → lock-AA2F4I3K.js} +13 -16
- package/dist/{lock-INAXNLMC.js.map → lock-AA2F4I3K.js.map} +1 -1
- package/dist/{marketplace-TUVLLPBG.js → marketplace-QUYCV23F.js} +75 -94
- package/dist/marketplace-QUYCV23F.js.map +1 -0
- package/dist/{mcp-MMWGRASN.js → mcp-CIHSR4DD.js} +35 -52
- package/dist/{mcp-MMWGRASN.js.map → mcp-CIHSR4DD.js.map} +1 -1
- package/dist/{migrate-55S4XODX.js → migrate-TQPEZYS5.js} +148 -74
- package/dist/migrate-TQPEZYS5.js.map +1 -0
- package/dist/notifications-TAELTPDW.js +154 -0
- package/dist/notifications-TAELTPDW.js.map +1 -0
- package/dist/open-D3GWGDSQ.js +20 -0
- package/dist/{pack-VZIBS42E.js → pack-VUO4UBWL.js} +12 -22
- package/dist/{pack-VZIBS42E.js.map → pack-VUO4UBWL.js.map} +1 -1
- package/dist/plugin-L3466DHK.js +47 -0
- package/dist/plugin-from-project-U5UGKTJH.js +15 -0
- package/dist/plugin-from-project-U5UGKTJH.js.map +1 -0
- package/dist/{policy-P3HGLEZS.js → policy-Z5TL4N3V.js} +11 -15
- package/dist/{policy-P3HGLEZS.js.map → policy-Z5TL4N3V.js.map} +1 -1
- package/dist/{profile-STS3CZUK.js → profile-QFI7SL3S.js} +167 -143
- package/dist/profile-QFI7SL3S.js.map +1 -0
- package/dist/{project-R4DGM3ZG.js → project-3KR3EPYR.js} +506 -94
- package/dist/project-3KR3EPYR.js.map +1 -0
- package/dist/{resource-GJVEDXVZ.js → resource-45BPRQ7V.js} +66 -63
- package/dist/resource-45BPRQ7V.js.map +1 -0
- package/dist/status-refresh-worker.js +1155 -0
- package/dist/status-refresh-worker.js.map +1 -0
- package/dist/{version-FUHV4O6U.js → version-QUJZGTZ5.js} +3 -3
- package/dist/version-QUJZGTZ5.js.map +1 -0
- package/package.json +17 -11
- package/dist/apply-Q5SFF3FY.js +0 -67
- package/dist/chunk-24V5ZSIF.js +0 -658
- package/dist/chunk-24V5ZSIF.js.map +0 -1
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-3JOPDYQD.js +0 -730
- package/dist/chunk-3JOPDYQD.js.map +0 -1
- package/dist/chunk-555XE3NJ.js +0 -60
- package/dist/chunk-555XE3NJ.js.map +0 -1
- package/dist/chunk-64R32MG2.js.map +0 -1
- package/dist/chunk-6JMVGKMD.js.map +0 -1
- package/dist/chunk-6ZWKF3YZ.js +0 -7795
- package/dist/chunk-6ZWKF3YZ.js.map +0 -1
- package/dist/chunk-AFKCNFPP.js.map +0 -1
- package/dist/chunk-AUWWL6KX.js +0 -296
- package/dist/chunk-AUWWL6KX.js.map +0 -1
- package/dist/chunk-AVZOFMJX.js.map +0 -1
- package/dist/chunk-CZ4T75PP.js.map +0 -1
- package/dist/chunk-FUV7QYBS.js.map +0 -1
- package/dist/chunk-GWQVYGRD.js.map +0 -1
- package/dist/chunk-HENOKIBB.js +0 -346
- package/dist/chunk-HENOKIBB.js.map +0 -1
- package/dist/chunk-HWL67OCJ.js +0 -238
- package/dist/chunk-HWL67OCJ.js.map +0 -1
- package/dist/chunk-IKAGGJEO.js.map +0 -1
- package/dist/chunk-JJJJ2RAD.js.map +0 -1
- package/dist/chunk-JRFUTIEH.js +0 -426
- package/dist/chunk-JRFUTIEH.js.map +0 -1
- package/dist/chunk-KJIFZLHN.js +0 -11066
- package/dist/chunk-KJIFZLHN.js.map +0 -1
- package/dist/chunk-LDVXYN6F.js.map +0 -1
- package/dist/chunk-MHOTXMD2.js +0 -430
- package/dist/chunk-MHOTXMD2.js.map +0 -1
- package/dist/chunk-NAGAJ5UM.js +0 -145
- package/dist/chunk-NAGAJ5UM.js.map +0 -1
- package/dist/chunk-NEPUP33Q.js +0 -35
- package/dist/chunk-NEPUP33Q.js.map +0 -1
- package/dist/chunk-OPVIX7E4.js.map +0 -1
- package/dist/chunk-OQ4KBUN2.js.map +0 -1
- package/dist/chunk-OXVCYRZB.js +0 -491
- package/dist/chunk-OXVCYRZB.js.map +0 -1
- package/dist/chunk-PJQAMC6L.js +0 -183
- package/dist/chunk-PJQAMC6L.js.map +0 -1
- package/dist/chunk-PW5QXRBA.js +0 -1173
- package/dist/chunk-PW5QXRBA.js.map +0 -1
- package/dist/chunk-QNAIDM6W.js.map +0 -1
- package/dist/chunk-R4PTE774.js.map +0 -1
- package/dist/chunk-S2E4KSYW.js +0 -610
- package/dist/chunk-S2E4KSYW.js.map +0 -1
- package/dist/chunk-SNVAMWB7.js +0 -40
- package/dist/chunk-SNVAMWB7.js.map +0 -1
- package/dist/chunk-TQ2NA4Z4.js.map +0 -1
- package/dist/chunk-U472S6IB.js.map +0 -1
- package/dist/chunk-UEHDEADL.js.map +0 -1
- package/dist/chunk-UNRR4KH5.js.map +0 -1
- package/dist/chunk-VQVUJYYY.js.map +0 -1
- package/dist/chunk-XGTTOO4R.js +0 -84
- package/dist/chunk-XGTTOO4R.js.map +0 -1
- package/dist/chunk-XRXFJTAT.js.map +0 -1
- package/dist/chunk-Y2JGMICO.js.map +0 -1
- package/dist/chunk-YVJQ2QDG.js.map +0 -1
- package/dist/chunk-YX7MVSDA.js +0 -235
- package/dist/chunk-YX7MVSDA.js.map +0 -1
- package/dist/chunk-ZGRBIBO7.js +0 -681
- package/dist/chunk-ZGRBIBO7.js.map +0 -1
- package/dist/chunk-ZTBAMBAI.js +0 -6448
- package/dist/chunk-ZTBAMBAI.js.map +0 -1
- package/dist/chunk-ZVANUFPF.js +0 -1035
- package/dist/chunk-ZVANUFPF.js.map +0 -1
- package/dist/doctor-HH6CFBRQ.js.map +0 -1
- package/dist/environment-K7YMJJYN.js.map +0 -1
- package/dist/help-QR4VTJZU.js.map +0 -1
- package/dist/help-TLHNRJJ6.js.map +0 -1
- package/dist/init-AOKFPZHG.js.map +0 -1
- package/dist/marketplace-TUVLLPBG.js.map +0 -1
- package/dist/migrate-55S4XODX.js.map +0 -1
- package/dist/open-SLFQV45J.js +0 -32
- package/dist/plugin-WLEFFBRY.js +0 -64
- package/dist/plugin-from-project-UV2O364T.js +0 -16
- package/dist/profile-STS3CZUK.js.map +0 -1
- package/dist/project-R4DGM3ZG.js.map +0 -1
- package/dist/resource-GJVEDXVZ.js.map +0 -1
- /package/dist/{apply-Q5SFF3FY.js.map → apply-FTAIL3X3.js.map} +0 -0
- /package/dist/{chunk-IHW4PCDT.js.map → chunk-6FXJIKEG.js.map} +0 -0
- /package/dist/{chunk-IAZNF35S.js.map → chunk-CBSDMRMY.js.map} +0 -0
- /package/dist/{chunk-3EGM4IUI.js.map → chunk-EPXAOEBB.js.map} +0 -0
- /package/dist/{chunk-XCPWLGPB.js.map → chunk-K4UDZUJ2.js.map} +0 -0
- /package/dist/{chunk-FBYAIBHP.js.map → chunk-MHLAIGIM.js.map} +0 -0
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-MKLJBW5N.js.map} +0 -0
- /package/dist/{chunk-BXSS2S4W.js.map → chunk-R27VZIF6.js.map} +0 -0
- /package/dist/{chunk-JQOKQKQT.js.map → chunk-S2D5PWAO.js.map} +0 -0
- /package/dist/{chunk-WXRPQICX.js.map → chunk-UK2IV2ZQ.js.map} +0 -0
- /package/dist/{open-SLFQV45J.js.map → live-read-cache-ESQQJBNS.js.map} +0 -0
- /package/dist/{plugin-WLEFFBRY.js.map → live-read-cache-WPUFHVMZ.js.map} +0 -0
- /package/dist/{plugin-from-project-UV2O364T.js.map → open-D3GWGDSQ.js.map} +0 -0
- /package/dist/{version-FUHV4O6U.js.map → plugin-L3466DHK.js.map} +0 -0
|
@@ -1,51 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
isLegacyPluginTomlPath,
|
|
8
|
-
isLegacyTomlTransportPath,
|
|
9
|
-
legacyTomlTransportRejection,
|
|
10
|
-
loadVerifiedPackageFiles
|
|
11
|
-
} from "./chunk-PJQAMC6L.js";
|
|
12
|
-
import "./chunk-3JOPDYQD.js";
|
|
2
|
+
diagnosePackageFiles,
|
|
3
|
+
formatResourceCounts,
|
|
4
|
+
formatSkippedEntry
|
|
5
|
+
} from "./chunk-HV3ENT2F.js";
|
|
13
6
|
import {
|
|
14
7
|
formatEnvironmentToml,
|
|
15
8
|
importEnvironmentToml,
|
|
16
9
|
listEnvironmentDocuments
|
|
17
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UK2IV2ZQ.js";
|
|
11
|
+
import {
|
|
12
|
+
formatResourceSelectionLabel,
|
|
13
|
+
sortResourcesByUpdatedAt,
|
|
14
|
+
toResourceListRows
|
|
15
|
+
} from "./chunk-L6BJCRBU.js";
|
|
18
16
|
import {
|
|
19
17
|
toPluginChoices
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K4UDZUJ2.js";
|
|
21
19
|
import "./chunk-KRI4R7EM.js";
|
|
22
|
-
import "./chunk-XGTTOO4R.js";
|
|
23
|
-
import "./chunk-HWL67OCJ.js";
|
|
24
|
-
import {
|
|
25
|
-
promptForSearchableChoice,
|
|
26
|
-
promptForValue,
|
|
27
|
-
shouldUseWizard
|
|
28
|
-
} from "./chunk-NAGAJ5UM.js";
|
|
29
20
|
import {
|
|
30
21
|
initializeSchema
|
|
31
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RQLVXJH2.js";
|
|
32
23
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-HENOKIBB.js";
|
|
24
|
+
configureCommandGroup
|
|
25
|
+
} from "./chunk-T4EKNX2Q.js";
|
|
36
26
|
import "./chunk-I6XFZLTJ.js";
|
|
37
|
-
import "./chunk-S2E4KSYW.js";
|
|
38
|
-
import "./chunk-JRFUTIEH.js";
|
|
39
27
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
import "./chunk-MHOTXMD2.js";
|
|
48
|
-
import "./chunk-ZGRBIBO7.js";
|
|
28
|
+
parseOutputFormat,
|
|
29
|
+
printJson
|
|
30
|
+
} from "./chunk-R4NV3Q7G.js";
|
|
31
|
+
import {
|
|
32
|
+
fail,
|
|
33
|
+
failCaught
|
|
34
|
+
} from "./chunk-WGVU3LA5.js";
|
|
49
35
|
import {
|
|
50
36
|
ManifestValidationError,
|
|
51
37
|
assertArchiveMembersContained,
|
|
@@ -53,6 +39,8 @@ import {
|
|
|
53
39
|
buildApPackageFiles,
|
|
54
40
|
buildApPackageFilesForResource,
|
|
55
41
|
envelopeFromFiles,
|
|
42
|
+
getHarnessPreference,
|
|
43
|
+
getLatestSnapshot,
|
|
56
44
|
getPlugin,
|
|
57
45
|
getPluginById,
|
|
58
46
|
getPluginResources,
|
|
@@ -60,48 +48,48 @@ import {
|
|
|
60
48
|
importApPackageFiles,
|
|
61
49
|
isApEnvelopePath,
|
|
62
50
|
isCompositionResourceType,
|
|
51
|
+
isLegacyPluginTomlPath,
|
|
52
|
+
isLegacyTomlTransportPath,
|
|
53
|
+
legacyTomlTransportRejection,
|
|
63
54
|
listContainedFiles,
|
|
64
55
|
listPluginDependencies,
|
|
65
56
|
listPlugins,
|
|
57
|
+
listProjects,
|
|
66
58
|
listResources,
|
|
59
|
+
loadVerifiedPackageFiles,
|
|
67
60
|
parseApEnvelope,
|
|
68
61
|
parseResourceSelector,
|
|
69
62
|
readApEnvelope,
|
|
70
63
|
readApPackageFiles,
|
|
64
|
+
registeredFromLegacyParts,
|
|
71
65
|
resolutionKey,
|
|
72
66
|
resolveComposition,
|
|
73
67
|
resolveResource,
|
|
68
|
+
setHarnessPreference,
|
|
74
69
|
setPluginResourceOverride,
|
|
70
|
+
shortenHomePath,
|
|
75
71
|
slugifyApName,
|
|
76
72
|
writeApEnvelope,
|
|
77
|
-
writeApPackageFiles
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
import "./chunk-OPVIX7E4.js";
|
|
81
|
-
import {
|
|
82
|
-
configureCommandGroup
|
|
83
|
-
} from "./chunk-JJJJ2RAD.js";
|
|
84
|
-
import {
|
|
85
|
-
parseOutputFormat,
|
|
86
|
-
printJson
|
|
87
|
-
} from "./chunk-TQ2NA4Z4.js";
|
|
88
|
-
import {
|
|
89
|
-
fail,
|
|
90
|
-
failCaught
|
|
91
|
-
} from "./chunk-Y2JGMICO.js";
|
|
73
|
+
writeApPackageFiles,
|
|
74
|
+
writeApZipArchive
|
|
75
|
+
} from "./chunk-BUA7WFI4.js";
|
|
92
76
|
import {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
promptForSearchableChoice,
|
|
78
|
+
promptForValue,
|
|
79
|
+
shouldUseWizard
|
|
80
|
+
} from "./chunk-UC27MQ3T.js";
|
|
81
|
+
import "./chunk-V4UNYSZO.js";
|
|
97
82
|
import {
|
|
98
83
|
loadSettings
|
|
99
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-CWXCZBJR.js";
|
|
85
|
+
import "./chunk-A3TZT4WT.js";
|
|
100
86
|
import {
|
|
87
|
+
formatCount,
|
|
101
88
|
getDb,
|
|
102
89
|
getHarnesstapDir,
|
|
103
|
-
skippedInvalidPluginExport
|
|
104
|
-
|
|
90
|
+
skippedInvalidPluginExport,
|
|
91
|
+
ui
|
|
92
|
+
} from "./chunk-OHZNDV4A.js";
|
|
105
93
|
|
|
106
94
|
// src/services/migrate-scope.ts
|
|
107
95
|
import { existsSync as existsSync3, statSync as statSync3 } from "fs";
|
|
@@ -450,6 +438,21 @@ function importResourceFromFile(filePath) {
|
|
|
450
438
|
}
|
|
451
439
|
|
|
452
440
|
// src/services/migrate-scope.ts
|
|
441
|
+
var ImportSkippedFilesError = class extends Error {
|
|
442
|
+
diagnostics;
|
|
443
|
+
constructor(diagnostics) {
|
|
444
|
+
const count = diagnostics.skipped.length;
|
|
445
|
+
super(
|
|
446
|
+
[
|
|
447
|
+
`Not imported: ${count} ${count === 1 ? "file was" : "files were"} skipped.`,
|
|
448
|
+
...diagnostics.skipped.map((item) => ` ${formatSkippedEntry(item)}`),
|
|
449
|
+
"Fix the files, or pass --no-strict to import the rest anyway."
|
|
450
|
+
].join("\n")
|
|
451
|
+
);
|
|
452
|
+
this.name = "ImportSkippedFilesError";
|
|
453
|
+
this.diagnostics = diagnostics;
|
|
454
|
+
}
|
|
455
|
+
};
|
|
453
456
|
function countScopeFlags(opts) {
|
|
454
457
|
let count = 0;
|
|
455
458
|
if (opts.workspace) count++;
|
|
@@ -485,16 +488,24 @@ function resolveExportScope(opts) {
|
|
|
485
488
|
assertExclusiveScopeFlags(opts);
|
|
486
489
|
const outputPath = opts.outputFile ?? opts.file;
|
|
487
490
|
const resolvedExplicit = outputPath && outputPath.length > 0 ? resolve3(outputPath) : void 0;
|
|
488
|
-
const
|
|
491
|
+
const pathIsZip = resolvedExplicit?.toLowerCase().endsWith(".zip") === true;
|
|
492
|
+
const archive = opts.archive === true || pathIsZip;
|
|
493
|
+
if (opts.singleFile === true && archive) {
|
|
494
|
+
throw new Error("Choose a package directory, a .zip, or a .ap.json envelope.");
|
|
495
|
+
}
|
|
496
|
+
const singleFile = !archive && (opts.singleFile === true || resolvedExplicit != null && isApEnvelopePath(resolvedExplicit));
|
|
489
497
|
if (opts.plugin) {
|
|
490
498
|
const firstPlugin = opts.plugin.split(",")[0]?.trim() ?? "plugin";
|
|
491
499
|
const apName = slugifyApName(firstPlugin);
|
|
492
|
-
const path = resolvedExplicit ?? resolve3(
|
|
500
|
+
const path = resolvedExplicit ?? resolve3(
|
|
501
|
+
archive ? `${apName}.zip` : singleFile ? `${apName}.ap.json` : apName
|
|
502
|
+
);
|
|
493
503
|
return {
|
|
494
504
|
scope: "plugin",
|
|
495
505
|
outputPath: path,
|
|
496
506
|
pluginSelector: opts.plugin,
|
|
497
|
-
singleFile
|
|
507
|
+
singleFile,
|
|
508
|
+
archive
|
|
498
509
|
};
|
|
499
510
|
}
|
|
500
511
|
if (opts.resource) {
|
|
@@ -502,27 +513,31 @@ function resolveExportScope(opts) {
|
|
|
502
513
|
const rest = colon === -1 ? opts.resource : opts.resource.slice(colon + 1);
|
|
503
514
|
const name = slugifyApName(rest.split("@")[0] ?? "export");
|
|
504
515
|
const path = resolvedExplicit ?? resolve3(singleFile ? `${name}.ap.json` : name);
|
|
516
|
+
if (archive) {
|
|
517
|
+
throw new Error("Resource export writes a directory or a .ap.json envelope.");
|
|
518
|
+
}
|
|
505
519
|
return {
|
|
506
520
|
scope: "resource",
|
|
507
521
|
outputPath: path,
|
|
508
522
|
resourceSelector: opts.resource,
|
|
509
|
-
singleFile
|
|
523
|
+
singleFile,
|
|
524
|
+
archive: false
|
|
510
525
|
};
|
|
511
526
|
}
|
|
512
527
|
if (opts.workspace) {
|
|
513
528
|
if (!outputPath || outputPath.length === 0) {
|
|
514
529
|
throw new Error("Output path is required for workspace export.");
|
|
515
530
|
}
|
|
516
|
-
return { scope: "workspace", outputPath: resolve3(outputPath), singleFile: false };
|
|
531
|
+
return { scope: "workspace", outputPath: resolve3(outputPath), singleFile: false, archive: false };
|
|
517
532
|
}
|
|
518
533
|
if (outputPath && outputPath.length > 0) {
|
|
519
534
|
const resolvedOutput = resolve3(outputPath);
|
|
520
535
|
const lower = resolvedOutput.toLowerCase();
|
|
521
536
|
if (lower.endsWith(".tar.gz")) {
|
|
522
|
-
return { scope: "workspace", outputPath: resolvedOutput, singleFile: false };
|
|
537
|
+
return { scope: "workspace", outputPath: resolvedOutput, singleFile: false, archive: false };
|
|
523
538
|
}
|
|
524
539
|
if (extname(resolvedOutput).toLowerCase() === ".json" && !isApEnvelopePath(resolvedOutput)) {
|
|
525
|
-
return { scope: "workspace", outputPath: resolvedOutput, singleFile: false };
|
|
540
|
+
return { scope: "workspace", outputPath: resolvedOutput, singleFile: false, archive: false };
|
|
526
541
|
}
|
|
527
542
|
}
|
|
528
543
|
throw new Error(
|
|
@@ -598,9 +613,18 @@ function exportScopedMigration(resolved, opts) {
|
|
|
598
613
|
}
|
|
599
614
|
const plugin = resolvePluginOrThrow(resolved.pluginSelector);
|
|
600
615
|
assertPluginsCleanForShare([plugin]);
|
|
601
|
-
const files = buildApPackageFiles(plugin.id
|
|
616
|
+
const files = buildApPackageFiles(plugin.id, {
|
|
617
|
+
vendorExtensions: opts.vendorExtensions === true
|
|
618
|
+
});
|
|
602
619
|
let written;
|
|
603
|
-
if (resolved.
|
|
620
|
+
if (resolved.archive) {
|
|
621
|
+
if (existsSync3(resolved.outputPath) && statSync3(resolved.outputPath).isDirectory()) {
|
|
622
|
+
throw new Error(
|
|
623
|
+
`Refusing to replace directory ${resolved.outputPath} with a zip archive.`
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
written = writeApZipArchive(files, resolved.outputPath);
|
|
627
|
+
} else if (resolved.singleFile) {
|
|
604
628
|
writeApEnvelope(files, resolved.outputPath);
|
|
605
629
|
written = Object.keys(files).sort();
|
|
606
630
|
} else {
|
|
@@ -635,7 +659,7 @@ function exportScopedMigration(resolved, opts) {
|
|
|
635
659
|
}
|
|
636
660
|
}
|
|
637
661
|
}
|
|
638
|
-
function importScopedMigration(scope, filePath) {
|
|
662
|
+
function importScopedMigration(scope, filePath, options = {}) {
|
|
639
663
|
const resolved = resolve3(filePath);
|
|
640
664
|
switch (scope) {
|
|
641
665
|
case "workspace": {
|
|
@@ -649,12 +673,18 @@ function importScopedMigration(scope, filePath) {
|
|
|
649
673
|
}
|
|
650
674
|
case "plugin": {
|
|
651
675
|
const files = loadVerifiedPackageFiles(resolved);
|
|
676
|
+
const diagnostics = diagnosePackageFiles(files);
|
|
677
|
+
if (options.strict && diagnostics.skipped.length > 0) {
|
|
678
|
+
throw new ImportSkippedFilesError(diagnostics);
|
|
679
|
+
}
|
|
652
680
|
const plugin = importApPackageFiles(files);
|
|
653
681
|
return {
|
|
654
682
|
scope: "plugin",
|
|
655
683
|
plugin: plugin.name,
|
|
656
684
|
plugins: [plugin.name],
|
|
657
|
-
resources_imported: getPluginResources(plugin.id).length
|
|
685
|
+
resources_imported: getPluginResources(plugin.id).length,
|
|
686
|
+
skipped: diagnostics.skipped,
|
|
687
|
+
resource_counts: diagnostics.counts
|
|
658
688
|
};
|
|
659
689
|
}
|
|
660
690
|
case "resource": {
|
|
@@ -861,20 +891,21 @@ async function runMigrateImportWizard() {
|
|
|
861
891
|
|
|
862
892
|
// src/cli/commands/migrate.ts
|
|
863
893
|
function printMigrateExportHuman(result) {
|
|
894
|
+
const output = shortenHomePath(result.output);
|
|
864
895
|
switch (result.scope) {
|
|
865
896
|
case "workspace":
|
|
866
897
|
ui.success(
|
|
867
|
-
`Exported migration archive ${ui.icons.hint} ${
|
|
898
|
+
`Exported migration archive ${ui.icons.hint} ${output} ${ui.icons.bullet} ${formatCount(result.manifest.plugin_count, "plugin")}, ${formatCount(result.manifest.environment_count, "environment")}`
|
|
868
899
|
);
|
|
869
900
|
return;
|
|
870
901
|
case "plugin":
|
|
871
902
|
ui.success(
|
|
872
|
-
`Exported plugin ${ui.theme.accent(result.plugins.join(", "))} ${ui.icons.hint} ${
|
|
903
|
+
`Exported plugin ${ui.theme.accent(result.plugins.join(", "))} ${ui.icons.hint} ${output}`
|
|
873
904
|
);
|
|
874
905
|
return;
|
|
875
906
|
case "resource":
|
|
876
907
|
ui.success(
|
|
877
|
-
`Exported resource ${ui.theme.accent(result.resource)} ${ui.icons.hint} ${
|
|
908
|
+
`Exported resource ${ui.theme.accent(result.resource)} ${ui.icons.hint} ${output}`
|
|
878
909
|
);
|
|
879
910
|
return;
|
|
880
911
|
default: {
|
|
@@ -891,9 +922,18 @@ function printMigrateImportHuman(result) {
|
|
|
891
922
|
);
|
|
892
923
|
return;
|
|
893
924
|
case "plugin":
|
|
925
|
+
for (const item of result.skipped) {
|
|
926
|
+
ui.warn(`skipped ${formatSkippedEntry(item)}`);
|
|
927
|
+
}
|
|
894
928
|
ui.success(
|
|
895
929
|
`Imported plugin ${ui.theme.accent(result.plugin)} ${ui.icons.bullet} ${formatCount(result.resources_imported, "resource")}`
|
|
896
930
|
);
|
|
931
|
+
ui.info(`Resources, imported of discovered: ${formatResourceCounts(result.resource_counts)}`);
|
|
932
|
+
if (result.skipped.length > 0) {
|
|
933
|
+
ui.warn(
|
|
934
|
+
`${formatCount(result.skipped.length, "file")} not imported. Fix them and import again; --strict refuses the import instead.`
|
|
935
|
+
);
|
|
936
|
+
}
|
|
897
937
|
return;
|
|
898
938
|
case "resource":
|
|
899
939
|
ui.success(
|
|
@@ -976,13 +1016,41 @@ async function handleMigrateImportCommand(file, opts = {}) {
|
|
|
976
1016
|
}
|
|
977
1017
|
try {
|
|
978
1018
|
const scope = scopeOverride ?? resolveImportScope({ ...opts, file: importFile });
|
|
979
|
-
const
|
|
1019
|
+
const strict = opts.strict ?? !shouldUseWizard({
|
|
1020
|
+
interactive: true,
|
|
1021
|
+
noInteractive: opts.noInteractive,
|
|
1022
|
+
format: opts.format,
|
|
1023
|
+
missingRequiredArgs: false
|
|
1024
|
+
});
|
|
1025
|
+
const result = importScopedMigration(scope, importFile, { strict });
|
|
980
1026
|
if (format === "json") {
|
|
981
1027
|
printJson(result);
|
|
982
1028
|
return;
|
|
983
1029
|
}
|
|
984
1030
|
printMigrateImportHuman(result);
|
|
985
1031
|
} catch (err) {
|
|
1032
|
+
if (err instanceof ImportSkippedFilesError) {
|
|
1033
|
+
if (format === "json") {
|
|
1034
|
+
printJson({
|
|
1035
|
+
scope: "plugin",
|
|
1036
|
+
imported: false,
|
|
1037
|
+
error: "skipped_files",
|
|
1038
|
+
skipped: err.diagnostics.skipped,
|
|
1039
|
+
resource_counts: err.diagnostics.counts
|
|
1040
|
+
});
|
|
1041
|
+
process.exitCode = 1;
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
for (const item of err.diagnostics.skipped) {
|
|
1045
|
+
ui.warn(`skipped ${formatSkippedEntry(item)}`);
|
|
1046
|
+
}
|
|
1047
|
+
ui.info(`Would import, of discovered: ${formatResourceCounts(err.diagnostics.counts)}`);
|
|
1048
|
+
fail(
|
|
1049
|
+
`Not imported: ${formatCount(err.diagnostics.skipped.length, "file")} would be skipped.`,
|
|
1050
|
+
{ hint: "Fix the files, or pass --no-strict to import the rest anyway." }
|
|
1051
|
+
);
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
986
1054
|
failCaught(err);
|
|
987
1055
|
}
|
|
988
1056
|
}
|
|
@@ -1025,11 +1093,17 @@ function registerMigrateCommands(root) {
|
|
|
1025
1093
|
).option("--workspace", "Export full workspace archive").option("--plugin <name>", "Export plugin(s); comma-separated names or IDs").option("--resource <selector>", "Export one resource (type:name or type:name@namespace)").option(
|
|
1026
1094
|
"--environment <name>",
|
|
1027
1095
|
"Removed: environments are machine-local; use --workspace"
|
|
1028
|
-
).option("--single-file", "Write a .ap.json envelope instead of a package directory").option("
|
|
1096
|
+
).option("--single-file", "Write a .ap.json envelope instead of a package directory").option("--archive", "Write a .zip of the Agent Plugins package").option(
|
|
1097
|
+
"--vendor-extensions",
|
|
1098
|
+
"Also write com.github.copilot files and Codex hook settings"
|
|
1099
|
+
).option("-o, --file <path>", "Output path (overrides positional)").option("--include-plugins", "Embed plugin trees (workspace scope)").option("--embed-plugins", "Alias for --include-plugins").option("--format <mode>", "Output format: human or json", "human").description("Export workspace, plugin, or resource for offline sharing").action(handleMigrateExportCommand);
|
|
1029
1100
|
migrateCmd.command("import").argument(
|
|
1030
1101
|
"[file]",
|
|
1031
1102
|
"package directory, .ap.json envelope, or .tar.gz workspace archive"
|
|
1032
1103
|
).option("--workspace", "Force workspace archive import").option("--plugin", "Force Agent Plugins package import").option("--resource", "Force single-resource package import").option(
|
|
1104
|
+
"--strict",
|
|
1105
|
+
"Refuse a plugin package with skipped files (default when not interactive)"
|
|
1106
|
+
).option("--no-strict", "Import a plugin package even when some files are skipped").option(
|
|
1033
1107
|
"--environment",
|
|
1034
1108
|
"Removed: environments are machine-local; use --workspace"
|
|
1035
1109
|
).option("--format <mode>", "Output format: human or json", "human").description("Import workspace, plugin, or resource from file").action(handleMigrateImportCommand);
|
|
@@ -1040,4 +1114,4 @@ function registerMigrateCommands(root) {
|
|
|
1040
1114
|
export {
|
|
1041
1115
|
registerMigrateCommands
|
|
1042
1116
|
};
|
|
1043
|
-
//# sourceMappingURL=migrate-
|
|
1117
|
+
//# sourceMappingURL=migrate-TQPEZYS5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/migrate-scope.ts","../src/services/migrate.ts","../src/services/resource-import-export.ts","../src/services/order-to-override-migration.ts","../src/services/wizards/migrate-export.ts","../src/services/wizards/migrate-import.ts","../src/cli/commands/migrate.ts"],"sourcesContent":["import { existsSync, statSync } from \"node:fs\";\nimport { extname, join, resolve } from \"node:path\";\nimport { getPlugin, getPluginResources } from \"../models/plugin-model.js\";\nimport type { Plugin } from \"../types.js\";\nimport {\n buildApPackageFiles,\n writeApPackageFiles,\n writeApZipArchive,\n} from \"./agent-plugins/files.js\";\nimport { importApPackageFiles } from \"./agent-plugins/import.js\";\nimport {\n diagnosePackageFiles,\n formatSkippedEntry,\n type PackageImportDiagnostics,\n type PackageResourceCount,\n} from \"./agent-plugins/import-diagnostics.js\";\nimport type { ApLoadSkipped } from \"./agent-plugins/spec-load.js\";\nimport {\n isApEnvelopePath,\n writeApEnvelope,\n} from \"./agent-plugins/envelope.js\";\nimport { slugifyApName } from \"./agent-plugins/name.js\";\nimport { loadVerifiedPackageFiles } from \"./apm-bundle.js\";\nimport {\n isLegacyTomlTransportPath,\n legacyTomlTransportRejection,\n} from \"./legacy-toml-transport.js\";\nimport type { AnyMigrateManifest, MigrateManifest } from \"./migrate.js\";\nimport { exportMigrationState, importMigrationState } from \"./migrate.js\";\nimport { assertPluginsCleanForShare } from \"./plugin-versioning.js\";\nimport {\n exportResourceToFile,\n formatResourceSelector,\n importResourceFromFile,\n} from \"./resource-import-export.js\";\n\nexport type MigrateScope = \"workspace\" | \"plugin\" | \"resource\";\n\nexport interface MigrateExportCliOpts {\n file?: string;\n outputFile?: string;\n workspace?: boolean;\n plugin?: string;\n resource?: string;\n /** Deprecated: rejected by {@link rejectEnvironmentScope}. */\n environment?: string;\n includePlugins?: boolean;\n embedPlugins?: boolean;\n singleFile?: boolean;\n /** Write a .zip of the Agent Plugins package. */\n archive?: boolean;\n /** Also write Copilot files and Codex hook settings. Plugin scope only. */\n vendorExtensions?: boolean;\n onSkip?: (message: string) => void;\n}\n\nexport interface MigrateImportCliOpts {\n file?: string;\n workspace?: boolean;\n plugin?: boolean;\n resource?: boolean;\n /** Deprecated: rejected by {@link rejectEnvironmentScope}. */\n environment?: boolean | string;\n}\n\nexport type WorkspaceExportResult = {\n scope: \"workspace\";\n output: string;\n manifest: MigrateManifest;\n};\n\nexport type PluginExportResult = {\n scope: \"plugin\";\n output: string;\n plugins: string[];\n files: string[];\n};\n\nexport type ResourceExportResult = {\n scope: \"resource\";\n output: string;\n resource: string;\n files: string[];\n};\n\nexport type ScopedExportResult =\n | WorkspaceExportResult\n | PluginExportResult\n | ResourceExportResult;\n\nexport type WorkspaceImportResult = {\n scope: \"workspace\";\n manifest: AnyMigrateManifest;\n plugins_imported: number;\n environments_imported: number;\n};\n\nexport type PluginImportResult = {\n scope: \"plugin\";\n plugin: string;\n plugins: string[];\n resources_imported: number;\n /** Package files that were not imported, with the reason for each. */\n skipped: ApLoadSkipped[];\n /** Discovered versus imported resources per type. */\n resource_counts: PackageResourceCount[];\n};\n\nexport interface ScopedImportOptions {\n /** Refuse a plugin package that would leave files behind; nothing is written. */\n strict?: boolean;\n}\n\n/** Strict plugin import found files it would not import. */\nexport class ImportSkippedFilesError extends Error {\n readonly diagnostics: PackageImportDiagnostics;\n\n constructor(diagnostics: PackageImportDiagnostics) {\n const count = diagnostics.skipped.length;\n super(\n [\n `Not imported: ${count} ${count === 1 ? \"file was\" : \"files were\"} skipped.`,\n ...diagnostics.skipped.map((item) => ` ${formatSkippedEntry(item)}`),\n \"Fix the files, or pass --no-strict to import the rest anyway.\",\n ].join(\"\\n\"),\n );\n this.name = \"ImportSkippedFilesError\";\n this.diagnostics = diagnostics;\n }\n}\n\nexport type ResourceImportResult = {\n scope: \"resource\";\n resource: string;\n action: \"created\" | \"updated\" | \"unchanged\";\n};\n\nexport type ScopedImportResult =\n | WorkspaceImportResult\n | PluginImportResult\n | ResourceImportResult;\n\nfunction countScopeFlags(opts: {\n workspace?: boolean;\n plugin?: string | boolean;\n resource?: string | boolean;\n}): number {\n let count = 0;\n if (opts.workspace) count++;\n if (opts.plugin) count++;\n if (opts.resource) count++;\n return count;\n}\n\nexport function assertExclusiveScopeFlags(opts: {\n workspace?: boolean;\n plugin?: string | boolean;\n resource?: string | boolean;\n}): void {\n if (countScopeFlags(opts) > 1) {\n throw new Error(\"Choose only one of --workspace, --plugin, or --resource.\");\n }\n}\n\nexport function rejectEnvironmentScope(opts: { environment?: string | boolean }): void {\n if (opts.environment) {\n throw new Error(\n \"Environments are no longer exported on their own: they are machine-local \" +\n \"secret references. Use --workspace to back them up with everything else.\",\n );\n }\n}\n\nfunction embedPlugins(opts: MigrateExportCliOpts): boolean {\n return opts.includePlugins ?? opts.embedPlugins ?? false;\n}\n\nfunction resolvePluginOrThrow(selector: string): Plugin {\n const first = selector.split(\",\")[0]?.trim() ?? selector;\n const plugin = getPlugin(first);\n if (!plugin) {\n throw new Error(`Plugin not found: ${first}`);\n }\n return plugin;\n}\n\nexport function resolveExportScope(opts: MigrateExportCliOpts): {\n scope: MigrateScope;\n outputPath: string;\n pluginSelector?: string;\n resourceSelector?: string;\n singleFile: boolean;\n archive: boolean;\n} {\n rejectEnvironmentScope(opts);\n assertExclusiveScopeFlags(opts);\n const outputPath = opts.outputFile ?? opts.file;\n const resolvedExplicit =\n outputPath && outputPath.length > 0 ? resolve(outputPath) : undefined;\n const pathIsZip = resolvedExplicit?.toLowerCase().endsWith(\".zip\") === true;\n const archive = opts.archive === true || pathIsZip;\n if (opts.singleFile === true && archive) {\n throw new Error(\"Choose a package directory, a .zip, or a .ap.json envelope.\");\n }\n const singleFile =\n !archive && (\n opts.singleFile === true\n || (resolvedExplicit != null && isApEnvelopePath(resolvedExplicit))\n );\n\n if (opts.plugin) {\n const firstPlugin = opts.plugin.split(\",\")[0]?.trim() ?? \"plugin\";\n const apName = slugifyApName(firstPlugin);\n const path = resolvedExplicit ?? resolve(\n archive ? `${apName}.zip` : singleFile ? `${apName}.ap.json` : apName,\n );\n return {\n scope: \"plugin\",\n outputPath: path,\n pluginSelector: opts.plugin,\n singleFile,\n archive,\n };\n }\n\n if (opts.resource) {\n const colon = opts.resource.indexOf(\":\");\n const rest = colon === -1 ? opts.resource : opts.resource.slice(colon + 1);\n const name = slugifyApName(rest.split(\"@\")[0] ?? \"export\");\n const path = resolvedExplicit ?? resolve(singleFile ? `${name}.ap.json` : name);\n if (archive) {\n throw new Error(\"Resource export writes a directory or a .ap.json envelope.\");\n }\n return {\n scope: \"resource\",\n outputPath: path,\n resourceSelector: opts.resource,\n singleFile,\n archive: false,\n };\n }\n\n if (opts.workspace) {\n if (!outputPath || outputPath.length === 0) {\n throw new Error(\"Output path is required for workspace export.\");\n }\n return { scope: \"workspace\", outputPath: resolve(outputPath), singleFile: false, archive: false };\n }\n\n if (outputPath && outputPath.length > 0) {\n const resolvedOutput = resolve(outputPath);\n const lower = resolvedOutput.toLowerCase();\n if (lower.endsWith(\".tar.gz\")) {\n return { scope: \"workspace\", outputPath: resolvedOutput, singleFile: false, archive: false };\n }\n if (\n extname(resolvedOutput).toLowerCase() === \".json\"\n && !isApEnvelopePath(resolvedOutput)\n ) {\n return { scope: \"workspace\", outputPath: resolvedOutput, singleFile: false, archive: false };\n }\n }\n\n throw new Error(\n \"Specify export scope: --workspace, --plugin <name>, or --resource <selector>.\",\n );\n}\n\nexport function detectImportScopeFromFile(filePath: string): MigrateScope {\n const resolved = resolve(filePath);\n if (statSync(resolved).isDirectory()) {\n if (!existsSync(join(resolved, \"plugin.json\"))) {\n throw new Error(\n `${resolved} is a directory but has no plugin.json: expected an Agent Plugins package.`,\n );\n }\n return \"plugin\";\n }\n const lower = resolved.toLowerCase();\n if (lower.endsWith(\".tar.gz\")) return \"workspace\";\n if (isApEnvelopePath(resolved) || lower.endsWith(\".zip\")) return \"plugin\";\n if (isLegacyTomlTransportPath(resolved)) {\n throw new Error(legacyTomlTransportRejection(resolved));\n }\n throw new Error(\n `Cannot tell what ${resolved} is. Pass an Agent Plugins package directory, ` +\n \"an .ap.json envelope, or a .tar.gz workspace archive.\",\n );\n}\n\nexport function resolveImportScope(opts: MigrateImportCliOpts): MigrateScope {\n rejectEnvironmentScope(opts);\n assertExclusiveScopeFlags({\n workspace: opts.workspace,\n plugin: opts.plugin,\n resource: opts.resource,\n });\n if (!opts.file || opts.file.length === 0) {\n throw new Error(\"Import file path is required.\");\n }\n\n let scope: MigrateScope;\n if (opts.workspace) {\n scope = \"workspace\";\n } else if (opts.plugin) {\n scope = \"plugin\";\n } else if (opts.resource) {\n scope = \"resource\";\n } else {\n return detectImportScopeFromFile(opts.file);\n }\n\n const detected = detectImportScopeFromFile(opts.file);\n if (detected !== scope) {\n throw new Error(\n `Import file looks like ${detected} data but --${scope} was specified.`,\n );\n }\n return scope;\n}\n\nexport function exportScopedMigration(\n resolved: ReturnType<typeof resolveExportScope>,\n opts: MigrateExportCliOpts,\n): ScopedExportResult {\n const includePlugins = embedPlugins(opts);\n\n switch (resolved.scope) {\n case \"workspace\": {\n const manifest = exportMigrationState({\n outputPath: resolved.outputPath,\n includePlugins,\n ...(opts.onSkip ? { onSkip: opts.onSkip } : {}),\n });\n return {\n scope: \"workspace\",\n output: resolved.outputPath,\n manifest,\n };\n }\n case \"plugin\": {\n if (!resolved.pluginSelector) {\n throw new Error(\"Plugin selector is required for plugin export.\");\n }\n const plugin = resolvePluginOrThrow(resolved.pluginSelector);\n assertPluginsCleanForShare([plugin]);\n const files = buildApPackageFiles(plugin.id, {\n vendorExtensions: opts.vendorExtensions === true,\n });\n let written: string[];\n if (resolved.archive) {\n if (existsSync(resolved.outputPath) && statSync(resolved.outputPath).isDirectory()) {\n throw new Error(\n `Refusing to replace directory ${resolved.outputPath} with a zip archive.`,\n );\n }\n written = writeApZipArchive(files, resolved.outputPath);\n } else if (resolved.singleFile) {\n writeApEnvelope(files, resolved.outputPath);\n written = Object.keys(files).sort();\n } else {\n written = writeApPackageFiles(files, resolved.outputPath);\n }\n return {\n scope: \"plugin\",\n output: resolved.outputPath,\n plugins: [plugin.name],\n files: written,\n };\n }\n case \"resource\": {\n if (!resolved.resourceSelector) {\n throw new Error(\"Resource selector is required for resource export.\");\n }\n const exportDoc = exportResourceToFile(\n resolved.resourceSelector,\n resolved.outputPath,\n { singleFile: resolved.singleFile },\n );\n return {\n scope: \"resource\",\n output: resolved.outputPath,\n resource: formatResourceSelector(exportDoc),\n files: exportDoc.files,\n };\n }\n default: {\n const neverScope: never = resolved.scope;\n throw new Error(`Unsupported export scope: ${neverScope}`);\n }\n }\n}\n\nexport function importScopedMigration(\n scope: MigrateScope,\n filePath: string,\n options: ScopedImportOptions = {},\n): ScopedImportResult {\n const resolved = resolve(filePath);\n\n switch (scope) {\n case \"workspace\": {\n const result = importMigrationState({ archivePath: resolved });\n return {\n scope: \"workspace\",\n manifest: result.manifest,\n plugins_imported: result.plugins_imported,\n environments_imported: result.environments_imported,\n };\n }\n case \"plugin\": {\n const files = loadVerifiedPackageFiles(resolved);\n const diagnostics = diagnosePackageFiles(files);\n if (options.strict && diagnostics.skipped.length > 0) {\n throw new ImportSkippedFilesError(diagnostics);\n }\n const plugin = importApPackageFiles(files);\n return {\n scope: \"plugin\",\n plugin: plugin.name,\n plugins: [plugin.name],\n resources_imported: getPluginResources(plugin.id).length,\n skipped: diagnostics.skipped,\n resource_counts: diagnostics.counts,\n };\n }\n case \"resource\": {\n const result = importResourceFromFile(resolved);\n return {\n scope: \"resource\",\n resource: formatResourceSelector(result.resource),\n action: result.action,\n };\n }\n default: {\n const neverScope: never = scope;\n throw new Error(`Unsupported import scope: ${neverScope}`);\n }\n }\n}\n","import {\n cpSync,\n existsSync,\n mkdirSync,\n mkdtempSync,\n readFileSync,\n readdirSync,\n rmSync,\n statSync,\n writeFileSync,\n} from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\nimport { execSync } from \"node:child_process\";\nimport { getHarnesstapDir } from \"../db/connection.js\";\nimport { getHarnessPreference, setHarnessPreference } from \"../models/harness.js\";\nimport { listPlugins } from \"../models/plugin-model.js\";\nimport { loadSettings } from \"../config/settings.js\";\nimport type { HarnesstapSettings } from \"../config/settings.js\";\nimport type { HarnessPreference, HarnessSelection } from \"../types.js\";\nimport { registeredFromLegacyParts } from \"./harness-targets.js\";\nimport {\n formatEnvironmentToml,\n importEnvironmentToml,\n listEnvironmentDocuments,\n} from \"./environment-import-export.js\";\nimport { listContainedFiles, assertArchiveMembersContained } from \"../utils/path-containment.js\";\nimport {\n buildApPackageFiles,\n writeApPackageFiles,\n readApPackageFiles,\n} from \"./agent-plugins/files.js\";\nimport { importApPackageFiles } from \"./agent-plugins/import.js\";\nimport { slugifyApName } from \"./agent-plugins/name.js\";\nimport { ManifestValidationError } from \"./agent-plugins/validate.js\";\nimport { skippedInvalidPluginExport } from \"../copy/cli.js\";\nimport {\n envelopeFromFiles,\n parseApEnvelope,\n} from \"./agent-plugins/envelope.js\";\nimport { isLegacyPluginTomlPath } from \"./legacy-toml-transport.js\";\n\nfunction selectionFromArchive(raw: unknown): HarnessSelection {\n const rec = (raw ?? {}) as Record<string, unknown>;\n if (Array.isArray(rec.registered_harnesses)) {\n return {\n registered_harnesses: rec.registered_harnesses.filter(\n (entry): entry is string => typeof entry === \"string\",\n ),\n };\n }\n return {\n registered_harnesses: registeredFromLegacyParts(\n typeof rec.main_harness === \"string\" ? rec.main_harness : null,\n Array.isArray(rec.alias_harnesses)\n ? rec.alias_harnesses.filter((entry): entry is string => typeof entry === \"string\")\n : [],\n ),\n };\n}\n\nexport const MIGRATE_MANIFEST_VERSION_V1 = 1 as const;\nexport const MIGRATE_MANIFEST_VERSION = 2 as const;\n\nexport interface MigrateManifestV1 {\n version: typeof MIGRATE_MANIFEST_VERSION_V1;\n exported_at: string;\n plugin_count: number;\n include_plugins: boolean;\n includes_active_profile: boolean;\n}\n\nexport interface MigrateManifest {\n version: typeof MIGRATE_MANIFEST_VERSION;\n exported_at: string;\n plugin_count: number;\n environment_count: number;\n /** Slugified plugin directory names packed under `plugins/`. */\n plugins: string[];\n include_plugins: boolean;\n includes_active_profile: boolean;\n}\n\nexport type AnyMigrateManifest = MigrateManifestV1 | MigrateManifest;\n\nexport interface MigrateExportOptions {\n outputPath: string;\n includePlugins?: boolean;\n onSkip?: (message: string) => void;\n}\n\nexport interface MigrateImportOptions {\n archivePath: string;\n}\n\nfunction writeJson(path: string, data: unknown): void {\n writeFileSync(path, JSON.stringify(data, null, 2), \"utf-8\");\n}\n\nfunction listArchiveMembers(archivePath: string): string[] {\n const listing = execSync(`tar -tzf \"${archivePath}\"`, {\n encoding: \"utf-8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n return listing\n .split(\"\\n\")\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n}\n\nfunction extractArchive(archivePath: string, destDir: string): void {\n const resolved = resolve(archivePath);\n if (resolved.endsWith(\".json\") && !resolved.endsWith(\".ap.json\")) {\n mkdirSync(join(destDir, \"state\"), { recursive: true });\n cpSync(resolved, join(destDir, \"state\", \"migrate.json\"));\n return;\n }\n // Reject path-traversal members before write; post-walk only sees files under destDir.\n assertArchiveMembersContained(destDir, listArchiveMembers(resolved));\n execSync(`tar -xzf \"${resolved}\" -C \"${destDir}\"`, { stdio: \"pipe\" });\n // Catch in-tree symlink escapes that resolve outside the destination.\n listContainedFiles(destDir);\n}\n\nfunction createArchive(sourceDir: string, outputPath: string): void {\n const resolved = resolve(outputPath);\n if (resolved.endsWith(\".json\") && !resolved.endsWith(\".ap.json\")) {\n const manifest = readFileSync(join(sourceDir, \"manifest.json\"), \"utf-8\");\n const environmentsDir = join(sourceDir, \"environments\");\n const pluginsDir = join(sourceDir, \"plugins\");\n const plugins: unknown[] = [];\n if (existsSync(pluginsDir)) {\n for (const entry of readdirSync(pluginsDir)) {\n const packageDir = join(pluginsDir, entry);\n if (!statSync(packageDir).isDirectory()) continue;\n if (!existsSync(join(packageDir, \"plugin.json\"))) {\n throw new Error(\n `Archive plugin directory ${entry} is missing plugin.json`,\n );\n }\n plugins.push(envelopeFromFiles(readApPackageFiles(packageDir)));\n }\n }\n const state: Record<string, unknown> = {\n manifest: JSON.parse(manifest) as AnyMigrateManifest,\n harness: existsSync(join(sourceDir, \"harness.json\"))\n ? JSON.parse(readFileSync(join(sourceDir, \"harness.json\"), \"utf-8\"))\n : null,\n config: existsSync(join(sourceDir, \"config.json\"))\n ? JSON.parse(readFileSync(join(sourceDir, \"config.json\"), \"utf-8\"))\n : null,\n active_profile: existsSync(join(sourceDir, \"active-profile.json\"))\n ? JSON.parse(readFileSync(join(sourceDir, \"active-profile.json\"), \"utf-8\"))\n : null,\n plugins,\n };\n if (existsSync(environmentsDir)) {\n state.environments = readdirSync(environmentsDir)\n .filter((f) => f.endsWith(\".toml\"))\n .map((f) => readFileSync(join(environmentsDir, f), \"utf-8\"));\n }\n writeFileSync(resolved, JSON.stringify(state, null, 2), \"utf-8\");\n return;\n }\n execSync(`tar -czf \"${resolved}\" -C \"${sourceDir}\" .`, { stdio: \"pipe\" });\n}\n\nfunction dirnameSafe(path: string): string {\n const idx = path.lastIndexOf(\"/\");\n return idx >= 0 ? path.slice(0, idx) : \".\";\n}\n\nfunction isMigrateManifestV1(manifest: AnyMigrateManifest): manifest is MigrateManifestV1 {\n return manifest.version === MIGRATE_MANIFEST_VERSION_V1;\n}\n\n/**\n * Export all plugins, environments, harness preferences, and config into an archive.\n */\nexport function exportMigrationState(opts: MigrateExportOptions): MigrateManifest {\n const workDir = mkdtempSync(join(tmpdir(), \"harnesstap-migrate-\"));\n const pluginsDir = join(workDir, \"plugins\");\n const environmentsDir = join(workDir, \"environments\");\n mkdirSync(pluginsDir, { recursive: true });\n mkdirSync(environmentsDir, { recursive: true });\n\n const plugins = listPlugins();\n const pluginNames: string[] = [];\n for (const plugin of plugins) {\n const slug = slugifyApName(plugin.name);\n const packageDir = join(pluginsDir, slug);\n try {\n writeApPackageFiles(buildApPackageFiles(plugin.id), packageDir);\n pluginNames.push(slug);\n } catch (error) {\n if (error instanceof ManifestValidationError) {\n opts.onSkip?.(skippedInvalidPluginExport(plugin.name));\n continue;\n }\n throw error;\n }\n }\n\n const environments = listEnvironmentDocuments();\n for (const environment of environments) {\n writeFileSync(\n join(environmentsDir, `${environment.name}.toml`),\n formatEnvironmentToml(environment),\n \"utf-8\",\n );\n }\n\n const harness = getHarnessPreference();\n if (harness) {\n writeJson(join(workDir, \"harness.json\"), harness);\n }\n\n const config = loadSettings(getHarnesstapDir());\n writeJson(join(workDir, \"config.json\"), config);\n const harnesstapDir = getHarnesstapDir();\n const activeProfilePath = join(harnesstapDir, \"active-profile.json\");\n const includesActiveProfile = existsSync(activeProfilePath);\n if (includesActiveProfile) {\n cpSync(activeProfilePath, join(workDir, \"active-profile.json\"));\n }\n\n const manifest: MigrateManifest = {\n version: MIGRATE_MANIFEST_VERSION,\n exported_at: new Date().toISOString(),\n plugin_count: plugins.length,\n environment_count: environments.length,\n plugins: pluginNames,\n include_plugins: opts.includePlugins ?? false,\n includes_active_profile: includesActiveProfile,\n };\n writeJson(join(workDir, \"manifest.json\"), manifest);\n\n mkdirSync(dirnameSafe(resolve(opts.outputPath)), { recursive: true });\n createArchive(workDir, opts.outputPath);\n rmSync(workDir, { recursive: true, force: true });\n\n return manifest;\n}\n\nfunction importEnvironmentsFromDir(environmentsDir: string): number {\n if (!existsSync(environmentsDir)) {\n return 0;\n }\n let imported = 0;\n for (const file of readdirSync(environmentsDir)) {\n if (!file.endsWith(\".toml\")) continue;\n importEnvironmentToml(readFileSync(join(environmentsDir, file), \"utf-8\"));\n imported++;\n }\n return imported;\n}\n\nfunction importPluginsFromDir(pluginsDir: string): number {\n if (!existsSync(pluginsDir)) {\n return 0;\n }\n let imported = 0;\n for (const entry of readdirSync(pluginsDir)) {\n const packageDir = join(pluginsDir, entry);\n if (!statSync(packageDir).isDirectory()) {\n if (isLegacyPluginTomlPath(entry) || entry.endsWith(\".toml\")) {\n throw new Error(\n \"This archive stores plugins as TOML, which is no longer supported. \" +\n \"Re-export with a current CLI to produce Agent Plugins packages.\",\n );\n }\n continue;\n }\n if (!existsSync(join(packageDir, \"plugin.json\"))) {\n throw new Error(\n `Archive plugin directory ${entry} is missing plugin.json`,\n );\n }\n importApPackageFiles(readApPackageFiles(packageDir));\n imported++;\n }\n return imported;\n}\n\n/**\n * Import a migration archive produced by exportMigrationState.\n */\nexport function importMigrationState(opts: MigrateImportOptions): {\n manifest: AnyMigrateManifest;\n plugins_imported: number;\n environments_imported: number;\n} {\n const workDir = mkdtempSync(join(tmpdir(), \"harnesstap-migrate-import-\"));\n\n try {\n extractArchive(opts.archivePath, workDir);\n\n let manifest: AnyMigrateManifest;\n let pluginsDir: string;\n let environmentsDir: string;\n let harnessPath: string;\n let configPath: string;\n\n if (existsSync(join(workDir, \"state\", \"migrate.json\"))) {\n const state = JSON.parse(\n readFileSync(join(workDir, \"state\", \"migrate.json\"), \"utf-8\"),\n ) as {\n manifest: AnyMigrateManifest;\n harness: HarnessPreference | null;\n config: HarnesstapSettings;\n active_profile: { name?: string } | null;\n plugins: unknown[];\n environments?: string[];\n };\n manifest = state.manifest;\n pluginsDir = join(workDir, \"import-plugins\");\n environmentsDir = join(workDir, \"import-environments\");\n mkdirSync(pluginsDir, { recursive: true });\n mkdirSync(environmentsDir, { recursive: true });\n for (let i = 0; i < state.plugins.length; i++) {\n const packageDir = join(pluginsDir, `plugin-${i}`);\n const envelopeRaw = JSON.stringify(state.plugins[i]);\n const files = parseApEnvelope(envelopeRaw, `archive plugin ${i}`);\n writeApPackageFiles(files, packageDir);\n }\n if (state.environments) {\n for (let i = 0; i < state.environments.length; i++) {\n writeFileSync(\n join(environmentsDir, `environment-${i}.toml`),\n state.environments[i] ?? \"\",\n \"utf-8\",\n );\n }\n }\n if (state.harness) {\n writeJson(join(workDir, \"harness.json\"), state.harness);\n }\n writeJson(join(workDir, \"config.json\"), state.config);\n if (state.active_profile) {\n writeJson(join(workDir, \"active-profile.json\"), state.active_profile);\n }\n harnessPath = join(workDir, \"harness.json\");\n configPath = join(workDir, \"config.json\");\n } else {\n manifest = JSON.parse(\n readFileSync(join(workDir, \"manifest.json\"), \"utf-8\"),\n ) as AnyMigrateManifest;\n pluginsDir = join(workDir, \"plugins\");\n environmentsDir = join(workDir, \"environments\");\n harnessPath = join(workDir, \"harness.json\");\n configPath = join(workDir, \"config.json\");\n }\n const activeProfilePath = join(workDir, \"active-profile.json\");\n\n if (isMigrateManifestV1(manifest)) {\n throw new Error(\n \"This archive uses manifest version 1, which stored plugins as TOML. \" +\n \"Version 1 archives were never released and are not supported.\",\n );\n }\n\n const manifestVersion = manifest.version;\n if (manifestVersion !== MIGRATE_MANIFEST_VERSION) {\n throw new Error(`Unsupported migration manifest version: ${manifestVersion}`);\n }\n\n const pluginsImported = importPluginsFromDir(pluginsDir);\n const environmentsImported = importEnvironmentsFromDir(environmentsDir);\n\n if (existsSync(harnessPath)) {\n const harness = JSON.parse(\n readFileSync(harnessPath, \"utf-8\"),\n ) as HarnessPreference;\n setHarnessPreference(selectionFromArchive(harness));\n }\n\n if (existsSync(configPath)) {\n const config = JSON.parse(\n readFileSync(configPath, \"utf-8\"),\n ) as HarnesstapSettings;\n const targetDir = getHarnesstapDir();\n mkdirSync(targetDir, { recursive: true });\n writeJson(join(targetDir, \"config.json\"), config);\n }\n if (existsSync(activeProfilePath)) {\n const activeProfile = JSON.parse(\n readFileSync(activeProfilePath, \"utf-8\"),\n ) as { name?: string };\n const targetDir = getHarnesstapDir();\n mkdirSync(targetDir, { recursive: true });\n writeJson(join(targetDir, \"active-profile.json\"), activeProfile);\n }\n\n return {\n manifest,\n plugins_imported: pluginsImported,\n environments_imported: environmentsImported,\n };\n } finally {\n rmSync(workDir, { recursive: true, force: true });\n }\n}\n","import { existsSync, statSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { getPluginResources } from \"../models/plugin-model.js\";\nimport { getResource, resolveResource } from \"../models/resource.js\";\nimport type { Resource } from \"../types.js\";\nimport {\n buildApPackageFilesForResource,\n readApPackageFiles,\n writeApPackageFiles,\n} from \"./agent-plugins/files.js\";\nimport {\n isApEnvelopePath,\n readApEnvelope,\n writeApEnvelope,\n} from \"./agent-plugins/envelope.js\";\nimport { importApPackageFiles } from \"./agent-plugins/import.js\";\nimport { isCompositionResourceType } from \"./plugin-composition.js\";\nimport { parseResourceSelector } from \"./resource-selector.js\";\n\nexport interface ResourcePackageExportResult {\n type: Resource[\"type\"];\n name: string;\n description: string;\n content: string;\n metadata: Resource[\"metadata\"];\n namespace: string;\n origin_kind: Resource[\"origin_kind\"];\n origin_ref: string;\n content_hash: string;\n content_blob_ref: string;\n files: string[];\n}\n\nexport function formatResourceSelector(\n resource: Pick<Resource, \"type\" | \"name\" | \"namespace\">,\n): string {\n const namePart = resource.namespace\n ? `${resource.name}@${resource.namespace}`\n : resource.name;\n return `${resource.type}:${namePart}`;\n}\n\nexport function exportResourceToFile(\n selector: string,\n filePath: string,\n options?: { singleFile?: boolean },\n): ResourcePackageExportResult {\n const parsed = parseResourceSelector(selector);\n if (parsed.type && isCompositionResourceType(parsed.type)) {\n throw new Error(\n `Cannot export composition resource type: ${parsed.type}`,\n );\n }\n const resolved = resolveResource(selector);\n if (resolved.status !== \"found\") {\n throw new Error(\n resolved.status === \"ambiguous\"\n ? `Ambiguous resource selector: ${selector}`\n : `Resource not found: ${selector}`,\n );\n }\n if (isCompositionResourceType(resolved.resource.type)) {\n throw new Error(\n `Cannot export composition resource type: ${resolved.resource.type}`,\n );\n }\n const out = resolve(filePath);\n const files = buildApPackageFilesForResource(resolved.resource.id);\n const singleFile = options?.singleFile === true || isApEnvelopePath(out);\n const written = singleFile\n ? (writeApEnvelope(files, out), Object.keys(files).sort())\n : writeApPackageFiles(files, out);\n const { id: _id, created_at: _c, updated_at: _u, source: _s, ...payload } =\n resolved.resource;\n return {\n ...payload,\n files: written,\n };\n}\n\nexport function importResourceFromFile(filePath: string): {\n resource: Resource;\n action: \"created\" | \"updated\" | \"unchanged\";\n} {\n const resolved = resolve(filePath);\n if (!existsSync(resolved)) {\n throw new Error(`Path not found: ${resolved}`);\n }\n const packageFiles = statSync(resolved).isDirectory()\n ? readApPackageFiles(resolved)\n : isApEnvelopePath(resolved)\n ? readApEnvelope(resolved)\n : (() => {\n throw new Error(\n `${resolved} is not an Agent Plugins package directory or .ap.json envelope.`,\n );\n })();\n\n const plugin = importApPackageFiles(packageFiles);\n const resources = getPluginResources(plugin.id);\n const resource = resources[0];\n if (!resource) {\n throw new Error(`Package ${resolved} did not contain any resources.`);\n }\n const stored = getResource(resource.id) ?? resource;\n return {\n resource: stored,\n action: \"created\",\n };\n}\n","import {\n getPluginById,\n getPluginResources,\n listPluginDependencies,\n listPlugins,\n} from \"../models/plugin-model.js\";\nimport { listProjects } from \"../models/project.js\";\nimport { getLatestSnapshot } from \"../models/snapshot.js\";\nimport type { SnapshotState } from \"../types.js\";\nimport { setPluginResourceOverride } from \"./plugin-overrides.js\";\nimport {\n type ResolutionResult,\n resolutionKey,\n resolveComposition,\n} from \"./resolve/index.js\";\n\nexport interface OrderMigrationReport {\n projectsWithSnapshot: number;\n projectsWithoutSnapshot: number;\n overridesWritten: Array<{ root: string; key: string; winner: string }>;\n warnings: string[];\n}\n\nexport interface MigrateOrderToOverridesOptions {\n /** When true, report overrides that would be written without persisting them. */\n dryRun?: boolean;\n}\n\n/**\n * Reproduce previously applied results under nearest-to-root precedence.\n *\n * For every project with a recorded apply snapshot, compare the resource that\n * the old ordered merge materialized against the one resolution now picks. Where\n * they differ, write an explicit `overrides.resources` entry on the root so the\n * applied result is unchanged. Projects with no snapshot get a warning listing\n * the resources whose winner may change.\n */\nexport function migrateOrderToOverrides(\n options: MigrateOrderToOverridesOptions = {},\n): OrderMigrationReport {\n const report: OrderMigrationReport = {\n projectsWithSnapshot: 0,\n projectsWithoutSnapshot: 0,\n overridesWritten: [],\n warnings: [],\n };\n const dryRun = options.dryRun === true;\n\n for (const project of listProjects()) {\n const snapshot = getLatestSnapshot(project.id);\n const state = snapshot?.state as SnapshotState | undefined;\n const rootPlugin = state?.plugins?.[state.plugins.length - 1];\n if (!rootPlugin) {\n report.projectsWithoutSnapshot += 1;\n continue;\n }\n report.projectsWithSnapshot += 1;\n\n let resolution: ResolutionResult;\n try {\n resolution = resolveComposition({ rootSelectors: [rootPlugin.name] });\n } catch {\n report.warnings.push(\n `${project.name}: ${rootPlugin.name} no longer resolves; run ` +\n `\\`ht plugin apply ${rootPlugin.name} --explain\\` to inspect.`,\n );\n continue;\n }\n\n const previousWinnerByKey = new Map<string, string>();\n for (const resource of state?.resources ?? []) {\n const owner = ownerPluginName(resource.id, resolution.selected);\n if (owner) {\n previousWinnerByKey.set(resolutionKey(resource), owner);\n }\n }\n\n for (const decision of resolution.decisions) {\n const previous = previousWinnerByKey.get(decision.key);\n if (!previous || previous === decision.winner.pluginName) continue;\n if (!dryRun) {\n setPluginResourceOverride(resolution.root.pluginId, decision.key, previous);\n }\n report.overridesWritten.push({\n root: resolution.root.name,\n key: decision.key,\n winner: previous,\n });\n }\n }\n\n // Projects with no snapshot: name the resources whose winner may change.\n if (report.projectsWithoutSnapshot > 0) {\n for (const project of listProjects()) {\n if (getLatestSnapshot(project.id)) continue;\n const contested = collectContestedKeys();\n if (contested.keys.length > 0) {\n report.warnings.push(\n `${project.name}: no apply snapshot recorded, so previous winners are unknown. ` +\n `Contested: ${contested.keys.join(\", \")}. ` +\n `Run \\`ht plugin apply ${contested.explainRoot} --explain\\` to inspect.`,\n );\n } else {\n report.warnings.push(\n `${project.name}: no apply snapshot recorded, so previous winners are unknown.`,\n );\n }\n }\n }\n\n return report;\n}\n\nfunction collectContestedKeys(): { keys: string[]; explainRoot: string } {\n const keys: string[] = [];\n let explainRoot = \"<root>\";\n for (const plugin of listPlugins()) {\n if (listPluginDependencies(plugin.id).length === 0) continue;\n try {\n const resolution = resolveComposition({ rootSelectors: [plugin.name] });\n for (const decision of resolution.decisions) {\n if (decision.losers.length === 0) continue;\n if (!keys.includes(decision.key)) {\n keys.push(decision.key);\n }\n }\n if (explainRoot === \"<root>\") {\n explainRoot = plugin.name;\n }\n } catch {\n // Skip plugins that no longer resolve; the project-level warning still fires.\n }\n }\n return { keys, explainRoot };\n}\n\nfunction ownerPluginName(\n resourceId: string,\n selected: ReturnType<typeof resolveComposition>[\"selected\"],\n): string | undefined {\n for (const frame of selected) {\n const plugin = getPluginById(frame.pluginId);\n if (!plugin) continue;\n if (getPluginResources(plugin.id).some((resource) => resource.id === resourceId)) {\n return plugin.name;\n }\n }\n return undefined;\n}\n","import inquirer from \"inquirer\";\nimport { listResources } from \"../../models/resource.js\";\nimport { toPluginChoices } from \"../completion/choices.js\";\nimport type { MigrateScope } from \"../migrate-scope.js\";\nimport { isCompositionResourceType } from \"../plugin-composition.js\";\nimport { slugifyApName } from \"../agent-plugins/name.js\";\nimport {\n formatResourceSelectionLabel,\n sortResourcesByUpdatedAt,\n toResourceListRows,\n} from \"../../ui/resource-list-render.js\";\nimport { promptForSearchableChoice, promptForValue } from \"./shared.js\";\n\nexport type MigrateExportWizardResult = {\n scope: MigrateScope;\n outputPath: string;\n plugin?: string;\n resource?: string;\n embedPlugins?: boolean;\n singleFile?: boolean;\n};\n\nexport async function runMigrateExportWizard(): Promise<MigrateExportWizardResult> {\n const { scope } = await inquirer.prompt<{ scope: MigrateScope }>([\n {\n type: \"list\",\n name: \"scope\",\n message: \"What should be exported?\",\n choices: [\n { name: \"Workspace (full local library)\", value: \"workspace\" },\n { name: \"Plugin\", value: \"plugin\" },\n { name: \"Resource\", value: \"resource\" },\n ],\n },\n ]);\n\n if (scope === \"plugin\") {\n const choices = toPluginChoices();\n const plugin = choices.length > 0\n ? await promptForSearchableChoice({ message: \"Which plugin?\", choices })\n : await promptForValue({ message: \"Plugin name or ID\" });\n const firstPlugin = plugin.split(\",\")[0]?.trim() ?? \"plugin\";\n const apName = slugifyApName(firstPlugin);\n const { singleFile } = await inquirer.prompt<{ singleFile: boolean }>([\n {\n type: \"confirm\",\n name: \"singleFile\",\n message: \"Write a single .ap.json envelope?\",\n default: false,\n },\n ]);\n const outputPath = await promptForValue({\n message: \"Output path\",\n default: singleFile ? `./${apName}.ap.json` : `./${apName}`,\n });\n return { scope, plugin, outputPath, singleFile };\n }\n\n if (scope === \"resource\") {\n const resources = sortResourcesByUpdatedAt(\n toResourceListRows(listResources()).filter(\n (resource) => !isCompositionResourceType(resource.type),\n ),\n );\n if (resources.length === 0) {\n throw new Error(\n \"No exportable resources in workspace. Scan or create resources first.\",\n );\n }\n const choices = resources.map((resource) => ({\n name: formatResourceSelectionLabel(resource),\n value: `${resource.type}:${resource.name}${resource.namespace ? `@${resource.namespace}` : \"\"}`,\n }));\n const resource = await promptForSearchableChoice({\n message: \"Which resource?\",\n choices,\n });\n const rest = resource.split(\":\")[1] ?? \"resource\";\n const name = slugifyApName(rest.split(\"@\")[0] ?? \"resource\");\n const { singleFile } = await inquirer.prompt<{ singleFile: boolean }>([\n {\n type: \"confirm\",\n name: \"singleFile\",\n message: \"Write a single .ap.json envelope?\",\n default: false,\n },\n ]);\n const outputPath = await promptForValue({\n message: \"Output path\",\n default: singleFile ? `./${name}.ap.json` : `./${name}`,\n });\n return { scope, resource, outputPath, singleFile };\n }\n\n const outputPath = await promptForValue({\n message: \"Output archive path\",\n default: \"./harnesstap-backup.tar.gz\",\n });\n const { embed } = await inquirer.prompt<{ embed: boolean }>([\n {\n type: \"confirm\",\n name: \"embed\",\n message: \"Embed plugin trees in plugin exports?\",\n default: false,\n },\n ]);\n return { scope, outputPath, embedPlugins: embed };\n}\n","import {\n detectImportScopeFromFile,\n type MigrateScope,\n} from \"../migrate-scope.js\";\nimport { promptForValue } from \"./shared.js\";\n\nexport async function runMigrateImportWizard(): Promise<{\n file: string;\n scope: MigrateScope;\n}> {\n const file = await promptForValue({ message: \"Import file path\" });\n const scope = detectImportScopeFromFile(file);\n return { file, scope };\n}\n","import type { Command } from \"commander\";\nimport { getDb } from \"../../db/connection.js\";\nimport { initializeSchema } from \"../../db/schema.js\";\nimport {\n formatResourceCounts,\n formatSkippedEntry,\n} from \"../../services/agent-plugins/import-diagnostics.js\";\nimport {\n exportScopedMigration,\n ImportSkippedFilesError,\n importScopedMigration,\n resolveExportScope,\n resolveImportScope,\n type ScopedExportResult,\n type ScopedImportResult,\n} from \"../../services/migrate-scope.js\";\nimport {\n migrateOrderToOverrides,\n type OrderMigrationReport,\n} from \"../../services/order-to-override-migration.js\";\nimport { runMigrateExportWizard } from \"../../services/wizards/migrate-export.js\";\nimport { runMigrateImportWizard } from \"../../services/wizards/migrate-import.js\";\nimport { shouldUseWizard } from \"../../services/wizards/shared.js\";\nimport { ui } from \"../../ui/index.js\";\nimport { shortenHomePath } from \"../../utils/home-path.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { formatCount } from \"../formatting.js\";\nimport { configureCommandGroup } from \"../help.js\";\nimport { fail, failCaught } from \"../shared.js\";\n\nfunction printMigrateExportHuman(result: ScopedExportResult): void {\n const output = shortenHomePath(result.output);\n switch (result.scope) {\n case \"workspace\":\n ui.success(\n `Exported migration archive ${ui.icons.hint} ${output} ${ui.icons.bullet} ${formatCount(result.manifest.plugin_count, \"plugin\")}, ${formatCount(result.manifest.environment_count, \"environment\")}`,\n );\n return;\n case \"plugin\":\n ui.success(\n `Exported plugin ${ui.theme.accent(result.plugins.join(\", \"))} ${ui.icons.hint} ${output}`,\n );\n return;\n case \"resource\":\n ui.success(\n `Exported resource ${ui.theme.accent(result.resource)} ${ui.icons.hint} ${output}`,\n );\n return;\n default: {\n const neverResult: never = result;\n throw new Error(`Unsupported export result: ${String(neverResult)}`);\n }\n }\n}\n\nfunction printMigrateImportHuman(result: ScopedImportResult): void {\n switch (result.scope) {\n case \"workspace\":\n ui.success(\n `Imported migration archive ${ui.icons.bullet} ${formatCount(result.plugins_imported, \"plugin\")}, ${formatCount(result.environments_imported, \"environment\")}`,\n );\n return;\n case \"plugin\":\n for (const item of result.skipped) {\n ui.warn(`skipped ${formatSkippedEntry(item)}`);\n }\n ui.success(\n `Imported plugin ${ui.theme.accent(result.plugin)} ${ui.icons.bullet} ${formatCount(result.resources_imported, \"resource\")}`,\n );\n ui.info(`Resources, imported of discovered: ${formatResourceCounts(result.resource_counts)}`);\n if (result.skipped.length > 0) {\n ui.warn(\n `${formatCount(result.skipped.length, \"file\")} not imported. Fix them and import again; --strict refuses the import instead.`,\n );\n }\n return;\n case \"resource\":\n ui.success(\n `Imported resource ${ui.theme.accent(result.resource)} ${ui.icons.bullet} ${result.action}`,\n );\n return;\n default: {\n const neverResult: never = result;\n throw new Error(`Unsupported import result: ${String(neverResult)}`);\n }\n }\n}\n\nasync function handleMigrateExportCommand(\n file: string | undefined,\n opts: {\n file?: string;\n workspace?: boolean;\n plugin?: string;\n resource?: string;\n environment?: string;\n includePlugins?: boolean;\n embedPlugins?: boolean;\n singleFile?: boolean;\n archive?: boolean;\n vendorExtensions?: boolean;\n format?: string;\n noInteractive?: boolean;\n interactive?: boolean;\n },\n): Promise<void> {\n const db = getDb();\n initializeSchema(db, { allowLegacyRead: true });\n const format = parseOutputFormat(opts.format);\n\n let exportOpts = {\n ...opts,\n file: opts.file ?? file,\n };\n\n const useWizard = shouldUseWizard({\n interactive: opts.interactive,\n noInteractive: opts.noInteractive,\n format: opts.format,\n missingRequiredArgs:\n !exportOpts.file\n && !exportOpts.plugin\n && !exportOpts.resource\n && !exportOpts.environment\n && !exportOpts.workspace,\n });\n\n if (useWizard) {\n const wizard = await runMigrateExportWizard();\n exportOpts = {\n ...exportOpts,\n file: wizard.outputPath,\n workspace: wizard.scope === \"workspace\" ? true : undefined,\n plugin: wizard.plugin,\n resource: wizard.resource,\n includePlugins: wizard.embedPlugins,\n singleFile: wizard.singleFile,\n };\n }\n\n try {\n const resolved = resolveExportScope(exportOpts);\n const result = exportScopedMigration(resolved, {\n ...exportOpts,\n onSkip: (message) => ui.warn(message),\n });\n if (format === \"json\") {\n if (result.scope === \"workspace\") {\n printJson({ ...result.manifest, output: result.output, scope: result.scope });\n return;\n }\n printJson(result);\n return;\n }\n printMigrateExportHuman(result);\n } catch (err) {\n fail(err instanceof Error ? err.message : String(err));\n process.exitCode = 1;\n }\n}\n\nasync function handleMigrateImportCommand(\n file: string | undefined,\n opts: {\n workspace?: boolean;\n plugin?: boolean;\n resource?: boolean;\n environment?: boolean;\n strict?: boolean;\n format?: string;\n noInteractive?: boolean;\n interactive?: boolean;\n } = {},\n): Promise<void> {\n const db = getDb();\n initializeSchema(db);\n const format = parseOutputFormat(opts.format);\n\n let importFile = file;\n let scopeOverride: ReturnType<typeof resolveImportScope> | undefined;\n\n const useWizard = shouldUseWizard({\n interactive: opts.interactive,\n noInteractive: opts.noInteractive,\n format: opts.format,\n missingRequiredArgs: !importFile,\n });\n\n if (useWizard) {\n const wizard = await runMigrateImportWizard();\n importFile = wizard.file;\n scopeOverride = wizard.scope;\n }\n\n if (!importFile) {\n fail(\"Import file path is required.\");\n process.exitCode = 1;\n return;\n }\n\n try {\n const scope = scopeOverride ?? resolveImportScope({ ...opts, file: importFile });\n // Scripts and CI fail on skipped files unless they opt out with --no-strict.\n const strict = opts.strict ?? !shouldUseWizard({\n interactive: true,\n noInteractive: opts.noInteractive,\n format: opts.format,\n missingRequiredArgs: false,\n });\n const result = importScopedMigration(scope, importFile, { strict });\n if (format === \"json\") {\n printJson(result);\n return;\n }\n printMigrateImportHuman(result);\n } catch (err) {\n if (err instanceof ImportSkippedFilesError) {\n if (format === \"json\") {\n printJson({\n scope: \"plugin\",\n imported: false,\n error: \"skipped_files\",\n skipped: err.diagnostics.skipped,\n resource_counts: err.diagnostics.counts,\n });\n process.exitCode = 1;\n return;\n }\n for (const item of err.diagnostics.skipped) {\n ui.warn(`skipped ${formatSkippedEntry(item)}`);\n }\n ui.info(`Would import, of discovered: ${formatResourceCounts(err.diagnostics.counts)}`);\n fail(\n `Not imported: ${formatCount(err.diagnostics.skipped.length, \"file\")} would be skipped.`,\n { hint: \"Fix the files, or pass --no-strict to import the rest anyway.\" },\n );\n return;\n }\n failCaught(err);\n }\n}\n\nfunction printMigrateResolveOrderHuman(\n report: OrderMigrationReport,\n dryRun: boolean,\n): void {\n const dryRunSuffix = dryRun ? ` ${ui.icons.bullet} dry-run` : \"\";\n if (report.overridesWritten.length === 0) {\n const aligned =\n report.projectsWithSnapshot > 0\n ? \"Last applied winners already match current resolution. No overrides to write\"\n : \"No apply snapshots to compare. No overrides to write\";\n ui.success(`${aligned}${dryRunSuffix}`);\n } else {\n const overrideCount = formatCount(report.overridesWritten.length, \"override\");\n const projectCount = formatCount(report.projectsWithSnapshot, \"project\");\n const verb = dryRun ? \"Would write\" : \"Wrote\";\n ui.success(\n `${verb} ${overrideCount} across ${projectCount}${dryRunSuffix}`,\n );\n }\n for (const warning of report.warnings) {\n ui.warn(warning);\n }\n}\n\nfunction handleMigrateResolveOrderCommand(opts: {\n dryRun?: boolean;\n format?: string;\n}): void {\n const db = getDb();\n initializeSchema(db, { allowLegacyRead: true });\n const format = parseOutputFormat(opts.format);\n const dryRun = opts.dryRun === true;\n const report = migrateOrderToOverrides({ dryRun });\n if (format === \"json\") {\n printJson(report);\n return;\n }\n printMigrateResolveOrderHuman(report, dryRun);\n}\n\nexport function registerMigrateCommands(root: Command): void {\n const migrateCmd = configureCommandGroup(\n root\n .command(\"migrate\")\n .alias(\"m\")\n .description(\"Export or import workspace, plugins, or resources for offline sharing\"),\n );\n\n migrateCmd\n .command(\"export\")\n .argument(\n \"[file]\",\n \"Output path (package directory, .ap.json envelope, or .tar.gz workspace archive)\",\n )\n .option(\"--workspace\", \"Export full workspace archive\")\n .option(\"--plugin <name>\", \"Export plugin(s); comma-separated names or IDs\")\n .option(\"--resource <selector>\", \"Export one resource (type:name or type:name@namespace)\")\n .option(\n \"--environment <name>\",\n \"Removed: environments are machine-local; use --workspace\",\n )\n .option(\"--single-file\", \"Write a .ap.json envelope instead of a package directory\")\n .option(\"--archive\", \"Write a .zip of the Agent Plugins package\")\n .option(\n \"--vendor-extensions\",\n \"Also write com.github.copilot files and Codex hook settings\",\n )\n .option(\"-o, --file <path>\", \"Output path (overrides positional)\")\n .option(\"--include-plugins\", \"Embed plugin trees (workspace scope)\")\n .option(\"--embed-plugins\", \"Alias for --include-plugins\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .description(\"Export workspace, plugin, or resource for offline sharing\")\n .action(handleMigrateExportCommand);\n\n migrateCmd\n .command(\"import\")\n .argument(\n \"[file]\",\n \"package directory, .ap.json envelope, or .tar.gz workspace archive\",\n )\n .option(\"--workspace\", \"Force workspace archive import\")\n .option(\"--plugin\", \"Force Agent Plugins package import\")\n .option(\"--resource\", \"Force single-resource package import\")\n .option(\n \"--strict\",\n \"Refuse a plugin package with skipped files (default when not interactive)\",\n )\n .option(\"--no-strict\", \"Import a plugin package even when some files are skipped\")\n .option(\n \"--environment\",\n \"Removed: environments are machine-local; use --workspace\",\n )\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .description(\"Import workspace, plugin, or resource from file\")\n .action(handleMigrateImportCommand);\n\n migrateCmd\n .command(\"resolve-order\")\n .option(\"--dry-run\", \"Report what would be written without writing\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .description(\n \"Pin last-applied resource winners as overrides where current resolution would pick a different plugin\",\n )\n .action(handleMigrateResolveOrderCommand);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,cAAAA,aAAY,YAAAC,iBAAgB;AACrC,SAAS,SAAS,QAAAC,OAAM,WAAAC,gBAAe;;;ACDvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,MAAM,eAAe;AAC9B,SAAS,gBAAgB;AA6BzB,SAAS,qBAAqB,KAAgC;AAC5D,QAAM,MAAO,OAAO,CAAC;AACrB,MAAI,MAAM,QAAQ,IAAI,oBAAoB,GAAG;AAC3C,WAAO;AAAA,MACL,sBAAsB,IAAI,qBAAqB;AAAA,QAC7C,CAAC,UAA2B,OAAO,UAAU;AAAA,MAC/C;AAAA,IACF;AAAA,EACF;AACA,SAAO;AAAA,IACL,sBAAsB;AAAA,MACpB,OAAO,IAAI,iBAAiB,WAAW,IAAI,eAAe;AAAA,MAC1D,MAAM,QAAQ,IAAI,eAAe,IAC7B,IAAI,gBAAgB,OAAO,CAAC,UAA2B,OAAO,UAAU,QAAQ,IAChF,CAAC;AAAA,IACP;AAAA,EACF;AACF;AAEO,IAAM,8BAA8B;AACpC,IAAM,2BAA2B;AAiCxC,SAAS,UAAU,MAAc,MAAqB;AACpD,gBAAc,MAAM,KAAK,UAAU,MAAM,MAAM,CAAC,GAAG,OAAO;AAC5D;AAEA,SAAS,mBAAmB,aAA+B;AACzD,QAAM,UAAU,SAAS,aAAa,WAAW,KAAK;AAAA,IACpD,UAAU;AAAA,IACV,OAAO,CAAC,UAAU,QAAQ,MAAM;AAAA,EAClC,CAAC;AACD,SAAO,QACJ,MAAM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;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,eAAe,gCAAgC,EACtD,OAAO,YAAY,oCAAoC,EACvD,OAAO,cAAc,sCAAsC,EAC3D;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,eAAe,0DAA0D,EAChF;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,YAAY,iDAAiD,EAC7D,OAAO,0BAA0B;AAEpC,aACG,QAAQ,eAAe,EACvB,OAAO,aAAa,8CAA8C,EAClE,OAAO,mBAAmB,gCAAgC,OAAO,EACjE;AAAA,IACC;AAAA,EACF,EACC,OAAO,gCAAgC;AAC5C;","names":["existsSync","statSync","join","resolve","existsSync","statSync","resolve","resolve","existsSync","statSync","resolve","statSync","existsSync","join","outputPath","resource"]}
|