@fased/fased 0.1.39 → 0.1.41
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/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/cli/update-cli/update-command.js +15 -0
- package/dist/commands/onboard-non-interactive/local/gateway-config.js +1 -1
- package/dist/gateway/server-plugins.js +8 -3
- package/dist/gateway/server.impl.js +2 -2
- package/dist/plugin-sdk/{audio-preflight-WolqDIx8.js → audio-preflight-Chxqjwxe.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-DIJQAjNX.js → audio-preflight-aupYKWfa.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.js +2 -2
- package/dist/plugin-sdk/{chunk-items-j6n1a2yQ.js → chunk-items-BDhRe_xU.js} +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/{config-CZaFbNZU.js → config-B6SjJFp-.js} +7 -7
- package/dist/plugin-sdk/{config-BxVjLTIv.js → config-C0qggNKQ.js} +7 -7
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/{monitor-jztLTK6V.js → monitor-38DGeIwS.js} +3 -3
- package/dist/plugin-sdk/{monitor-DyW8M8cP.js → monitor-CYCSEVee.js} +3 -3
- package/dist/plugin-sdk/{monitor-JQsKE-Nn.js → monitor-Ceu-Wayc.js} +3 -3
- package/dist/plugin-sdk/{monitor-C20pbAuB.js → monitor-DCyBaUCs.js} +3 -3
- package/dist/plugin-sdk/{openresponses-http-DXTQURTj.js → openresponses-http-CCfimy89.js} +1 -1
- package/dist/plugin-sdk/{openresponses-http-81UzNEsm.js → openresponses-http-DAL_9jE-.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-runner-BXCGeeps.js → pi-embedded-runner-Dum71Tdo.js} +14 -9
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DxoFm4Vd.js → pi-model-discovery-runtime-C5ssE6EW.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-BvFEoUSk.js → pi-model-discovery-runtime-DyOIGBor.js} +1 -1
- package/dist/plugin-sdk/{resolve-utils-4mG32lvJ.js → resolve-utils-r6ef8mj8.js} +1 -1
- package/dist/plugin-sdk/{slack-DRSLzWUb.js → slack-B0dLDyHM.js} +3 -3
- package/dist/plugin-sdk/{slack-qsR7PUPb.js → slack-Dv4zCw-x.js} +3 -3
- package/dist/plugin-sdk/src/brand.d.ts +2 -2
- package/dist/plugin-sdk/src/plugins/loader.d.ts +3 -1
- package/dist/plugin-sdk/{status-Cl4MeWSg.js → status-B2vb7zNW.js} +14 -9
- package/dist/plugin-sdk/{sticker-cache-DjFhjSZc.js → sticker-cache-C1vOWkzA.js} +2 -2
- package/dist/plugin-sdk/{sticker-cache-CcER-WWu.js → sticker-cache-CJDzqowL.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-DfDEOBPg.js → telegram-actions-BoiC9J7L.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-8Rjfgf8m.js → telegram-actions-CwAsKaNz.js} +2 -2
- package/dist/plugin-sdk/telegram.js +2 -2
- package/dist/plugin-sdk/{web-BbgvbXQz.js → web-BjV7ROeA.js} +1 -1
- package/dist/plugin-sdk/{web-KBdzfu6K.js → web-DjTSgU98.js} +1 -1
- package/dist/plugins/loader.js +70 -3
- package/dist/wizard/onboarding.gateway-config.js +1 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/sat-mining/src/strategy-skill.ts +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +3 -1
- package/scripts/start-managed.sh +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const FASED_BRAND_NAME = "Fased";
|
|
2
2
|
export declare const FASED_AGENT_NAME = "Fased Agent";
|
|
3
3
|
export declare const FASED_CONTROL_NAME = "Fased Control";
|
|
4
|
-
export declare const FASED_PRODUCT_VERSION = "0.1.
|
|
5
|
-
export declare const FASED_DISPLAY_VERSION = "v0.1.
|
|
4
|
+
export declare const FASED_PRODUCT_VERSION = "0.1.41";
|
|
5
|
+
export declare const FASED_DISPLAY_VERSION = "v0.1.41";
|
|
6
6
|
export declare function formatFasedDisplayLine(): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FasedAgentConfig } from "../config/config.js";
|
|
2
2
|
import type { GatewayRequestHandler } from "../gateway/server-methods/types.js";
|
|
3
3
|
import { type PluginRegistry } from "./registry.js";
|
|
4
|
-
import type { PluginLogger } from "./types.js";
|
|
4
|
+
import type { FasedAgentPluginModule, PluginLogger } from "./types.js";
|
|
5
5
|
export type PluginLoadResult = PluginRegistry;
|
|
6
6
|
export type PluginLoadOptions = {
|
|
7
7
|
config?: FasedAgentConfig;
|
|
@@ -10,6 +10,7 @@ export type PluginLoadOptions = {
|
|
|
10
10
|
coreGatewayHandlers?: Record<string, GatewayRequestHandler>;
|
|
11
11
|
cache?: boolean;
|
|
12
12
|
mode?: "full" | "validate";
|
|
13
|
+
preloadedModules?: Map<string, FasedAgentPluginModule>;
|
|
13
14
|
};
|
|
14
15
|
export declare function clearPluginLoaderCache(): void;
|
|
15
16
|
declare function repairOfficialChannelRuntimeDependencies(params: {
|
|
@@ -19,6 +20,7 @@ declare function repairOfficialChannelRuntimeDependencies(params: {
|
|
|
19
20
|
coreRoot?: string;
|
|
20
21
|
}): void;
|
|
21
22
|
declare function resolvePluginSdkAliases(): Record<string, string>;
|
|
23
|
+
export declare function preloadNativePluginModules(options?: PluginLoadOptions): Promise<Map<string, FasedAgentPluginModule>>;
|
|
22
24
|
export declare const __testing: {
|
|
23
25
|
repairOfficialChannelRuntimeDependencies: typeof repairOfficialChannelRuntimeDependencies;
|
|
24
26
|
resolvePluginSdkAliasFile: (params: {
|
|
@@ -72,7 +72,7 @@ import JSON5 from "json5";
|
|
|
72
72
|
import { execFile, spawn, spawnSync } from "node:child_process";
|
|
73
73
|
import * as fs$2 from "node:fs/promises";
|
|
74
74
|
import fs$1, { appendFile, mkdir } from "node:fs/promises";
|
|
75
|
-
import { fileURLToPath } from "node:url";
|
|
75
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
76
76
|
import process$1 from "node:process";
|
|
77
77
|
import { createServer } from "node:http";
|
|
78
78
|
import AjvPkg from "ajv";
|
|
@@ -17691,7 +17691,7 @@ function createOutboundSendDepsFromCliSource(deps) {
|
|
|
17691
17691
|
function createDefaultDeps() {
|
|
17692
17692
|
return {
|
|
17693
17693
|
sendMessageWhatsApp: async (...args) => {
|
|
17694
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
17694
|
+
const { sendMessageWhatsApp } = await import("./web-DjTSgU98.js");
|
|
17695
17695
|
return await sendMessageWhatsApp(...args);
|
|
17696
17696
|
},
|
|
17697
17697
|
sendMessageTelegram: async (...args) => {
|
|
@@ -93666,7 +93666,7 @@ function extractToolSend(args, expectedAction = "sendMessage") {
|
|
|
93666
93666
|
//#region src/channels/plugins/actions/telegram.ts
|
|
93667
93667
|
const providerId = "telegram";
|
|
93668
93668
|
async function loadTelegramActionHandler() {
|
|
93669
|
-
const { handleTelegramAction } = await import("./telegram-actions-
|
|
93669
|
+
const { handleTelegramAction } = await import("./telegram-actions-BoiC9J7L.js");
|
|
93670
93670
|
return handleTelegramAction;
|
|
93671
93671
|
}
|
|
93672
93672
|
function readTelegramSendParams(params) {
|
|
@@ -96182,7 +96182,7 @@ function buildPairingReply(params) {
|
|
|
96182
96182
|
|
|
96183
96183
|
//#endregion
|
|
96184
96184
|
//#region src/brand.ts
|
|
96185
|
-
const FASED_PRODUCT_VERSION = "0.1.
|
|
96185
|
+
const FASED_PRODUCT_VERSION = "0.1.41";
|
|
96186
96186
|
const FASED_DISPLAY_VERSION = `v${FASED_PRODUCT_VERSION}`;
|
|
96187
96187
|
|
|
96188
96188
|
//#endregion
|
|
@@ -100289,7 +100289,7 @@ const sendPollDiscordLazy = async (...args) => {
|
|
|
100289
100289
|
return sendPollDiscord(...args);
|
|
100290
100290
|
};
|
|
100291
100291
|
const monitorDiscordProviderLazy = async (...args) => {
|
|
100292
|
-
const { monitorDiscordProvider } = await import("./monitor-
|
|
100292
|
+
const { monitorDiscordProvider } = await import("./monitor-CYCSEVee.js");
|
|
100293
100293
|
return monitorDiscordProvider(...args);
|
|
100294
100294
|
};
|
|
100295
100295
|
const listSlackDirectoryGroupsLiveLazy = async (...args) => {
|
|
@@ -100317,7 +100317,7 @@ const sendMessageSlackLazy = async (...args) => {
|
|
|
100317
100317
|
return sendMessageSlack(...args);
|
|
100318
100318
|
};
|
|
100319
100319
|
const monitorSlackProviderLazy = async (...args) => {
|
|
100320
|
-
const { monitorSlackProvider } = await import("./slack-
|
|
100320
|
+
const { monitorSlackProvider } = await import("./slack-Dv4zCw-x.js");
|
|
100321
100321
|
return monitorSlackProvider(...args);
|
|
100322
100322
|
};
|
|
100323
100323
|
const handleSlackActionLazy = async (...args) => {
|
|
@@ -100337,7 +100337,7 @@ const sendPollTelegramLazy = async (...args) => {
|
|
|
100337
100337
|
return sendPollTelegram(...args);
|
|
100338
100338
|
};
|
|
100339
100339
|
const monitorTelegramProviderLazy = async (...args) => {
|
|
100340
|
-
const { monitorTelegramProvider } = await import("./monitor-
|
|
100340
|
+
const { monitorTelegramProvider } = await import("./monitor-Ceu-Wayc.js");
|
|
100341
100341
|
return monitorTelegramProvider(...args);
|
|
100342
100342
|
};
|
|
100343
100343
|
let webOutboundPromise = null;
|
|
@@ -100358,7 +100358,7 @@ function loadWebLoginQr() {
|
|
|
100358
100358
|
return webLoginQrPromise;
|
|
100359
100359
|
}
|
|
100360
100360
|
function loadWebChannel() {
|
|
100361
|
-
webChannelPromise ??= import("./web-
|
|
100361
|
+
webChannelPromise ??= import("./web-DjTSgU98.js");
|
|
100362
100362
|
return webChannelPromise;
|
|
100363
100363
|
}
|
|
100364
100364
|
function loadWhatsAppActions() {
|
|
@@ -101061,8 +101061,13 @@ function loadFasedAgentPlugins(options = {}) {
|
|
|
101061
101061
|
logger
|
|
101062
101062
|
});
|
|
101063
101063
|
let mod = null;
|
|
101064
|
+
const moduleLoadStartedAt = Date.now();
|
|
101064
101065
|
try {
|
|
101065
|
-
mod =
|
|
101066
|
+
mod = options.preloadedModules?.get(safeSource) ?? null;
|
|
101067
|
+
if (!mod) {
|
|
101068
|
+
mod = getJiti()(safeSource);
|
|
101069
|
+
logger.debug?.(`[plugins] ${record.id} Jiti load ${Date.now() - moduleLoadStartedAt}ms`);
|
|
101070
|
+
}
|
|
101066
101071
|
} catch (err) {
|
|
101067
101072
|
recordPluginError({
|
|
101068
101073
|
logger,
|
|
@@ -2,7 +2,7 @@ import { Rt as resolveApiKeyForProvider, Tt as resolveDefaultModelForAgent } fro
|
|
|
2
2
|
import { t as STATE_DIR } from "./paths-GdhK5mV_.js";
|
|
3
3
|
import { i as logVerbose } from "./globals-BtKmaIS3.js";
|
|
4
4
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-Djqpy66R.js";
|
|
5
|
-
import { c as findModelInCatalog, dt as resolveAutoImageModel, l as loadModelCatalog, u as modelSupportsVision } from "./status-
|
|
5
|
+
import { c as findModelInCatalog, dt as resolveAutoImageModel, l as loadModelCatalog, u as modelSupportsVision } from "./status-B2vb7zNW.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
|
|
@@ -147,7 +147,7 @@ async function describeStickerImage(params) {
|
|
|
147
147
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
148
148
|
try {
|
|
149
149
|
const buffer = await fs.readFile(imagePath);
|
|
150
|
-
const { describeImageWithModel } = await import("./status-
|
|
150
|
+
const { describeImageWithModel } = await import("./status-B2vb7zNW.js").then((n) => n.Ct);
|
|
151
151
|
return (await describeImageWithModel({
|
|
152
152
|
buffer,
|
|
153
153
|
fileName: "sticker.webp",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as loadModelCatalog, kt as resolveAutoImageModel, l as modelSupportsVision, s as findModelInCatalog } from "./pi-embedded-runner-
|
|
1
|
+
import { c as loadModelCatalog, kt as resolveAutoImageModel, l as modelSupportsVision, s as findModelInCatalog } from "./pi-embedded-runner-Dum71Tdo.js";
|
|
2
2
|
import { i as logVerbose } from "./globals-B_jjtAje.js";
|
|
3
3
|
import { t as STATE_DIR } from "./paths-BEmvSyOV.js";
|
|
4
4
|
import { Gt as resolveDefaultModelForAgent, in as resolveApiKeyForProvider } from "./config-DtqAN2L3.js";
|
|
@@ -147,7 +147,7 @@ async function describeStickerImage(params) {
|
|
|
147
147
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
148
148
|
try {
|
|
149
149
|
const buffer = await fs.readFile(imagePath);
|
|
150
|
-
const { describeImageWithModel } = await import("./pi-embedded-runner-
|
|
150
|
+
const { describeImageWithModel } = await import("./pi-embedded-runner-Dum71Tdo.js").then((n) => n.Ht);
|
|
151
151
|
return (await describeImageWithModel({
|
|
152
152
|
buffer,
|
|
153
153
|
fileName: "sticker.webp",
|
|
@@ -14,7 +14,7 @@ import "./accounts-BwkH5bTD.js";
|
|
|
14
14
|
import "./tokens-BK5rrwBB.js";
|
|
15
15
|
import "./allow-list-CBtbuDI8.js";
|
|
16
16
|
import "./paths-DTurNPnO.js";
|
|
17
|
-
import { en as resolveTelegramReactionLevel, tn as resolveTelegramInlineButtonsScope } from "./status-
|
|
17
|
+
import { en as resolveTelegramReactionLevel, tn as resolveTelegramInlineButtonsScope } from "./status-B2vb7zNW.js";
|
|
18
18
|
import "./runtime-dependency-B-1u41Ph.js";
|
|
19
19
|
import "./ssrf-Cce6LubA.js";
|
|
20
20
|
import "./skill-commands-hyZA0LE3.js";
|
|
@@ -48,7 +48,7 @@ import "./tables-BD7H5ug-.js";
|
|
|
48
48
|
import { a as reactMessageTelegram, i as editMessageTelegram, n as createForumTopicTelegram, o as sendMessageTelegram, r as deleteMessageTelegram, s as sendStickerTelegram } from "./send-B09HRfHN.js";
|
|
49
49
|
import "./retry-policy-BLYEgIwP.js";
|
|
50
50
|
import "./proxy-CV9uL4Wi.js";
|
|
51
|
-
import { a as searchStickers, r as getCacheStats } from "./sticker-cache-
|
|
51
|
+
import { a as searchStickers, r as getCacheStats } from "./sticker-cache-C1vOWkzA.js";
|
|
52
52
|
|
|
53
53
|
//#region src/agents/tools/telegram-actions.ts
|
|
54
54
|
const TELEGRAM_BUTTON_STYLES = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as resolveTelegramInlineButtonsScope, Qn as resolveTelegramReactionLevel } from "./pi-embedded-runner-
|
|
1
|
+
import { $n as resolveTelegramInlineButtonsScope, Qn as resolveTelegramReactionLevel } from "./pi-embedded-runner-Dum71Tdo.js";
|
|
2
2
|
import { Ot as resolveTelegramToken, wt as createTelegramActionGate } from "./runtime-BPyuAmka.js";
|
|
3
3
|
import "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import "./globals-B_jjtAje.js";
|
|
@@ -48,7 +48,7 @@ import "./tables-CJE8kB35.js";
|
|
|
48
48
|
import { a as reactMessageTelegram, i as editMessageTelegram, n as createForumTopicTelegram, o as sendMessageTelegram, r as deleteMessageTelegram, s as sendStickerTelegram } from "./send-BzFdvD_i.js";
|
|
49
49
|
import "./retry-policy-sM01QZT2.js";
|
|
50
50
|
import "./proxy-CKQOQYAl.js";
|
|
51
|
-
import { a as searchStickers, r as getCacheStats } from "./sticker-cache-
|
|
51
|
+
import { a as searchStickers, r as getCacheStats } from "./sticker-cache-CJDzqowL.js";
|
|
52
52
|
|
|
53
53
|
//#region src/agents/tools/telegram-actions.ts
|
|
54
54
|
const TELEGRAM_BUTTON_STYLES = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as resolveRequiredHomeDir, S as expandHomePrefix, _ as isRecord, a as resolveImplicitCopilotProvider, b as createSubsystemLogger, c as resolveFasedAgentDir, d as resolveDefaultAgentId, f as isTruthyEnvValue, g as formatTerminalLink, h as normalizeAccountId, i as normalizeProviders, l as resolveProcessScopedMap, m as DEFAULT_ACCOUNT_ID, n as TelegramConfigSchema, o as resolveImplicitProviders, p as normalizeAgentId, t as loadConfig, u as formatCliCommand, v as normalizeE164, w as normalizeChatChannelId, x as resolveOAuthDir, y as resolveUserPath } from "./config-
|
|
1
|
+
import { C as resolveRequiredHomeDir, S as expandHomePrefix, _ as isRecord, a as resolveImplicitCopilotProvider, b as createSubsystemLogger, c as resolveFasedAgentDir, d as resolveDefaultAgentId, f as isTruthyEnvValue, g as formatTerminalLink, h as normalizeAccountId, i as normalizeProviders, l as resolveProcessScopedMap, m as DEFAULT_ACCOUNT_ID, n as TelegramConfigSchema, o as resolveImplicitProviders, p as normalizeAgentId, t as loadConfig, u as formatCliCommand, v as normalizeE164, w as normalizeChatChannelId, x as resolveOAuthDir, y as resolveUserPath } from "./config-B6SjJFp-.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs";
|
|
@@ -1642,7 +1642,7 @@ async function loadContextCache() {
|
|
|
1642
1642
|
await ensureFasedModelsJson(cfg);
|
|
1643
1643
|
} catch {}
|
|
1644
1644
|
try {
|
|
1645
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-
|
|
1645
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-DyOIGBor.js");
|
|
1646
1646
|
const agentDir = resolveFasedAgentDir();
|
|
1647
1647
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
1648
1648
|
applyDiscoveredContextWindows({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as buildPairingReply, Ct as enqueueSystemEvent, D as buildHistoryContextFromEntries, E as DEFAULT_GROUP_HISTORY_LIMIT, Gt as hasControlCommand, H as createInboundDebouncer, Jt as buildMentionRegexes, K as resolveEnvelopeFormatOptions, Kt as shouldComputeCommandAuthorized, N as recordPendingHistoryEntryIfEnabled, Nt as registerUnhandledRejectionHandler, R as shouldAckReactionForWhatsApp, Sr as warnMissingProviderGroupPolicyFallbackOnce, T as sleepWithAbort, U as resolveInboundDebounceMs, W as formatInboundEnvelope, X as getReplyFromConfig, Xt as normalizeMentionText, br as resolveDefaultGroupPolicy, ct as normalizeGroupActivation, fr as readStoreAllowFromForDmPolicy, lt as parseActivationCommand, mr as resolveDmGroupAccessWithLists, p as resolveMentionGating, pr as resolveDmGroupAccessWithCommandGate, sr as createDedupeCache, w as computeBackoff, xr as resolveOpenProviderRuntimeGroupPolicy, xt as formatDurationPrecise, z as dispatchReplyWithBufferedBlockDispatcher } from "./pi-embedded-runner-
|
|
1
|
+
import { C as buildPairingReply, Ct as enqueueSystemEvent, D as buildHistoryContextFromEntries, E as DEFAULT_GROUP_HISTORY_LIMIT, Gt as hasControlCommand, H as createInboundDebouncer, Jt as buildMentionRegexes, K as resolveEnvelopeFormatOptions, Kt as shouldComputeCommandAuthorized, N as recordPendingHistoryEntryIfEnabled, Nt as registerUnhandledRejectionHandler, R as shouldAckReactionForWhatsApp, Sr as warnMissingProviderGroupPolicyFallbackOnce, T as sleepWithAbort, U as resolveInboundDebounceMs, W as formatInboundEnvelope, X as getReplyFromConfig, Xt as normalizeMentionText, br as resolveDefaultGroupPolicy, ct as normalizeGroupActivation, fr as readStoreAllowFromForDmPolicy, lt as parseActivationCommand, mr as resolveDmGroupAccessWithLists, p as resolveMentionGating, pr as resolveDmGroupAccessWithCommandGate, sr as createDedupeCache, w as computeBackoff, xr as resolveOpenProviderRuntimeGroupPolicy, xt as formatDurationPrecise, z as dispatchReplyWithBufferedBlockDispatcher } from "./pi-embedded-runner-Dum71Tdo.js";
|
|
2
2
|
import { C as recordSessionMetaFromInbound, Ht as resolveGroupSessionKey, Rt as resolveChannelGroupPolicy, S as readSessionUpdatedAt, w as updateLastRoute, x as loadSessionStore, zt as resolveChannelGroupRequireMention } from "./runtime-BPyuAmka.js";
|
|
3
3
|
import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { i as logVerbose, p as getChildLogger, s as shouldLogVerbose } from "./globals-B_jjtAje.js";
|
|
@@ -15,7 +15,7 @@ import { a as logWebSelfId, c as pickWebChannel, i as getWebAuthAgeMs, m as webA
|
|
|
15
15
|
import "./tokens-BK5rrwBB.js";
|
|
16
16
|
import "./allow-list-CBtbuDI8.js";
|
|
17
17
|
import { l as resolveStorePath } from "./paths-DTurNPnO.js";
|
|
18
|
-
import { A as buildHistoryContextFromEntries, B as dispatchReplyWithBufferedBlockDispatcher, C as computeBackoff, D as resolveOpenProviderRuntimeGroupPolicy, Dt as buildMentionRegexes, E as resolveDefaultGroupPolicy, Ft as normalizeGroupActivation, G as formatInboundEnvelope, It as parseActivationCommand, Jt as formatDurationPrecise, K as resolveEnvelopeFormatOptions, N as recordPendingHistoryEntryIfEnabled, O as warnMissingProviderGroupPolicyFallbackOnce, S as buildPairingReply, Tt as shouldComputeCommandAuthorized, U as createInboundDebouncer, W as resolveInboundDebounceMs, Xt as enqueueSystemEvent, Y as createDedupeCache, Z as getReplyFromConfig, _ as resolveDmGroupAccessWithCommandGate, g as readStoreAllowFromForDmPolicy, jt as registerUnhandledRejectionHandler, k as DEFAULT_GROUP_HISTORY_LIMIT, kt as normalizeMentionText, p as resolveMentionGating, v as resolveDmGroupAccessWithLists, w as sleepWithAbort, wt as hasControlCommand, z as shouldAckReactionForWhatsApp } from "./status-
|
|
18
|
+
import { A as buildHistoryContextFromEntries, B as dispatchReplyWithBufferedBlockDispatcher, C as computeBackoff, D as resolveOpenProviderRuntimeGroupPolicy, Dt as buildMentionRegexes, E as resolveDefaultGroupPolicy, Ft as normalizeGroupActivation, G as formatInboundEnvelope, It as parseActivationCommand, Jt as formatDurationPrecise, K as resolveEnvelopeFormatOptions, N as recordPendingHistoryEntryIfEnabled, O as warnMissingProviderGroupPolicyFallbackOnce, S as buildPairingReply, Tt as shouldComputeCommandAuthorized, U as createInboundDebouncer, W as resolveInboundDebounceMs, Xt as enqueueSystemEvent, Y as createDedupeCache, Z as getReplyFromConfig, _ as resolveDmGroupAccessWithCommandGate, g as readStoreAllowFromForDmPolicy, jt as registerUnhandledRejectionHandler, k as DEFAULT_GROUP_HISTORY_LIMIT, kt as normalizeMentionText, p as resolveMentionGating, v as resolveDmGroupAccessWithLists, w as sleepWithAbort, wt as hasControlCommand, z as shouldAckReactionForWhatsApp } from "./status-B2vb7zNW.js";
|
|
19
19
|
import "./runtime-dependency-B-1u41Ph.js";
|
|
20
20
|
import "./ssrf-Cce6LubA.js";
|
|
21
21
|
import "./skill-commands-hyZA0LE3.js";
|
package/dist/plugins/loader.js
CHANGED
|
@@ -12,7 +12,7 @@ import { createPluginRegistry } from "./registry.js";
|
|
|
12
12
|
import { setActivePluginRegistry } from "./runtime.js";
|
|
13
13
|
import { initializeGlobalHookRunner } from "./hook-runner-global.js";
|
|
14
14
|
import { createPluginRuntime } from "./runtime/index.js";
|
|
15
|
-
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
16
|
import fs from "node:fs";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { createJiti } from "jiti";
|
|
@@ -179,6 +179,68 @@ function resolvePluginSdkAliases() {
|
|
|
179
179
|
}
|
|
180
180
|
return aliases;
|
|
181
181
|
}
|
|
182
|
+
function isNativePluginEntry(source) {
|
|
183
|
+
return [
|
|
184
|
+
".js",
|
|
185
|
+
".mjs",
|
|
186
|
+
".cjs"
|
|
187
|
+
].includes(path.extname(source).toLowerCase());
|
|
188
|
+
}
|
|
189
|
+
async function preloadNativePluginModules(options = {}) {
|
|
190
|
+
const cfg = applyTestPluginDefaults(options.config ?? {}, process.env);
|
|
191
|
+
const logger = options.logger ?? defaultLogger();
|
|
192
|
+
const normalized = normalizePluginsConfig(cfg.plugins);
|
|
193
|
+
const discovery = discoverFasedAgentPlugins({
|
|
194
|
+
workspaceDir: options.workspaceDir,
|
|
195
|
+
extraPaths: normalized.loadPaths
|
|
196
|
+
});
|
|
197
|
+
const manifestRegistry = loadPluginManifestRegistry({
|
|
198
|
+
config: cfg,
|
|
199
|
+
workspaceDir: options.workspaceDir,
|
|
200
|
+
cache: options.cache,
|
|
201
|
+
candidates: discovery.candidates,
|
|
202
|
+
diagnostics: discovery.diagnostics
|
|
203
|
+
});
|
|
204
|
+
const manifestByRoot = new Map(manifestRegistry.plugins.map((record) => [record.rootDir, record]));
|
|
205
|
+
const modules = new Map();
|
|
206
|
+
for (const candidate of discovery.candidates) {
|
|
207
|
+
const manifestRecord = manifestByRoot.get(candidate.rootDir);
|
|
208
|
+
if (!manifestRecord || !isNativePluginEntry(candidate.source)) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const enableState = resolveEffectiveEnableState({
|
|
212
|
+
id: manifestRecord.id,
|
|
213
|
+
origin: candidate.origin,
|
|
214
|
+
config: normalized,
|
|
215
|
+
rootConfig: cfg
|
|
216
|
+
});
|
|
217
|
+
if (!enableState.enabled) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
const pluginRoot = safeRealpathOrResolve(candidate.rootDir);
|
|
221
|
+
const opened = openBoundaryFileSync({
|
|
222
|
+
absolutePath: candidate.source,
|
|
223
|
+
rootPath: pluginRoot,
|
|
224
|
+
boundaryLabel: "plugin root",
|
|
225
|
+
skipLexicalRootCheck: true
|
|
226
|
+
});
|
|
227
|
+
if (!opened.ok) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
const safeSource = opened.path;
|
|
231
|
+
fs.closeSync(opened.fd);
|
|
232
|
+
const startedAt = Date.now();
|
|
233
|
+
try {
|
|
234
|
+
const moduleUrl = pathToFileURL(safeSource).href;
|
|
235
|
+
const loaded = await import(moduleUrl);
|
|
236
|
+
modules.set(safeSource, loaded);
|
|
237
|
+
logger.info(`[plugins] ${manifestRecord.id} native preload ${Date.now() - startedAt}ms`);
|
|
238
|
+
} catch (error) {
|
|
239
|
+
logger.warn(`[plugins] ${manifestRecord.id} native preload failed after ${Date.now() - startedAt}ms; falling back to Jiti: ${String(error)}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return modules;
|
|
243
|
+
}
|
|
182
244
|
const __testing = {
|
|
183
245
|
repairOfficialChannelRuntimeDependencies,
|
|
184
246
|
resolvePluginSdkAliasFile,
|
|
@@ -589,8 +651,13 @@ function loadFasedAgentPlugins(options = {}) {
|
|
|
589
651
|
logger
|
|
590
652
|
});
|
|
591
653
|
let mod = null;
|
|
654
|
+
const moduleLoadStartedAt = Date.now();
|
|
592
655
|
try {
|
|
593
|
-
mod =
|
|
656
|
+
mod = options.preloadedModules?.get(safeSource) ?? null;
|
|
657
|
+
if (!mod) {
|
|
658
|
+
mod = getJiti()(safeSource);
|
|
659
|
+
logger.debug?.(`[plugins] ${record.id} Jiti load ${Date.now() - moduleLoadStartedAt}ms`);
|
|
660
|
+
}
|
|
594
661
|
} catch (err) {
|
|
595
662
|
recordPluginError({
|
|
596
663
|
logger,
|
|
@@ -748,4 +815,4 @@ function safeRealpathOrResolve(value) {
|
|
|
748
815
|
}
|
|
749
816
|
|
|
750
817
|
//#endregion
|
|
751
|
-
export { loadFasedAgentPlugins };
|
|
818
|
+
export { loadFasedAgentPlugins, preloadNativePluginModules };
|
|
@@ -194,7 +194,7 @@ async function configureGatewayForOnboarding(opts) {
|
|
|
194
194
|
trustedProxies: strictHosting && tailscaleMode === "serve" ? Array.from(new Set([...nextConfig.gateway?.trustedProxies ?? [], ...HOSTED_TAILSCALE_TRUSTED_PROXIES])) : nextConfig.gateway?.trustedProxies,
|
|
195
195
|
controlUi: strictHosting && tailscaleMode === "serve" ? {
|
|
196
196
|
...nextConfig.gateway?.controlUi,
|
|
197
|
-
allowInsecureAuth:
|
|
197
|
+
allowInsecureAuth: false
|
|
198
198
|
} : nextConfig.gateway?.controlUi,
|
|
199
199
|
...bind === "custom" && customBindHost ? { customBindHost } : {},
|
|
200
200
|
tailscale: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fased/memory-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "FasedAgent core memory search plugin",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@fased/fased": "^0.1.
|
|
8
|
+
"@fased/fased": "^0.1.41"
|
|
9
9
|
},
|
|
10
10
|
"fased": {
|
|
11
11
|
"extensions": [
|