coreblow 1.0.0-rc.6 → 1.0.0-rc.7
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/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
mergeAlsoAllowPolicy,
|
|
18
18
|
resolveToolProfilePolicy,
|
|
19
19
|
} from "../agents/tool-policy.js";
|
|
20
|
-
import { ToolInputError } from "../agents/tools/common.js";
|
|
20
|
+
import { ToolInputError, type AnyAgentTool } from "../agents/tools/common.js";
|
|
21
21
|
import { loadConfig } from "../config/config.js";
|
|
22
22
|
import { resolveMainSessionKey } from "../config/sessions.js";
|
|
23
23
|
import { logWarn } from "../logger.js";
|
|
@@ -272,9 +272,8 @@ export async function handleToolsInvokeHttpRequest(
|
|
|
272
272
|
});
|
|
273
273
|
|
|
274
274
|
const subagentFiltered = applyToolPolicyPipeline({
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
toolMeta: (tool) => getPluginToolMeta(tool as Record<string, unknown>),
|
|
275
|
+
tools: allTools as unknown as AnyAgentTool[],
|
|
276
|
+
toolMeta: (tool) => getPluginToolMeta(tool),
|
|
278
277
|
warn: logWarn,
|
|
279
278
|
steps: [
|
|
280
279
|
...buildDefaultToolPolicyPipelineSteps({
|
|
@@ -318,7 +317,7 @@ export async function handleToolsInvokeHttpRequest(
|
|
|
318
317
|
try {
|
|
319
318
|
const toolCallId = `http-${Date.now()}`;
|
|
320
319
|
const toolArgs = mergeActionIntoArgsIfSupported({
|
|
321
|
-
toolSchema: (tool as Record<string, unknown>).parameters,
|
|
320
|
+
toolSchema: (tool as unknown as Record<string, unknown>).parameters,
|
|
322
321
|
action,
|
|
323
322
|
args,
|
|
324
323
|
});
|
|
@@ -339,7 +338,7 @@ export async function handleToolsInvokeHttpRequest(
|
|
|
339
338
|
});
|
|
340
339
|
return true;
|
|
341
340
|
}
|
|
342
|
-
const result = await (tool as unknown as { execute?: (id: string, params: Record<string, unknown>) => Promise<unknown> }).execute?.(toolCallId, hookResult.params);
|
|
341
|
+
const result = await (tool as unknown as { execute?: (id: string, params: Record<string, unknown>) => Promise<unknown> }).execute?.(toolCallId, hookResult.params as Record<string, unknown>);
|
|
343
342
|
sendJson(res, 200, { ok: true, result });
|
|
344
343
|
} catch (err) {
|
|
345
344
|
const inputStatus = resolveToolInputErrorStatus(err);
|
|
@@ -8,6 +8,7 @@ import type { ChannelId } from "../channels/plugins/types.js";
|
|
|
8
8
|
import { inspectReadOnlyChannelAccount } from "../channels/read-only-account-inspect.js";
|
|
9
9
|
import { formatCliCommand } from "../cli/command-format.js";
|
|
10
10
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "../config/commands.js";
|
|
11
|
+
import type { NativeCommandsSetting } from "../config/types.messages.js";
|
|
11
12
|
import type { CoreBlowConfig } from "../config/config.js";
|
|
12
13
|
import { isDangerousNameMatchingEnabled } from "../config/dangerous-name-matching.js";
|
|
13
14
|
import { formatErrorMessage } from "../infra/errors.js";
|
|
@@ -881,8 +882,7 @@ export async function collectChannelSecurityFindings(params: {
|
|
|
881
882
|
|
|
882
883
|
if (!hasAnySenderAllowlist) {
|
|
883
884
|
const providerSetting = (telegramCfg.commands as { nativeSkills?: unknown } | undefined)
|
|
884
|
-
|
|
885
|
-
?.nativeSkills as unknown;
|
|
885
|
+
?.nativeSkills as NativeCommandsSetting | undefined;
|
|
886
886
|
const skillsEnabled = resolveNativeSkillsEnabled({
|
|
887
887
|
providerId: "telegram",
|
|
888
888
|
providerSetting,
|
package/src/utils/logger.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { pino } from 'pino';
|
|
8
|
-
import type { Logger as PinoLogger } from 'pino';
|
|
8
|
+
import type { Logger as PinoLogger, TransportSingleOptions } from 'pino';
|
|
9
9
|
|
|
10
10
|
// ─── Configuration ────────────────────────────────────────────────
|
|
11
11
|
|
|
@@ -94,7 +94,7 @@ export const logger: PinoLogger = pino({
|
|
|
94
94
|
...(process.env.COREBLOW_INSTANCE_ID ? { instance: process.env.COREBLOW_INSTANCE_ID } : {}),
|
|
95
95
|
},
|
|
96
96
|
timestamp: () => `,"time":"${new Date().toISOString()}"`,
|
|
97
|
-
transport: transportConfig as
|
|
97
|
+
transport: transportConfig as unknown as TransportSingleOptions | undefined,
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
// ─── Module Logger Factory ────────────────────────────────────────
|