target-supabase-sdk 0.2.17 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/telegram/api-client.d.ts +12 -0
- package/dist/node/telegram/api-client.d.ts.map +1 -0
- package/dist/node/telegram/chunk-locator.d.ts +10 -0
- package/dist/node/telegram/chunk-locator.d.ts.map +1 -0
- package/dist/node/telegram/chunk.d.ts +4 -0
- package/dist/node/telegram/chunk.d.ts.map +1 -0
- package/dist/node/telegram/index.d.ts +8 -0
- package/dist/node/telegram/index.d.ts.map +1 -0
- package/dist/node/telegram/storage-provider.d.ts +32 -0
- package/dist/node/telegram/storage-provider.d.ts.map +1 -0
- package/dist/node/telegram/types.d.ts +53 -0
- package/dist/node/telegram/types.d.ts.map +1 -0
- package/dist/node.d.ts +2 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +295 -5
- package/dist/node.js.map +1 -1
- package/package.json +8 -1
- package/src/node/telegram/api-client.ts +146 -0
- package/src/node/telegram/chunk-locator.ts +23 -0
- package/src/node/telegram/chunk.ts +33 -0
- package/src/node/telegram/index.ts +20 -0
- package/src/node/telegram/storage-provider.ts +182 -0
- package/src/node/telegram/types.ts +82 -0
- package/src/node.ts +23 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FetchInitFactory } from "../../browser";
|
|
2
|
+
import type { ResolvedTelegramStorageOptions } from "./types";
|
|
3
|
+
export interface CallTelegramOptions {
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
retryAttempts?: number;
|
|
6
|
+
retryBaseMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function telegramFileDownloadUrl(options: ResolvedTelegramStorageOptions, filePath: string): string;
|
|
9
|
+
/** Bot API JSON call — transport retry via SDK fetch; outer loop retries Telegram `{ ok: false }`. */
|
|
10
|
+
export declare function callTelegramApi<T>(options: ResolvedTelegramStorageOptions, method: string, initOrFactory: RequestInit | FetchInitFactory, callOptions?: CallTelegramOptions): Promise<T>;
|
|
11
|
+
export declare function telegramDownloadBinary(options: ResolvedTelegramStorageOptions, url: string, label: string, callOptions?: CallTelegramOptions): Promise<ArrayBuffer>;
|
|
12
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/api-client.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,gBAAgB,EAIxB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,8BAA8B,EAAuB,MAAM,SAAS,CAAC;AA0BnF,MAAM,WAAW,mBAAmB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzG;AAUD,sGAAsG;AACtG,wBAAsB,eAAe,CAAC,CAAC,EACnC,OAAO,EAAE,8BAA8B,EACvC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,WAAW,GAAG,gBAAgB,EAC7C,WAAW,GAAE,mBAAwB,GACtC,OAAO,CAAC,CAAC,CAAC,CA4DZ;AAED,wBAAsB,sBAAsB,CACxC,OAAO,EAAE,8BAA8B,EACvC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,mBAAwB,GACtC,OAAO,CAAC,WAAW,CAAC,CAetB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram chunk URL encoding: `${messageId}|${fileId}`.
|
|
3
|
+
* Legacy parcels store bare `file_id` (no messageId → cannot deleteMessage).
|
|
4
|
+
*/
|
|
5
|
+
export declare function encodeTelegramChunkUrl(messageId: number, fileId: string): string;
|
|
6
|
+
export declare function parseTelegramChunkUrl(locator: string): {
|
|
7
|
+
messageId: number | null;
|
|
8
|
+
fileId: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-locator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-locator.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/chunk-locator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAWnG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedTelegramStorageOptions } from "./types";
|
|
2
|
+
/** Download chunk bytes by Telegram `file_id` stored in Chunk.url. */
|
|
3
|
+
export declare function downloadTelegramChunk(options: ResolvedTelegramStorageOptions, fileId: string): Promise<ArrayBuffer>;
|
|
4
|
+
//# sourceMappingURL=chunk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/chunk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAgB,MAAM,SAAS,CAAC;AAE5E,sEAAsE;AACtE,wBAAsB,qBAAqB,CACvC,OAAO,EAAE,8BAA8B,EACvC,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,CAyBtB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { CallTelegramOptions } from "./api-client";
|
|
2
|
+
export { callTelegramApi, telegramDownloadBinary, telegramFileDownloadUrl } from "./api-client";
|
|
3
|
+
export { downloadTelegramChunk } from "./chunk";
|
|
4
|
+
export { encodeTelegramChunkUrl, parseTelegramChunkUrl } from "./chunk-locator";
|
|
5
|
+
export { createTelegramStorageProvider, PROVIDER_TELEGRAM, type TelegramChunkDeleteResult, type TelegramStorageProvider, } from "./storage-provider";
|
|
6
|
+
export type { ResolvedTelegramStorageOptions, TelegramApiResponse, TelegramDocument, TelegramFile, TelegramMessage, TelegramStorageProviderOptions, TelegramUploadResult, } from "./types";
|
|
7
|
+
export { resolveTelegramStorageOptions } from "./types";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACH,6BAA6B,EAC7B,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACR,8BAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,8BAA8B,EAC9B,oBAAoB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Parcel, StorageProviderModule } from "../../browser";
|
|
2
|
+
import { type TelegramStorageProviderOptions, type TelegramUploadResult } from "./types";
|
|
3
|
+
export declare const PROVIDER_TELEGRAM = "telegram";
|
|
4
|
+
export interface TelegramChunkDeleteResult {
|
|
5
|
+
deleted: number;
|
|
6
|
+
failed: number;
|
|
7
|
+
skipped: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TelegramStorageProvider extends StorageProviderModule {
|
|
10
|
+
readonly provider: typeof PROVIDER_TELEGRAM;
|
|
11
|
+
/** Low-level upload for probes/CLIs. */
|
|
12
|
+
uploadChunk(data: ArrayBuffer, filename: string): Promise<TelegramUploadResult>;
|
|
13
|
+
/** Best-effort deleteMessage for rollback / probe cleanup. */
|
|
14
|
+
deleteMessage(messageId: number): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Best-effort delete Telegram messages for parcel chunks.
|
|
17
|
+
* Chunks without an encoded messageId (legacy bare file_id) are skipped.
|
|
18
|
+
*/
|
|
19
|
+
deleteChunkBlobs(parcel: Parcel): Promise<TelegramChunkDeleteResult>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build a Telegram {@link StorageProviderModule}. Caller registers it — no side effects.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { createStorageProviderRegistry, createTelegramStorageProvider } from "target-supabase-sdk/node";
|
|
27
|
+
* const registry = createStorageProviderRegistry();
|
|
28
|
+
* registry.register(createTelegramStorageProvider({ botToken, chatId, proxyUrl }));
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function createTelegramStorageProvider(input: TelegramStorageProviderOptions): TelegramStorageProvider;
|
|
32
|
+
//# sourceMappingURL=storage-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-provider.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/storage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA8B,MAAM,EAAE,qBAAqB,EAAiB,MAAM,eAAe,CAAC;AAK9G,OAAO,EAIH,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EAC5B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,MAAM,WAAW,yBAAyB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IAClE,QAAQ,CAAC,QAAQ,EAAE,OAAO,iBAAiB,CAAC;IAC5C,wCAAwC;IACxC,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChF,8DAA8D;IAC9D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACxE;AAgFD;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,8BAA8B,GAAG,uBAAuB,CA2D5G"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface TelegramApiResponse<T> {
|
|
2
|
+
ok: boolean;
|
|
3
|
+
description?: string;
|
|
4
|
+
result?: T;
|
|
5
|
+
}
|
|
6
|
+
export interface TelegramDocument {
|
|
7
|
+
file_id: string;
|
|
8
|
+
file_unique_id: string;
|
|
9
|
+
file_size?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TelegramMessage {
|
|
12
|
+
message_id: number;
|
|
13
|
+
document?: TelegramDocument;
|
|
14
|
+
}
|
|
15
|
+
export interface TelegramFile {
|
|
16
|
+
file_id: string;
|
|
17
|
+
file_unique_id: string;
|
|
18
|
+
file_size?: number;
|
|
19
|
+
file_path?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TelegramUploadResult {
|
|
22
|
+
fileId: string;
|
|
23
|
+
messageId: number;
|
|
24
|
+
}
|
|
25
|
+
/** Injected config for Telegram Bot API storage — do not read process.env inside SDK. */
|
|
26
|
+
export interface TelegramStorageProviderOptions {
|
|
27
|
+
botToken: string;
|
|
28
|
+
chatId: string;
|
|
29
|
+
/** Default `https://api.telegram.org`. */
|
|
30
|
+
apiBaseUrl?: string;
|
|
31
|
+
/** HTTP(S) proxy for Telegram only (e.g. Clash). Supabase stays direct. */
|
|
32
|
+
proxyUrl?: string;
|
|
33
|
+
/** Default 30s — getMe / getFile. */
|
|
34
|
+
fetchTimeoutMs?: number;
|
|
35
|
+
/** Default 120s — sendDocument / file download. */
|
|
36
|
+
uploadTimeoutMs?: number;
|
|
37
|
+
/** Default 3. */
|
|
38
|
+
uploadRetryAttempts?: number;
|
|
39
|
+
/** Default 2000 — backoff base for attempt N: base * 2^(N-1). */
|
|
40
|
+
uploadRetryBaseMs?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ResolvedTelegramStorageOptions {
|
|
43
|
+
botToken: string;
|
|
44
|
+
chatId: string;
|
|
45
|
+
apiBaseUrl: string;
|
|
46
|
+
proxyUrl?: string;
|
|
47
|
+
fetchTimeoutMs: number;
|
|
48
|
+
uploadTimeoutMs: number;
|
|
49
|
+
uploadRetryAttempts: number;
|
|
50
|
+
uploadRetryBaseMs: number;
|
|
51
|
+
}
|
|
52
|
+
export declare function resolveTelegramStorageOptions(options: TelegramStorageProviderOptions): ResolvedTelegramStorageOptions;
|
|
53
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/node/telegram/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB,CAAC,CAAC;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,yFAAyF;AACzF,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,8BAA8B,GAAG,8BAA8B,CAuBrH"}
|
package/dist/node.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export type { ApplyRegistrySlotGuardInput, ApplyRegistrySlotGuardResult, Registe
|
|
|
24
24
|
export { applyRegistrySlotGuardStep, guardRetryAfterSec, isGuardAvailable, markWorkerSpawned, registerServiceGuardRunner, runServiceGuardTick, SERVICE_GUARD_RUNNER_KEY, ServiceGuardNode, } from "./node/service-guard";
|
|
25
25
|
export type { CreateL3ChildLauncherOptions, L3ChildLauncher, L3ChildLauncherRuntimeStore, ServiceHost, ServiceHostClosable, ServiceHostContext, ServiceHostOptions, SingleProcessServiceContext, SingleProcessServiceOptions, } from "./node/service-host";
|
|
26
26
|
export { createL3ChildLauncher, createServiceHost, runSingleProcessService } from "./node/service-host";
|
|
27
|
+
export type { CallTelegramOptions, ResolvedTelegramStorageOptions, TelegramApiResponse, TelegramChunkDeleteResult, TelegramDocument, TelegramFile, TelegramMessage, TelegramStorageProvider, TelegramStorageProviderOptions, TelegramUploadResult, } from "./node/telegram";
|
|
28
|
+
export { callTelegramApi, createTelegramStorageProvider, downloadTelegramChunk, encodeTelegramChunkUrl, PROVIDER_TELEGRAM, parseTelegramChunkUrl, resolveTelegramStorageOptions, telegramDownloadBinary, telegramFileDownloadUrl, } from "./node/telegram";
|
|
27
29
|
export { RepoManager } from "./repo/repo-manager";
|
|
28
30
|
export { runCollectLogTick } from "./shared/log/spool/collector";
|
|
29
31
|
export { LOG_SPOOL_SERVICE_ID_ENV } from "./shared/log/spool/config";
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,YAAY,EACR,aAAa,EACb,gBAAgB,EAChB,4BAA4B,EAC5B,kCAAkC,EAClC,mBAAmB,EACnB,2BAA2B,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,aAAa,EACb,OAAO,EACP,MAAM,EACN,KAAK,EACL,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,oBAAoB,EACpB,OAAO,EACP,UAAU,EACV,sBAAsB,EACtB,+BAA+B,EAC/B,4BAA4B,EAC5B,2BAA2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CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,YAAY,EACR,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACH,kBAAkB,EAClB,yBAAyB,GAC5B,MAAM,6BAA6B,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,kCAAkC,EAClC,qCAAqC,GACxC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACR,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAClB,MAAM,6BAA6B,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/node.js
CHANGED
|
@@ -6,9 +6,10 @@ export { C as CLI_PROD_FLAG, S as SERVICE_ENV_PROFILE_ENV_KEY, w as SERVICE_ENV_
|
|
|
6
6
|
import { randomBytes, createHash } from 'node:crypto';
|
|
7
7
|
import { readFile, unlink, mkdir, writeFile, rename, access, stat, readdir, constants } from 'node:fs/promises';
|
|
8
8
|
import { dirname, resolve, join, isAbsolute } from 'node:path';
|
|
9
|
-
import { bq as sha256Hex, bw as getErrorMessage, bx as LOG_TOPIC_NODE, aU as postRegisterNode, ay as patchChangeNodeStatus, N as NodeStatus, aJ as patchStopNode, aG as patchNodeHeartBeat, E as EMPTY_REGISTRY_SLOT_RUNTIME_STATE, bg as runRegistrySlotGuardCheck, b6 as registrySlotRuntimePatchFromGuardResult, c as CategoryNode, Z as evaluateBusyNodeLiveness, aI as patchServiceRuntime, an as isLogEntry, F as claimServiceRegistrySlot, m as ServiceRegistryError, e as CategoryRepo, ai as guessMediaMime, M as MEDIA_CONTENT_HASH_ALGORITHM, ao as isMediaValue, as as mediaLinkDedupFilters, y as buildMediaLinkDraft, R as ResultCode, by as LOG_TOPIC_TASK, o as TASK_REPO_USAGE, ac as getScanRemoteRepoValues, aC as patchClaimTask, bz as CRITICAL_UNKNOWN_TASK_TRACE_ID, aA as patchChangeTaskStatus, q as TaskStatusAction, bA as toError, b0 as postTaskSchema, bB as createTaskRow, p as TaskStatus } from './chunks/task-queue-DufG7PlX.js';
|
|
10
|
-
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, b as CategoryLink, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS, L as LINK_MANIFEST_VERSION, h as LIST_MANIFEST_VERSION, i as MEDIA_CONTENT_HASH_PREFIX_LENGTH, j as MEDIA_VALUES, P as POST_TASK_DEFAULT_MAX_ATTEMPTS, k as ParcelManager, l as PostLinkValidator, S as ServiceLifecycleStatus, n as ServiceSlotStatus, T as TARGET_SYSTEM_REGISTRY_KEY, r as apiDetailsSchema, s as appendSystemRegistryEmptySlots, t as assertRegistrySlotAvailable, u as assertRegistrySlotOwner, v as buildEmptyServiceSlots, w as buildLinkTargetDraft, x as buildListTargetDraft, z as buildMediaNameFromLocator, B as buildSystemRegistryConfigDetails, G as classifyNetworkError, H as countTasksByType, I as createActiveServiceLifecycle, J as createClaimedRegistrySlotRuntimeState, K as createStorageProviderRegistry, O as createUploadTracker, Q as decodeLogBatch, U as decodeLogBatchList, V as defaultL3ServiceDetails, W as deleteParcel, X as deleteParcelSchema, Y as escapeIlikePattern,
|
|
9
|
+
import { bq as sha256Hex, bw as getErrorMessage, bx as LOG_TOPIC_NODE, aU as postRegisterNode, ay as patchChangeNodeStatus, N as NodeStatus, aJ as patchStopNode, aG as patchNodeHeartBeat, E as EMPTY_REGISTRY_SLOT_RUNTIME_STATE, bg as runRegistrySlotGuardCheck, b6 as registrySlotRuntimePatchFromGuardResult, c as CategoryNode, Z as evaluateBusyNodeLiveness, aI as patchServiceRuntime, an as isLogEntry, F as claimServiceRegistrySlot, m as ServiceRegistryError, $ as fetchWithRetry, aq as isRetryableHttpStatus, _ as fetchBinaryWithRetry, ap as isOpaqueChunkUrl, e as CategoryRepo, ai as guessMediaMime, M as MEDIA_CONTENT_HASH_ALGORITHM, ao as isMediaValue, as as mediaLinkDedupFilters, y as buildMediaLinkDraft, R as ResultCode, by as LOG_TOPIC_TASK, o as TASK_REPO_USAGE, ac as getScanRemoteRepoValues, aC as patchClaimTask, bz as CRITICAL_UNKNOWN_TASK_TRACE_ID, aA as patchChangeTaskStatus, q as TaskStatusAction, bA as toError, b0 as postTaskSchema, bB as createTaskRow, p as TaskStatus } from './chunks/task-queue-DufG7PlX.js';
|
|
10
|
+
export { A as ApiMethod, C as CategoryConfig, a as CategoryExtraction, b as CategoryLink, d as CategoryParcel, f as CategoryService, g as CategoryTask, D as DEFAULT_SYSTEM_REGISTRY_SEED_SLOTS, L as LINK_MANIFEST_VERSION, h as LIST_MANIFEST_VERSION, i as MEDIA_CONTENT_HASH_PREFIX_LENGTH, j as MEDIA_VALUES, P as POST_TASK_DEFAULT_MAX_ATTEMPTS, k as ParcelManager, l as PostLinkValidator, S as ServiceLifecycleStatus, n as ServiceSlotStatus, T as TARGET_SYSTEM_REGISTRY_KEY, r as apiDetailsSchema, s as appendSystemRegistryEmptySlots, t as assertRegistrySlotAvailable, u as assertRegistrySlotOwner, v as buildEmptyServiceSlots, w as buildLinkTargetDraft, x as buildListTargetDraft, z as buildMediaNameFromLocator, B as buildSystemRegistryConfigDetails, G as classifyNetworkError, H as countTasksByType, I as createActiveServiceLifecycle, J as createClaimedRegistrySlotRuntimeState, K as createStorageProviderRegistry, O as createUploadTracker, Q as decodeLogBatch, U as decodeLogBatchList, V as defaultL3ServiceDetails, W as deleteParcel, X as deleteParcelSchema, Y as escapeIlikePattern, a0 as fieldDefinitionSchema, a1 as flattenLogBatch, a2 as flattenLogBatches, a3 as formatNetworkError, a4 as getApi, a5 as getApiSchema, a6 as getConfig, a7 as getConfigSchema, a8 as getExtraction, a9 as getExtractionSchema, aa as getParcel, ab as getParcelSchema, ad as getScanRemoteRepoValuesSchema, ae as getService, af as getServiceSchema, ag as getTargetSystemRegistry, ah as getValueAtPath, aj as installChunkFetchRegistry, ak as isHttpUrl, al as isLocalFilesystemPath, am as isLogBatchList, ar as linkTargetDraftBuildInputSchema, at as parcelDetailsSchema, au as parseLogBatchMeta, av as parseProviderPrefixedUrl, aw as parseServiceSlot, ax as parseServiceSlots, az as patchChangeNodeStatusSchema, aB as patchChangeTaskStatusSchema, aD as patchClaimTaskSchema, aE as patchExtractionObjects, aF as patchExtractionObjectsSchema, aH as patchNodeHeartBeatSchema, aK as patchStopNodeSchema, aL as patchTaskProgress, aM as patchTaskProgressSchema, aN as postApi, aO as postApiSchema, aP as postExtraction, aQ as postExtractionSchema, aR as postLinkCreate, aS as postParcel, aT as postParcelSchema, aV as postRegisterNodeSchema, aW as postService, aX as postServiceInstance, aY as postServiceSchema, aZ as postSystemRegistryConfig, a_ as postSystemRegistryConfigSchema, a$ as postTask, b1 as postTaskWithRetry, b2 as publishParcel, b3 as registerProviderChunkResolver, b4 as registerService, b5 as registerServiceAtStartup, b7 as releaseSystemRegistrySlots, b8 as releaseSystemRegistrySlotsByServiceId, b9 as requestHasBody, ba as resetSystemRegistryConfig, bb as resetSystemRegistryConfigSchema, bc as resolveActiveRegistryServiceId, bd as resolveFetchUrl, be as restoreParcel, bf as restoreParcelById, bh as sanitizeFileName, bi as sanitizeParcelFileName, bj as scanExtractionList, bk as scanExtractionListSchema, bl as schemaDefinitionSchema, bm as serviceDetailsSchema, bn as serviceLifecycleSchema, bo as serviceNodeSnapshotSchema, bp as serviceRuntimeSchema, br as summarizeTaskQueue, bs as systemRegistrySeedSlotSchema, bt as toPostgrestTextArrayLiteral, bu as unregisterService, bv as unregisterServiceAtShutdown } from './chunks/task-queue-DufG7PlX.js';
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
12
|
+
import { ProxyAgent } from 'undici';
|
|
12
13
|
import { tmpdir } from 'node:os';
|
|
13
14
|
import { pathToFileURL } from 'node:url';
|
|
14
15
|
import { createReadStream } from 'node:fs';
|
|
@@ -923,7 +924,7 @@ function createManagedChildProcesses(options) {
|
|
|
923
924
|
});
|
|
924
925
|
}
|
|
925
926
|
|
|
926
|
-
function sleep(ms) {
|
|
927
|
+
function sleep$1(ms) {
|
|
927
928
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
928
929
|
}
|
|
929
930
|
/**
|
|
@@ -937,7 +938,7 @@ async function pollUntil(options) {
|
|
|
937
938
|
if (await options.until()) {
|
|
938
939
|
return;
|
|
939
940
|
}
|
|
940
|
-
await sleep(intervalMs);
|
|
941
|
+
await sleep$1(intervalMs);
|
|
941
942
|
}
|
|
942
943
|
throw new Error(`pollUntil timeout after ${options.timeoutMs}ms`);
|
|
943
944
|
}
|
|
@@ -2611,6 +2612,295 @@ async function runSingleProcessService(options) {
|
|
|
2611
2612
|
}
|
|
2612
2613
|
}
|
|
2613
2614
|
|
|
2615
|
+
const logger$1 = createLogger({ module: "telegram" });
|
|
2616
|
+
let cachedDispatcher;
|
|
2617
|
+
let cachedProxyUrl;
|
|
2618
|
+
/** Per-request undici dispatcher when proxyUrl is set (Supabase stays direct). */
|
|
2619
|
+
function telegramFetchDispatcher(proxyUrl) {
|
|
2620
|
+
if (proxyUrl == null) {
|
|
2621
|
+
return undefined;
|
|
2622
|
+
}
|
|
2623
|
+
if (cachedDispatcher != null && cachedProxyUrl === proxyUrl) {
|
|
2624
|
+
return cachedDispatcher;
|
|
2625
|
+
}
|
|
2626
|
+
cachedDispatcher = new ProxyAgent(proxyUrl);
|
|
2627
|
+
cachedProxyUrl = proxyUrl;
|
|
2628
|
+
return cachedDispatcher;
|
|
2629
|
+
}
|
|
2630
|
+
function telegramNetworkHint(proxyUrl) {
|
|
2631
|
+
return proxyUrl
|
|
2632
|
+
? ` (proxy=${proxyUrl}, ensure Clash/V2Ray is running)`
|
|
2633
|
+
: " (set proxyUrl / TELEGRAM_PROXY if api.telegram.org is blocked)";
|
|
2634
|
+
}
|
|
2635
|
+
function botApiUrl(options, method) {
|
|
2636
|
+
return `${options.apiBaseUrl}/bot${options.botToken}/${method}`;
|
|
2637
|
+
}
|
|
2638
|
+
function telegramFileDownloadUrl(options, filePath) {
|
|
2639
|
+
const normalized = filePath.replace(/^\/+/, "");
|
|
2640
|
+
return `${options.apiBaseUrl}/file/bot${options.botToken}/${normalized}`;
|
|
2641
|
+
}
|
|
2642
|
+
function sleep(ms) {
|
|
2643
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2644
|
+
}
|
|
2645
|
+
function telegramBackoff(attempt, retryBaseMs) {
|
|
2646
|
+
return sleep(retryBaseMs * 2 ** (attempt - 1));
|
|
2647
|
+
}
|
|
2648
|
+
/** Bot API JSON call — transport retry via SDK fetch; outer loop retries Telegram `{ ok: false }`. */
|
|
2649
|
+
async function callTelegramApi(options, method, initOrFactory, callOptions = {}) {
|
|
2650
|
+
const timeoutMs = callOptions.timeoutMs ?? options.fetchTimeoutMs;
|
|
2651
|
+
const maxAttempts = callOptions.retryAttempts ?? 1;
|
|
2652
|
+
const retryBaseMs = callOptions.retryBaseMs ?? options.uploadRetryBaseMs;
|
|
2653
|
+
const url = botApiUrl(options, method);
|
|
2654
|
+
const label = `Telegram ${method}`;
|
|
2655
|
+
const dispatcher = telegramFetchDispatcher(options.proxyUrl);
|
|
2656
|
+
const hint = telegramNetworkHint(options.proxyUrl);
|
|
2657
|
+
let lastError = null;
|
|
2658
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
2659
|
+
const response = await fetchWithRetry(url, initOrFactory, {
|
|
2660
|
+
label,
|
|
2661
|
+
timeoutMs,
|
|
2662
|
+
maxAttempts: attempt === 1 ? maxAttempts : 1,
|
|
2663
|
+
retryBaseMs,
|
|
2664
|
+
dispatcher,
|
|
2665
|
+
hint,
|
|
2666
|
+
logger: logger$1,
|
|
2667
|
+
});
|
|
2668
|
+
let payload;
|
|
2669
|
+
try {
|
|
2670
|
+
payload = (await response.json());
|
|
2671
|
+
}
|
|
2672
|
+
catch {
|
|
2673
|
+
lastError = new Error(`${label}: invalid JSON response (HTTP ${response.status})`);
|
|
2674
|
+
if (attempt < maxAttempts && isRetryableHttpStatus(response.status)) {
|
|
2675
|
+
await telegramBackoff(attempt, retryBaseMs);
|
|
2676
|
+
continue;
|
|
2677
|
+
}
|
|
2678
|
+
throw lastError;
|
|
2679
|
+
}
|
|
2680
|
+
if (!payload.ok) {
|
|
2681
|
+
const description = payload.description ?? `HTTP ${response.status}`;
|
|
2682
|
+
lastError = new Error(`${label}: ${description}`);
|
|
2683
|
+
if (attempt < maxAttempts && isRetryableHttpStatus(response.status)) {
|
|
2684
|
+
logger$1.warn("retrying after API error", {
|
|
2685
|
+
topic: "telegram",
|
|
2686
|
+
data: { method, attempt, description },
|
|
2687
|
+
});
|
|
2688
|
+
await telegramBackoff(attempt, retryBaseMs);
|
|
2689
|
+
continue;
|
|
2690
|
+
}
|
|
2691
|
+
throw lastError;
|
|
2692
|
+
}
|
|
2693
|
+
if (payload.result == null) {
|
|
2694
|
+
throw new Error(`${label}: empty result in response`);
|
|
2695
|
+
}
|
|
2696
|
+
if (attempt > 1) {
|
|
2697
|
+
logger$1.info("request succeeded after retry", { topic: "telegram", data: { method, attempt } });
|
|
2698
|
+
}
|
|
2699
|
+
return payload.result;
|
|
2700
|
+
}
|
|
2701
|
+
throw lastError ?? new Error(`${label}: request failed`);
|
|
2702
|
+
}
|
|
2703
|
+
async function telegramDownloadBinary(options, url, label, callOptions = {}) {
|
|
2704
|
+
const dispatcher = telegramFetchDispatcher(options.proxyUrl);
|
|
2705
|
+
return fetchBinaryWithRetry(url, { method: "GET" }, {
|
|
2706
|
+
label: `Telegram ${label}`,
|
|
2707
|
+
timeoutMs: callOptions.timeoutMs ?? options.fetchTimeoutMs,
|
|
2708
|
+
maxAttempts: callOptions.retryAttempts ?? 1,
|
|
2709
|
+
retryBaseMs: callOptions.retryBaseMs ?? options.uploadRetryBaseMs,
|
|
2710
|
+
dispatcher,
|
|
2711
|
+
hint: telegramNetworkHint(options.proxyUrl),
|
|
2712
|
+
logger: logger$1,
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
/** Download chunk bytes by Telegram `file_id` stored in Chunk.url. */
|
|
2717
|
+
async function downloadTelegramChunk(options, fileId) {
|
|
2718
|
+
const file = await callTelegramApi(options, `getFile?file_id=${encodeURIComponent(fileId)}`, { method: "GET" }, {
|
|
2719
|
+
retryAttempts: options.uploadRetryAttempts,
|
|
2720
|
+
retryBaseMs: options.uploadRetryBaseMs,
|
|
2721
|
+
});
|
|
2722
|
+
if (file.file_path == null || file.file_path === "") {
|
|
2723
|
+
throw new Error(`Telegram getFile: missing file_path for file_id ${fileId}`);
|
|
2724
|
+
}
|
|
2725
|
+
return telegramDownloadBinary(options, telegramFileDownloadUrl(options, file.file_path), `download:${fileId.slice(0, 12)}…`, {
|
|
2726
|
+
timeoutMs: options.uploadTimeoutMs,
|
|
2727
|
+
retryAttempts: options.uploadRetryAttempts,
|
|
2728
|
+
retryBaseMs: options.uploadRetryBaseMs,
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/**
|
|
2733
|
+
* Telegram chunk URL encoding: `${messageId}|${fileId}`.
|
|
2734
|
+
* Legacy parcels store bare `file_id` (no messageId → cannot deleteMessage).
|
|
2735
|
+
*/
|
|
2736
|
+
const SEPARATOR = "|";
|
|
2737
|
+
function encodeTelegramChunkUrl(messageId, fileId) {
|
|
2738
|
+
return `${messageId}${SEPARATOR}${fileId}`;
|
|
2739
|
+
}
|
|
2740
|
+
function parseTelegramChunkUrl(locator) {
|
|
2741
|
+
const idx = locator.indexOf(SEPARATOR);
|
|
2742
|
+
if (idx <= 0) {
|
|
2743
|
+
return { messageId: null, fileId: locator };
|
|
2744
|
+
}
|
|
2745
|
+
const mid = Number(locator.slice(0, idx));
|
|
2746
|
+
const fileId = locator.slice(idx + 1);
|
|
2747
|
+
if (!Number.isInteger(mid) || mid <= 0 || fileId === "") {
|
|
2748
|
+
return { messageId: null, fileId: locator };
|
|
2749
|
+
}
|
|
2750
|
+
return { messageId: mid, fileId };
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
function resolveTelegramStorageOptions(options) {
|
|
2754
|
+
const botToken = options.botToken.trim();
|
|
2755
|
+
const chatId = options.chatId.trim();
|
|
2756
|
+
if (botToken === "") {
|
|
2757
|
+
throw new Error("TelegramStorageProviderOptions.botToken is required");
|
|
2758
|
+
}
|
|
2759
|
+
if (chatId === "") {
|
|
2760
|
+
throw new Error("TelegramStorageProviderOptions.chatId is required");
|
|
2761
|
+
}
|
|
2762
|
+
const apiBaseUrl = (options.apiBaseUrl?.trim() || "https://api.telegram.org").replace(/\/$/, "");
|
|
2763
|
+
const proxyUrl = options.proxyUrl?.trim() || undefined;
|
|
2764
|
+
return {
|
|
2765
|
+
botToken,
|
|
2766
|
+
chatId,
|
|
2767
|
+
apiBaseUrl,
|
|
2768
|
+
proxyUrl: proxyUrl !== "" ? proxyUrl : undefined,
|
|
2769
|
+
fetchTimeoutMs: options.fetchTimeoutMs ?? 30_000,
|
|
2770
|
+
uploadTimeoutMs: options.uploadTimeoutMs ?? 120_000,
|
|
2771
|
+
uploadRetryAttempts: options.uploadRetryAttempts ?? 3,
|
|
2772
|
+
uploadRetryBaseMs: options.uploadRetryBaseMs ?? 2_000,
|
|
2773
|
+
};
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
const PROVIDER_TELEGRAM = "telegram";
|
|
2777
|
+
async function uploadChunkToTelegram(options, data, filename) {
|
|
2778
|
+
const sizeMb = (data.byteLength / (1024 * 1024)).toFixed(2);
|
|
2779
|
+
const message = await callTelegramApi(options, "sendDocument", () => {
|
|
2780
|
+
const form = new FormData();
|
|
2781
|
+
form.append("chat_id", options.chatId);
|
|
2782
|
+
form.append("document", new Blob([data]), filename);
|
|
2783
|
+
return { method: "POST", body: form };
|
|
2784
|
+
}, {
|
|
2785
|
+
timeoutMs: options.uploadTimeoutMs,
|
|
2786
|
+
retryAttempts: options.uploadRetryAttempts,
|
|
2787
|
+
retryBaseMs: options.uploadRetryBaseMs,
|
|
2788
|
+
});
|
|
2789
|
+
const fileId = message.document?.file_id;
|
|
2790
|
+
if (fileId == null || fileId === "") {
|
|
2791
|
+
throw new Error(`Telegram sendDocument: missing file_id (chunk ${filename}, ${sizeMb} MB)`);
|
|
2792
|
+
}
|
|
2793
|
+
return { fileId, messageId: message.message_id };
|
|
2794
|
+
}
|
|
2795
|
+
async function deleteTelegramMessage(options, messageId) {
|
|
2796
|
+
await callTelegramApi(options, "deleteMessage", () => {
|
|
2797
|
+
const form = new FormData();
|
|
2798
|
+
form.append("chat_id", options.chatId);
|
|
2799
|
+
form.append("message_id", String(messageId));
|
|
2800
|
+
return { method: "POST", body: form };
|
|
2801
|
+
}, {
|
|
2802
|
+
retryAttempts: 3,
|
|
2803
|
+
retryBaseMs: 1_000,
|
|
2804
|
+
});
|
|
2805
|
+
}
|
|
2806
|
+
async function rollbackTelegramUploads(options, handles) {
|
|
2807
|
+
for (const item of handles) {
|
|
2808
|
+
const upload = item;
|
|
2809
|
+
if (upload?.messageId == null) {
|
|
2810
|
+
continue;
|
|
2811
|
+
}
|
|
2812
|
+
try {
|
|
2813
|
+
await deleteTelegramMessage(options, upload.messageId);
|
|
2814
|
+
}
|
|
2815
|
+
catch {
|
|
2816
|
+
// Best-effort cleanup
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
function assertTelegramParcel(parcel) {
|
|
2821
|
+
const chunks = parcel.details.chunkList;
|
|
2822
|
+
if (chunks.length === 0) {
|
|
2823
|
+
throw new Error("Parcel has no chunks");
|
|
2824
|
+
}
|
|
2825
|
+
const nonTelegram = chunks.filter((chunk) => chunk.provider != null && chunk.provider !== PROVIDER_TELEGRAM);
|
|
2826
|
+
if (nonTelegram.length > 0) {
|
|
2827
|
+
const providers = [...new Set(nonTelegram.map((chunk) => chunk.provider))];
|
|
2828
|
+
throw new Error(`Parcel is not telegram-only (found providers: ${providers.join(", ")}). ` +
|
|
2829
|
+
"Multi-provider restore is not yet supported for this parcel.");
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
/**
|
|
2833
|
+
* Build a Telegram {@link StorageProviderModule}. Caller registers it — no side effects.
|
|
2834
|
+
*
|
|
2835
|
+
* @example
|
|
2836
|
+
* ```ts
|
|
2837
|
+
* import { createStorageProviderRegistry, createTelegramStorageProvider } from "target-supabase-sdk/node";
|
|
2838
|
+
* const registry = createStorageProviderRegistry();
|
|
2839
|
+
* registry.register(createTelegramStorageProvider({ botToken, chatId, proxyUrl }));
|
|
2840
|
+
* ```
|
|
2841
|
+
*/
|
|
2842
|
+
function createTelegramStorageProvider(input) {
|
|
2843
|
+
const options = resolveTelegramStorageOptions(input);
|
|
2844
|
+
return {
|
|
2845
|
+
provider: PROVIDER_TELEGRAM,
|
|
2846
|
+
uploadChunk: (data, filename) => uploadChunkToTelegram(options, data, filename),
|
|
2847
|
+
deleteMessage: (messageId) => deleteTelegramMessage(options, messageId),
|
|
2848
|
+
async deleteChunkBlobs(parcel) {
|
|
2849
|
+
let deleted = 0;
|
|
2850
|
+
let failed = 0;
|
|
2851
|
+
let skipped = 0;
|
|
2852
|
+
for (const chunk of parcel.details.chunkList) {
|
|
2853
|
+
if (chunk.provider != null && chunk.provider !== PROVIDER_TELEGRAM) {
|
|
2854
|
+
skipped += 1;
|
|
2855
|
+
continue;
|
|
2856
|
+
}
|
|
2857
|
+
const { messageId } = parseTelegramChunkUrl(chunk.url);
|
|
2858
|
+
if (messageId == null) {
|
|
2859
|
+
skipped += 1;
|
|
2860
|
+
continue;
|
|
2861
|
+
}
|
|
2862
|
+
try {
|
|
2863
|
+
await deleteTelegramMessage(options, messageId);
|
|
2864
|
+
deleted += 1;
|
|
2865
|
+
}
|
|
2866
|
+
catch {
|
|
2867
|
+
failed += 1;
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
return { deleted, failed, skipped };
|
|
2871
|
+
},
|
|
2872
|
+
createUploadAdapter(adapterOptions) {
|
|
2873
|
+
const tracker = adapterOptions?.tracker;
|
|
2874
|
+
return {
|
|
2875
|
+
provider: PROVIDER_TELEGRAM,
|
|
2876
|
+
async upload(data, pathOrKey) {
|
|
2877
|
+
const result = await uploadChunkToTelegram(options, data, pathOrKey);
|
|
2878
|
+
tracker?.push(result);
|
|
2879
|
+
// Persist messageId so later deleteParcel can call deleteMessage.
|
|
2880
|
+
return { url: encodeTelegramChunkUrl(result.messageId, result.fileId) };
|
|
2881
|
+
},
|
|
2882
|
+
};
|
|
2883
|
+
},
|
|
2884
|
+
resolveChunk: (locator) => {
|
|
2885
|
+
const { fileId } = parseTelegramChunkUrl(locator);
|
|
2886
|
+
return downloadTelegramChunk(options, fileId);
|
|
2887
|
+
},
|
|
2888
|
+
matchesOpaqueUrl: isOpaqueChunkUrl,
|
|
2889
|
+
async probe() {
|
|
2890
|
+
try {
|
|
2891
|
+
const me = await callTelegramApi(options, "getMe", { method: "GET" });
|
|
2892
|
+
return { ok: true, detail: { username: me.username ?? "unknown" } };
|
|
2893
|
+
}
|
|
2894
|
+
catch (error) {
|
|
2895
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2896
|
+
return { ok: false, error: message };
|
|
2897
|
+
}
|
|
2898
|
+
},
|
|
2899
|
+
rollbackUpload: (handles) => rollbackTelegramUploads(options, handles),
|
|
2900
|
+
assertParcelRestorable: assertTelegramParcel,
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2614
2904
|
/** Supabase `target.category` for rows that store task script payloads */
|
|
2615
2905
|
const TASK_REPO_SCRIPT_CATEGORY = "script";
|
|
2616
2906
|
/** Host app config directory (relative to `cwd`) — recommended for library consumers */
|
|
@@ -4241,5 +4531,5 @@ const patchTriggerFired = validateWithSchema(patchTriggerFiredSchema, "patchTrig
|
|
|
4241
4531
|
}
|
|
4242
4532
|
});
|
|
4243
4533
|
|
|
4244
|
-
export { BaseNodeRuntime, COLLECT_LOG_RUNNER_KEY, CategoryCommand, CategoryNode, CategoryRepo, CategoryTrigger, CommandType, EMPTY_REGISTRY_SLOT_RUNTIME_STATE, LOG_SPOOL_SERVICE_ID_ENV, LOG_TOPIC_TRIGGER, LogLevel, MAX_POLL_TARGET_LIST_SIZE, MEDIA_CONTENT_HASH_ALGORITHM, ManagedChildProcesses, NodeStatus, RepoManager, ResultCode, SERVICE_GUARD_RUNNER_KEY, ServiceGuardNode, ServiceRegistryError, TASK_LOCAL_PACKAGE_CONFIG_FILENAME, TASK_REPO_SCRIPT_CATEGORY, TASK_REPO_USAGE, TASK_RUNNER_CONFIG_DIR, TASK_RUNNER_ROOT_CONFIG_FILENAME, TASK_RUNNER_ROOT_CONFIG_LEGACY_RELATIVE_PATH, TASK_RUNNER_ROOT_CONFIG_RELATIVE_PATH, TRIGGER_LOOP_INTERVAL_MS, TRIGGER_RUNNER_DEFAULT_RETRY_COUNT, TRIGGER_RUNNER_DEFAULT_RETRY_DELAY_MS, TaskManager, TaskNode, TaskRepoValidation, TaskStatus, TaskStatusAction, TriggerManager, TriggerNode, TriggerStatus, applyRegistrySlotGuardStep, buildMediaLinkDraft, buildNodeImportArgs, checkMediaAvailability, claimServiceRegistrySlot, createJsonFileStateStore, createL3ChildLauncher, createLogSpoolCoordinator, createLogger, createManagedChildProcesses, createPathsExistCheck, createRequiredEnvCheck, createServiceHost, createServiceRuntimeStateStore, createSupabaseReachableCheck, createTarget, enableLogSpoolFromEnvInChild, ensureLogSpoolFromEnv, evaluateBusyNodeLiveness, findMediaLink, generateResponse, getConfigFileDir, getLogSpoolStats, getMainLogSpoolWriterStats, getPollCommandList, getPollCommandListSchema, getPossibleTarget, getScanRemoteRepoValues, guardRetryAfterSec, guessMediaMime, importJsConfigModule, initSupabaseFromStandardEnv, isChildProcessRunning, isCreateTargetAlreadyExistsError, isGuardAvailable, isLogEntry, isLogSpoolEnabled, isMediaValue, isOptimisticLockResponse, loadCachedJsConfigModule, loadEnvFiles, logManager, logSpoolEnabledFromEnv, markWorkerSpawned, mediaLinkDedupFilters, nodeBufferToArrayBuffer, patchChangeNodeStatus, patchChangeTaskStatus, patchClaimTask, patchNodeHeartBeat, patchServiceRuntime, patchStopNode, patchTriggerFired, patchTriggerFiredSchema, pathExists, pollTargetList, pollUntil, postCommand, postCommandSchema, postRegisterNode, postTarget, postTaskSchema, postTaskWithValidation, postTrigger, postTriggerSchema, probeMediaOriginal, publicBaseUrlFromEnv, readAndVerifySourceFile, readEnv, registerCollectLogRunner, registerMediaLink, registerServiceGuardRunner, registrySlotRuntimePatchFromGuardResult, requireEnv, resolveFirstExistingPath, resolveLogSpoolRoot, resolvePathFromBaseDir, resolvePathFromConfigFile, resolvePathFromCwd, runCollectLogTick, runReadinessChecks, runReadinessGate, runRegistrySlotGuardCheck, runServiceGuardTick, runSingleProcessService, scanEnabledTriggers, scanEnabledTriggersSchema, scanTargetList, sha256Hex, shutdownLogSpool, shutdownLogSpoolFromEnv, spawnTsxChild, supabase, toFileImportHref, updateTargetDetails, validateTaskRepoAndParams, validateWithSchema, waitForServiceReady };
|
|
4534
|
+
export { BaseNodeRuntime, COLLECT_LOG_RUNNER_KEY, CategoryCommand, CategoryNode, CategoryRepo, CategoryTrigger, CommandType, EMPTY_REGISTRY_SLOT_RUNTIME_STATE, LOG_SPOOL_SERVICE_ID_ENV, LOG_TOPIC_TRIGGER, LogLevel, MAX_POLL_TARGET_LIST_SIZE, MEDIA_CONTENT_HASH_ALGORITHM, ManagedChildProcesses, NodeStatus, PROVIDER_TELEGRAM, RepoManager, ResultCode, SERVICE_GUARD_RUNNER_KEY, ServiceGuardNode, ServiceRegistryError, TASK_LOCAL_PACKAGE_CONFIG_FILENAME, TASK_REPO_SCRIPT_CATEGORY, TASK_REPO_USAGE, TASK_RUNNER_CONFIG_DIR, TASK_RUNNER_ROOT_CONFIG_FILENAME, TASK_RUNNER_ROOT_CONFIG_LEGACY_RELATIVE_PATH, TASK_RUNNER_ROOT_CONFIG_RELATIVE_PATH, TRIGGER_LOOP_INTERVAL_MS, TRIGGER_RUNNER_DEFAULT_RETRY_COUNT, TRIGGER_RUNNER_DEFAULT_RETRY_DELAY_MS, TaskManager, TaskNode, TaskRepoValidation, TaskStatus, TaskStatusAction, TriggerManager, TriggerNode, TriggerStatus, applyRegistrySlotGuardStep, buildMediaLinkDraft, buildNodeImportArgs, callTelegramApi, checkMediaAvailability, claimServiceRegistrySlot, createJsonFileStateStore, createL3ChildLauncher, createLogSpoolCoordinator, createLogger, createManagedChildProcesses, createPathsExistCheck, createRequiredEnvCheck, createServiceHost, createServiceRuntimeStateStore, createSupabaseReachableCheck, createTarget, createTelegramStorageProvider, downloadTelegramChunk, enableLogSpoolFromEnvInChild, encodeTelegramChunkUrl, ensureLogSpoolFromEnv, evaluateBusyNodeLiveness, fetchBinaryWithRetry, fetchWithRetry, findMediaLink, generateResponse, getConfigFileDir, getLogSpoolStats, getMainLogSpoolWriterStats, getPollCommandList, getPollCommandListSchema, getPossibleTarget, getScanRemoteRepoValues, guardRetryAfterSec, guessMediaMime, importJsConfigModule, initSupabaseFromStandardEnv, isChildProcessRunning, isCreateTargetAlreadyExistsError, isGuardAvailable, isLogEntry, isLogSpoolEnabled, isMediaValue, isOpaqueChunkUrl, isOptimisticLockResponse, isRetryableHttpStatus, loadCachedJsConfigModule, loadEnvFiles, logManager, logSpoolEnabledFromEnv, markWorkerSpawned, mediaLinkDedupFilters, nodeBufferToArrayBuffer, parseTelegramChunkUrl, patchChangeNodeStatus, patchChangeTaskStatus, patchClaimTask, patchNodeHeartBeat, patchServiceRuntime, patchStopNode, patchTriggerFired, patchTriggerFiredSchema, pathExists, pollTargetList, pollUntil, postCommand, postCommandSchema, postRegisterNode, postTarget, postTaskSchema, postTaskWithValidation, postTrigger, postTriggerSchema, probeMediaOriginal, publicBaseUrlFromEnv, readAndVerifySourceFile, readEnv, registerCollectLogRunner, registerMediaLink, registerServiceGuardRunner, registrySlotRuntimePatchFromGuardResult, requireEnv, resolveFirstExistingPath, resolveLogSpoolRoot, resolvePathFromBaseDir, resolvePathFromConfigFile, resolvePathFromCwd, resolveTelegramStorageOptions, runCollectLogTick, runReadinessChecks, runReadinessGate, runRegistrySlotGuardCheck, runServiceGuardTick, runSingleProcessService, scanEnabledTriggers, scanEnabledTriggersSchema, scanTargetList, sha256Hex, shutdownLogSpool, shutdownLogSpoolFromEnv, spawnTsxChild, supabase, telegramDownloadBinary, telegramFileDownloadUrl, toFileImportHref, updateTargetDetails, validateTaskRepoAndParams, validateWithSchema, waitForServiceReady };
|
|
4245
4535
|
//# sourceMappingURL=node.js.map
|