@botharness/core 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +659 -0
- package/CHANGELOG.zh.md +659 -0
- package/dist/index.d.mts +86 -2
- package/dist/index.mjs +636 -34
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -8159,6 +8159,7 @@ interface MessagingProvider {
|
|
|
8159
8159
|
bytes: Uint8Array;
|
|
8160
8160
|
};
|
|
8161
8161
|
signal: AbortSignal;
|
|
8162
|
+
beforeSend?: () => boolean;
|
|
8162
8163
|
}): Promise<{
|
|
8163
8164
|
accepted: true;
|
|
8164
8165
|
}>;
|
|
@@ -10758,12 +10759,24 @@ declare module '@deepseek-ai/cordis' {
|
|
|
10758
10759
|
}
|
|
10759
10760
|
}
|
|
10760
10761
|
//#endregion
|
|
10762
|
+
//#region packages/core/src/marketplace/altcha.d.ts
|
|
10763
|
+
declare const ALTCHA_ALGORITHM = "SHA-256";
|
|
10764
|
+
interface AltchaChallenge {
|
|
10765
|
+
algorithm: typeof ALTCHA_ALGORITHM;
|
|
10766
|
+
challenge: string;
|
|
10767
|
+
maxnumber: number;
|
|
10768
|
+
salt: string;
|
|
10769
|
+
signature: string;
|
|
10770
|
+
}
|
|
10771
|
+
//#endregion
|
|
10761
10772
|
//#region packages/core/src/marketplace/client.d.ts
|
|
10762
10773
|
interface MarketplaceEntry {
|
|
10763
10774
|
id: string;
|
|
10764
10775
|
owner: string;
|
|
10765
10776
|
name: string;
|
|
10766
10777
|
fullName: string;
|
|
10778
|
+
displayName: string | null;
|
|
10779
|
+
roles: string[];
|
|
10767
10780
|
description: string | null;
|
|
10768
10781
|
topics: string[];
|
|
10769
10782
|
stars: number;
|
|
@@ -10791,6 +10804,11 @@ interface MarketplaceTopic {
|
|
|
10791
10804
|
topic: string;
|
|
10792
10805
|
count: number;
|
|
10793
10806
|
}
|
|
10807
|
+
interface MarketplaceDetail {
|
|
10808
|
+
bot: MarketplaceEntry;
|
|
10809
|
+
readme: string | null;
|
|
10810
|
+
commitSha: string | null;
|
|
10811
|
+
}
|
|
10794
10812
|
type MarketplaceResult<T> = {
|
|
10795
10813
|
ok: true;
|
|
10796
10814
|
value: T;
|
|
@@ -10801,9 +10819,59 @@ type MarketplaceResult<T> = {
|
|
|
10801
10819
|
interface MarketplaceClient {
|
|
10802
10820
|
list(query: MarketplaceQuery): Promise<MarketplaceResult<MarketplacePage>>;
|
|
10803
10821
|
topics(): Promise<MarketplaceResult<MarketplaceTopic[]>>;
|
|
10804
|
-
|
|
10822
|
+
detail(id: string): Promise<MarketplaceResult<MarketplaceDetail>>;
|
|
10823
|
+
challenge(): Promise<MarketplaceResult<AltchaChallenge>>;
|
|
10824
|
+
submit(url: string, altcha: string): Promise<MarketplaceResult<{
|
|
10805
10825
|
bot: MarketplaceEntry;
|
|
10806
10826
|
}>>;
|
|
10827
|
+
report(id: string, options: {
|
|
10828
|
+
altcha: string;
|
|
10829
|
+
reason?: string;
|
|
10830
|
+
}): Promise<MarketplaceResult<{
|
|
10831
|
+
received: true;
|
|
10832
|
+
}>>;
|
|
10833
|
+
}
|
|
10834
|
+
//#endregion
|
|
10835
|
+
//#region packages/core/src/release/notes.d.ts
|
|
10836
|
+
interface LocalizedText {
|
|
10837
|
+
en: string;
|
|
10838
|
+
zh: string;
|
|
10839
|
+
}
|
|
10840
|
+
interface ReleaseNoteSection {
|
|
10841
|
+
name: string;
|
|
10842
|
+
entries: LocalizedText[];
|
|
10843
|
+
}
|
|
10844
|
+
interface ReleaseNote {
|
|
10845
|
+
version: string;
|
|
10846
|
+
date: string;
|
|
10847
|
+
summary: LocalizedText;
|
|
10848
|
+
sections: ReleaseNoteSection[];
|
|
10849
|
+
}
|
|
10850
|
+
//#endregion
|
|
10851
|
+
//#region packages/core/src/release/service.d.ts
|
|
10852
|
+
interface ReleaseInfo {
|
|
10853
|
+
version: string;
|
|
10854
|
+
releases: ReleaseNote[];
|
|
10855
|
+
}
|
|
10856
|
+
type ReleaseUpdate = {
|
|
10857
|
+
status: 'development';
|
|
10858
|
+
current: string;
|
|
10859
|
+
} | {
|
|
10860
|
+
status: 'unavailable';
|
|
10861
|
+
current: string;
|
|
10862
|
+
} | {
|
|
10863
|
+
status: 'current';
|
|
10864
|
+
current: string;
|
|
10865
|
+
latest: string;
|
|
10866
|
+
} | {
|
|
10867
|
+
status: 'available';
|
|
10868
|
+
current: string;
|
|
10869
|
+
latest: string;
|
|
10870
|
+
releases: ReleaseNote[];
|
|
10871
|
+
};
|
|
10872
|
+
interface ReleaseService {
|
|
10873
|
+
info(since?: string): ReleaseInfo;
|
|
10874
|
+
update(): Promise<ReleaseUpdate>;
|
|
10807
10875
|
}
|
|
10808
10876
|
//#endregion
|
|
10809
10877
|
//#region packages/core/src/channels/profile-activity.d.ts
|
|
@@ -11332,6 +11400,13 @@ interface BridgeMethods {
|
|
|
11332
11400
|
bot: MarketplaceEntry;
|
|
11333
11401
|
}>>;
|
|
11334
11402
|
marketplaceTopics(): Promise<BridgeResult<MarketplaceTopic[]>>;
|
|
11403
|
+
marketplaceDetail(payload: unknown): Promise<BridgeResult<MarketplaceDetail>>;
|
|
11404
|
+
marketplaceChallenge(): Promise<BridgeResult<AltchaChallenge>>;
|
|
11405
|
+
marketplaceReport(payload: unknown): Promise<BridgeResult<{
|
|
11406
|
+
received: true;
|
|
11407
|
+
}>>;
|
|
11408
|
+
releaseInfo(payload: unknown): BridgeResult<ReleaseInfo>;
|
|
11409
|
+
releaseUpdate(): Promise<BridgeResult<ReleaseUpdate>>;
|
|
11335
11410
|
}
|
|
11336
11411
|
interface BridgeMethodsDeps {
|
|
11337
11412
|
warn?: (message: string) => void;
|
|
@@ -11372,6 +11447,7 @@ interface BridgeMethodsDeps {
|
|
|
11372
11447
|
};
|
|
11373
11448
|
createBotId?: () => string;
|
|
11374
11449
|
marketplace?: MarketplaceClient;
|
|
11450
|
+
release?: ReleaseService;
|
|
11375
11451
|
}
|
|
11376
11452
|
export declare function createBridgeMethods(deps: BridgeMethodsDeps): BridgeMethods;
|
|
11377
11453
|
//#endregion
|
|
@@ -11728,10 +11804,17 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
11728
11804
|
accepted: boolean;
|
|
11729
11805
|
};
|
|
11730
11806
|
marketplaceList(query?: MarketplaceQuery): Promise<MarketplacePage>;
|
|
11731
|
-
marketplaceSubmit(url: string): Promise<{
|
|
11807
|
+
marketplaceSubmit(url: string, altcha: string): Promise<{
|
|
11732
11808
|
bot: MarketplaceEntry;
|
|
11733
11809
|
}>;
|
|
11810
|
+
marketplaceChallenge(): Promise<AltchaChallenge>;
|
|
11811
|
+
marketplaceReport(id: string, altcha: string, reason?: string): Promise<{
|
|
11812
|
+
received: true;
|
|
11813
|
+
}>;
|
|
11734
11814
|
marketplaceTopics(): Promise<MarketplaceTopic[]>;
|
|
11815
|
+
marketplaceDetail(id: string): Promise<MarketplaceDetail>;
|
|
11816
|
+
releaseInfo(since?: string): Promise<ReleaseInfo>;
|
|
11817
|
+
releaseUpdate(): Promise<ReleaseUpdate>;
|
|
11735
11818
|
}
|
|
11736
11819
|
export declare function registerBridge(ctx: Context, methods: BridgeMethods): BotharnessBridgeService;
|
|
11737
11820
|
//#endregion
|
|
@@ -11910,6 +11993,7 @@ interface DshImOutboundService {
|
|
|
11910
11993
|
}, options: {
|
|
11911
11994
|
expectedFingerprint: string;
|
|
11912
11995
|
signal: AbortSignal;
|
|
11996
|
+
beforeSend?: () => boolean;
|
|
11913
11997
|
}): Promise<{
|
|
11914
11998
|
sent: true;
|
|
11915
11999
|
}>;
|