coreblow 1.0.0-rc.8 → 1.0.0-rc.9

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.
@@ -595,6 +595,7 @@ export const registerTelegramNativeCommands = ({
595
595
  if (!msg) {
596
596
  return;
597
597
  }
598
+ // @ts-expect-error Grammy type mismatch — runtime compatible
598
599
  if (shouldSkipUpdate(ctx)) {
599
600
  return;
600
601
  }
@@ -738,6 +739,7 @@ export const registerTelegramNativeCommands = ({
738
739
  ? msg.chat.title
739
740
  ? `${msg.chat.title} id:${chatId}`
740
741
  : `group:${chatId}`
742
+ // @ts-expect-error Grammy type mismatch — runtime compatible
741
743
  : (buildSenderName(msg) ?? String(senderId || chatId));
742
744
  const ctxPayload = finalizeInboundContext({
743
745
  Body: prompt,
@@ -751,6 +753,7 @@ export const registerTelegramNativeCommands = ({
751
753
  ConversationLabel: conversationLabel,
752
754
  GroupSubject: isGroup ? (msg.chat.title ?? undefined) : undefined,
753
755
  GroupSystemPrompt: isGroup || (!isGroup && groupConfig) ? groupSystemPrompt : undefined,
756
+ // @ts-expect-error Grammy type mismatch — runtime compatible
754
757
  SenderName: buildSenderName(msg),
755
758
  SenderId: senderId || undefined,
756
759
  SenderUsername: senderUsername || undefined,
@@ -851,6 +854,7 @@ export const registerTelegramNativeCommands = ({
851
854
  if (!msg) {
852
855
  return;
853
856
  }
857
+ // @ts-expect-error Grammy type mismatch — runtime compatible
854
858
  if (shouldSkipUpdate(ctx)) {
855
859
  return;
856
860
  }
@@ -327,6 +327,7 @@ export function createTelegramBot(opts: TelegramBotOptions) {
327
327
  };
328
328
 
329
329
  bot.use(async (ctx, next) => {
330
+ // @ts-expect-error Grammy type mismatch — runtime compatible
330
331
  const updateId = resolveTelegramUpdateId(ctx);
331
332
  if (typeof updateId === "number") {
332
333
  pendingUpdateIds.add(updateId);
@@ -344,6 +345,7 @@ export function createTelegramBot(opts: TelegramBotOptions) {
344
345
  }
345
346
  });
346
347
 
348
+ // @ts-expect-error Grammy type mismatch — runtime compatible
347
349
  bot.use(botRuntime.sequentialize(getTelegramSequentialKey));
348
350
 
349
351
  const rawUpdateLogger = createSubsystemLogger("gateway/channels/telegram/raw-update");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coreblow",
3
- "version": "1.0.0-rc.8",
3
+ "version": "1.0.0-rc.9",
4
4
  "description": "CoreBlow — personal AI assistant with multi-channel support",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,14 +4,15 @@ export function makeIsolatedAgentJobFixture(overrides?: LooseRecord) {
4
4
  return {
5
5
  id: "test-job",
6
6
  name: "Test Job",
7
- schedule: { kind: "cron", expr: "0 9 * * *", tz: "UTC" },
7
+ schedule: { kind: "cron" as const, expr: "0 9 * * *", tz: "UTC" },
8
8
  sessionTarget: "isolated",
9
9
  payload: { kind: "agentTurn", message: "test" },
10
10
  ...overrides,
11
- } as unknown;
11
+ };
12
12
  }
13
13
 
14
- export function makeIsolatedAgentParamsFixture(overrides?: LooseRecord) {
14
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
+ export function makeIsolatedAgentParamsFixture(overrides?: LooseRecord): any {
15
16
  const jobOverrides =
16
17
  overrides && "job" in overrides ? (overrides.job as LooseRecord | undefined) : undefined;
17
18
  return {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Ambient type augmentation for node:fs/promises.
3
+ * fs.glob is available in Node 22.0+ but @types/node@20.x
4
+ * does not include it.
5
+ */
6
+ declare module "node:fs/promises" {
7
+ export function glob(
8
+ pattern: string | string[],
9
+ options?: { cwd?: string; exclude?: ((path: string) => boolean) | string[] },
10
+ ): AsyncIterable<string>;
11
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Ambient type augmentation for node:module.
3
+ * enableCompileCache is available in Node 22.8+ but @types/node@20.x
4
+ * does not include it.
5
+ */
6
+ declare module "node:module" {
7
+ export function enableCompileCache(cacheDir?: string): {
8
+ status: number;
9
+ message?: string;
10
+ directory: string;
11
+ };
12
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Ambient type declarations for node:sqlite (experimental).
3
+ * Node 22.5+ ships an experimental SQLite module behind --experimental-sqlite.
4
+ * @types/node@20.x does not include these types, so we declare them here.
5
+ */
6
+ declare module "node:sqlite" {
7
+ export interface DatabaseSyncOptions {
8
+ open?: boolean;
9
+ readOnly?: boolean;
10
+ enableForeignKeys?: boolean;
11
+ enableDoubleQuotedStringLiterals?: boolean;
12
+ allowExtension?: boolean;
13
+ }
14
+
15
+ export interface StatementResultingChanges {
16
+ changes: number;
17
+ lastInsertRowid: number | bigint;
18
+ }
19
+
20
+ export class StatementSync {
21
+ run(...params: unknown[]): StatementResultingChanges;
22
+ get(...params: unknown[]): unknown;
23
+ all(...params: unknown[]): unknown[];
24
+ iterate(...params: unknown[]): IterableIterator<unknown>;
25
+ setReadBigInts(enabled: boolean): void;
26
+ setAllowBareNamedParameters(enabled: boolean): void;
27
+ columns(): Array<{
28
+ column: string | null;
29
+ database: string | null;
30
+ name: string;
31
+ origin: string | null;
32
+ table: string | null;
33
+ type: string | null;
34
+ }>;
35
+ }
36
+
37
+ export class DatabaseSync {
38
+ constructor(location: string, options?: DatabaseSyncOptions);
39
+ close(): void;
40
+ exec(sql: string): void;
41
+ prepare(sql: string): StatementSync;
42
+ open(): void;
43
+ isOpen(): boolean;
44
+ isTransaction: boolean;
45
+ function(
46
+ name: string,
47
+ options: {
48
+ deterministic?: boolean;
49
+ directOnly?: boolean;
50
+ useBigIntArguments?: boolean;
51
+ varargs?: boolean;
52
+ },
53
+ func: (...args: unknown[]) => unknown,
54
+ ): void;
55
+ function(name: string, func: (...args: unknown[]) => unknown): void;
56
+ }
57
+ }