├── .editorconfig ├── .gitattributes ├── .github ├── 68f8fec9.png ├── A}YWVE860U(%YQD$R1GB1[P.png ├── EZSLAB`K@YFFOW47{090W8B.png ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── feature.md ├── J]CE)IK4BU08(EO~UVLJ{[F.png ├── event hook.png ├── jetbrains-variant-3.png ├── workflows │ ├── build.yml │ ├── check-publishing.yml │ ├── doc.yml │ └── release.yml └── 机器人和联系人架构.png ├── .gitignore ├── .idea ├── copyright │ ├── Mamoe_mirai.xml │ └── profiles_settings.xml ├── icon.png └── vcs.xml ├── .run ├── Check Binary Compatibility.run.xml ├── Compile everything.run.xml ├── Compile mirai-console.run.xml ├── Compile mirai-core for JVM.run.xml ├── Dump API Changes for mirai-console-frontend-base.run.xml ├── Dump API Changes for mirai-console.run.xml ├── Dump API Changes for mirai-core-api.run.xml ├── Publish deps test artifacts.run.xml ├── Publish local artifacts.run.xml ├── Run IDE.run.xml ├── Run core tests.run.xml ├── RunMessageDecodingRecorderKt.run.xml ├── RunRecorderKt.run.xml ├── Test everything.run.xml ├── Test mirai-console.run.xml └── Test mirai-core for JVM.run.xml ├── CONTRIBUTING.md ├── LICENSE ├── README-eng.md ├── README.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ ├── kotlin │ ├── Android.kt │ ├── BinaryCompatibilityConfigurator.kt │ ├── DependencyDumper.kt │ ├── HmppConfigure.kt │ ├── JvmDependencies.kt │ ├── JvmPublishing.kt │ ├── KotlinMetadataPatcher.kt │ ├── LocalProperties.kt │ ├── Mpp.kt │ ├── MppPublishing.kt │ ├── ProjectConfigure.kt │ ├── PublishingHelpers.kt │ ├── Stdlib.kt │ ├── TestDependencies.kt │ ├── UpdateSnapshotPage.kt │ ├── Versions.kt │ ├── analyzes │ │ ├── AndroidApiLevelCheck.kt │ │ ├── AsmUtil.kt │ │ ├── CompiledCodeVerify.kt │ │ └── NoSuchMethodAnalyzer.kt │ ├── explicit-api.gradle.kts │ ├── keys │ │ └── SecretKeys.kt │ ├── shadow │ │ ├── Relocation.kt │ │ ├── RelocationConfig.kt │ │ └── Shadow.kt │ └── utils.kt │ └── resources │ ├── androidutil │ └── api-versions.xml │ ├── binary-compatibility-validator-build.txt │ └── binary-compatibility-validator-ignore.txt ├── ci-release-helper ├── .gitignore ├── build.gradle.kts ├── changelogs │ ├── 2.10.1.md │ ├── 2.10.2.md │ ├── 2.11.0-M1.md │ ├── 2.11.0-RC.md │ ├── 2.11.0.md │ ├── 2.12.0-RC.md │ ├── 2.12.0.md │ ├── 2.12.1.md │ ├── 2.12.2.md │ ├── 2.12.3.md │ ├── 2.13.0-M1.md │ ├── 2.13.0-RC.md │ ├── 2.13.0-RC2.md │ ├── 2.13.0.md │ ├── 2.13.1.md │ ├── 2.13.2.md │ ├── 2.13.3.md │ ├── 2.13.4.md │ ├── 2.14.0-RC.md │ ├── 2.14.0.md │ ├── 2.15.0-M1.md │ └── README.md ├── scripts │ └── kill-java.js └── src │ ├── CiHelper.kt │ ├── buildIndex │ ├── Index.kt │ └── SnapshotVersions.kt │ └── package.kt ├── docs ├── .UserManual_images │ ├── MCLI-1.png │ └── MCPS-1.png ├── .conf │ └── nav.js ├── .mirai_images │ ├── d548dae5.png │ └── e02dc13d.png ├── Bots.md ├── ConciseAPI.md ├── ConfiguringMultiplatformProjects.md ├── ConfiguringProjects.md ├── ConsoleTerminal.md ├── Contacts.md ├── CoreAPI.md ├── DebuggingNetwork.md ├── EventList.md ├── Events.md ├── Evolution.md ├── KotlinAndJava.md ├── Messages.md ├── MigrationFrom1x.md ├── Preparations.md ├── Questions.md ├── README.md ├── UserManual.md ├── UsingSnapshots.md ├── contributing │ ├── ImplementingProtocol.md │ ├── README.md │ ├── SimpleInstructions.md │ ├── VerifyingABI.md │ ├── building │ │ ├── BuildingCoreAndroid.md │ │ ├── README.md │ │ └── images │ │ │ └── run-gradle-tasks-in-idea.png │ └── mock │ │ └── SpaceAllocation.md ├── files │ └── install-20210412.cmd ├── images │ ├── snapshots-build-jvm.png │ └── snapshots-find-actions.png ├── mirai-ecology.md ├── mirai.png ├── mirai.svg ├── mocking │ └── Mocking.md └── src │ ├── Contacts.mermaid.md │ └── Messages.mermaid.md ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── install.sh ├── logging ├── README.md ├── mirai-logging-log4j2 │ ├── build.gradle.kts │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── net.mamoe.mirai.utils.MiraiLogger$Factory │ ├── src │ │ └── MiraiLog4JFactory.kt │ └── test │ │ └── MiraiLog4JAdapterTest.kt ├── mirai-logging-slf4j-logback │ ├── build.gradle.kts │ └── test │ │ └── MiraiSlf4JLogbackAdapterTest.kt ├── mirai-logging-slf4j-simple │ ├── build.gradle.kts │ └── test │ │ └── MiraiSlf4JSimpleAdapterTest.kt └── mirai-logging-slf4j │ ├── build.gradle.kts │ └── test │ └── MiraiSlf4JAdapterTest.kt ├── mirai-bom └── build.gradle.kts ├── mirai-console ├── .gitignore ├── .gitmodules ├── README.md ├── backend │ ├── codegen │ │ ├── README.md │ │ ├── build.gradle.kts │ │ └── src │ │ │ ├── Codegen.kt │ │ │ ├── MessageScopeCodegen.kt │ │ │ ├── ValuePluginDataCodegen.kt │ │ │ ├── old │ │ │ ├── JSettingCodegen.kt │ │ │ ├── SettingValueUseSiteCodegen.kt │ │ │ ├── ValueImplCodegen.kt │ │ │ └── ValuesCodegen.kt │ │ │ └── util.kt │ ├── integration-test │ │ ├── README.md │ │ ├── build.gradle.kts │ │ ├── src │ │ │ ├── AbstractTestPoint.kt │ │ │ ├── AbstractTestPointAsPlugin.kt │ │ │ ├── IntegrationTestBootstrap.kt │ │ │ ├── MiraiConsoleIntegrationTestLauncher.kt │ │ │ └── utils.kt │ │ ├── test │ │ │ ├── MiraiConsoleIntegrationTestBootstrap.kt │ │ │ └── testpoints │ │ │ │ ├── DoNothingPoint.kt │ │ │ │ ├── MCITBSelfAssertions.kt │ │ │ │ ├── PluginSharedLibraries.kt │ │ │ │ └── plugin │ │ │ │ ├── PluginDataRenameToIdTest.kt │ │ │ │ ├── PluginDependOnErrorPlugin.kt │ │ │ │ ├── PluginOnDisableCalledOnlyOnceTest.kt │ │ │ │ └── PluginWithExceptionTest.kt │ │ └── testers │ │ │ ├── .gitignore │ │ │ ├── MCITSelfTestPlugin │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── MCITSelfTestPlugin.kt │ │ │ ├── README.md │ │ │ ├── mirai-plugin-compatibility │ │ │ ├── .module-group.txt │ │ │ ├── mirai-jar-after-2_11-without-new │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── After211NoNew.kt │ │ │ ├── mirai-jar-after-2_11 │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── After211.kt │ │ │ ├── mirai-jar-before-2_11 │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── Before211.kt │ │ │ ├── same-pkg-1 │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── P.kt │ │ │ └── same-pkg-2 │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ └── P.kt │ │ │ ├── never-override-jdk-modules │ │ │ ├── module-jdk-module │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── mvn.txt │ │ │ │ └── src │ │ │ │ │ └── javax │ │ │ │ │ └── xml │ │ │ │ │ └── parsers │ │ │ │ │ └── SAXParser.kt │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── NeverOverrideJdkModules.kt │ │ │ ├── options-properties │ │ │ ├── independent-plugin │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── Independent.kt │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ ├── mirai-console-plugin │ │ │ │ │ └── options.properties │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── OptionsProperties.kt │ │ │ ├── plugin-can-depends-on-mirai-console │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── PluginCanDependsOnMiraiConsole.kt │ │ │ ├── plugin-dep-dependon-dep-issue-2054 │ │ │ ├── module-moda │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── mvn.txt │ │ │ │ └── src │ │ │ │ │ └── ModuleA.kt │ │ │ ├── module-modb │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ └── mvn.txt │ │ │ │ └── src │ │ │ │ │ └── ModuleB.kt │ │ │ ├── module-private-issue2108 │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── mvn.txt │ │ │ │ └── src │ │ │ │ │ └── PrivateModule.kt │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ ├── second-plugin │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── src │ │ │ │ │ └── PDepDependOnDepSec.kt │ │ │ └── src │ │ │ │ └── PDepDependOnDep.kt │ │ │ ├── plugin-depend-on-other │ │ │ ├── build.gradle.kts │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ ├── PluginDependOnOther.kt │ │ │ │ └── issue1920 │ │ │ │ ├── OtherClass1.kt │ │ │ │ └── OtherClass2.kt │ │ │ ├── plugin-dynamic-dependencies-download │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ ├── mirai-console-plugin │ │ │ │ │ ├── dependencies-private.txt │ │ │ │ │ └── dependencies-shared.txt │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── P.kt │ │ │ ├── plugin-resolve-self-dependencies-over-console-ones │ │ │ ├── build.gradle.kts │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ ├── mirai-console-plugin │ │ │ │ │ └── dependencies-private.txt │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── PluginResolveSelfDependenciesOverConsoleOnes.kt │ │ │ ├── plugin-use-console-deps-fallback │ │ │ ├── build.gradle.kts │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ └── src │ │ │ │ └── PluginUseConsoleDepsFallback.kt │ │ │ ├── plugin-with-pluginyml-can-use-libraries-while-clinit │ │ │ ├── clinit-library │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── mvn.txt │ │ │ │ └── src │ │ │ │ │ └── PluginLibrary.kt │ │ │ ├── resources │ │ │ │ ├── META-INF │ │ │ │ │ ├── mirai-console-plugin │ │ │ │ │ │ └── dependencies-private.txt │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── plugin.yml │ │ │ └── src │ │ │ │ └── PluginWithPluginYmlClinitTest.kt │ │ │ ├── plugin-with-pluginyml │ │ │ ├── resources │ │ │ │ ├── META-INF │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── plugin.yml │ │ │ └── src │ │ │ │ └── PluginWithPluginYml.kt │ │ │ ├── service-loader │ │ │ ├── module-service-loader-impl │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ ├── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ │ └── net.mamoe.console.integrationtest.mod.servicetypedef.ServiceTypedef │ │ │ │ │ └── test-res.txt │ │ │ │ └── src │ │ │ │ │ └── ServiceImpl.kt │ │ │ ├── module-service-loader-typedef │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── resources │ │ │ │ │ └── test-res.txt │ │ │ │ └── src │ │ │ │ │ └── ServiceTypedef.kt │ │ │ ├── resources │ │ │ │ ├── META-INF │ │ │ │ │ └── services │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ └── test-res.txt │ │ │ ├── service-loader-2dep-plugin │ │ │ │ ├── .nested-module.txt │ │ │ │ ├── build.gradle.kts │ │ │ │ ├── resources │ │ │ │ │ ├── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ │ ├── net.mamoe.console.integrationtest.mod.servicetypedef.ServiceTypedef │ │ │ │ │ │ │ └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin │ │ │ │ │ └── test-res.txt │ │ │ │ └── src │ │ │ │ │ └── PMain.kt │ │ │ └── src │ │ │ │ └── PMain.kt │ │ │ └── tester.template.gradle.kts │ └── mirai-console │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.gradle.kts │ │ ├── compatibility-validation │ │ └── jvm │ │ │ └── api │ │ │ └── jvm.api │ │ ├── resources │ │ └── net │ │ │ └── mamoe │ │ │ └── mirai │ │ │ └── console │ │ │ └── internal │ │ │ └── enduserreadme │ │ │ └── readme.txt │ │ ├── src │ │ ├── MiraiConsole.kt │ │ ├── MiraiConsoleFrontEndDescription.kt │ │ ├── MiraiConsoleImplementation.kt │ │ ├── command │ │ │ ├── AbstractCommand.kt │ │ │ ├── BuiltInCommands.kt │ │ │ ├── Command.kt │ │ │ ├── CommandContext.kt │ │ │ ├── CommandExecuteResult.kt │ │ │ ├── CommandExecutionException.kt │ │ │ ├── CommandManager.kt │ │ │ ├── CommandOwner.kt │ │ │ ├── CommandPermissionDeniedException.kt │ │ │ ├── CommandSender.kt │ │ │ ├── CompositeCommand.kt │ │ │ ├── IllegalCommandArgumentException.kt │ │ │ ├── RawCommand.kt │ │ │ ├── SimpleCommand.kt │ │ │ ├── descriptor │ │ │ │ ├── CommandArgumentContext.kt │ │ │ │ ├── CommandArgumentParserBuiltins.kt │ │ │ │ ├── CommandParameter.kt │ │ │ │ ├── CommandSignature.kt │ │ │ │ ├── CommandValueArgumentParser.kt │ │ │ │ ├── Exceptions.kt │ │ │ │ ├── ExperimentalCommandDescriptors.kt │ │ │ │ └── TypeVariant.kt │ │ │ ├── java │ │ │ │ ├── JCompositeCommand.kt │ │ │ │ ├── JRawCommand.kt │ │ │ │ └── JSimpleCommand.kt │ │ │ ├── parse │ │ │ │ ├── CommandCall.kt │ │ │ │ ├── CommandCallParser.kt │ │ │ │ ├── CommandValueArgument.kt │ │ │ │ └── SpaceSeparatedCommandCallParser.kt │ │ │ └── resolve │ │ │ │ ├── BuiltInCommandCallResolver.kt │ │ │ │ ├── CommandCallInterceptor.kt │ │ │ │ ├── CommandCallResolver.kt │ │ │ │ └── ResolvedCommandCall.kt │ │ ├── data │ │ │ ├── AbstractPluginData.kt │ │ │ ├── AutoSavePluginConfig.kt │ │ │ ├── AutoSavePluginData.kt │ │ │ ├── AutoSavePluginDataHolder.kt │ │ │ ├── PluginConfig.kt │ │ │ ├── PluginData.kt │ │ │ ├── PluginDataExtensions.kt │ │ │ ├── PluginDataHolder.kt │ │ │ ├── PluginDataStorage.kt │ │ │ ├── ReadOnlyPluginConfig.kt │ │ │ ├── ReadOnlyPluginData.kt │ │ │ ├── Value.kt │ │ │ ├── ValueDescription.kt │ │ │ ├── ValueName.kt │ │ │ └── java │ │ │ │ ├── JAutoSavePluginConfig.kt │ │ │ │ ├── JAutoSavePluginData.kt │ │ │ │ ├── JavaAutoSavePluginConfig.kt │ │ │ │ └── JavaAutoSavePluginData.kt │ │ ├── enduserreadme │ │ │ └── EndUserReadme.kt │ │ ├── events │ │ │ ├── AutoLoginEvent.kt │ │ │ ├── CommandExecutionEvent.kt │ │ │ ├── ConsoleEvent.kt │ │ │ ├── EndUserReadmeInitializeEvent.kt │ │ │ └── StartupEvent.kt │ │ ├── extension │ │ │ ├── ComponentStorage.kt │ │ │ ├── Extension.kt │ │ │ ├── ExtensionException.kt │ │ │ ├── ExtensionPoint.kt │ │ │ ├── ExtensionRegistry.kt │ │ │ └── PluginComponentStorage.kt │ │ ├── extensions │ │ │ ├── BotConfigurationAlterer.kt │ │ │ ├── CommandCallInterceptorProvider.kt │ │ │ ├── CommandCallParserProvider.kt │ │ │ ├── CommandCallResolverProvider.kt │ │ │ ├── PermissionServiceProvider.kt │ │ │ ├── PluginLoaderProvider.kt │ │ │ ├── PostStartupExtension.kt │ │ │ └── SingletonExtensionSelector.kt │ │ ├── fontend │ │ │ ├── DefaultLoggingProcessProgress.kt │ │ │ └── ProcessProgress.kt │ │ ├── internal │ │ │ ├── MiraiConsoleBuildConstants.kt.template │ │ │ ├── MiraiConsoleImplementationBridge.kt │ │ │ ├── auth │ │ │ │ ├── ConsoleBotAuthorization.kt │ │ │ │ └── ConsoleSecretsCalculator.kt │ │ │ ├── command │ │ │ │ ├── CommandManagerImpl.kt │ │ │ │ ├── CommandReflector.kt │ │ │ │ ├── CommnadConfig.kt │ │ │ │ ├── builtin │ │ │ │ │ └── LoginCommandImpl.kt │ │ │ │ └── internal.kt │ │ │ ├── data │ │ │ │ ├── CompositeValueImpl.kt │ │ │ │ ├── MemoryPluginDataStorageImpl.kt │ │ │ │ ├── MultiFilePluginDataStorageImpl.kt │ │ │ │ ├── PluginDataImpl.kt │ │ │ │ ├── _PluginData.value.kt │ │ │ │ ├── _PrimitiveValueDeclarations.kt │ │ │ │ ├── builtins │ │ │ │ │ ├── AutoLoginConfig.kt │ │ │ │ │ ├── ConsoleDataScopeImpl.kt │ │ │ │ │ ├── EndUserReadmeData.kt │ │ │ │ │ ├── LoggerConfig.kt │ │ │ │ │ └── PluginDependenciesConfig.kt │ │ │ │ ├── collectionUtil.kt │ │ │ │ ├── reflectionUtils.kt │ │ │ │ ├── serializerHelper.kt │ │ │ │ └── valueFromKTypeImpl.kt │ │ │ ├── enduserreadme │ │ │ │ └── EndUserReadmeProcessor.kt │ │ │ ├── extension │ │ │ │ ├── ComponentStorageInternal.kt │ │ │ │ └── SingletonExtensionSelectorImpl.kt │ │ │ ├── logging │ │ │ │ ├── LazyInitMiraiLogger.kt │ │ │ │ ├── LoggerControllerImpl.kt │ │ │ │ ├── MiraiConsoleLogger.kt │ │ │ │ └── externalbind │ │ │ │ │ └── slf4j │ │ │ │ │ ├── MiraiConsoleSLF4JService.kt │ │ │ │ │ └── SLF4JAdapterLogger.kt │ │ │ ├── permission │ │ │ │ ├── AbstractConcurrentPermissionService.kt │ │ │ │ ├── BuiltInPermissionServices.kt │ │ │ │ └── parseFromStringImpl.kt │ │ │ ├── plugin │ │ │ │ ├── AllDependenciesClassesHolder.kt │ │ │ │ ├── BuiltInJvmPluginLoaderImpl.kt │ │ │ │ ├── Exceptions.kt │ │ │ │ ├── ExportManagerImpl.kt │ │ │ │ ├── JvmPluginClassLoader.kt │ │ │ │ ├── JvmPluginDependencyDownload.kt │ │ │ │ ├── JvmPluginInternal.kt │ │ │ │ ├── JvmPluginTesting.kt │ │ │ │ ├── MiraiConsoleAsPlugin.kt │ │ │ │ ├── NotYetLoadedJvmPlugin.kt │ │ │ │ ├── PluginDescriptionUtil.kt │ │ │ │ └── PluginManagerImpl.kt │ │ │ ├── shutdown │ │ │ │ └── ShutdownDaemon.kt │ │ │ └── util │ │ │ │ ├── CommonUtils.kt │ │ │ │ ├── ConsoleInputImpl.kt │ │ │ │ ├── JavaPluginSchedulerImpl.kt │ │ │ │ ├── PluginServiceHelper.kt │ │ │ │ └── semver │ │ │ │ ├── RequirementInternal.kt │ │ │ │ ├── RequirementParser.kt │ │ │ │ └── SemVersionInternal.kt │ │ ├── logging │ │ │ ├── AbstractLoggerController.kt │ │ │ └── LoggerController.kt │ │ ├── permission │ │ │ ├── Permission.kt │ │ │ ├── PermissionId.kt │ │ │ ├── PermissionIdNamespace.kt │ │ │ ├── PermissionImplementation.kt │ │ │ ├── PermissionRegistryConflictException.kt │ │ │ ├── PermissionService.kt │ │ │ ├── Permittee.kt │ │ │ └── PermitteeId.kt │ │ ├── plugin │ │ │ ├── NotYetLoadedPlugin.kt │ │ │ ├── Plugin.kt │ │ │ ├── PluginFileExtensions.kt │ │ │ ├── PluginManager.kt │ │ │ ├── ResourceContainer.kt │ │ │ ├── center │ │ │ │ └── PluginCenter.kt │ │ │ ├── description │ │ │ │ ├── IllegalPluginDescriptionException.kt │ │ │ │ ├── PluginDependency.kt │ │ │ │ └── PluginDescription.kt │ │ │ ├── jvm │ │ │ │ ├── AbstractJvmPlugin.kt │ │ │ │ ├── ExportManager.kt │ │ │ │ ├── JavaPlugin.kt │ │ │ │ ├── JavaPluginScheduler.kt │ │ │ │ ├── JvmPlugin.kt │ │ │ │ ├── JvmPluginClasspath.kt │ │ │ │ ├── JvmPluginDescription.kt │ │ │ │ ├── JvmPluginLoader.kt │ │ │ │ └── KotlinPlugin.kt │ │ │ └── loader │ │ │ │ ├── FilePluginLoader.kt │ │ │ │ ├── PluginLoadException.kt │ │ │ │ └── PluginLoader.kt │ │ └── util │ │ │ ├── Annotations.kt │ │ │ ├── AnsiMessageBuilder.kt │ │ │ ├── ConsoleInput.kt │ │ │ ├── ContactUtils.kt │ │ │ ├── CoroutineScopeUtils.kt │ │ │ ├── MemoryFormat.kt │ │ │ ├── MessageScope.kt │ │ │ ├── MessageUtils.kt │ │ │ ├── SemVersion.kt │ │ │ ├── StandardUtils.kt │ │ │ └── retryCatching.kt │ │ ├── test │ │ ├── TestMiraiConosle.kt │ │ ├── command │ │ │ ├── AbstractCommandTest.kt │ │ │ ├── CommandContextTest.kt │ │ │ ├── CommandValueArgumentContextTest.kt │ │ │ ├── InstanceTestCommand.kt │ │ │ ├── JSimpleTest.java │ │ │ └── commanTestingUtil.kt │ │ ├── configuration │ │ │ └── AutoLoginTest.kt │ │ ├── data │ │ │ ├── JAutoSavePluginDataTest.kt │ │ │ ├── JavaPluginDescriptionTests.kt │ │ │ ├── MultiFilePluginDataStorageImplTests.kt │ │ │ ├── PluginDataTest.kt │ │ │ └── PluginMovingTests.kt │ │ ├── extension │ │ │ └── GlobalComponentStorageTest.kt │ │ ├── logging │ │ │ ├── TestAbstractLoggerController.kt │ │ │ └── TestAbstractLoggerController_PathBased.kt │ │ ├── permission │ │ │ ├── PermissionServiceTest.kt │ │ │ └── PermissionsBasicsTest.kt │ │ ├── plugin │ │ │ ├── BuiltInJvmPluginLoaderImplTest.kt │ │ │ └── PluginLoadingOrderTest.kt │ │ ├── testFramework │ │ │ ├── AbstractConsoleInstanceTest.kt │ │ │ ├── MockConsoleImplementation.kt │ │ │ └── test │ │ │ │ └── FrameworkInstanceTest.kt │ │ └── util │ │ │ ├── TestCoroutineUtils.kt │ │ │ └── TestSemVersion.kt │ │ └── testResources │ │ └── META-INF │ │ └── services │ │ └── org.slf4j.spi.SLF4JServiceProvider ├── docs │ ├── .ConfiguringProjects_images │ │ ├── 6d010b1a.png │ │ └── a6a3b24b.png │ ├── .conf │ │ └── nav.js │ ├── Appendix.md │ ├── BuiltInCommands.md │ ├── Commands.md │ ├── ConfiguringProjects.md │ ├── Contributing.md │ ├── Extensions.md │ ├── FrontEnd.md │ ├── Logging.md │ ├── Permissions.md │ ├── PluginData.md │ ├── QA.md │ ├── README.md │ ├── Run.md │ └── plugin │ │ ├── JVMPlugin-Appendix.md │ │ ├── JVMPlugin-DataExchange.md │ │ ├── JVMPlugin-Debug.md │ │ ├── JVMPlugin.md │ │ ├── JVMPlugin_images │ │ └── 75227ef5.png │ │ ├── Plugins.md │ │ └── images │ │ ├── CreateResourcesDir.png │ │ ├── PluginDebugGradleTask.png │ │ ├── PluginDebugRunConfiguration.png │ │ ├── PluginDebugWindowPreview.webp │ │ ├── PluginMainDeclaration.png │ │ └── PluginMainServiceNotConfigured.png ├── frontend │ ├── mirai-android │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ └── bug_report.md │ │ │ └── workflows │ │ │ │ └── android.yml │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── app │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── libs │ │ │ │ ├── d8.jar │ │ │ │ ├── giteeman-0.2.3.jar │ │ │ │ ├── mirai-console-0.5.2.jar │ │ │ │ └── mirai-js-1.0.0.jar │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── androidTest │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── github │ │ │ │ │ └── mzdluo123 │ │ │ │ │ └── mirai │ │ │ │ │ └── android │ │ │ │ │ ├── TestWithIdleResources.kt │ │ │ │ │ ├── activity │ │ │ │ │ └── NavTest.kt │ │ │ │ │ ├── console │ │ │ │ │ ├── ConsoleIntentTest.kt │ │ │ │ │ └── ConsoleTest.kt │ │ │ │ │ ├── script │ │ │ │ │ └── ScriptManageTest.kt │ │ │ │ │ └── utils.kt │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── aidl │ │ │ │ └── io │ │ │ │ │ └── github │ │ │ │ │ └── mzdluo123 │ │ │ │ │ └── mirai │ │ │ │ │ └── android │ │ │ │ │ └── IbotAidlInterface.aidl │ │ │ │ ├── ic_new_launcher-playstore.png │ │ │ │ ├── java │ │ │ │ ├── io │ │ │ │ │ └── github │ │ │ │ │ │ └── mzdluo123 │ │ │ │ │ │ └── mirai │ │ │ │ │ │ └── android │ │ │ │ │ │ ├── AppSettings.kt │ │ │ │ │ │ ├── BotApplication.kt │ │ │ │ │ │ ├── IdleResources.kt │ │ │ │ │ │ ├── NotificationFactory.kt │ │ │ │ │ │ ├── activity │ │ │ │ │ │ ├── CaptchaActivity.kt │ │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ │ ├── PluginImportActivity.kt │ │ │ │ │ │ └── UnsafeLoginActivity.kt │ │ │ │ │ │ ├── crash │ │ │ │ │ │ ├── MiraiAndroidReportSender.kt │ │ │ │ │ │ └── MiraiAndroidReportSenderFactory.kt │ │ │ │ │ │ ├── miraiconsole │ │ │ │ │ │ ├── AndroidLoginSolver.kt │ │ │ │ │ │ └── AndroidMiraiConsole.kt │ │ │ │ │ │ ├── receiver │ │ │ │ │ │ ├── BootReceiver.kt │ │ │ │ │ │ └── PushMsgReceiver.kt │ │ │ │ │ │ ├── script │ │ │ │ │ │ ├── JavaScriptHost.kt │ │ │ │ │ │ ├── LuaScriptHost.kt │ │ │ │ │ │ ├── ScriptHost.kt │ │ │ │ │ │ ├── ScriptHostFactory.kt │ │ │ │ │ │ └── ScriptManager.kt │ │ │ │ │ │ ├── service │ │ │ │ │ │ ├── BotService.kt │ │ │ │ │ │ └── ServiceConnector.kt │ │ │ │ │ │ ├── ui │ │ │ │ │ │ ├── about │ │ │ │ │ │ │ └── AboutFragment.kt │ │ │ │ │ │ ├── console │ │ │ │ │ │ │ └── ConsoleFragment.kt │ │ │ │ │ │ ├── plugin │ │ │ │ │ │ │ ├── PluginFragment.kt │ │ │ │ │ │ │ └── PluginViewModel.kt │ │ │ │ │ │ ├── script │ │ │ │ │ │ │ ├── ScriptCenterFragment.kt │ │ │ │ │ │ │ ├── ScriptCenterListAdapter.kt │ │ │ │ │ │ │ ├── ScriptCenterViewModel.kt │ │ │ │ │ │ │ ├── ScriptFragment.kt │ │ │ │ │ │ │ ├── ScriptInfoDialogFragment.kt │ │ │ │ │ │ │ ├── ScriptListAdapter.kt │ │ │ │ │ │ │ └── ScriptViewModel.kt │ │ │ │ │ │ └── setting │ │ │ │ │ │ │ └── SettingFragment.kt │ │ │ │ │ │ └── utils │ │ │ │ │ │ ├── CommandFastRegister.kt │ │ │ │ │ │ ├── DeviceStatus.java │ │ │ │ │ │ ├── DexCompiler.java │ │ │ │ │ │ ├── LoopQueue.java │ │ │ │ │ │ ├── MiraiAndroidStatus.kt │ │ │ │ │ │ ├── TextSharer.kt │ │ │ │ │ │ ├── dnsQuery.kt │ │ │ │ │ │ ├── fileUtils.kt │ │ │ │ │ │ └── pasteBin.kt │ │ │ │ └── java │ │ │ │ │ └── awt │ │ │ │ │ └── image │ │ │ │ │ └── BufferedImage.java │ │ │ │ └── res │ │ │ │ ├── color │ │ │ │ └── color_drawer_item.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable │ │ │ │ ├── avatar.png │ │ │ │ ├── ic_add_white_24dp.xml │ │ │ │ ├── ic_android_24.xml │ │ │ │ ├── ic_baseline_folder_24.xml │ │ │ │ ├── ic_baseline_insert_drive_file_24.xml │ │ │ │ ├── ic_baseline_keyboard_arrow_up_24.xml │ │ │ │ ├── ic_baseline_publish_24.xml │ │ │ │ ├── ic_battery_alert_24.xml │ │ │ │ ├── ic_chat_bubble_black_24dp.xml │ │ │ │ ├── ic_check_white_24dp.xml │ │ │ │ ├── ic_delete_black_24dp.xml │ │ │ │ ├── ic_desktop_windows_black_24dp.xml │ │ │ │ ├── ic_edit_black_24dp.xml │ │ │ │ ├── ic_exit_to_app_24dp.xml │ │ │ │ ├── ic_extension_black_24dp.xml │ │ │ │ ├── ic_info_black_24dp.xml │ │ │ │ ├── ic_insert_drive_file_black_24dp.xml │ │ │ │ ├── ic_keyboard_arrow_down_black_24dp.xml │ │ │ │ ├── ic_keyboard_return_black_24dp.xml │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── ic_local_printshop_24.xml │ │ │ │ ├── ic_new_launcher_foreground.xml │ │ │ │ ├── ic_refresh_black_24dp.xml │ │ │ │ ├── ic_restore_24.xml │ │ │ │ ├── ic_save_black_24dp.xml │ │ │ │ ├── ic_settings_black_24dp.xml │ │ │ │ ├── ic_share_24.xml │ │ │ │ ├── ic_store_white_24.xml │ │ │ │ ├── icon.xml │ │ │ │ ├── loading_background.xml │ │ │ │ ├── mirai_a.png │ │ │ │ ├── mirai_b.png │ │ │ │ └── side_nav_bar.xml │ │ │ │ ├── layout │ │ │ │ ├── activity_captcha.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_plugin_import.xml │ │ │ │ ├── activity_unsafe_login.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── dialog_ask_filename.xml │ │ │ │ ├── dialog_autologin.xml │ │ │ │ ├── dialog_script_info.xml │ │ │ │ ├── fragment_about.xml │ │ │ │ ├── fragment_home.xml │ │ │ │ ├── fragment_plugin.xml │ │ │ │ ├── fragment_script.xml │ │ │ │ ├── fragment_script_center.xml │ │ │ │ ├── fragment_script_center_empty.xml │ │ │ │ ├── fragment_script_empty.xml │ │ │ │ ├── item_plugin.xml │ │ │ │ ├── item_script.xml │ │ │ │ ├── item_script_center_list.xml │ │ │ │ └── nav_header_main.xml │ │ │ │ ├── menu │ │ │ │ ├── menu_activity_main_drawer.xml │ │ │ │ ├── menu_console.xml │ │ │ │ ├── menu_script.xml │ │ │ │ ├── menu_script_center.xml │ │ │ │ ├── plugin_add.xml │ │ │ │ ├── plugin_manage.xml │ │ │ │ └── unsafe_menu.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ ├── ic_launcher_round.xml │ │ │ │ ├── ic_new_launcher.xml │ │ │ │ └── ic_new_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── ic_new_launcher.png │ │ │ │ └── ic_new_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── ic_new_launcher.png │ │ │ │ └── ic_new_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── ic_new_launcher.png │ │ │ │ └── ic_new_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── ic_new_launcher.png │ │ │ │ └── ic_new_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── ic_new_launcher.png │ │ │ │ └── ic_new_launcher_round.png │ │ │ │ ├── navigation │ │ │ │ └── mobile_navigation.xml │ │ │ │ ├── values-night │ │ │ │ └── colors-night.xml │ │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ │ ├── values-v29 │ │ │ │ └── styles.xml │ │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── ic_new_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ │ └── xml │ │ │ │ ├── path_script.xml │ │ │ │ └── setting_screen.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── mirai-console-frontend-base │ │ ├── build.gradle.kts │ │ ├── compatibility-validation │ │ │ └── jvm │ │ │ │ └── api │ │ │ │ └── jvm.api │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── org.slf4j.spi.SLF4JServiceProvider │ │ ├── src │ │ │ ├── AbstractMiraiConsoleFrontendImplementation.kt │ │ │ ├── FrontendBase.kt │ │ │ ├── RepipedMessageForward.kt │ │ │ ├── logging │ │ │ │ └── LogRecorder.kt │ │ │ └── package.kt │ │ └── test │ │ │ ├── RepipedMessageForwardTest.kt │ │ │ └── package.kt │ └── mirai-console-terminal │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ ├── src │ │ ├── BufferedOutputStream.kt │ │ ├── ConsoleInputImpl.kt │ │ ├── ConsoleTerminalSettings.kt │ │ ├── ConsoleThread.kt │ │ ├── JLineInputDaemon.kt │ │ ├── LoggingService.kt │ │ ├── MiraiConsoleImplementationTerminal.kt │ │ ├── MiraiConsoleTerminalLoader.kt │ │ ├── TerminalProcessProgress.kt │ │ ├── net │ │ │ └── mamoe │ │ │ │ └── mirai │ │ │ │ └── console │ │ │ │ └── pure │ │ │ │ └── MiraiConsolePureLoader.kt │ │ └── noconsole │ │ │ └── NoConsole.kt │ │ └── test │ │ └── RunTerminal.kt └── tools │ ├── compiler-annotations │ ├── README.md │ ├── build.gradle.kts │ └── src │ │ ├── androidMain │ │ └── AndroidManifest.xml │ │ └── commonMain │ │ └── kotlin │ │ ├── CheckerConstants.kt │ │ ├── ResolveContext.kt │ │ └── RestrictedScope.kt │ ├── compiler-common │ ├── README.md │ ├── build.gradle.kts │ └── src │ │ ├── diagnostics │ │ ├── MiraiConsoleErrors.kt │ │ └── MiraiConsoleErrorsRendering.kt │ │ ├── resolve │ │ ├── resolveCommon.kt │ │ └── resolveTypes.kt │ │ └── utilCommon.kt │ ├── gradle-plugin │ ├── .gitignore │ ├── README.md │ ├── build.gradle.kts │ ├── gradle.properties │ ├── src │ │ ├── integTest │ │ │ └── kotlin │ │ │ │ ├── AbstractTest.kt │ │ │ │ ├── KotlinTransitiveDependenciesIntegrationTest.kt │ │ │ │ ├── TestBuildPlugin.kt │ │ │ │ └── TestPluginApply.kt │ │ └── main │ │ │ └── kotlin │ │ │ ├── BuildMiraiPluginTask.kt │ │ │ ├── BuildMiraiPluginV2.kt │ │ │ ├── IGNORED_DEPENDENCIES_IN_SHADOW.kt │ │ │ ├── MiraiConsoleExtension.kt │ │ │ ├── MiraiConsoleGradlePlugin.kt │ │ │ ├── VersionConstants.kt.template │ │ │ ├── dsl.kt │ │ │ └── publishing.kt │ └── test │ │ └── net │ │ └── mamoe │ │ └── mirai │ │ └── console │ │ └── gradle │ │ ├── AbstractTest.groovy │ │ └── TestPluginApply.groovy │ └── intellij-plugin │ ├── .gitignore │ ├── .images │ └── ILLEGAL_PLUGIN_DESCRIPTION.png │ ├── README.md │ ├── build.gradle.kts │ ├── gradle.properties │ ├── libs │ └── ide-common.jar │ ├── resources │ ├── META-INF │ │ └── plugin.xml │ ├── fileTemplates │ │ └── code │ │ │ ├── .gitignore.ft │ │ │ ├── .gitignore.html │ │ │ ├── Gradle gradle-wrapper.properties.ft │ │ │ ├── Gradle gradle-wrapper.properties.html │ │ │ ├── Gradle gradle.properties.ft │ │ │ ├── Gradle gradle.properties.html │ │ │ ├── Plugin build.gradle.ft │ │ │ ├── Plugin build.gradle.html │ │ │ ├── Plugin build.gradle.kts.ft │ │ │ ├── Plugin build.gradle.kts.html │ │ │ ├── Plugin main class Java.java.ft │ │ │ ├── Plugin main class Java.java.ft.back │ │ │ ├── Plugin main class Java.java.html │ │ │ ├── Plugin main class Kotlin.kt.ft │ │ │ ├── Plugin main class Kotlin.kt.html │ │ │ ├── Plugin main service.txt.ft │ │ │ ├── Plugin main service.txt.html │ │ │ ├── Plugin settings.gradle.ft │ │ │ ├── Plugin settings.gradle.html │ │ │ ├── Plugin settings.gradle.kts.ft │ │ │ ├── Plugin settings.gradle.kts.html │ │ │ ├── RunTerminal.run.xml.ft │ │ │ ├── RunTerminal.run.xml.html │ │ │ ├── account.properties.ft │ │ │ └── account.properties.html │ ├── icons │ │ ├── commandDeclaration.svg │ │ ├── pluginIcon.svg │ │ └── pluginMainDeclaration.png │ ├── inspectionDescriptions │ │ ├── PluginMainServiceNotConfigured.html │ │ ├── ResourceNotClosed.html │ │ └── UsingStringPlusMessage.html │ ├── intentionDescriptions │ │ ├── WrapWithResourceUseCallIntention │ │ │ ├── after.receiver.template │ │ │ ├── before.receiver.template │ │ │ └── description.html │ │ └── WrapWithResourceUseCallJavaIntention │ │ │ ├── after.action.template │ │ │ ├── before.action.template │ │ │ └── description.html │ └── messages │ │ ├── InspectionGadgetsBundle.properties │ │ ├── InspectionsBundle.properties │ │ ├── MiraiProjectWizardBundle.properties │ │ └── MiraiProjectWizardBundle_zh.properties │ ├── run │ └── projects │ │ ├── .gitignore │ │ └── test-project │ │ ├── build.gradle.kts │ │ ├── gradle.properties │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── settings.gradle.kts │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── test │ │ │ │ ├── ResourceNotClosedInspectionTestJava.java │ │ │ │ └── TestJavaPlugin.java │ │ └── kotlin │ │ │ └── org │ │ │ └── example │ │ │ └── myplugin │ │ │ ├── AbstractMessageKeysUsages.kt │ │ │ ├── ConsoleCommandOwnerCheck.kt │ │ │ ├── MyPluginMain.kt │ │ │ ├── MySimpleCommand.kt │ │ │ ├── ReadOnlyPluginDataVar.kt │ │ │ ├── ResourceNotClosedInspectionTest.kt │ │ │ ├── StringPlusMessageInspectionTest.kt │ │ │ ├── UsingDerivedMap.kt │ │ │ └── WrapWithResourceUseCallIntentionTest.kt │ │ └── test │ │ └── kotlin │ │ └── RunConsole.kt │ ├── src │ ├── IDEContainerContributor.kt │ ├── QuickFixRegistrar.kt │ ├── assets │ │ ├── Assets.kt │ │ └── FileTemplateRegistrar.kt │ ├── diagnostics │ │ ├── CommandDeclarationChecker.kt │ │ ├── ContextualParametersChecker.kt │ │ ├── MessageChainGetCallChecker.kt │ │ ├── PluginDataValuesChecker.kt │ │ ├── PluginMainServiceNotConfiguredInspection.kt │ │ ├── QuickFixUtils.kt │ │ ├── ResourceNotClosedInspection.kt │ │ ├── TaskUtils.kt │ │ ├── UsingStringPlusMessageInspection.kt │ │ ├── diagnosticsUtil.kt │ │ └── fix │ │ │ ├── AbuseYellowIntention.kt │ │ │ ├── AddSerializerFix.kt │ │ │ ├── ConfigurePluginMainServiceFix.kt │ │ │ ├── ConvertToValFix.kt │ │ │ ├── ProvideDefaultValueFix.kt │ │ │ ├── TypeProjectionFix.kt │ │ │ └── WrapWithResourceUseCallIntention.kt │ ├── line │ │ └── marker │ │ │ ├── CommandDeclarationLineMarkerProvider.kt │ │ │ └── PluginMainLineMarkerProvider.kt │ ├── resolve │ │ ├── FunctionSignature.kt │ │ ├── ReceiverExpression.kt │ │ └── resolveIdea.kt │ ├── util │ │ ├── RequirementHelper.kt │ │ ├── RequirementParser.kt │ │ └── RunIgnoringErrors.kt │ └── wizard │ │ ├── BuildSystemType.kt │ │ ├── KotlinStdlibVersion.kt │ │ ├── LanguageType.kt │ │ ├── MiraiModuleBuilder.kt │ │ ├── MiraiModuleType.kt │ │ ├── MiraiProjectModel.kt │ │ ├── MiraiProjectWizardInitialStep.kt │ │ ├── MiraiValidations.kt │ │ ├── MiraiVersion.kt │ │ ├── MiraiWizardBundle.kt │ │ └── ProjectAssetsProvider.kt │ └── test │ ├── creator │ ├── MiraiVersionKindTest.kt │ └── tasks │ │ └── TaskUtilsKtTest.kt │ └── package.kt ├── mirai-core-all └── build.gradle.kts ├── mirai-core-api ├── README.md ├── build.gradle.kts ├── compatibility-validation │ ├── android │ │ └── api │ │ │ └── android.api │ └── jvm │ │ └── api │ │ └── jvm.api └── src │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ ├── package.kt │ │ └── utils │ │ ├── LoginSolver.android.kt │ │ ├── PlatformLogger.android.kt │ │ └── SingleFileLogger.android.kt │ ├── commonMain │ └── kotlin │ │ ├── Bot.kt │ │ ├── BotFactory.kt │ │ ├── IMirai.kt │ │ ├── LowLevelApiAccessor.kt │ │ ├── auth │ │ ├── BotAuthorization.kt │ │ └── QRCodeLoginListener.kt │ │ ├── contact │ │ ├── AnonymousMember.kt │ │ ├── AudioSupported.kt │ │ ├── AvatarSpec.kt │ │ ├── Contact.kt │ │ ├── ContactList.kt │ │ ├── ContactOrBot.kt │ │ ├── Exceptions.kt │ │ ├── FileSupported.kt │ │ ├── Friend.kt │ │ ├── Group.kt │ │ ├── Member.kt │ │ ├── MemberPermission.kt │ │ ├── NormalMember.kt │ │ ├── OtherClient.kt │ │ ├── Stranger.kt │ │ ├── TempUser.kt │ │ ├── User.kt │ │ ├── UserOrBot.kt │ │ ├── active │ │ │ ├── ActiveChart.kt │ │ │ ├── ActiveHonorInfo.kt │ │ │ ├── ActiveHonorList.kt │ │ │ ├── ActiveRankRecord.kt │ │ │ ├── ActiveRecord.kt │ │ │ ├── GroupActive.kt │ │ │ ├── MemberActive.kt │ │ │ ├── MemberMedalInfo.kt │ │ │ └── MemberMedalType.kt │ │ ├── announcement │ │ │ ├── Announcement.kt │ │ │ ├── AnnouncementImage.kt │ │ │ ├── AnnouncementParameters.kt │ │ │ ├── AnnouncementParametersBuilder.kt │ │ │ ├── Announcements.kt │ │ │ ├── OfflineAnnouncement.kt │ │ │ └── OnlineAnnouncement.kt │ │ ├── essence │ │ │ ├── EssenceMessageRecord.kt │ │ │ └── Essences.kt │ │ ├── file │ │ │ ├── AbsoluteFile.kt │ │ │ ├── AbsoluteFileFolder.kt │ │ │ ├── AbsoluteFolder.kt │ │ │ └── RemoteFiles.kt │ │ ├── friendgroup │ │ │ ├── FriendGroup.kt │ │ │ └── FriendGroups.kt │ │ └── roaming │ │ │ ├── RoamingMessageFilter.kt │ │ │ ├── RoamingMessages.kt │ │ │ └── RoamingSupported.kt │ │ ├── data │ │ ├── FriendInfo.kt │ │ ├── GroupHonorType.kt │ │ ├── GroupInfo.kt │ │ ├── MemberInfo.kt │ │ ├── OnlineStatus.kt │ │ ├── Profile.kt │ │ ├── RequestEventData.kt │ │ ├── StrangerInfo.kt │ │ ├── UserInfo.kt │ │ └── UserProfile.kt │ │ ├── event │ │ ├── Event.kt │ │ ├── EventChannel.kt │ │ ├── EventChannelKotlinExtensions.kt │ │ ├── ExceptionInEventChannelFilterException.kt │ │ ├── Extensions.kt │ │ ├── GlobalEventChannel.kt │ │ ├── JvmMethodListeners.kt │ │ ├── Listener.kt │ │ ├── MessageSelectBuilderUnit.kt │ │ ├── MessageSubscribersBuilder.kt │ │ ├── deprecated.nextEvent.kt │ │ ├── deprecated.nextEventAsync.kt │ │ ├── deprecated.syncFromEvent.kt │ │ ├── events │ │ │ ├── EventCancelledException.kt │ │ │ ├── ImageUploadEvent.kt │ │ │ ├── MessageEvent.kt │ │ │ ├── MessagePostSendEvent.kt │ │ │ ├── MessagePreSendEvent.kt │ │ │ ├── MessageRecallEvent.kt │ │ │ ├── MessageSyncEvent.kt │ │ │ ├── NudgeEvent.kt │ │ │ ├── ShortVideoUploadEvent.kt │ │ │ ├── SignEvent.kt │ │ │ ├── bot.kt │ │ │ ├── friend.kt │ │ │ ├── group.kt │ │ │ ├── otherClient.kt │ │ │ ├── stranger.kt │ │ │ └── types.kt │ │ ├── select.kt │ │ └── subscribeMessages.kt │ │ ├── internal │ │ ├── event │ │ │ ├── JvmMethodListenersInternal.kt │ │ │ ├── VerboseEvent.kt │ │ │ └── messageSubscribersInternal.kt │ │ ├── message │ │ │ ├── AbstractPolymorphicSerializer.kt │ │ │ └── MessageSerializersImpl.kt │ │ ├── network │ │ │ └── Packet.kt │ │ └── utils │ │ │ ├── ExternalResourceImpls.kt │ │ │ ├── ExternalResourceLeakObserver.kt │ │ │ ├── LoggerAdapterImpls.kt │ │ │ ├── MarkedMiraiLogger.kt │ │ │ ├── Marker.kt │ │ │ └── StdoutLogger.kt │ │ ├── message │ │ ├── MessageReceipt.kt │ │ ├── MessageSerializers.kt │ │ ├── action │ │ │ ├── AsyncRecallResult.kt │ │ │ └── Nudge.kt │ │ ├── code │ │ │ ├── CodableMessage.kt │ │ │ ├── MiraiCode.kt │ │ │ └── internal │ │ │ │ └── impl.kt │ │ ├── data │ │ │ ├── At.kt │ │ │ ├── AtAll.kt │ │ │ ├── Audio.kt │ │ │ ├── CombinedMessage.kt │ │ │ ├── ConstrainSingle.kt │ │ │ ├── CustomMessage.kt │ │ │ ├── Deprecated.kt │ │ │ ├── Dice.kt │ │ │ ├── Face.kt │ │ │ ├── FileMessage.kt │ │ │ ├── FlashImage.kt │ │ │ ├── ForwardMessage.kt │ │ │ ├── HummerMessage.kt │ │ │ ├── Image.kt │ │ │ ├── MarketFace.kt │ │ │ ├── Message.kt │ │ │ ├── MessageChain.kt │ │ │ ├── MessageChainBuilder.kt │ │ │ ├── MessageKey.kt │ │ │ ├── MessageOrigin.kt │ │ │ ├── MessageSource.kt │ │ │ ├── MessageSourceBuilder.kt │ │ │ ├── MusicShare.kt │ │ │ ├── OfflineMessageSource.kt │ │ │ ├── OnlineMessageSource.kt │ │ │ ├── PlainText.kt │ │ │ ├── PokeMessage.kt │ │ │ ├── QuoteReply.kt │ │ │ ├── README.md │ │ │ ├── RichMessage.kt │ │ │ ├── RockPaperScissors.kt │ │ │ ├── ShortVideo.kt │ │ │ ├── ShowImageFlag.kt │ │ │ ├── SingleMessage.kt │ │ │ ├── SuperFace.kt │ │ │ ├── UnsupportedMessage.kt │ │ │ ├── VipFace.kt │ │ │ ├── Voice.kt │ │ │ ├── impl.kt │ │ │ └── visitor │ │ │ │ └── MessageVisitor.kt │ │ └── utils.kt │ │ ├── network │ │ ├── ForceOfflineException.kt │ │ └── LoginFailedException.kt │ │ ├── spi │ │ ├── AudioToSilkService.kt │ │ └── SPIServiceLoader.kt │ │ └── utils │ │ ├── AbstractBotConfiguration.kt │ │ ├── AbstractExternalResource.kt │ │ ├── Annotations.kt │ │ ├── BotConfiguration.kt │ │ ├── DeviceInfo.kt │ │ ├── DeviceInfoBuilder.kt │ │ ├── DeviceInfoManager.kt │ │ ├── DeviceInfoV1LegacySerializer.kt │ │ ├── ExternalResource.kt │ │ ├── FileCacheStrategy.kt │ │ ├── FileLogger.kt │ │ ├── LoggerAdapters.kt │ │ ├── LoginSolver.kt │ │ ├── MiraiLogger.kt │ │ ├── MiraiLoggerFactoryImplementationBridge.kt │ │ ├── MiraiUtilsLogger.kt │ │ ├── OverFileSizeMaxException.kt │ │ ├── ProgressionCallback.kt │ │ ├── RemoteFile.kt │ │ ├── SingleFileLogger.kt │ │ └── Streamable.kt │ ├── commonTest │ ├── kotlin │ │ ├── logging │ │ │ ├── AbstractLoggingTest.kt │ │ │ ├── Log4j2LoggingTest.kt │ │ │ └── LoggingCompatibilityTest.kt │ │ ├── message.data │ │ │ ├── CombinedMessageTest.kt │ │ │ ├── ConstrainSingleHelperTest.kt │ │ │ ├── ConstrainSingleTest.kt │ │ │ ├── ImageTest.kt │ │ │ ├── LinearMessageChainImplTest.kt │ │ │ ├── MessageChainBuilderTest.kt │ │ │ ├── MessageChainImmutableTest.kt │ │ │ ├── MessageChainImplTest.kt │ │ │ ├── MessageKeyTest.kt │ │ │ ├── MessageUtilsTest.kt │ │ │ ├── MessageVisitorTest.kt │ │ │ └── TestMessageChainDelegate.kt │ │ ├── package.kt │ │ ├── test │ │ │ └── TestDSL.kt │ │ └── utils │ │ │ ├── DeviceInfoTest.kt │ │ │ ├── JvmDeviceInfoTest.kt │ │ │ └── TimeTest.kt │ └── resources │ │ └── log4j.properties │ ├── jvmMain │ ├── kotlin │ │ ├── package.kt │ │ └── utils │ │ │ ├── LoginSolver.TxCaptchaHelper.kt │ │ │ ├── LoginSolver.jvm.kt │ │ │ ├── PlatformLogger.jvm.kt │ │ │ └── SingleFileLogger.jvm.kt │ └── resources │ │ └── net │ │ └── mamoe │ │ └── mirai │ │ └── utils │ │ └── project-mirai.png │ └── jvmTest │ └── kotlin │ ├── message │ └── data │ │ └── MessageChainImmutableTestJdk8.kt │ └── package.kt ├── mirai-core-mock ├── README.md ├── build.gradle.kts ├── src │ ├── MockActions.kt │ ├── MockBot.kt │ ├── MockBotDSL.kt │ ├── MockBotFactory.kt │ ├── contact │ │ ├── MockAnonymousMember.kt │ │ ├── MockContact.kt │ │ ├── MockContactOrBot.kt │ │ ├── MockFriend.kt │ │ ├── MockGroup.kt │ │ ├── MockGroupControlPane.kt │ │ ├── MockMember.kt │ │ ├── MockMsgSyncSupport.kt │ │ ├── MockNormalMember.kt │ │ ├── MockOtherClient.kt │ │ ├── MockStranger.kt │ │ ├── MockUser.kt │ │ ├── MockUserOrBot.kt │ │ ├── active │ │ │ ├── MockGroupActive.kt │ │ │ └── MockMemberActive.kt │ │ ├── announcement │ │ │ └── MockAnnouncements.kt │ │ └── essence │ │ │ └── MockEssences.kt │ ├── database │ │ └── MessageDatabase.kt │ ├── internal │ │ ├── MockBotFactoryImpl.kt │ │ ├── MockBotImpl.kt │ │ ├── MockMiraiImpl.kt │ │ ├── components │ │ │ └── MockEventDispatcherImpl.kt │ │ ├── contact │ │ │ ├── AbstractMockContact.kt │ │ │ ├── MockAnnouncementsImpl.kt │ │ │ ├── MockAnonymousMemberImpl.kt │ │ │ ├── MockFriendImpl.kt │ │ │ ├── MockGroupImpl.kt │ │ │ ├── MockNormalMemberImpl.kt │ │ │ ├── MockStrangerImpl.kt │ │ │ ├── active │ │ │ │ ├── MockGroupActive.kt │ │ │ │ └── MockMemberActiveImpl.kt │ │ │ ├── essence │ │ │ │ └── MockEssences.kt │ │ │ ├── friendfroup │ │ │ │ ├── MockFriendGroup.kt │ │ │ │ └── MockFriendGroups.kt │ │ │ ├── roaming │ │ │ │ └── MockRoamingMessages.kt │ │ │ └── util.kt │ │ ├── contactbase │ │ │ ├── ContactDatabase.kt │ │ │ └── ContactInfo.kt │ │ ├── db │ │ │ └── MsgDatabaseImpl.kt │ │ ├── msgsrc │ │ │ └── OnlineMsgSrc.kt │ │ ├── remotefile │ │ │ ├── absolutefile │ │ │ │ ├── MockAbsoluteFile.kt │ │ │ │ ├── MockAbsoluteFolder.kt │ │ │ │ └── MockRemoteFiles.kt │ │ │ └── remotefile │ │ │ │ └── MockRemoteFile.kt │ │ └── serverfs │ │ │ ├── MockServerFileDiskImpl.kt │ │ │ └── TmpResourceServerImpl.kt │ ├── package.kt │ ├── resserver │ │ ├── MockServerFileDisk.kt │ │ ├── MockServerFileSystem.kt │ │ ├── MockServerRemoteFile.kt │ │ └── TmpResourceServer.kt │ ├── userprofile │ │ ├── UserProfileService.kt │ │ └── contactinfos.kt │ └── utils │ │ ├── AvatarGenerator.kt │ │ ├── MemberInfo.kt │ │ ├── MockActionsScope.kt │ │ ├── MockConversions.kt │ │ ├── NameGenerator.kt │ │ ├── NudgeDsl.kt │ │ ├── event.kt │ │ ├── http.kt │ │ ├── image.kt │ │ └── mockdsl.kt └── test │ ├── AbsoluteFileTest.kt │ ├── DslTest.kt │ ├── FsServerTest.kt │ ├── ImageUploadTest.kt │ ├── MockBotTestBase.kt │ ├── MsgDbTest.kt │ ├── TestBase.kt │ ├── TxFsDiskTest.kt │ ├── mock │ ├── MessageSerializationTest.kt │ ├── MessagingTest.kt │ ├── MockBotBaseTest.kt │ ├── MockBotEventTest.kt │ ├── MockFriendGroupsTest.kt │ ├── MockFriendTest.kt │ ├── MockGroupTest.kt │ ├── MockMemberTest.kt │ └── MockStrangerTest.kt │ └── package.kt ├── mirai-core-utils ├── README.md ├── build.gradle.kts └── src │ ├── androidInstrumentedTest │ └── kotlin │ │ └── AndroidUnwrapTest.kt │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── Actuals.kt │ ├── commonMain │ └── kotlin │ │ ├── Annotations.kt │ │ ├── Arrays.kt │ │ ├── AtomicInteger.kt │ │ ├── Base64.kt │ │ ├── ByteArrayOp.kt │ │ ├── ByteArrayPool.kt │ │ ├── Bytes.kt │ │ ├── CheckableResult.kt │ │ ├── Clock.kt │ │ ├── Closeable.kt │ │ ├── CollectionDiff.kt │ │ ├── Collections.kt │ │ ├── Conversions.kt │ │ ├── CoroutineUtils.kt │ │ ├── Either.kt │ │ ├── ExceptionCollector.kt │ │ ├── File.kt │ │ ├── Files.kt │ │ ├── HtmlEntity.kt │ │ ├── IO.kt │ │ ├── JsonStruct.kt │ │ ├── LateinitMutableProperty.kt │ │ ├── Numbers.kt │ │ ├── RandomUtils.kt │ │ ├── Resources.kt │ │ ├── ResultExtensions.kt │ │ ├── SecretsProtection.kt │ │ ├── Serialization.kt │ │ ├── Services.kt │ │ ├── SizedCache.kt │ │ ├── StandardUtils.kt │ │ ├── Strings.kt │ │ ├── StructureToStringTransformer.kt │ │ ├── Symbol.kt │ │ ├── TimeUtils.kt │ │ ├── TlvMap.kt │ │ ├── TypeSafeMap.kt │ │ ├── UnsafeMutableNonNullProperty.kt │ │ ├── UtilsLogger.kt │ │ ├── annotations │ │ └── Range.kt │ │ ├── channels │ │ ├── ChannelState.kt │ │ ├── IllegalChannelStateException.kt │ │ ├── OnDemandChannelImpl.kt │ │ ├── OnDemandSendChannel.kt │ │ └── ProducerFailureException.kt │ │ ├── package.kt │ │ └── systemProp.kt │ ├── commonTest │ └── kotlin │ │ └── net │ │ └── mamoe │ │ └── mirai │ │ └── utils │ │ ├── CommonByteArrayOpTest.kt │ │ ├── EitherTest.kt │ │ ├── ExceptionCollectorTest.kt │ │ ├── ExternalImageTest.kt │ │ ├── HexToBytesTest.kt │ │ ├── HtmlEscapeTest.kt │ │ ├── ImageIdConversionTest.kt │ │ ├── LateinitMutablePropertyTest.kt │ │ ├── ResourceAccessLockTest.kt │ │ ├── SizedCacheTest.kt │ │ ├── TlvMapTest.kt │ │ ├── TrySafelyTest.kt │ │ ├── TypeSafeMapTest.kt │ │ ├── channels │ │ └── OnDemandChannelTest.kt │ │ └── testFramework │ │ └── AssertNoCoroutineSuspension.kt │ ├── jvmBaseMain │ └── kotlin │ │ ├── ByteArrayOp.kt │ │ ├── Clock.kt │ │ ├── Closeable.kt │ │ ├── Collections.kt │ │ ├── ConcurrentLinkedQueue.kt │ │ ├── CoroutineUtils.kt │ │ ├── ExceptionCollector.kt │ │ ├── Files.kt │ │ ├── IO.jvm.shared.kt │ │ ├── JvmNioBuffer.kt │ │ ├── MiraiFile.kt │ │ ├── Reflections.kt │ │ ├── Resources.kt │ │ ├── SecretsProtection.kt │ │ ├── Serialization.kt │ │ ├── Services.kt │ │ ├── StandardUtils.kt │ │ ├── Streams.kt │ │ ├── StructureToStringTransformer.kt │ │ ├── StructureToStringTransformerLegacy.kt │ │ ├── ThreadLocal.kt │ │ ├── TimeUtils.kt │ │ ├── WeakRef.kt │ │ ├── annotations │ │ └── Range.kt │ │ ├── package.kt │ │ └── systemProp.kt │ ├── jvmBaseTest │ └── kotlin │ │ ├── ByteArrayOpTest.kt │ │ ├── KotlinFlowToJdkStreamTest.kt │ │ ├── LateinitMutablePropertyTestJvm.kt │ │ └── package.kt │ ├── jvmMain │ └── kotlin │ │ ├── Actuals.kt │ │ └── IO.jvm.kt │ └── jvmTest │ └── kotlin │ ├── AndroidUnwrapTest.kt │ └── SecretsProtectionTest.kt ├── mirai-core ├── .gitignore ├── README.md ├── build.gradle.kts ├── compatibility-validation │ ├── android │ │ └── api │ │ │ └── android.api │ └── jvm │ │ └── api │ │ └── jvm.api └── src │ ├── androidInstrumentedTest │ └── kotlin │ │ ├── package.kt │ │ ├── test │ │ └── initializeTestJvm.kt │ │ └── testFramework │ │ └── currentPlatform.kt │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ ├── package.kt │ │ └── utils │ │ └── crypto │ │ └── EcdhAndroid.kt │ ├── androidUnitTest │ └── kotlin │ │ ├── package.kt │ │ ├── test │ │ ├── Logger.kt │ │ └── initializeTestJvm.kt │ │ └── testFramework │ │ └── currentPlatform.kt │ ├── commonMain │ ├── kotlin │ │ ├── AbstractBot.kt │ │ ├── BotAccount.kt │ │ ├── BotFactory.kt │ │ ├── MiraiImpl.kt │ │ ├── QQAndroidBot.kt │ │ ├── contact │ │ │ ├── AbstractContact.kt │ │ │ ├── AbstractMember.kt │ │ │ ├── AbstractUser.kt │ │ │ ├── AnonymousMemberImpl.kt │ │ │ ├── ContactAware.kt │ │ │ ├── FriendImpl.kt │ │ │ ├── GroupImpl.kt │ │ │ ├── GroupSendMessageImpl.kt │ │ │ ├── GroupSettingsImpl.kt │ │ │ ├── MemberActiveImpl.kt │ │ │ ├── NormalMemberImpl.kt │ │ │ ├── OnlineAnnouncementImpl.kt │ │ │ ├── OtherClientImpl.kt │ │ │ ├── SendMessageHandler.kt │ │ │ ├── StrangerImpl.kt │ │ │ ├── active │ │ │ │ ├── GroupActiveImpl.kt │ │ │ │ └── GroupActiveProtocol.kt │ │ │ ├── announcement │ │ │ │ ├── AnnouncementsImpl.kt │ │ │ │ └── GroupAnnouncement.kt │ │ │ ├── essence │ │ │ │ ├── EssencesImpl.kt │ │ │ │ └── GroupDigestProtocol.kt │ │ │ ├── file │ │ │ │ ├── AbsoluteFileImpl.kt │ │ │ │ ├── AbsoluteFolderImpl.kt │ │ │ │ ├── AbstractAbsoluteFileFolder.kt │ │ │ │ ├── FileProtocol.kt │ │ │ │ └── RemoteFilesImpl.kt │ │ │ ├── friendgroup │ │ │ │ ├── FriendGroupImpl.kt │ │ │ │ └── FriendGroupsImpl.kt │ │ │ ├── info │ │ │ │ ├── FriendGroupInfo.kt │ │ │ │ ├── FriendInfoImpl.kt │ │ │ │ ├── GroupInfoImpl.kt │ │ │ │ ├── MemberInfoImpl.kt │ │ │ │ └── StrangerInfoImpl.kt │ │ │ ├── roaming │ │ │ │ ├── AbstractRoamingMessages.kt │ │ │ │ ├── RoamingMessagesImplFriend.kt │ │ │ │ ├── RoamingMessagesImplGroup.kt │ │ │ │ └── TimeBasedRoamingMessagesImpl.kt │ │ │ └── util.kt │ │ ├── event │ │ │ ├── EventChannelImpl.kt │ │ │ ├── EventChannelToEventDispatcherAdapter.kt │ │ │ ├── EventListeners.kt │ │ │ ├── GlobalEventChannelProviderImpl.kt │ │ │ ├── SafeListener.kt │ │ │ └── package.kt │ │ ├── message │ │ │ ├── ReceiveMessageHandler.kt │ │ │ ├── RefinableMessage.kt │ │ │ ├── atImpl.kt │ │ │ ├── contextualBugReportException.kt │ │ │ ├── data │ │ │ │ ├── FileMessageImpl.kt │ │ │ │ ├── LongMessageInternal.kt │ │ │ │ ├── MarketFaceImpl.kt │ │ │ │ ├── MessageChainBuilderExt.kt │ │ │ │ ├── MessageSourceExt.kt │ │ │ │ ├── MultiMsgUploader.kt │ │ │ │ ├── UnsupportedMessageImpl.kt │ │ │ │ ├── audio.kt │ │ │ │ ├── lightApp.kt │ │ │ │ └── shortVideo.kt │ │ │ ├── faceImpl.kt │ │ │ ├── flags │ │ │ │ └── InternalFlagOnlyMessage.kt │ │ │ ├── image │ │ │ │ ├── AbstractImage.kt │ │ │ │ ├── ImageDecoder.kt │ │ │ │ ├── ImageInfo.kt │ │ │ │ ├── ImageUrlAware.kt │ │ │ │ ├── InternalImageProtocolImpl.kt │ │ │ │ ├── InternalShortVideoProtocolImpl.kt │ │ │ │ ├── OfflineImage.kt │ │ │ │ ├── OnlineImage.kt │ │ │ │ └── jceData.kt │ │ │ ├── imagesImpl.kt │ │ │ ├── messageToElems.kt │ │ │ ├── protocol │ │ │ │ ├── MessageProtocol.kt │ │ │ │ ├── MessageProtocolFacade.kt │ │ │ │ ├── decode │ │ │ │ │ ├── MessageDecoder.kt │ │ │ │ │ └── MessageDecoderPipeline.kt │ │ │ │ ├── encode │ │ │ │ │ ├── MessageEncoder.kt │ │ │ │ │ └── MessageEncoderPipeline.kt │ │ │ │ ├── impl │ │ │ │ │ ├── AudioProtocol.kt │ │ │ │ │ ├── CustomMessageProtocol.kt │ │ │ │ │ ├── FaceProtocol.kt │ │ │ │ │ ├── FileMessageProtocol.kt │ │ │ │ │ ├── FlashImageProtocol.kt │ │ │ │ │ ├── ForwardMessageProtocol.kt │ │ │ │ │ ├── GeneralMessageSenderProtocol.kt │ │ │ │ │ ├── IgnoredMessagesProtocol.kt │ │ │ │ │ ├── ImageProtocol.kt │ │ │ │ │ ├── LongMessageProtocol.kt │ │ │ │ │ ├── MarketFaceProtocol.kt │ │ │ │ │ ├── MusicShareProtocol.kt │ │ │ │ │ ├── PokeMessageProtocol.kt │ │ │ │ │ ├── PttMessageProtocol.kt │ │ │ │ │ ├── QuoteReplyProtocol.kt │ │ │ │ │ ├── RichMessageProtocol.kt │ │ │ │ │ ├── ShortVideoProtocol.kt │ │ │ │ │ ├── SuperFaceProtocol.kt │ │ │ │ │ ├── TextProtocol.kt │ │ │ │ │ ├── UnsupportedMessageProtocol.kt │ │ │ │ │ └── VipFaceProtocol.kt │ │ │ │ ├── outgoing │ │ │ │ │ ├── HighwayUploader.kt │ │ │ │ │ ├── MessageProtocolStrategy.kt │ │ │ │ │ ├── OutgoingMessagePipeline.kt │ │ │ │ │ ├── OutgoingMessagePipelineProcessor.kt │ │ │ │ │ └── OutgoingMessageProcessor.kt │ │ │ │ └── serialization │ │ │ │ │ └── MessageSerializer.kt │ │ │ ├── rich │ │ │ │ └── package.kt │ │ │ ├── source │ │ │ │ ├── MessageSourceInternal.kt │ │ │ │ ├── incomingSourceImpl.kt │ │ │ │ ├── offlineSourceImpl.kt │ │ │ │ └── outgoingSourceImpl.kt │ │ │ └── visitor │ │ │ │ └── MessageVisitorEx.kt │ │ ├── network │ │ │ ├── ContactListCache.kt │ │ │ ├── DebuggingProperties.kt │ │ │ ├── Packet.kt │ │ │ ├── QQAndroidClient.kt │ │ │ ├── Ticket.kt │ │ │ ├── auth │ │ │ │ ├── AuthControl.kt │ │ │ │ ├── BotAuthSessionInternal.kt │ │ │ │ ├── DefaultBotAuthorizationFactoryImpl.kt │ │ │ │ └── SafeBotAuthSession.kt │ │ │ ├── component │ │ │ │ ├── ComponentKey.kt │ │ │ │ ├── ComponentStorage.kt │ │ │ │ ├── ComponentStorageDelegate.kt │ │ │ │ ├── ConcurrentComponentStorage.kt │ │ │ │ ├── MutableComponentStorage.kt │ │ │ │ └── NoSuchComponentException.kt │ │ │ ├── components │ │ │ │ ├── AccountSecretsManager.kt │ │ │ │ ├── BdhSessionSyncer.kt │ │ │ │ ├── BotClientHolder.kt │ │ │ │ ├── BotInitProcessor.kt │ │ │ │ ├── BotOfflineEventMonitor.kt │ │ │ │ ├── CacheValidator.kt │ │ │ │ ├── ClockComponent.kt │ │ │ │ ├── ConfigPushProcessor.kt │ │ │ │ ├── ConfigPushSyncer.kt │ │ │ │ ├── ContactCacheService.kt │ │ │ │ ├── ContactUpdater.kt │ │ │ │ ├── EcdhInitialPublicKeyUpdater.kt │ │ │ │ ├── EncryptServiceHolder.kt │ │ │ │ ├── EventDispatcher.kt │ │ │ │ ├── HeartbeatProcessor.kt │ │ │ │ ├── HeartbeatScheduler.kt │ │ │ │ ├── HttpClientProvider.kt │ │ │ │ ├── KeyRefreshProcessor.kt │ │ │ │ ├── MessageSvcSyncer.kt │ │ │ │ ├── NetworkHandlerReference.kt │ │ │ │ ├── NoticeProcessorPipeline.kt │ │ │ │ ├── OtherClientUpdater.kt │ │ │ │ ├── PacketCodec.kt │ │ │ │ ├── PacketHandler.kt │ │ │ │ ├── PacketLoggingStrategy.kt │ │ │ │ ├── QRCodeLoginProcessor.kt │ │ │ │ ├── ServerList.kt │ │ │ │ ├── SsoProcessor.kt │ │ │ │ ├── SsoProcessorContext.kt │ │ │ │ ├── SyncController.kt │ │ │ │ └── package.kt │ │ │ ├── handler │ │ │ │ ├── CommonNetworkHandler.kt │ │ │ │ ├── NetworkHandler.kt │ │ │ │ ├── NetworkHandlerContext.kt │ │ │ │ ├── NetworkHandlerFactory.kt │ │ │ │ ├── NetworkHandlerSupport.kt │ │ │ │ ├── selector │ │ │ │ │ ├── AbstractKeepAliveNetworkHandlerSelector.kt │ │ │ │ │ ├── ExceptionInSelectorResumeException.kt │ │ │ │ │ ├── MaxAttemptsReachedException.kt │ │ │ │ │ ├── NetworkChannelException.kt │ │ │ │ │ ├── NetworkException.kt │ │ │ │ │ ├── NetworkHandlerSelector.kt │ │ │ │ │ ├── NoServerAvailableException.kt │ │ │ │ │ ├── PacketTimeoutException.kt │ │ │ │ │ ├── SelectorNetworkHandler.kt │ │ │ │ │ └── SelectorRequireReconnectException.kt │ │ │ │ └── state │ │ │ │ │ ├── CombinedStateObserver.kt │ │ │ │ │ ├── ExceptionInStateObserverException.kt │ │ │ │ │ ├── JobAttachStateObserver.kt │ │ │ │ │ ├── LoggingStateObserver.kt │ │ │ │ │ ├── SafeStateObserver.kt │ │ │ │ │ ├── StateChangedObserver.kt │ │ │ │ │ └── StateObserver.kt │ │ │ ├── highway │ │ │ │ ├── ChunkedFlowSession.kt │ │ │ │ ├── Highway.kt │ │ │ │ └── Http.kt │ │ │ ├── impl │ │ │ │ ├── HeartbeatFailedException.kt │ │ │ │ ├── ServerClosedException.kt │ │ │ │ └── package.kt │ │ │ ├── keys.kt │ │ │ ├── notice │ │ │ │ ├── NewContactSupport.kt │ │ │ │ ├── PrivateContactSupport.kt │ │ │ │ ├── TraceLoggingNoticeProcessor.kt │ │ │ │ ├── UnconsumedNoticesAlerter.kt │ │ │ │ ├── decoders │ │ │ │ │ ├── GroupNotificationDecoder.kt │ │ │ │ │ └── MsgInfoDecoder.kt │ │ │ │ ├── group │ │ │ │ │ ├── GroupMessageProcessor.kt │ │ │ │ │ ├── GroupNotificationProcessor.kt │ │ │ │ │ ├── GroupOrMemberListNoticeProcessor.kt │ │ │ │ │ └── GroupRecallProcessor.kt │ │ │ │ └── priv │ │ │ │ │ ├── FriendGroupNoticeProcessor.kt │ │ │ │ │ ├── FriendNoticeProcessor.kt │ │ │ │ │ ├── OtherClientNoticeProcessor.kt │ │ │ │ │ └── PrivateMessageProcessor.kt │ │ │ ├── protocol │ │ │ │ ├── LoginType.kt │ │ │ │ ├── SyncingCacheList.kt │ │ │ │ ├── data │ │ │ │ │ ├── jce │ │ │ │ │ │ ├── ChangeFriendNameReq.kt │ │ │ │ │ │ ├── ConfigPush.kt │ │ │ │ │ │ ├── DeviceItemDes.kt │ │ │ │ │ │ ├── FriendList.kt │ │ │ │ │ │ ├── GroupMngReq.kt │ │ │ │ │ │ ├── InstanceInfo.kt │ │ │ │ │ │ ├── MoveGroupMemPack.kt │ │ │ │ │ │ ├── MsgType0x210.kt │ │ │ │ │ │ ├── OnlinePushPack.kt │ │ │ │ │ │ ├── PushNotifyPack.kt │ │ │ │ │ │ ├── ReqPushStatus.kt │ │ │ │ │ │ ├── ReqSummaryCard.kt │ │ │ │ │ │ ├── RequestMSFForceOffline.kt │ │ │ │ │ │ ├── RequestPacket.kt │ │ │ │ │ │ ├── RequestPushForceOffline.kt │ │ │ │ │ │ ├── SetGroupPack.kt │ │ │ │ │ │ ├── SvcDevLoginInfo.kt │ │ │ │ │ │ ├── SvcReqMSFLoginNotifyData.kt │ │ │ │ │ │ ├── SvcReqRegister.kt │ │ │ │ │ │ ├── SvcRequestPushReadedNotify.kt │ │ │ │ │ │ ├── SvcRespRegister.kt │ │ │ │ │ │ ├── SvcRspGetDevLoginInfo.kt │ │ │ │ │ │ └── TroopList.kt │ │ │ │ │ ├── proto │ │ │ │ │ │ ├── Cmd0x346.kt │ │ │ │ │ │ ├── Cmd0x352.kt │ │ │ │ │ │ ├── Cmd0x388.kt │ │ │ │ │ │ ├── Cmd0x857.kt │ │ │ │ │ │ ├── Cmd0x858.kt │ │ │ │ │ │ ├── Define.kt │ │ │ │ │ │ ├── Exciting.kt │ │ │ │ │ │ ├── FrdSysMsg.kt │ │ │ │ │ │ ├── FriendListCommon.kt │ │ │ │ │ │ ├── Group.kt │ │ │ │ │ │ ├── GroupFileCommon.kt │ │ │ │ │ │ ├── Highway.kt │ │ │ │ │ │ ├── HummerCommelem.kt │ │ │ │ │ │ ├── HummerResv12.kt │ │ │ │ │ │ ├── HummerResv21.kt │ │ │ │ │ │ ├── HummerResv3.kt │ │ │ │ │ │ ├── HummerResv6.kt │ │ │ │ │ │ ├── ImageRequest.kt │ │ │ │ │ │ ├── ImgExtPbResvAttrCommon.kt │ │ │ │ │ │ ├── LongMsg.kt │ │ │ │ │ │ ├── Msg.kt │ │ │ │ │ │ ├── MsgCommon.kt │ │ │ │ │ │ ├── MsgRevokeUserDef.kt │ │ │ │ │ │ ├── MsgSvc.kt │ │ │ │ │ │ ├── MsgTransmit.kt │ │ │ │ │ │ ├── MultiMsg.kt │ │ │ │ │ │ ├── OIDB.kt │ │ │ │ │ │ ├── Oidb0x6d6.kt │ │ │ │ │ │ ├── Oidb0x6d7.kt │ │ │ │ │ │ ├── Oidb0x6d8.kt │ │ │ │ │ │ ├── Oidb0x6d9.kt │ │ │ │ │ │ ├── Oidb0x769.kt │ │ │ │ │ │ ├── Oidb0xeac.kt │ │ │ │ │ │ ├── OidbCmd0xb77.kt │ │ │ │ │ │ ├── OnlinePush.kt │ │ │ │ │ │ ├── PbReserve.kt │ │ │ │ │ │ ├── PttShortVideo.kt │ │ │ │ │ │ ├── SSOReserveField.kt │ │ │ │ │ │ ├── StatSvcGetOnline.kt │ │ │ │ │ │ ├── StatSvcSimpleGet.kt │ │ │ │ │ │ ├── StructMsg.kt │ │ │ │ │ │ ├── SyncCookie.kt │ │ │ │ │ │ ├── msgType0x210.kt │ │ │ │ │ │ └── msgType0x211.kt │ │ │ │ │ └── richstatus │ │ │ │ │ │ └── RichStatus.kt │ │ │ │ └── packet │ │ │ │ │ ├── EncryptMethod.kt │ │ │ │ │ ├── OutgoingPacket.kt │ │ │ │ │ ├── PacketFactory.kt │ │ │ │ │ ├── Tlv.kt │ │ │ │ │ ├── chat │ │ │ │ │ ├── ChatType.kt │ │ │ │ │ ├── GroupFile.kt │ │ │ │ │ ├── MultiMsg.kt │ │ │ │ │ ├── MusicSharePacket.kt │ │ │ │ │ ├── NewContact.kt │ │ │ │ │ ├── NudgePacket.kt │ │ │ │ │ ├── PbMessageSvc.kt │ │ │ │ │ ├── SendMessageMultiProtocol.kt │ │ │ │ │ ├── TroopEssenceMsgManager.kt │ │ │ │ │ ├── TroopManagement.kt │ │ │ │ │ ├── image │ │ │ │ │ │ ├── ImgStore.kt │ │ │ │ │ │ └── LongConn.kt │ │ │ │ │ ├── receive │ │ │ │ │ │ ├── MessageSvc.PbDeleteMsg.kt │ │ │ │ │ │ ├── MessageSvc.PbGetGroupMsg.kt │ │ │ │ │ │ ├── MessageSvc.PbGetMsg.kt │ │ │ │ │ │ ├── MessageSvc.PbGetRoamMsgReq.kt │ │ │ │ │ │ ├── MessageSvc.PbSendMsg.kt │ │ │ │ │ │ ├── MessageSvc.PushForceOffline.kt │ │ │ │ │ │ ├── MessageSvc.PushNotify.kt │ │ │ │ │ │ ├── MessageSvc.PushReaded.kt │ │ │ │ │ │ ├── MessageSvc.RequestPushStatus.kt │ │ │ │ │ │ ├── OnlinePush.PbC2CMsgSync.kt │ │ │ │ │ │ ├── OnlinePush.PbPushGroupMsg.kt │ │ │ │ │ │ ├── OnlinePush.PbPushTransMsg.kt │ │ │ │ │ │ ├── OnlinePush.ReqPush.kt │ │ │ │ │ │ └── OnlinePush.SidExpired.kt │ │ │ │ │ ├── shortvideo │ │ │ │ │ │ └── PttCenterSvr.kt │ │ │ │ │ └── voice │ │ │ │ │ │ └── PttStore.kt │ │ │ │ │ ├── list │ │ │ │ │ ├── FriendList.kt │ │ │ │ │ ├── ProfileService.kt │ │ │ │ │ └── StrangerList.kt │ │ │ │ │ ├── login │ │ │ │ │ ├── ConfigPushSvc.kt │ │ │ │ │ ├── Heartbeat.kt │ │ │ │ │ ├── StatSvc.kt │ │ │ │ │ ├── WtLogin.kt │ │ │ │ │ └── wtlogin │ │ │ │ │ │ ├── WtLogin10.kt │ │ │ │ │ │ ├── WtLogin15.kt │ │ │ │ │ │ ├── WtLogin2.kt │ │ │ │ │ │ ├── WtLogin20.kt │ │ │ │ │ │ ├── WtLogin7.kt │ │ │ │ │ │ ├── WtLogin8.kt │ │ │ │ │ │ ├── WtLogin9.kt │ │ │ │ │ │ └── WtLoginExt.kt │ │ │ │ │ ├── sso │ │ │ │ │ └── TRpcRawPacket.kt │ │ │ │ │ └── summarycard │ │ │ │ │ ├── FriendRemark.kt │ │ │ │ │ └── SummaryCard.kt │ │ │ └── qimei │ │ │ │ └── Qimei.kt │ │ ├── pipeline │ │ │ └── ProcessorPipeline.kt │ │ ├── spi │ │ │ └── EncryptService.kt │ │ └── utils │ │ │ ├── AtomicIntSeq.kt │ │ │ ├── BotConfigurationExt.kt │ │ │ ├── ExternalResourceImpl.kt │ │ │ ├── FileSystem.kt │ │ │ ├── FragmentedMsgParsingCache.kt │ │ │ ├── GuidSource.kt │ │ │ ├── ImagePatcher.kt │ │ │ ├── MiraiCoreServices.kt │ │ │ ├── MiraiProtocolInternal.kt │ │ │ ├── MiraiUtilsLogger.kt │ │ │ ├── NetworkType.kt │ │ │ ├── PlatformDatagramChannel.kt │ │ │ ├── PlatformSocket.kt │ │ │ ├── ScheduledJob.kt │ │ │ ├── SingleEntrantLock.kt │ │ │ ├── SubLogger.kt │ │ │ ├── collection.kt │ │ │ ├── crypto │ │ │ ├── AES.kt │ │ │ ├── Ecdh.kt │ │ │ ├── QQEcdh.kt │ │ │ ├── RSA.kt │ │ │ └── TEA.kt │ │ │ ├── flags.kt │ │ │ ├── io │ │ │ ├── ProtocolStruct.kt │ │ │ ├── output.kt │ │ │ └── serialization │ │ │ │ ├── tars │ │ │ │ ├── Tars.kt │ │ │ │ ├── TarsId.kt │ │ │ │ └── internal │ │ │ │ │ ├── TarsDecoder.kt │ │ │ │ │ ├── TarsInput.kt │ │ │ │ │ ├── TarsOld.kt │ │ │ │ │ └── TarsTag.kt │ │ │ │ └── utils.kt │ │ │ ├── numbers.kt │ │ │ ├── printStructure.kt │ │ │ ├── retryWithServers.kt │ │ │ ├── runCoroutineInPlace.kt │ │ │ ├── string.kt │ │ │ └── type.kt │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── net.mamoe.mirai.IMirai │ │ │ ├── net.mamoe.mirai.auth.DefaultBotAuthorizationFactory │ │ │ ├── net.mamoe.mirai.event.InternalGlobalEventChannelProvider │ │ │ ├── net.mamoe.mirai.internal.message.protocol.MessageProtocol │ │ │ ├── net.mamoe.mirai.message.data.InternalImageProtocol │ │ │ ├── net.mamoe.mirai.message.data.InternalShortVideoProtocol │ │ │ ├── net.mamoe.mirai.message.data.OfflineAudio$Factory │ │ │ └── net.mamoe.mirai.utils.InternalProtocolDataExchange │ │ └── emoji-pattern.regex │ ├── commonTest │ ├── kotlin │ │ ├── AbstractTestWithMiraiImpl.kt │ │ ├── BotFactoryTest.kt │ │ ├── MockBot.kt │ │ ├── PlatformUtilsTest.kt │ │ ├── ScheduledJobTest.kt │ │ ├── TypeConversionTest.kt │ │ ├── contact │ │ │ └── file │ │ │ │ └── AbsoluteFolderTest.kt │ │ ├── event │ │ │ ├── AbstractEventTest.kt │ │ │ ├── CancelScopeTest.kt │ │ │ ├── EventChannelFlowTest.kt │ │ │ ├── EventChannelTest.kt │ │ │ ├── EventTests.kt │ │ │ ├── NextEventTest.kt │ │ │ └── StepUtil.kt │ │ ├── message │ │ │ ├── CleanupRubbishMessageElementsTest.kt │ │ │ ├── ImageBuilderTest.kt │ │ │ ├── ImageReadingTest.kt │ │ │ ├── InternalImageProtocolImplTest.kt │ │ │ ├── RefineContextTest.kt │ │ │ ├── code │ │ │ │ └── TestMiraiCode.kt │ │ │ ├── data │ │ │ │ ├── AudioTest.kt │ │ │ │ ├── ContentEqualsTest.kt │ │ │ │ ├── ForwardRefineTest.kt │ │ │ │ ├── MessageReceiptTest.kt │ │ │ │ ├── MessageRefineTest.kt │ │ │ │ └── MessageSerializationTest.kt │ │ │ ├── protocol │ │ │ │ ├── MessageProtocolFacadeTest.kt │ │ │ │ └── impl │ │ │ │ │ ├── AbstractMessageProtocolTest.kt │ │ │ │ │ ├── CustomMessageProtocolTest.kt │ │ │ │ │ ├── EqualityAsserter.kt │ │ │ │ │ ├── FaceProtocolTest.kt │ │ │ │ │ ├── FileMessageProtocolTest.kt │ │ │ │ │ ├── FlashImageProtocolTest.kt │ │ │ │ │ ├── ForwardMessageProtocolTest.kt │ │ │ │ │ ├── GeneralMessageSenderProtocolTest.kt │ │ │ │ │ ├── ImageProtocolTest.kt │ │ │ │ │ ├── LongMessageProtocolTest.kt │ │ │ │ │ ├── MarketFaceProtocolTest.kt │ │ │ │ │ ├── MusicShareProtocolTest.kt │ │ │ │ │ ├── PokeMessageProtocolTest.kt │ │ │ │ │ ├── QuoteReplyProtocolTest.kt │ │ │ │ │ ├── RichMessageProtocolTest.kt │ │ │ │ │ ├── SuperFaceProtocolTest.kt │ │ │ │ │ ├── TextProtocolTest.kt │ │ │ │ │ └── VipFaceProtocolTest.kt │ │ │ └── serialization │ │ │ │ └── AbstractMessageSerializationTest.kt │ │ ├── network │ │ │ ├── AwaitStateTest.kt │ │ │ ├── PacketCodecTest.kt │ │ │ ├── ServerListTest.kt │ │ │ ├── auth │ │ │ │ ├── AbstractBotAuthTest.kt │ │ │ │ ├── AuthorizationReasonTest.kt │ │ │ │ └── BotAuthorizationTest.kt │ │ │ ├── component │ │ │ │ ├── AbstractMutableComponentStorageTest.kt │ │ │ │ ├── BotAuthControlTest.kt │ │ │ │ ├── BotInitProcessorTest.kt │ │ │ │ ├── CombinedStorageTest.kt │ │ │ │ └── EventDispatcherTest.kt │ │ │ ├── framework │ │ │ │ ├── AbstractCommonNHTest.kt │ │ │ │ ├── AbstractCommonNHTestWithSelector.kt │ │ │ │ ├── AbstractMockNetworkHandlerTest.kt │ │ │ │ ├── AbstractNetworkHandlerTest.kt │ │ │ │ ├── AbstractRealNetworkHandlerTest.kt │ │ │ │ ├── AbstractRealTimeActionTestUnit.kt │ │ │ │ ├── ITestNetworkHandler.kt │ │ │ │ ├── PacketReplier.kt │ │ │ │ ├── SynchronizedStdoutLogger.kt │ │ │ │ ├── TestNetworkHandler.kt │ │ │ │ ├── TestNetworkHandlerContext.kt │ │ │ │ ├── components │ │ │ │ │ ├── TestEventDispatcherImpl.kt │ │ │ │ │ ├── TestImagePatcher.kt │ │ │ │ │ └── TestSsoProcessor.kt │ │ │ │ ├── networkUtils.kt │ │ │ │ ├── sessionUtils.kt │ │ │ │ └── test │ │ │ │ │ └── FrameworkEventTest.kt │ │ │ ├── handler │ │ │ │ ├── KeepAliveNetworkHandlerSelectorTest.kt │ │ │ │ ├── SelectorHeartbeatRecoveryTest.kt │ │ │ │ ├── SelectorLoginRecoveryTest.kt │ │ │ │ ├── StandaloneSelectorTests.kt │ │ │ │ └── StateObserverTest.kt │ │ │ └── impl │ │ │ │ └── common │ │ │ │ ├── AccountSecretsTest.kt │ │ │ │ ├── BotLifecycleTest.kt │ │ │ │ ├── CommonNHAddressChangedTest.kt │ │ │ │ ├── CommonNHBotNormalLoginTest.kt │ │ │ │ ├── CommonNHEventTest.kt │ │ │ │ ├── ResumeConnectionTest.kt │ │ │ │ ├── SendPacketTest.kt │ │ │ │ └── SetStateTest.kt │ │ ├── notice │ │ │ └── processors │ │ │ │ ├── AbstractNoticeProcessorTest.kt │ │ │ │ ├── BotInvitedJoinTest.kt │ │ │ │ ├── FriendNickChangeTest.kt │ │ │ │ ├── GroupRetrieveTest.kt │ │ │ │ ├── GroupTransferTest.kt │ │ │ │ ├── MemberAdminChangeTest.kt │ │ │ │ ├── MemberJoinTest.kt │ │ │ │ ├── MemberQuitTest.kt │ │ │ │ ├── MessageSyncTest.kt │ │ │ │ ├── MessageTest.kt │ │ │ │ ├── MuteTest.kt │ │ │ │ └── RecallTest.kt │ │ ├── samples │ │ │ └── CustomMessageSamples.kt │ │ ├── test │ │ │ ├── events.kt │ │ │ ├── initPlatform.common.kt │ │ │ ├── printing.kt │ │ │ └── utils.kt │ │ ├── testFramework │ │ │ ├── DebugProbes.kt │ │ │ ├── DynamicTest.kt │ │ │ ├── Platform.kt │ │ │ ├── message │ │ │ │ └── TestMessageSourceSequenceIdAwaiter.kt │ │ │ ├── package.kt │ │ │ └── rules │ │ │ │ └── DisabledOnJvmLikePlatform.kt │ │ └── utils │ │ │ ├── FileSystemTest.kt │ │ │ ├── crypto │ │ │ ├── AESTest.kt │ │ │ ├── EcdhTest.kt │ │ │ └── RSATest.kt │ │ │ └── io │ │ │ └── serialization │ │ │ ├── ReadJceStructTest.kt │ │ │ └── tars │ │ │ └── internal │ │ │ └── DebugLoggerTest.kt │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── net.mamoe.mirai.internal.message.source.MessageSourceSequenceIdAwaiter │ │ ├── image │ │ └── jpeg-header-issue-1610.bin │ │ └── recording │ │ └── configs │ │ ├── desensitization.yml │ │ └── test.desensitization.yml │ ├── jvmBaseMain │ └── kotlin │ │ ├── MiraiImpl.kt │ │ ├── contact │ │ ├── GroupImpl.kt │ │ ├── active │ │ │ └── GroupActiveImpl.kt │ │ └── file │ │ │ └── AbsoluteFolderImpl.kt │ │ ├── message │ │ └── protocol │ │ │ └── impl │ │ │ └── TextProtocol.kt │ │ ├── network │ │ ├── component │ │ │ └── ComponentKey.kt │ │ ├── handler │ │ │ ├── NetworkHandlerFactory.kt │ │ │ ├── SocketAddress.kt │ │ │ └── selector │ │ │ │ └── SelectorRequireReconnectException.kt │ │ ├── impl │ │ │ ├── netty │ │ │ │ ├── NettyChannelException.kt │ │ │ │ ├── NettyNetworkHandler.kt │ │ │ │ ├── NettyNetworkHandlerFactory.kt │ │ │ │ └── nettyUtils.kt │ │ │ └── package.kt │ │ ├── package.kt │ │ └── protocol │ │ │ └── data │ │ │ └── richstatus │ │ │ └── RichStatus.kt │ │ ├── package.kt │ │ └── utils │ │ ├── BotConfigurationExt.kt │ │ ├── ExternalResourceImpl.kt │ │ ├── PlatformSocket.kt │ │ ├── RemoteFileImpl.kt │ │ └── crypto │ │ ├── AES.kt │ │ ├── JceEcdh.kt │ │ ├── JceEcdhWithProvider.kt │ │ ├── QQEcdhJvm.kt │ │ └── RSA.kt │ ├── jvmBaseTest │ ├── kotlin │ │ ├── event │ │ │ ├── EventChannelJavaTest.java │ │ │ ├── EventLaunchUndispatchedTest.kt │ │ │ ├── JvmMethodEventsTest.kt │ │ │ ├── JvmMethodEventsTestJava.kt │ │ │ └── SimpleListenerHostTestJava.kt │ │ ├── network │ │ │ ├── component │ │ │ │ ├── ComponentKeyTest.kt │ │ │ │ └── ConcurrentComponentStorageToStringTest.kt │ │ │ ├── framework │ │ │ │ ├── AbstractCommonNHTest.kt │ │ │ │ ├── AbstractNettyNHTest.kt │ │ │ │ └── NettyNHTestChannel.kt │ │ │ └── impl │ │ │ │ └── netty │ │ │ │ └── CommonNHUtilsTest.kt │ │ ├── package.kt │ │ ├── test │ │ │ ├── AbstractTest.kt │ │ │ └── NativeTestWrapper.kt │ │ ├── testFramework │ │ │ ├── DebugProbes.kt │ │ │ ├── DynamicTest.kt │ │ │ ├── codegen │ │ │ │ ├── RemoveDefaultValuesVisitor.kt │ │ │ │ ├── ValueDescAnalyzer.kt │ │ │ │ ├── descriptors │ │ │ │ │ ├── ClassValueDesc.kt │ │ │ │ │ ├── CollectionLikeValueDesc.kt │ │ │ │ │ ├── CollectionValueDesc.kt │ │ │ │ │ ├── MapValueDesc.kt │ │ │ │ │ ├── ObjectArrayValueDesc.kt │ │ │ │ │ ├── PlainValueDesc.kt │ │ │ │ │ ├── PrimitiveArrayValueDesc.kt │ │ │ │ │ └── ValueDesc.kt │ │ │ │ ├── test │ │ │ │ │ ├── IndenterTest.kt │ │ │ │ │ ├── OptimizeByteArrayAsHexStringTransformerTest.kt │ │ │ │ │ └── visitors │ │ │ │ │ │ ├── ValueDescAnalyzerTest.kt │ │ │ │ │ │ └── ValueDescToStringRendererTest.kt │ │ │ │ ├── visitor │ │ │ │ │ ├── ValueDescTransformer.kt │ │ │ │ │ ├── ValueDescVisitor.kt │ │ │ │ │ └── ValueDescVisitorUnit.kt │ │ │ │ └── visitors │ │ │ │ │ ├── AnalyzeDefaultValuesMappingVisitor.kt │ │ │ │ │ ├── ClassFormatter.kt │ │ │ │ │ ├── Indenter.kt │ │ │ │ │ ├── OptimizeByteArrayAsHexStringTransformer.kt │ │ │ │ │ └── ValueDescToStringRenderer.kt │ │ │ ├── desensitizer │ │ │ │ └── Desensitizer.kt │ │ │ ├── message │ │ │ │ └── protocol │ │ │ │ │ └── MessageDecodingRecorder.kt │ │ │ ├── notice │ │ │ │ └── RecordingNoticeHandler.kt │ │ │ ├── rules │ │ │ │ └── DisabledOnPlatform.kt │ │ │ └── test │ │ │ │ └── RecordingNoticeProcessorTest.kt │ │ └── utils │ │ │ ├── CombinedExternalResourceTest.kt │ │ │ ├── StructureToStringTransformerNew.kt │ │ │ └── test │ │ │ └── StructureToStringTransformerNewTest.kt │ └── resources │ │ └── META-INF │ │ └── services │ │ └── net.mamoe.mirai.utils.StructureToStringTransformer │ ├── jvmMain │ └── kotlin │ │ ├── package.kt │ │ └── utils │ │ └── crypto │ │ └── EcdhJvmDesktop.kt │ └── jvmTest │ ├── README.md │ ├── kotlin │ ├── AtomicResizeCacheListTest.kt │ ├── JavaApiTests.java │ ├── bootstrap │ │ ├── RunMessageDecodingRecorder.kt │ │ └── RunNoticeRecorder.kt │ ├── directboot │ │ ├── DebugRunHelper.kt │ │ └── envprepare.kt │ ├── netinternalkit │ │ ├── Ansi.kt │ │ ├── LogCapture.kt │ │ └── NetReplayHelper.kt │ ├── package.kt │ ├── test │ │ └── initializeTestJvm.kt │ └── testFramework │ │ └── currentPlatform.kt │ └── resources │ └── account.yml ├── mirai-deps-test ├── .gitignore ├── README.md ├── build.gradle.kts ├── gradle.properties └── test │ ├── AbstractTest.kt │ ├── CoreDependencyResolutionTest.kt │ ├── CoreShadowRelocationTest.kt │ └── package.kt ├── mirai-dokka ├── .gitignore ├── README.md ├── build.gradle.kts ├── frontend │ └── ext.js └── src │ ├── BuildVersionList.kt │ ├── DeployToGitHub.kt │ ├── Prepare.kt │ └── system.kt └── settings.gradle.kts /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | * eol=lf 3 | *.png binary 4 | *.jar binary 5 | *.jpg binary 6 | *.jpeg binary 7 | *.webp binary 8 | *.bin binary 9 | -------------------------------------------------------------------------------- /.github/68f8fec9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/68f8fec9.png -------------------------------------------------------------------------------- /.github/A}YWVE860U(%YQD$R1GB1[P.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/A}YWVE860U(%YQD$R1GB1[P.png -------------------------------------------------------------------------------- /.github/EZSLAB`K@YFFOW47{090W8B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/EZSLAB`K@YFFOW47{090W8B.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | 3 | contact_links: 4 | - name: Mirai Forum 5 | url: https://mirai.mamoe.net 6 | about: 论坛 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 特性申请 3 | about: 申请 mirai 添加新的特性 4 | title: '' 5 | labels: 't:feature' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 17 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /.github/J]CE)IK4BU08(EO~UVLJ{[F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/J]CE)IK4BU08(EO~UVLJ{[F.png -------------------------------------------------------------------------------- /.github/event hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/event hook.png -------------------------------------------------------------------------------- /.github/jetbrains-variant-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/jetbrains-variant-3.png -------------------------------------------------------------------------------- /.github/机器人和联系人架构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.github/机器人和联系人架构.png -------------------------------------------------------------------------------- /.idea/copyright/Mamoe_mirai.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/.idea/icon.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ----------------------------- 4 | 5 | 欢迎你来到这里, 请移步 [`docs/contributing`](docs/contributing) 6 | -------------------------------------------------------------------------------- /buildSrc/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/Stdlib.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | fun String.capitalize(): String = this.replaceFirstChar { it.uppercaseChar() } -------------------------------------------------------------------------------- /buildSrc/src/main/resources/binary-compatibility-validator-ignore.txt: -------------------------------------------------------------------------------- 1 | build.gradle.kts 2 | .gitignore -------------------------------------------------------------------------------- /ci-release-helper/.gitignore: -------------------------------------------------------------------------------- 1 | /stage-repo 2 | /stage-* 3 | -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.10.1.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复取消发送 `FriendMessage` 却显示 'cancelled by 6 | GroupMessagePreSendEvent' 7 | 的问题 (#1851) 8 | - 优化日志性能 (#1880 by @AdoptOSS) 9 | - 完善 `RoamingMessages` 文档 10 | - 修复文档错别字 (#1902 by @Moyulingjiu) 11 | - 补充文档错别字 (#1908 by @LaoLittle) 12 | 13 | ## mirai-console 14 | 15 | ### 优化和修复 16 | 17 | - 仅在 Console 实例已经初始化之后才在 JVM 关闭时停止 Console 实例 18 | - 修复权限取消, 并在取消权限指令中给出更多提示 (#1843 by @cssxsh) 19 | - 优化在指令匹配群成员时的性能 20 | - 修复文档错别字 (#1912 by @Colerar) 21 | - 补全 AutoLogin 配置中对 `protocol` 的注释 (#1891 by @Stardust-minus) 22 | -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.10.2.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复登录时遇到 'Timeout waiting for ConfigPush' 等 ConfigPush 6 | 有关问题 (#1899, #1991) 7 | - 修复 `Image.size` 文档错别字 (#1978) -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.11.0.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复 `AbsoluteFolder.resolveFileById` 在一些情况下会找不到文件的问题 ( 6 | #2033) 7 | - 修复一些情况下心跳超时后不会重连的问题 (#2024) 8 | - 修复一些情况下发送数据包出错的问题 (#2006) 9 | - 修复文档错别字 (#2019 by @hundun000, ) 10 | 11 | ## mirai-console 12 | 13 | ### 优化和修复 14 | 15 | - 修复一些情况下找不到 `java.*` 或 `javax.*` 的问题 (#2009) 16 | - 修复 `ContactUtils` 中 `ContactOrBot.render` 不支持 `Stranger` 17 | 的问题 (#2010) 18 | - 增加在 Java 注册扩展的文档 (#2021 by @MrXiaoM) 19 | 20 | ## mirai-console-gradle 21 | 22 | ### 优化和修复 23 | 24 | - 修复 console 下载依赖时试图下载并不存在 JAR 的问题 (#1975) 25 | - 修复 buildPlugin 未打包子项目间依赖的问题 (#2038) 26 | -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.12.0.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复部分情况下发送图片无法显示和发送 GIF 后图片不播放的问题 (#2114 by 6 | @sandtechnology) 7 | > 此问题并非 2.12.0-RC 引入 8 | 9 | ## mirai-console 10 | 11 | ### 优化和修复 12 | 13 | - 修复前置插件存在私有依赖时, 插件无法链接相同依赖的问题 (#2108) 14 | > 此问题于 2.11 引入 -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.12.1.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复合并转发消息显示昵称错误的问题 (#2114) 6 | 7 | ## mirai-console 8 | 9 | ### 优化和修复 10 | 11 | - 修复前置插件存在私有依赖时, 插件无法链接相同依赖的问题 (#2108) 12 | - 修复插件使用内置依赖错误 (#2126) 13 | - 修复加载插件时,若插件 JAR 包含 JVM 14 | 内置依赖,会导致其他插件直接链接到该插件内依赖并重复加载报错 (#2141) 15 | 16 | ## IDEA 17 | 18 | ### 优化和修复 19 | 20 | - 支持 2022.2 (#2124) 21 | > 新插件版本号为 `221-2.13.0-171-1` -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.12.2.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复上传文件时没有发送文件消息的问题 (#2195) 6 | > 自 2.12.0 -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.12.3.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复合并转发内容中用户昵称错误的问题 (#2187) -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.13.0-RC2.md: -------------------------------------------------------------------------------- 1 | 2.13.0-RC2 包含对 2.13 的补充和对 2.13.0-RC 的修复. 2 | 3 | ## mirai-core 4 | 5 | ### 优化和修复 6 | 7 | - 修复无法加载 2.9.0 以前版本生成的设备信息的问题 (#2280) 8 | - 修复因好友分组列表加载失败而造成好友列表加载失败的问题 (#2274) 9 | - 修复网络断开时无法重连的错误 10 | - 修复重连后 `Invalid number format: 'msfwifi'` 导致的立刻断开连接 11 | - 修复 `Bot.close` 时出现 `StackOverflowError` 的问题 (#2266) 12 | - 修复非 snapshots 版本无法在 MPP 项目依赖的问题 (`Could not resolve net.mamoe:mirai-core-api:2.13.0-RC`) (#2270) 13 | - 修复使用 HTTP API 相关功能报错 `java.lang.NoClassDefFoundError: okhttp3/Request$Builder` 的问题 (#2263) 14 | - 修复获取群语音下载链接失败的问题 (#2269) 15 | > 此问题非 2.13 引入 16 | - 在使用不支持滑动验证的验证码处理器的错误中附带所使用的验证器的具体信息 17 | 18 | ## mirai-core-mock 19 | 20 | ### 优化和修复 21 | 22 | - 修复在模拟环境时的信息序列化相关问题 -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.13.1.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复找不到 OkHttp 等问题 (#2324, #2331) 6 | - 优化 `UnsupportedSliderCaptchaException` 的错误提示 7 | - 修复验证码解决器报错时没有按照预期停止 bot 的错误逻辑 8 | - 修复 `java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 4132 out of bounds for byte[4096]` (#2309) 9 | 10 | 11 | 12 | ## mirai-console 13 | 14 | ### 优化修复 15 | 16 | - 修复 console 显示进度条的时候出现死锁 (#2322) 17 | - 修复 console 中 Gradle 缓存路径检查不正确的问题 (#2357) 18 | - 修复 console 中指定多个远程仓库地址时未按照预期工作的错误 (#2358 by @cssxsh) 19 | -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.13.2.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复发送图片时发生 `java.lang.NoSuchMethodError` 的问题 (#2381) 6 | > 自 2.13.0 -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.13.3.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复登录时出现 `DecryptionFailedException` 的问题 (#2167, #2419 by @sandtechnology) 6 | - 修复使用 `ANDROID_PHONE` 或 `ANDROID_PAD` 登录时出现错误 "版本过低" 的问题 (#2405, #2423 by @sandtechnology) 7 | - 为 `friendGroupId` 增加默认值 `0`, 以兼容旧缓存 (#2403 by @cssxsh) -------------------------------------------------------------------------------- /ci-release-helper/changelogs/2.13.4.md: -------------------------------------------------------------------------------- 1 | ## mirai-core 2 | 3 | ### 优化和修复 4 | 5 | - 修复无法登录的问题 (#2433 by @sandtechnology) 6 | 7 | > 此修复也在 2.14.0-RC 包含 -------------------------------------------------------------------------------- /ci-release-helper/changelogs/README.md: -------------------------------------------------------------------------------- 1 | # Changelogs 2 | 3 | 本目录存档历史版本的变更记录 -------------------------------------------------------------------------------- /ci-release-helper/src/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package cihelper 11 | 12 | -------------------------------------------------------------------------------- /docs/.UserManual_images/MCLI-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/.UserManual_images/MCLI-1.png -------------------------------------------------------------------------------- /docs/.UserManual_images/MCPS-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/.UserManual_images/MCPS-1.png -------------------------------------------------------------------------------- /docs/.mirai_images/d548dae5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/.mirai_images/d548dae5.png -------------------------------------------------------------------------------- /docs/.mirai_images/e02dc13d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/.mirai_images/e02dc13d.png -------------------------------------------------------------------------------- /docs/CoreAPI.md: -------------------------------------------------------------------------------- 1 | # Mirai - Core API 2 | 3 | > 本文档适用于 mirai 2.x 版本 4 | > 要由 mirai 1.x 迁移到 2.x,请阅读 [MigrationFrom1x.md](MigrationFrom1x.md) 5 | 6 | > 在 GitHub 和 `docs.mirai.mamoe.net` 默认看到的是最新版本的文档,可能不适用于旧版本。 7 | > 可以将 URL `https://github.com/mamoe/mirai/blob/2.4.2/docs/README.md` 中的 `2.4.2` 替换为其他版本来查看对应文档。 8 | 9 | - 机器人 [Bots](Bots.md) 10 | - 联系人 [Contacts](Contacts.md) 11 | - 事件 [Events](Events.md) 12 | - 消息 [Messages](Messages.md) 13 | 14 | *附录* 15 | 16 | - 常用 API [ConciseAPI](ConciseAPI.md) 17 | 18 | > 希望改进文档? 请在 [#848](https://github.com/mamoe/mirai/discussions/848) 提出建议 19 | -------------------------------------------------------------------------------- /docs/contributing/VerifyingABI.md: -------------------------------------------------------------------------------- 1 | # 进行 ABI 验证 2 | 3 | mirai 4 | 通过 [binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator)) 5 | 维护 [ABI](https://zh.wikipedia.org/zh-cn/%E5%BA%94%E7%94%A8%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%8E%A5%E5%8F%A3) 6 | 稳定性。 7 | 8 | 若要修改 mirai-core-api,可执行 Gradle 任务 `apiCheckAll` 来检验 ABI 9 | 兼容性,也可以在 IDEA 双击 Control 键运行 `Check Binary Compatiblity`。 10 | 11 | 若正在添加一个新功能,可以执行 Gradle 任务 `apiDumpAll` 或在 IDEA 双击 12 | Control 键运行 `Dump API Changes for ...` 来更新记录。这将会生成 `*.api` 13 | 文件,文件的变化反映了你的修改情况。请人工审核该文件以确保向下兼容。 -------------------------------------------------------------------------------- /docs/contributing/building/images/run-gradle-tasks-in-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/contributing/building/images/run-gradle-tasks-in-idea.png -------------------------------------------------------------------------------- /docs/files/install-20210412.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/files/install-20210412.cmd -------------------------------------------------------------------------------- /docs/images/snapshots-build-jvm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/images/snapshots-build-jvm.png -------------------------------------------------------------------------------- /docs/images/snapshots-find-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/images/snapshots-find-actions.png -------------------------------------------------------------------------------- /docs/mirai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/docs/mirai.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | distributionBase=GRADLE_USER_HOME 11 | distributionPath=wrapper/dists 12 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip 13 | zipStoreBase=GRADLE_USER_HOME 14 | zipStorePath=wrapper/dists 15 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | cargo install --force cbindgen 11 | cargo install bindgen -------------------------------------------------------------------------------- /logging/mirai-logging-log4j2/resources/META-INF/services/net.mamoe.mirai.utils.MiraiLogger$Factory: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.utils.logging.MiraiLog4JFactory -------------------------------------------------------------------------------- /mirai-console/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.war 15 | *.nar 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | 24 | target/ 25 | build/ 26 | 27 | .idea/ 28 | *.iml 29 | /.idea/ 30 | .idea/* 31 | /.idea/* 32 | 33 | /test 34 | 35 | 36 | .gradle/ 37 | 38 | 39 | local.properties 40 | 41 | # Maven publishing credits 42 | keys.properties 43 | /plugins/ 44 | 45 | bintray.user.txt 46 | bintray.key.txt 47 | 48 | token.txt 49 | /*/token.txt -------------------------------------------------------------------------------- /mirai-console/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "frontend/mirai-android"] 2 | path = frontend/mirai-android 3 | url = https://github.com/mzdluo123/MiraiAndroid 4 | -------------------------------------------------------------------------------- /mirai-console/backend/codegen/README.md: -------------------------------------------------------------------------------- 1 | # Mirai Console - Backend.codegen 2 | 3 | 后端代码生成模块,用于最小化重复代码的人工成本。 4 | 5 | - `MessageScope` 代码生成: [MessageScopeCodegen.kt: Line 33](src/MessageScopeCodegen.kt#L33) 6 | - `Value` 和 `PluginData` 相关代码生成: [ValueSettingCodegen.kt: Line 18](src/ValuePluginDataCodegen.kt#L18) 7 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/.gitignore: -------------------------------------------------------------------------------- 1 | build.gradle.kts 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/MCITSelfTestPlugin/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | net.mamoe.console.integrationtest.ep.mcitselftest.MCITSelfTestPlugin 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/README.md: -------------------------------------------------------------------------------- 1 | # Integration Test - Sub Testers 2 | 3 | Integration Test 的测试插件, 放置在本文件夹内的全部插件均为 console 内部测试用插件 4 | 5 | 如果您不是正在修改 mirai-console, 则不需要阅读此文件及此模块 6 | 7 | --- 8 | 9 | 创建新测试插件只需要在本文件夹创建新的目录, 然后重载 (Reimport gradle projects) 10 | 11 | 如果需要添加新的依赖, 请在 [`IntegrationTest/build.gradle.kts`](../build.gradle.kts) 添加相关依赖 (使用 `testApi`) 并标注哪个测试框架使用此依赖, 为何使用此依赖 12 | 13 | 如果需要自定义 `build.gradle.kts`, 请在 IDEA 右键 `build.gradle.kts` 并选择 `Git > Add File` 14 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/.module-group.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/.module-group.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11-without-new/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11-without-new/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11-without-new/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | mirai.jar.before211.nonew.After211NoNew -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-after-2_11/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | mirai.jar.after211.After211 -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-before-2_11/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-before-2_11/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/mirai-jar-before-2_11/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | mirai.jar.before211.Before211 -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-1/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-1/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-1/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | samepkg.P -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-2/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-2/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/mirai-plugin-compatibility/same-pkg-2/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | samepkg.P -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/never-override-jdk-modules/module-jdk-module/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/never-override-jdk-modules/module-jdk-module/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/never-override-jdk-modules/module-jdk-module/resources/mvn.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.issue2141:javax-xml:1.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/never-override-jdk-modules/module-jdk-module/src/javax/xml/parsers/SAXParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package javax.xml.parsers 11 | 12 | public class SAXParser 13 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/never-override-jdk-modules/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | neveroverridejdkmodules.NeverOverrideJdkModules -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/options-properties/independent-plugin/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/options-properties/independent-plugin/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/options-properties/independent-plugin/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | consoleittest.optionproperties.independent.Independent -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/options-properties/resources/META-INF/mirai-console-plugin/options.properties: -------------------------------------------------------------------------------- 1 | # suppress inspection "UnusedProperty" for whole file 2 | 3 | resources.resolve-console-system-resources=true 4 | 5 | 6 | class.loading.be-resolvable-to-independent=false 7 | class.loading.resolve-independent=false 8 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/options-properties/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | consoleittest.optionproperties.main.OptionsProperties -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-can-depends-on-mirai-console/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.plugincandependsonmiraiconsole.PluginCanDependsOnMiraiConsole 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-moda/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-moda/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-moda/resources/mvn.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.issue2054:moda:1.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-moda/src/ModuleA.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package issue2054.modulea 11 | 12 | public object ModuleA { 13 | public fun act(b: () -> Unit) { 14 | b() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-modb/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-modb/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-modb/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("UnusedImport") 11 | 12 | plugins { 13 | kotlin("jvm") 14 | kotlin("plugin.serialization") 15 | id("java") 16 | } 17 | 18 | version = "0.0.0" 19 | 20 | kotlin { 21 | explicitApiWarning() 22 | } 23 | 24 | dependencies { 25 | api(project(":mirai-console.integration-test")) 26 | api(parent!!.project("module-moda")) 27 | } 28 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-modb/resources/mvn.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.issue2054:modb:1.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-modb/src/ModuleB.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package issue2054.moduleb 11 | 12 | import issue2054.modulea.ModuleA 13 | 14 | 15 | public object ModuleB { 16 | public val getModuleA: Any get() = ModuleA 17 | public fun act(b: () -> Unit) { 18 | b() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-private-issue2108/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-private-issue2108/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-private-issue2108/resources/mvn.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.issue2108:private-module:1.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/module-private-issue2108/src/PrivateModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | package issue2108 10 | 11 | public object PrivateModule { 12 | public fun stack(): Throwable = Throwable("Stack trace") 13 | } 14 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | pdepdep2054.PDepDependOnDep 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/second-plugin/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/second-plugin/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dep-dependon-dep-issue-2054/second-plugin/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | pdepdep2054sec.PDepDependOnDepSec 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-depend-on-other/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | @file:Suppress("UnusedImport") 11 | 12 | plugins { 13 | kotlin("jvm") 14 | kotlin("plugin.serialization") 15 | id("java") 16 | } 17 | 18 | version = "0.0.0" 19 | 20 | kotlin { 21 | explicitApiWarning() 22 | } 23 | 24 | dependencies { 25 | api(project(":mirai-console.integration-test")) 26 | api(parent!!.project("MCITSelfTestPlugin")) 27 | } 28 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-depend-on-other/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.integrationtest.ep.dependonother.PluginDependOnOther -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dynamic-dependencies-download/resources/META-INF/mirai-console-plugin/dependencies-private.txt: -------------------------------------------------------------------------------- 1 | com.zaxxer:SparseBitSet:1.2 2 | 3 | ## Test console non-hard-link override 4 | org.bouncycastle:bcprov-jdk15on:1.63 5 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dynamic-dependencies-download/resources/META-INF/mirai-console-plugin/dependencies-shared.txt: -------------------------------------------------------------------------------- 1 | com.google.code.gson:gson:2.8.9 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-dynamic-dependencies-download/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | net.mamoe.console.integrationtest.ep.pddd.P -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-resolve-self-dependencies-over-console-ones/resources/META-INF/mirai-console-plugin/dependencies-private.txt: -------------------------------------------------------------------------------- 1 | io.ktor:ktor-client-core-jvm:2.0.0 2 | io.ktor:ktor-client-java-jvm:2.0.0 3 | io.ktor:ktor-client-resources-jvm:2.0.0 4 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-resolve-self-dependencies-over-console-ones/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | pluginresolveselfdepoverconsoleones.PluginResolveSelfDependenciesOverConsoleOnes 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-use-console-deps-fallback/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("UnusedImport") 11 | 12 | plugins { 13 | kotlin("jvm") 14 | kotlin("plugin.serialization") 15 | id("java") 16 | } 17 | 18 | version = "0.0.0" 19 | 20 | kotlin { 21 | explicitApiWarning() 22 | } 23 | 24 | dependencies { 25 | api(project(":mirai-console.integration-test")) 26 | compileOnly(`ktor-client-okhttp`) 27 | } 28 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-use-console-deps-fallback/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | pluginuseconsoledepsfallback.PluginUseConsoleDepsFallback 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/clinit-library/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/clinit-library/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/clinit-library/resources/mvn.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.plugin-with-yml:plugin-library:0.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/clinit-library/src/PluginLibrary.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.console.itest.pluginwithpluginyml.library 11 | 12 | public object PluginLibrary { 13 | @JvmStatic 14 | public fun ok() { 15 | println("Plugin with plugin.yml using libraries under clinit ok") 16 | } 17 | } -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/resources/META-INF/mirai-console-plugin/dependencies-private.txt: -------------------------------------------------------------------------------- 1 | net.mamoe.consoleit.plugin-with-yml:plugin-library:0.0.0 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.pluginwithpluginyml.clinit.PluginWithPluginYmlClinitTest 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | id: net.mamoe.console.itest.plugin-with-yml-can-use-library-while-clinit 2 | version: 0.0.0 3 | 4 | dependencies: 5 | - net.mamoe.console.itest.plugin-with-yml 6 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.pluginwithpluginyml.PluginWithPluginYml 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/plugin-with-pluginyml/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | id: net.mamoe.console.itest.plugin-with-yml 2 | version: 0.0.0 3 | 4 | dependencies: 5 | - net.mamoe.console.itest.serviceloader 6 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-impl/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/service-loader/module-service-loader-impl/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-impl/resources/META-INF/services/net.mamoe.console.integrationtest.mod.servicetypedef.ServiceTypedef: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.integrationtest.mod.serviceimpl.ServiceImpl -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-impl/resources/test-res.txt: -------------------------------------------------------------------------------- 1 | service-loader-impl 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-impl/src/ServiceImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | package net.mamoe.console.integrationtest.mod.serviceimpl 10 | 11 | import net.mamoe.console.integrationtest.mod.servicetypedef.ServiceTypedef 12 | 13 | public class ServiceImpl : ServiceTypedef { 14 | override fun act() { 15 | Throwable("Stacktrace").printStackTrace(System.out) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-typedef/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/service-loader/module-service-loader-typedef/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-typedef/resources/test-res.txt: -------------------------------------------------------------------------------- 1 | service-loader-typedef 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/module-service-loader-typedef/src/ServiceTypedef.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.console.integrationtest.mod.servicetypedef 11 | 12 | public interface ServiceTypedef { 13 | public fun act() {} 14 | } 15 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.serviceloader.PMain 11 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/resources/test-res.txt: -------------------------------------------------------------------------------- 1 | from plugin 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/service-loader-2dep-plugin/.nested-module.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/backend/integration-test/testers/service-loader/service-loader-2dep-plugin/.nested-module.txt -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/service-loader-2dep-plugin/resources/META-INF/services/net.mamoe.console.integrationtest.mod.servicetypedef.ServiceTypedef: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.serviceloader.ndep.PS -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/service-loader-2dep-plugin/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.console.itest.serviceloader.ndep.PMain -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/service-loader/service-loader-2dep-plugin/resources/test-res.txt: -------------------------------------------------------------------------------- 1 | from 2nd plugin 2 | -------------------------------------------------------------------------------- /mirai-console/backend/integration-test/testers/tester.template.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("UnusedImport") 11 | 12 | plugins { 13 | kotlin("jvm") 14 | kotlin("plugin.serialization") 15 | id("java") 16 | } 17 | 18 | version = "0.0.0" 19 | 20 | kotlin { 21 | explicitApiWarning() 22 | } 23 | 24 | dependencies { 25 | api(project(":mirai-console.integration-test")) 26 | } 27 | -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/.gitignore: -------------------------------------------------------------------------------- 1 | src/internal/MiraiConsoleBuildConstants.kt 2 | src/internal/MiraiConsoleBuildDependencies.kt -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/README.md: -------------------------------------------------------------------------------- 1 | # Mirai Console - Backend 2 | 3 | Mirai Console 后端模块. 发布为 `net.mamoe:mirai-console`. -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/src/data/ReadOnlyPluginConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("unused") 11 | 12 | package net.mamoe.mirai.console.data 13 | 14 | /** 15 | * 只读的 [PluginConfig]. 插件只能读取其值, 但值可能在后台被前端 (用户) 修改. 16 | * 17 | * @see PluginConfig 18 | * @see AutoSavePluginData 19 | * @since 1.1 20 | */ 21 | public open class ReadOnlyPluginConfig public constructor(saveName: String) : ReadOnlyPluginData(saveName), PluginConfig -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/src/events/ConsoleEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.events 11 | 12 | import net.mamoe.mirai.event.Event 13 | 14 | /** 15 | * 表示来自 mirai-console 的事件 16 | */ 17 | public interface ConsoleEvent : Event -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/src/events/EndUserReadmeInitializeEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.events 11 | 12 | import net.mamoe.mirai.console.enduserreadme.EndUserReadme 13 | import net.mamoe.mirai.event.AbstractEvent 14 | import net.mamoe.mirai.utils.MiraiInternalApi 15 | 16 | public class EndUserReadmeInitializeEvent @MiraiInternalApi constructor( 17 | public val readme: EndUserReadme, 18 | ) : ConsoleEvent, AbstractEvent() 19 | -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/src/internal/plugin/PluginDescriptionUtil.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.internal.plugin 11 | 12 | import net.mamoe.mirai.console.plugin.description.PluginDescription 13 | 14 | internal fun PluginDescription.smartToString(): String { 15 | return "$name v$version" 16 | } 17 | -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/src/internal/util/semver/RequirementInternal.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.internal.util.semver 11 | 12 | import net.mamoe.mirai.console.util.SemVersion 13 | 14 | internal interface RequirementInternal { 15 | fun test(version: SemVersion): Boolean 16 | } 17 | -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/test/plugin/BuiltInJvmPluginLoaderImplTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.plugin 11 | 12 | import net.mamoe.mirai.console.testFramework.AbstractConsoleInstanceTest 13 | 14 | internal class BuiltInJvmPluginLoaderImplTest : AbstractConsoleInstanceTest() { 15 | 16 | } -------------------------------------------------------------------------------- /mirai-console/backend/mirai-console/testResources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider: -------------------------------------------------------------------------------- 1 | net.mamoe.mirai.console.internal.logging.externalbind.slf4j.MiraiConsoleSLF4JService 2 | -------------------------------------------------------------------------------- /mirai-console/docs/.ConfiguringProjects_images/6d010b1a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/.ConfiguringProjects_images/6d010b1a.png -------------------------------------------------------------------------------- /mirai-console/docs/.ConfiguringProjects_images/a6a3b24b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/.ConfiguringProjects_images/a6a3b24b.png -------------------------------------------------------------------------------- /mirai-console/docs/QA.md: -------------------------------------------------------------------------------- 1 | # Q&A 2 | 3 | ## 插件 4 | 5 | 6 | ### 使用 AutoService 7 | 8 | 在 `build.gradle.kts` 添加: 9 | ```kotlin 10 | plugins { 11 | kotlin("kapt") 12 | } 13 | dependencies { 14 | val autoService = "1.0-rc7" 15 | kapt("com.google.auto.service", "auto-service", autoService) 16 | compileOnly("com.google.auto.service", "auto-service-annotations", autoService) 17 | } 18 | ``` 19 | *对于 `build.gradle` 用户, 请自行按照 Groovy DSL 语法翻译* 20 | 21 | ### 为什么不支持热加载和卸载插件? 22 | 23 | 在热加载过程容易产生冲突情况; 24 | 卸载时不容易完全卸载所有静态对象。 25 | 26 | 为了避免这些麻烦,Mirai Console 认为没有支持热加载和热卸载的必要。 27 | -------------------------------------------------------------------------------- /mirai-console/docs/plugin/JVMPlugin_images/75227ef5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/JVMPlugin_images/75227ef5.png -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/CreateResourcesDir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/CreateResourcesDir.png -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/PluginDebugGradleTask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/PluginDebugGradleTask.png -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/PluginDebugRunConfiguration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/PluginDebugRunConfiguration.png -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/PluginDebugWindowPreview.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/PluginDebugWindowPreview.webp -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/PluginMainDeclaration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/PluginMainDeclaration.png -------------------------------------------------------------------------------- /mirai-console/docs/plugin/images/PluginMainServiceNotConfigured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/docs/plugin/images/PluginMainServiceNotConfigured.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: 报告一个bug 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ``` 27 | 28 | 29 | 30 | ``` 31 | 32 | 33 | #### 复现 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | app/release -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/libs/d8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/libs/d8.jar -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/libs/giteeman-0.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/libs/giteeman-0.2.3.jar -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/libs/mirai-console-0.5.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/libs/mirai-console-0.5.2.jar -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/libs/mirai-js-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/libs/mirai-js-1.0.0.jar -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/ic_new_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/ic_new_launcher-playstore.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/java/io/github/mzdluo123/mirai/android/IdleResources.kt: -------------------------------------------------------------------------------- 1 | package io.github.mzdluo123.mirai.android 2 | 3 | import androidx.test.espresso.idling.CountingIdlingResource 4 | 5 | object IdleResources { 6 | 7 | // Android单元测试所需要的东西 8 | 9 | val loadingData by lazy { CountingIdlingResource("logUploadDialogIdleResources") } 10 | 11 | val botServiceLoading by lazy { CountingIdlingResource("botServiceLoading") } 12 | } -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/java/io/github/mzdluo123/mirai/android/crash/MiraiAndroidReportSender.kt: -------------------------------------------------------------------------------- 1 | package io.github.mzdluo123.mirai.android.crash 2 | 3 | import android.content.Context 4 | import org.acra.data.CrashReportData 5 | import org.acra.sender.ReportSender 6 | import org.acra.sender.ReportSenderException 7 | import java.io.File 8 | import java.io.FileWriter 9 | 10 | //崩溃日志处理 11 | class MiraiAndroidReportSender() : ReportSender { 12 | @Throws(ReportSenderException::class) 13 | override fun send( 14 | context: Context, 15 | report: CrashReportData 16 | ) { 17 | val outFile = File(context.getExternalFilesDir("crash"), "crashdata") 18 | FileWriter(outFile).also { 19 | it.write(report.toJSON()) 20 | }.close() 21 | } 22 | } -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/java/io/github/mzdluo123/mirai/android/crash/MiraiAndroidReportSenderFactory.kt: -------------------------------------------------------------------------------- 1 | package io.github.mzdluo123.mirai.android.crash 2 | 3 | import android.content.Context 4 | import org.acra.config.CoreConfiguration 5 | import org.acra.sender.ReportSender 6 | import org.acra.sender.ReportSenderFactory 7 | 8 | class MiraiAndroidReportSenderFactory : ReportSenderFactory { 9 | override fun create( 10 | context: Context, 11 | config: CoreConfiguration 12 | ): ReportSender = MiraiAndroidReportSender() 13 | 14 | override fun enabled(config: CoreConfiguration): Boolean = true 15 | 16 | } -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/java/java/awt/image/BufferedImage.java: -------------------------------------------------------------------------------- 1 | package java.awt.image; 2 | 3 | //防止崩溃 4 | public class BufferedImage { 5 | } 6 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/color/color_drawer_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable/avatar.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_android_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_baseline_folder_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_baseline_insert_drive_file_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_baseline_keyboard_arrow_up_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_baseline_publish_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_battery_alert_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_chat_bubble_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_check_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_delete_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_desktop_windows_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_edit_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_exit_to_app_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_extension_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_info_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_insert_drive_file_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_keyboard_arrow_down_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_keyboard_return_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_local_printshop_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_refresh_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_restore_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_save_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/ic_store_white_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/loading_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/mirai_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable/mirai_a.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/mirai_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/drawable/mirai_b.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/menu_console.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 13 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/menu_script.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/menu_script_center.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/plugin_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/plugin_manage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/menu/unsafe_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-anydpi-v26/ic_new_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-anydpi-v26/ic_new_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_new_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_new_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_new_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-hdpi/ic_new_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_new_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_new_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_new_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-mdpi/ic_new_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_new_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_new_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_new_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xhdpi/ic_new_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_new_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_new_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_new_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxhdpi/ic_new_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_new_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_new_launcher.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_new_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/app/src/main/res/mipmap-xxxhdpi/ic_new_launcher_round.png -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values-night/colors-night.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #FFFFFF 5 | #FFFFFF 6 | 7 | #FFFFFF 8 | #000000 9 | 10 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 15 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #418FC3 4 | #12517E 5 | #56BBFF 6 | #000000 7 | #1879BA 8 | #000000 9 | #FFFFFF 10 | 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 200dp 7 | 16dp 8 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/values/ic_new_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/app/src/main/res/xml/path_script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/frontend/mirai-android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Apr 26 21:31:38 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='MiraiAndroid' 2 | include ':app' 3 | 4 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-console-frontend-base/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider: -------------------------------------------------------------------------------- 1 | net.mamoe.mirai.console.internal.logging.externalbind.slf4j.MiraiConsoleSLF4JService 2 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-console-frontend-base/src/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.frontendbase 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-console-frontend-base/test/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.frontendbase 11 | -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-console-terminal/.gitignore: -------------------------------------------------------------------------------- 1 | /run -------------------------------------------------------------------------------- /mirai-console/frontend/mirai-console-terminal/src/ConsoleInputImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.terminal 11 | 12 | import net.mamoe.mirai.console.util.ConsoleInput 13 | 14 | 15 | internal object ConsoleInputImpl : ConsoleInput { 16 | override suspend fun requestInput(hint: String): String { 17 | return JLineInputDaemon.nextInput(hint) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /mirai-console/tools/compiler-annotations/README.md: -------------------------------------------------------------------------------- 1 | # mirai-console-compiler-common 2 | 3 | Mirai Console 编译器注解模块。 4 | 5 | 提供 `ResolveContext` 和 `RestrictedScope`,帮助 [IntelliJ 插件](../intellij-plugin) 进行语境推断。 -------------------------------------------------------------------------------- /mirai-console/tools/compiler-annotations/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("UnusedImport") 11 | 12 | plugins { 13 | kotlin("multiplatform") 14 | `maven-publish` 15 | } 16 | 17 | version = Versions.console 18 | description = "Mirai Console compiler annotations" 19 | 20 | kotlin { 21 | explicitApi() 22 | apply(plugin = "explicit-api") 23 | 24 | configureJvmTargetsHierarchical("net.mamoe.mirai.compiler.annotations") 25 | } 26 | 27 | configureMppPublishing() 28 | -------------------------------------------------------------------------------- /mirai-console/tools/compiler-annotations/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /mirai-console/tools/compiler-common/README.md: -------------------------------------------------------------------------------- 1 | # mirai-console-compiler-common 2 | 3 | Mirai Console 编译器后端通用模块. 4 | 5 | ## -------------------------------------------------------------------------------- /mirai-console/tools/gradle-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | src/main/kotlin/VersionConstants.kt -------------------------------------------------------------------------------- /mirai-console/tools/gradle-plugin/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/master/LICENSE 8 | # 9 | flatten.sourceset=false -------------------------------------------------------------------------------- /mirai-console/tools/gradle-plugin/src/integTest/kotlin/TestPluginApply.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.gradle 11 | 12 | import kotlin.test.Test 13 | 14 | class TestPluginApply : AbstractTest() { 15 | 16 | @Test 17 | fun `can apply plugin`() { 18 | runGradle("clean", "--stacktrace") 19 | } 20 | } -------------------------------------------------------------------------------- /mirai-console/tools/gradle-plugin/src/main/kotlin/VersionConstants.kt.template: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.gradle 11 | 12 | internal object VersionConstants { 13 | const val CONSOLE_VERSION = "$$CONSOLE_VERSION$$" // value is written here automatically during build 14 | const val CORE_VERSION = "$$CORE_VERSION$$" // value is written here automatically during build 15 | } -------------------------------------------------------------------------------- /mirai-console/tools/gradle-plugin/src/main/kotlin/dsl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.console.gradle 11 | 12 | import org.gradle.api.logging.Logger 13 | 14 | internal inline fun Logger.info(msg: () -> String) { 15 | if (isInfoEnabled) info(msg()) 16 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | run/idea-sandbox 2 | !src/creator/build -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/.images/ILLEGAL_PLUGIN_DESCRIPTION.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/tools/intellij-plugin/.images/ILLEGAL_PLUGIN_DESCRIPTION.png -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # ???????? GNU AFFERO GENERAL PUBLIC LICENSE version 3 ??????, ?????????????. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | kotlin.stdlib.default.dependency=false -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/libs/ide-common.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/tools/intellij-plugin/libs/ide-common.jar -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/.gitignore.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new .gitignore for Gradle projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Gradle gradle-wrapper.properties.ft: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Gradle gradle-wrapper.properties.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new gradle-wrapper.properties for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Gradle gradle.properties.ft: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Gradle gradle.properties.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new gradle.properties for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin build.gradle.ft: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.jetbrains.kotlin.jvm' version '$KOTLIN_VERSION' 3 | id 'org.jetbrains.kotlin.plugin.serialization' version '$KOTLIN_VERSION' 4 | 5 | id 'net.mamoe.mirai-console' version '$MIRAI_VERSION' 6 | } 7 | 8 | group = '$GROUP_ID' 9 | version = '$VERSION' 10 | 11 | repositories { 12 | #if($USE_PROXY_REPO) 13 | maven { url 'https://maven.aliyun.com/repository/public' } 14 | #end 15 | mavenCentral() 16 | } 17 | 18 | mirai { 19 | jvmTarget JavaVersion.VERSION_1_8 20 | } 21 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin build.gradle.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new build.gradle for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin build.gradle.kts.ft: -------------------------------------------------------------------------------- 1 | plugins { 2 | val kotlinVersion = "$KOTLIN_VERSION" 3 | kotlin("jvm") version kotlinVersion 4 | kotlin("plugin.serialization") version kotlinVersion 5 | 6 | id("net.mamoe.mirai-console") version "$MIRAI_VERSION" 7 | } 8 | 9 | group = "$GROUP_ID" 10 | version = "$VERSION" 11 | 12 | repositories { 13 | #if($USE_PROXY_REPO) 14 | maven("https://maven.aliyun.com/repository/public") 15 | #end 16 | mavenCentral() 17 | } 18 | 19 | mirai { 20 | jvmTarget = JavaVersion.VERSION_1_8 21 | } 22 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin build.gradle.kts.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new build.gradle.kts for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin main class Java.java.ft.back: -------------------------------------------------------------------------------- 1 | package $PACKAGE_NAME; 2 | 3 | import net.mamoe.mirai.console.plugin.jvm.JavaPlugin; 4 | import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription; 5 | 6 | public final class ${CLASS_NAME} extends JavaPlugin { 7 | public static final ${CLASS_NAME} INSTANCE = new ${CLASS_NAME}(); 8 | 9 | private ${CLASS_NAME}() { 10 | super(JvmPluginDescription.loadFromResource("plugin.yml", ${CLASS_NAME}.class.getClassLoader())); 11 | } 12 | 13 | @Override 14 | public void onEnable() { 15 | getLogger().info("Plugin loaded!"); 16 | } 17 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin main class Java.java.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new plugin main class for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin main class Kotlin.kt.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new plugin main class for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin main service.txt.ft: -------------------------------------------------------------------------------- 1 | ${PACKAGE_NAME}.${CLASS_NAME} -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin main service.txt.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new plugin main class for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin settings.gradle.ft: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | #if($USE_PROXY_REPO) 4 | maven { url "https://maven.aliyun.com/repository/gradle-plugin" } 5 | #end 6 | gradlePluginPortal() 7 | } 8 | } 9 | rootProject.name = "$ARTIFACT_ID" 10 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin settings.gradle.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new settings.gradle for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin settings.gradle.kts.ft: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | #if($USE_PROXY_REPO) 4 | maven("https://maven.aliyun.com/repository/gradle-plugin") 5 | #end 6 | gradlePluginPortal() 7 | } 8 | } 9 | rootProject.name = "$ARTIFACT_ID" -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/Plugin settings.gradle.kts.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new settings.gradle.kts for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/RunTerminal.run.xml.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new settings.gradle.kts for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/account.properties.ft: -------------------------------------------------------------------------------- 1 | id=123456 2 | password=pwd -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/fileTemplates/code/account.properties.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

This is a built-in file template used to create a new gradle.properties for Mirai Console Plugin projects.

13 | 14 | 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/icons/commandDeclaration.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/icons/pluginMainDeclaration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/tools/intellij-plugin/resources/icons/pluginMainDeclaration.png -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/inspectionDescriptions/PluginMainServiceNotConfigured.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

检查插件主类服务配置情况。 13 |

14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/inspectionDescriptions/ResourceNotClosed.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

检查 ExternalResource 没有 close 的情况。 13 |

14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/inspectionDescriptions/UsingStringPlusMessage.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

Detects `String + Message` calls.

13 | 14 |

Detects `String + Message` calls. `String + Message` is essentially `String + Message.toString()` and is different 15 | from `Message + Message`. Such conversions are implicit and may lead to confusing behavior.

16 | 17 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallIntention/after.receiver.template: -------------------------------------------------------------------------------- 1 | resource.use { it.uploadAsImage(contact) } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallIntention/before.receiver.template: -------------------------------------------------------------------------------- 1 | resource.uploadAsImage(contact) -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallIntention/description.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

将资源直接使用转换为 `.use { ... }` 13 |

14 | 15 |

将 `resource.sendAsImageTo(contact)` 转换为 `resource.use { it.sendAsImageTo(contact) }`

16 | 17 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallJavaIntention/after.action.template: -------------------------------------------------------------------------------- 1 | ExternalResource resource; 2 | Contact contact; 3 | 4 | resource.use { it.uploadAsImage(contact) } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallJavaIntention/before.action.template: -------------------------------------------------------------------------------- 1 | ExternalResource resource; 2 | Contact contact; 3 | 4 | resource.uploadAsImage(contact) -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/intentionDescriptions/WrapWithResourceUseCallJavaIntention/description.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

将资源直接使用转换为 `.use { ... }` 13 |

14 | 15 |

将 `resource.sendAsImageTo(contact)` 转换为 `resource.use { it.sendAsImageTo(contact) }`

16 | 17 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/messages/InspectionGadgetsBundle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | plugin.service.not.configured.display.name=Plugin main not configured 10 | using.string.plus.message.display.name=Using string plus message 11 | resource.not.closed.display.name=Resource not closed -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/resources/messages/InspectionsBundle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | group.names.plugin.service.issues=Plugin service issues 10 | group.names.message.issues=Message issues 11 | group.names.mirai.core.issues=Mirai core issues -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/.gitignore: -------------------------------------------------------------------------------- 1 | local.properties 2 | build/ 3 | build 4 | .gradle 5 | .idea 6 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | plugins { 11 | kotlin("jvm") version "1.8.20" 12 | kotlin("plugin.serialization") version "1.8.20" 13 | id("net.mamoe.mirai-console") version "2.99.0-local" 14 | java 15 | } 16 | 17 | group = "org.example" 18 | version = "1.0-SNAPSHOT" 19 | 20 | dependencies { 21 | 22 | } 23 | 24 | repositories { 25 | mavenCentral() 26 | mavenLocal() 27 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official 2 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-console/tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | distributionBase=GRADLE_USER_HOME 11 | distributionPath=wrapper/dists 12 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip 13 | zipStoreBase=GRADLE_USER_HOME 14 | zipStorePath=wrapper/dists 15 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "test-project" 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | jcenter() 8 | } 9 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/AbstractMessageKeysUsages.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package org.example.myplugin 11 | 12 | import net.mamoe.mirai.message.data.MessageContent 13 | import net.mamoe.mirai.message.data.messageChainOf 14 | 15 | fun main() { 16 | val chain = messageChainOf() 17 | chain[MessageContent] 18 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/ConsoleCommandOwnerCheck.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package org.example.myplugin 11 | 12 | import net.mamoe.mirai.console.command.ConsoleCommandOwner 13 | import net.mamoe.mirai.console.command.SimpleCommand 14 | 15 | 16 | object MySimpleCommand0002 : SimpleCommand( 17 | ConsoleCommandOwner, "foo", 18 | description = "示例指令" 19 | ) {} 20 | -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/WrapWithResourceUseCallIntentionTest.kt: -------------------------------------------------------------------------------- 1 | package org.example.myplugin 2 | 3 | import net.mamoe.mirai.contact.Contact 4 | import net.mamoe.mirai.utils.ExternalResource 5 | import net.mamoe.mirai.utils.ExternalResource.Companion.sendAsImageTo 6 | import java.io.File 7 | 8 | class WrapWithResourceUseCallIntentionTest { 9 | suspend fun test() { 10 | 11 | val file = magic() 12 | val contact = magic() 13 | val resource = magic() 14 | 15 | resource.sendAsImageTo(contact) 16 | resource.run { sendAsImageTo(contact) } 17 | } 18 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/run/projects/test-project/src/test/kotlin/RunConsole.kt: -------------------------------------------------------------------------------- 1 | import net.mamoe.mirai.alsoLogin 2 | import net.mamoe.mirai.console.MiraiConsole 3 | import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.enable 4 | import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.load 5 | import net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader 6 | import org.example.myplugin.MyPluginMain 7 | 8 | suspend fun main() { 9 | MiraiConsoleTerminalLoader.startAsDaemon() 10 | 11 | MyPluginMain.load() // 主动加载插件, Console 会调用 MyPluginMain.onLoad 12 | MyPluginMain.enable() // 主动启用插件, Console 会调用 MyPluginMain.onEnable 13 | 14 | val bot = MiraiConsole.addBot(123456, "").alsoLogin() // 登录一个测试环境的 Bot 15 | 16 | MiraiConsole.job.join() 17 | } -------------------------------------------------------------------------------- /mirai-console/tools/intellij-plugin/test/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | 11 | package net.mamoe.mirai.console.intellij -------------------------------------------------------------------------------- /mirai-core-api/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mirai-core-api/src/androidMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai -------------------------------------------------------------------------------- /mirai-core-api/src/androidMain/kotlin/utils/LoginSolver.android.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | 11 | package net.mamoe.mirai.utils 12 | 13 | internal actual object PlatformLoginSolverImplementations { 14 | actual val isSliderCaptchaSupported: Boolean by lazy { System.getProperty("mirai.slider.captcha.supported") != null } 15 | actual val default: LoginSolver? get() = null 16 | } 17 | -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/contact/TempUser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.contact 11 | 12 | import net.mamoe.mirai.utils.MiraiInternalApi 13 | import net.mamoe.mirai.utils.NotStableForInheritance 14 | 15 | /** 16 | * 临时会话用户, 非群成员. 17 | * 18 | * [#429](https://github.com/mamoe/mirai/issues/429) 19 | */ 20 | @MiraiInternalApi("其他渠道的临时会话暂未支持. ") 21 | @NotStableForInheritance 22 | public interface TempUser : User -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/data/UserInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.data 11 | 12 | import net.mamoe.mirai.LowLevelApi 13 | 14 | @LowLevelApi 15 | public interface UserInfo { 16 | public val uin: Long 17 | 18 | public val nick: String 19 | 20 | public val remark: String 21 | } 22 | -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/event/events/EventCancelledException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.event.events 11 | 12 | @Suppress("unused") 13 | public class EventCancelledException : RuntimeException { 14 | public constructor() : super() 15 | public constructor(message: String?) : super(message) 16 | public constructor(message: String?, cause: Throwable?) : super(message, cause) 17 | public constructor(cause: Throwable?) : super(cause) 18 | } 19 | -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/internal/event/VerboseEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.event 11 | 12 | import net.mamoe.mirai.utils.MiraiInternalApi 13 | 14 | /** 15 | * 标记一个事件过于冗长, 默认不显示 16 | */ 17 | @MiraiInternalApi 18 | public interface VerboseEvent // May be public? 19 | -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/internal/utils/Marker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.utils 11 | 12 | import org.apache.logging.log4j.MarkerManager 13 | 14 | internal typealias Marker = org.apache.logging.log4j.Marker 15 | 16 | internal object MarkerManager { 17 | fun getMarker(name: String): Marker { 18 | return MarkerManager.getMarker(name) 19 | } 20 | } -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/message/data/README.md: -------------------------------------------------------------------------------- 1 | # mirai Message 2 | 消息对象. 查看 [Message] 源码内注释 3 | 4 | [Message]: Message.kt#L35 5 | -------------------------------------------------------------------------------- /mirai-core-api/src/commonMain/kotlin/utils/OverFileSizeMaxException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:JvmMultifileClass 11 | @file:JvmName("Utils") 12 | 13 | package net.mamoe.mirai.utils 14 | 15 | import kotlin.jvm.JvmMultifileClass 16 | import kotlin.jvm.JvmName 17 | 18 | /** 19 | * 图片文件过大 20 | */ // 不要删除多平台结构, 这是 kotlin 的 bug 21 | public class OverFileSizeMaxException : IllegalStateException() -------------------------------------------------------------------------------- /mirai-core-api/src/commonTest/kotlin/logging/AbstractLoggingTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.logging 11 | 12 | import net.mamoe.mirai.utils.MiraiLoggerFactoryImplementationBridge 13 | import org.junit.jupiter.api.AfterEach 14 | 15 | internal abstract class AbstractLoggingTest { 16 | @AfterEach 17 | fun cleanup() { 18 | MiraiLoggerFactoryImplementationBridge.run { setInstance(createPlatformInstance()) } 19 | } 20 | } -------------------------------------------------------------------------------- /mirai-core-api/src/commonTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | package net.mamoe.mirai -------------------------------------------------------------------------------- /mirai-core-api/src/commonTest/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | log4j.rootLogger=INFO,stdout 10 | log4j.logger.mirai=INFO 11 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 12 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 13 | log4j.appender.stdout.layout.ConversionPattern=%p\t%d{ISO8601}\t%r\t%c\t%m%n -------------------------------------------------------------------------------- /mirai-core-api/src/jvmMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai -------------------------------------------------------------------------------- /mirai-core-api/src/jvmMain/resources/net/mamoe/mirai/utils/project-mirai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core-api/src/jvmMain/resources/net/mamoe/mirai/utils/project-mirai.png -------------------------------------------------------------------------------- /mirai-core-api/src/jvmTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai -------------------------------------------------------------------------------- /mirai-core-mock/README.md: -------------------------------------------------------------------------------- 1 | # mirai-core-mock 2 | 3 | mirai 模拟环境测试框架 4 | 5 | > 模拟环境目前仅支持 JVM 6 | 7 | -------------- 8 | 9 | # src 架构 10 | 11 | - `contact` - 与 `mirai-core-api` 架构一致 12 | - `database` - 数据库, 用于存储一些临时的零碎数据 13 | - `resserver` - 资源服务 14 | - `userprofile` - 与 `UserProfile` 相关的一些服务 15 | - `utils` - 工具类 16 | 17 | # test 架构 18 | 19 | - `` 与 mirai-core-api 关系不大或者一些独立的组件的测试 20 | - `.mock` 模拟的各个部分的测试, 每个测试都继承 `MockBotTestBase` 21 | 22 | -------------------------------------------------------------------------------- /mirai-core-mock/src/MockBotDSL.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock 11 | 12 | @DslMarker 13 | public annotation class MockBotDSL 14 | -------------------------------------------------------------------------------- /mirai-core-mock/src/contact/MockAnonymousMember.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.contact 11 | 12 | import net.mamoe.mirai.contact.AnonymousMember 13 | 14 | public interface MockAnonymousMember : AnonymousMember, MockMember 15 | -------------------------------------------------------------------------------- /mirai-core-mock/src/contact/MockContactOrBot.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.contact 11 | 12 | import net.mamoe.mirai.contact.ContactOrBot 13 | import net.mamoe.mirai.mock.MockBot 14 | 15 | public interface MockContactOrBot : ContactOrBot { 16 | override val bot: MockBot 17 | } -------------------------------------------------------------------------------- /mirai-core-mock/src/contact/MockMsgSyncSupport.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.contact 11 | 12 | import net.mamoe.mirai.contact.OtherClient 13 | import net.mamoe.mirai.message.data.MessageChain 14 | import net.mamoe.mirai.mock.MockBotDSL 15 | 16 | public interface MockMsgSyncSupport : MockContact { 17 | /** 18 | * 广播消息同步事件 19 | */ 20 | @MockBotDSL 21 | public suspend fun broadcastMsgSyncEvent(client: OtherClient, message: MessageChain, time: Int) 22 | } -------------------------------------------------------------------------------- /mirai-core-mock/src/contact/MockOtherClient.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.contact 11 | 12 | import net.mamoe.mirai.contact.OtherClient 13 | 14 | public interface MockOtherClient : OtherClient, MockContact 15 | -------------------------------------------------------------------------------- /mirai-core-mock/src/contact/MockUserOrBot.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") 11 | 12 | package net.mamoe.mirai.mock.contact 13 | 14 | import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge 15 | import net.mamoe.mirai.contact.UserOrBot 16 | 17 | @JvmBlockingBridge 18 | public interface MockUserOrBot : MockContactOrBot, UserOrBot -------------------------------------------------------------------------------- /mirai-core-mock/src/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock 11 | 12 | -------------------------------------------------------------------------------- /mirai-core-mock/src/resserver/MockServerFileSystem.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.resserver 11 | 12 | public interface MockServerFileSystem { 13 | public val disk: MockServerFileDisk 14 | public val root: MockServerRemoteFile 15 | public fun resolveById(id: String): MockServerRemoteFile? 16 | public fun findByPath(path: String): Sequence 17 | } 18 | -------------------------------------------------------------------------------- /mirai-core-mock/src/utils/AvatarGenerator.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.utils 11 | 12 | /** 13 | * 头像生成器 14 | * 15 | * @since 2.14.0 16 | */ 17 | public interface AvatarGenerator { 18 | public fun generateAvatarForPerson(id: Long): ByteArray = generateRandomAvatar() 19 | public fun generateAvatarForGroup(id: Long): ByteArray = generateRandomAvatar() 20 | 21 | public fun generateRandomAvatar(): ByteArray 22 | } 23 | -------------------------------------------------------------------------------- /mirai-core-mock/src/utils/event.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.utils 11 | 12 | import kotlinx.coroutines.runBlocking 13 | import net.mamoe.mirai.event.Event 14 | import net.mamoe.mirai.event.broadcast 15 | 16 | 17 | public fun T.broadcastBlocking(): T = apply { 18 | runBlocking { broadcast() } 19 | } 20 | -------------------------------------------------------------------------------- /mirai-core-mock/src/utils/http.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:JvmMultifileClass 11 | @file:JvmName("MiraiUtils") 12 | @file:Suppress("NOTHING_TO_INLINE") 13 | 14 | package net.mamoe.mirai.mock.utils 15 | 16 | import kotlin.jvm.JvmMultifileClass 17 | import kotlin.jvm.JvmName 18 | 19 | public fun String.plusHttpSubpath(subpath: String): String { 20 | 21 | if (this[this.lastIndex] == '/') return this + subpath 22 | 23 | return "$this/$subpath" 24 | } 25 | 26 | -------------------------------------------------------------------------------- /mirai-core-mock/src/utils/mockdsl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") 11 | 12 | package net.mamoe.mirai.mock.utils 13 | 14 | @DslMarker 15 | public annotation class MockActionsDsl 16 | -------------------------------------------------------------------------------- /mirai-core-mock/test/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.mock.test 11 | -------------------------------------------------------------------------------- /mirai-core-utils/README.md: -------------------------------------------------------------------------------- 1 | # mirai-core-utils 2 | 3 | 内部工具类模块。提供二进制兼容而不提供源码兼容,但也不保证破坏性变更不会发生,因此若要使用该工具模块,请自行承担兼容后果。 -------------------------------------------------------------------------------- /mirai-core-utils/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mirai-core-utils/src/commonMain/kotlin/Base64.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | public expect fun ByteArray.encodeBase64(): String 13 | public expect fun String.decodeBase64(): ByteArray 14 | -------------------------------------------------------------------------------- /mirai-core-utils/src/commonMain/kotlin/annotations/Range.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils.annotations 11 | 12 | @OptIn(ExperimentalMultiplatform::class) 13 | @Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY, AnnotationTarget.TYPE) 14 | @Retention(AnnotationRetention.BINARY) 15 | @OptionalExpectation 16 | public expect annotation class Range(val from: Long, val to: Long) -------------------------------------------------------------------------------- /mirai-core-utils/src/commonMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/Clock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | public actual inline fun measureTimeMillis(block: () -> Unit): Long = kotlin.system.measureTimeMillis(block) -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/ConcurrentLinkedQueue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | 13 | @Suppress("FunctionName") 14 | public actual fun ConcurrentLinkedDeque(): MutableDeque { 15 | return java.util.concurrent.ConcurrentLinkedDeque() 16 | } -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/Reflections.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | import kotlin.reflect.KClass 13 | import kotlin.reflect.KParameter 14 | 15 | public fun KClass.createInstanceOrNull(): T? { 16 | objectInstance?.let { return it } 17 | val noArgsConstructor = constructors.singleOrNull { it.parameters.all(KParameter::isOptional) } 18 | ?: return null 19 | 20 | return noArgsConstructor.callBy(emptyMap()) 21 | } 22 | -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/Resources.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | 13 | @TestOnly 14 | public fun readResource(url: String): String = 15 | Thread.currentThread().contextClassLoader?.getResourceAsStream(url)?.readBytes()?.decodeToString() 16 | ?: error("Could not find resource '$url'") 17 | -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/Serialization.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | import kotlinx.serialization.BinaryFormat 13 | import kotlinx.serialization.DeserializationStrategy 14 | import kotlinx.serialization.StringFormat 15 | import java.io.File 16 | 17 | -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/StructureToStringTransformer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | internal actual fun getPlatformDefaultStructureToStringTransformer(): StructureToStringTransformer? { 13 | return StructureToStringTransformerLegacy() 14 | } -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/annotations/Range.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils.annotations 11 | 12 | 13 | public actual typealias Range = org.jetbrains.annotations.Range -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | package net.mamoe.mirai.utils 10 | -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseMain/kotlin/systemProp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | internal actual fun getProperty(name: String, default: String): String? = System.getProperty(name, default) 13 | 14 | internal actual fun setProperty(name: String, value: String) { 15 | System.setProperty(name, value) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseTest/kotlin/ByteArrayOpTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils 11 | 12 | internal actual class ByteArrayOpTest : CommonByteArrayOpTest() -------------------------------------------------------------------------------- /mirai-core-utils/src/jvmBaseTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.utils -------------------------------------------------------------------------------- /mirai-core/.gitignore: -------------------------------------------------------------------------------- 1 | src/jvmTest/kotlin/local 2 | test-sandbox/ -------------------------------------------------------------------------------- /mirai-core/compatibility-validation/android/api/android.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core/compatibility-validation/android/api/android.api -------------------------------------------------------------------------------- /mirai-core/compatibility-validation/jvm/api/jvm.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core/compatibility-validation/jvm/api/jvm.api -------------------------------------------------------------------------------- /mirai-core/src/androidInstrumentedTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/androidInstrumentedTest/kotlin/test/initializeTestJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.test 11 | 12 | internal actual fun initializeTestPlatformBeforeCommon() { 13 | // nop 14 | } -------------------------------------------------------------------------------- /mirai-core/src/androidInstrumentedTest/kotlin/testFramework/currentPlatform.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.testFramework 11 | 12 | actual fun currentPlatform(): Platform = Platform.AndroidInstrumentedTest -------------------------------------------------------------------------------- /mirai-core/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mirai-core/src/androidMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/androidUnitTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | 11 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/contact/ContactAware.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.contact 11 | 12 | import net.mamoe.mirai.contact.Contact 13 | import net.mamoe.mirai.internal.asQQAndroidBot 14 | 15 | internal interface ContactAware { 16 | val contact: Contact 17 | 18 | val bot get() = contact.bot.asQQAndroidBot() 19 | val client get() = bot.client 20 | } -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/contact/info/FriendGroupInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.contact.info 11 | 12 | import kotlinx.serialization.Serializable 13 | 14 | @Serializable 15 | internal data class FriendGroupInfo( 16 | val groupId: Int, 17 | var groupName: String, 18 | // val friendCount: Int, 19 | // val onlineFriendCount: Int 20 | ) -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/event/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.event 11 | 12 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/atImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/faceImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/image/jceData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.message.image 11 | 12 | import net.mamoe.mirai.message.data.Image 13 | import net.mamoe.mirai.utils.toUHexString 14 | 15 | 16 | internal val Image.friendImageId: String 17 | get() { 18 | // /1234567890-3666252994-EFF4427CE3D27DB6B1D9A8AB72E7A29C 19 | return "/000000000-000000000-${md5.toUHexString("")}" 20 | } 21 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/imagesImpl.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core/src/commonMain/kotlin/message/imagesImpl.kt -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/messageToElems.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.message 11 | 12 | import net.mamoe.mirai.message.data.PlainText 13 | 14 | 15 | internal val UNSUPPORTED_VOICE_MESSAGE_PLAIN = PlainText("收到语音消息,你需要升级到最新版QQ才能接收,升级地址https://im.qq.com") 16 | 17 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/message/rich/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.message.rich 11 | 12 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/DebuggingProperties.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network 11 | 12 | internal object DebuggingProperties { 13 | const val SHOW_TLV_MAP_ON_LOGIN_SUCCESS = false 14 | } -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/components/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | /** 11 | * 放置一些小组件 12 | */ 13 | package net.mamoe.mirai.internal.network.components -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/ExceptionInSelectorResumeException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | internal class ExceptionInSelectorResumeException( 13 | cause: Throwable, 14 | ) : RuntimeException(cause) -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/MaxAttemptsReachedException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | internal data class MaxAttemptsReachedException( 13 | override val cause: Throwable?, 14 | ) : IllegalStateException("Failed to resume instance. Maximum attempts reached.") { 15 | override fun toString(): String { 16 | return "MaxAttemptsReachedException" 17 | } 18 | } -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/NetworkChannelException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | internal open class NetworkChannelException : NetworkException { 13 | constructor() : super(true) 14 | constructor(cause: Throwable?) : super(true, cause) 15 | constructor(message: String) : super(message, true) 16 | constructor(message: String, cause: Throwable?) : super(message, cause, true) 17 | } 18 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/NoServerAvailableException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | internal class NoServerAvailableException : 13 | NoSuchElementException("No server available. (Failed to connect to any of the servers)") -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/PacketTimeoutException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | internal data class PacketTimeoutException( 13 | override val message: String, 14 | override val cause: Throwable? = null, 15 | ) : NetworkException(true) -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/selector/SelectorRequireReconnectException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.selector 11 | 12 | /** 13 | * A special exception that instructs selector to restart network connection 14 | */ 15 | internal expect class SelectorRequireReconnectException() : NetworkException 16 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/handler/state/ExceptionInStateObserverException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.handler.state 11 | 12 | internal class ExceptionInStateObserverException( 13 | override val cause: Throwable, 14 | ) : RuntimeException() -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/impl/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.impl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/protocol/data/proto/ImgExtPbResvAttrCommon.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.protocol.data.proto 11 | 12 | import net.mamoe.mirai.internal.utils.io.ProtoBuf 13 | 14 | internal interface ImgExtPbResvAttrCommon: ProtoBuf { 15 | val textSummary: ByteArray 16 | val imageBizType: Int 17 | } -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/SendMessageMultiProtocol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.protocol.packet.chat 11 | 12 | -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/utils/ExternalResourceImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.utils 11 | 12 | import net.mamoe.mirai.utils.ExternalResource 13 | 14 | @Suppress("FunctionName") 15 | internal expect fun CombinedExternalResource(vararg resources: ExternalResource): ExternalResource -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/utils/MiraiUtilsLogger.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") 11 | 12 | package net.mamoe.mirai.internal.utils 13 | 14 | import net.mamoe.mirai.utils.MiraiLogger 15 | import net.mamoe.mirai.utils.UtilsLogger 16 | import net.mamoe.mirai.utils.asUtilsLogger as asUtilsLogger1 17 | 18 | internal fun MiraiLogger.asUtilsLogger(): UtilsLogger = asUtilsLogger1() -------------------------------------------------------------------------------- /mirai-core/src/commonMain/kotlin/utils/crypto/AES.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.utils.crypto 11 | 12 | internal expect fun aesEncrypt(input: ByteArray, iv: ByteArray, key: ByteArray): ByteArray 13 | 14 | internal expect fun aesDecrypt(input: ByteArray, iv: ByteArray, key: ByteArray): ByteArray -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.IMirai: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2021 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.MiraiImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.auth.DefaultBotAuthorizationFactory: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.network.auth.DefaultBotAuthorizationFactoryImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.event.InternalGlobalEventChannelProvider: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.event.GlobalEventChannelProviderImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.message.data.InternalImageProtocol: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.message.image.InternalImageProtocolImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.message.data.InternalShortVideoProtocol: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.message.image.InternalShortVideoProtocolImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.message.data.OfflineAudio$Factory: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.message.data.OfflineAudioFactoryImpl -------------------------------------------------------------------------------- /mirai-core/src/commonMain/resources/META-INF/services/net.mamoe.mirai.utils.InternalProtocolDataExchange: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2023 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.utils.MiraiProtocolInternal$Exchange 11 | -------------------------------------------------------------------------------- /mirai-core/src/commonTest/kotlin/event/AbstractEventTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.event 11 | 12 | import net.mamoe.mirai.internal.test.AbstractTest 13 | 14 | internal abstract class AbstractEventTest : AbstractTest() { 15 | init { 16 | // System.setProperty("mirai.event.trace", "true") // Do not set it to true by default, or the concurrency stress test will become extremely slow. 17 | } 18 | } -------------------------------------------------------------------------------- /mirai-core/src/commonTest/kotlin/message/serialization/AbstractMessageSerializationTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.message.serialization 11 | 12 | import net.mamoe.mirai.internal.test.AbstractTest 13 | 14 | internal abstract class AbstractMessageSerializationTest : AbstractTest() -------------------------------------------------------------------------------- /mirai-core/src/commonTest/kotlin/network/PacketCodecTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network 11 | 12 | import net.mamoe.mirai.internal.test.AbstractTest 13 | 14 | internal class PacketCodecTest : AbstractCodecTest() 15 | 16 | internal abstract class AbstractCodecTest : AbstractTest() -------------------------------------------------------------------------------- /mirai-core/src/commonTest/kotlin/testFramework/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.testFramework -------------------------------------------------------------------------------- /mirai-core/src/commonTest/resources/META-INF/services/net.mamoe.mirai.internal.message.source.MessageSourceSequenceIdAwaiter: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.testFramework.message.TestMessageSourceSequenceIdAwaiter -------------------------------------------------------------------------------- /mirai-core/src/commonTest/resources/image/jpeg-header-issue-1610.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mamoe/mirai/283f8840d4682cc30fbdd87c66fe76f6a71ff8db/mirai-core/src/commonTest/resources/image/jpeg-header-issue-1610.bin -------------------------------------------------------------------------------- /mirai-core/src/commonTest/resources/recording/configs/desensitization.yml: -------------------------------------------------------------------------------- 1 | # Template for Desensitization in recordings 2 | # 3 | # Format: 4 | # ``` 5 | # : 6 | # ``` 7 | # 8 | # If key is a number, its group uin counterpart will also be processed, with calculated replacer. 9 | # WARNING: Ensure the is not longer than . 10 | # 11 | # For example, if your account id is 147258369, you may add: 12 | # ``` 13 | # 147258369: 123456 14 | # ``` 15 | # Then your id will be replaced with 123456. 16 | # 17 | # 18 | # To use desensitization, duplicate this file into name "local.desensitization.yml". 19 | 20 | 123456789: 111 -------------------------------------------------------------------------------- /mirai-core/src/commonTest/resources/recording/configs/test.desensitization.yml: -------------------------------------------------------------------------------- 1 | 123456789: 111 2 | 987654321: 222 -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/message/protocol/impl/TextProtocol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.message.protocol.impl 11 | 12 | internal actual fun getEmojiPatternResourceOrNull(): String? { 13 | return TextProtocol::class.java.classLoader?.getResourceAsStream("emoji-pattern.regex") 14 | ?.use { it.readBytes().decodeToString() } 15 | } -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/network/component/ComponentKey.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.component 11 | 12 | import kotlin.reflect.KTypeProjection 13 | import kotlin.reflect.full.allSupertypes 14 | 15 | internal actual fun ComponentKey<*>.getComponentTypeArgument(): KTypeProjection? { 16 | val thisType = this::class.allSupertypes.find { it.classifier == ComponentKey::class } 17 | return thisType?.arguments?.firstOrNull() 18 | } -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/network/impl/netty/NettyChannelException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.impl.netty 11 | 12 | import net.mamoe.mirai.internal.network.handler.selector.NetworkChannelException 13 | 14 | internal data class NettyChannelException( 15 | override val message: String? = null, 16 | override val cause: Throwable? = null, 17 | ) : NetworkChannelException() -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/network/impl/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.impl -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/network/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseMain/kotlin/utils/BotConfigurationExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.utils 11 | 12 | import net.mamoe.mirai.utils.BotConfiguration 13 | 14 | internal actual val BotConfiguration.workingDirPath: String 15 | get() = workingDir.absolutePath 16 | 17 | internal actual val BotConfiguration.cacheDirPath: String 18 | get() = cacheDir.path -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/kotlin/network/framework/AbstractNettyNHTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.network.framework 11 | 12 | internal abstract class AbstractNettyNHTest : AbstractCommonNHTest() { 13 | 14 | } -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/kotlin/test/NativeTestWrapper.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.test 11 | 12 | -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/kotlin/testFramework/DebugProbes.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.testFramework 11 | 12 | import kotlinx.coroutines.ExperimentalCoroutinesApi 13 | 14 | @Suppress("ACTUAL_WITHOUT_EXPECT", "NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS") 15 | @OptIn(ExperimentalCoroutinesApi::class) 16 | actual typealias DebugProbes = kotlinx.coroutines.debug.DebugProbes -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/kotlin/testFramework/codegen/visitor/ValueDescVisitorUnit.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.testFramework.codegen.visitor 11 | 12 | import net.mamoe.mirai.internal.testFramework.codegen.descriptors.ValueDesc 13 | 14 | interface ValueDescVisitorUnit : ValueDescVisitor { 15 | override fun visitValue(desc: ValueDesc, data: Nothing?) { 16 | } 17 | } -------------------------------------------------------------------------------- /mirai-core/src/jvmBaseTest/resources/META-INF/services/net.mamoe.mirai.utils.StructureToStringTransformer: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | net.mamoe.mirai.internal.utils.StructureToStringTransformerNew -------------------------------------------------------------------------------- /mirai-core/src/jvmMain/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/jvmTest/kotlin/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2020 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/master/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal -------------------------------------------------------------------------------- /mirai-core/src/jvmTest/kotlin/test/initializeTestJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.test 11 | 12 | internal actual fun initializeTestPlatformBeforeCommon() { 13 | // nop 14 | } -------------------------------------------------------------------------------- /mirai-core/src/jvmTest/kotlin/testFramework/currentPlatform.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.internal.testFramework 11 | 12 | actual fun currentPlatform(): Platform = Platform.Jvm -------------------------------------------------------------------------------- /mirai-core/src/jvmTest/resources/account.yml: -------------------------------------------------------------------------------- 1 | id: 123 2 | password: "" -------------------------------------------------------------------------------- /mirai-deps-test/.gitignore: -------------------------------------------------------------------------------- 1 | test/BuildConfig.kt -------------------------------------------------------------------------------- /mirai-deps-test/README.md: -------------------------------------------------------------------------------- 1 | # native-deps-test 2 | 3 | 测试 shadow relocation -------------------------------------------------------------------------------- /mirai-deps-test/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019-2022 Mamoe Technologies and contributors. 3 | # 4 | # 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | # Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | # 7 | # https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | # 9 | 10 | -------------------------------------------------------------------------------- /mirai-deps-test/test/package.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.deps.test -------------------------------------------------------------------------------- /mirai-dokka/.gitignore: -------------------------------------------------------------------------------- 1 | /pages 2 | -------------------------------------------------------------------------------- /mirai-dokka/README.md: -------------------------------------------------------------------------------- 1 | # mirai-dokka 2 | 3 | 生成的文档会部署到 [project-mirai/mirai-doc](https://github.com/project-mirai/mirai-doc), 网页部署在 https://kdoc.mirai.mamoe.net/ 4 | -------------------------------------------------------------------------------- /mirai-dokka/src/Prepare.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 Mamoe Technologies and contributors. 3 | * 4 | * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. 5 | * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. 6 | * 7 | * https://github.com/mamoe/mirai/blob/dev/LICENSE 8 | */ 9 | 10 | package net.mamoe.mirai.dokka 11 | 12 | fun main() { 13 | if (pages.resolve(".git").isDirectory) { 14 | return 15 | } 16 | exec("git", "clone", "https://github.com/project-mirai/mirai-doc.git", pages.absolutePath) 17 | } 18 | --------------------------------------------------------------------------------