cclawd 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/dist/{active-listener-DYmI7imH.js → active-listener-BLd27Pxd.js} +2 -2
- package/dist/{api-key-rotation-DLU4jvSu.js → api-key-rotation-Dg3JlNDQ.js} +1 -1
- package/dist/{audio-preflight-C9TMbRb4.js → audio-preflight-eV5m9mMp.js} +15 -15
- package/dist/{audio-transcription-runner-Q5zG_hYd.js → audio-transcription-runner-CQU4Eg1M.js} +10 -10
- package/dist/{audit-membership-runtime-DhxSwFnF.js → audit-membership-runtime-hXUuer4x.js} +6 -6
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +35 -35
- package/dist/{channel-activity-Bx08UTAg.js → channel-activity-dT3cYb0e.js} +2 -2
- package/dist/{commands-registry-llLVCTH9.js → commands-registry-CyLMCPuP.js} +2 -2
- package/dist/compact.runtime-DGRl4st4.js +39 -0
- package/dist/{deliver-DJf2ZBpe.js → deliver-B6eTtXSk.js} +19 -19
- package/dist/deliver-runtime-CLDpY6AW.js +19 -0
- package/dist/deps-send-discord.runtime-CxADlame.js +19 -0
- package/dist/deps-send-imessage.runtime-Wi79xm6H.js +18 -0
- package/dist/deps-send-signal.runtime-BDtzvsnR.js +17 -0
- package/dist/deps-send-slack.runtime-CgX24hgT.js +17 -0
- package/dist/deps-send-telegram.runtime-CEWc7ePn.js +20 -0
- package/dist/deps-send-whatsapp.runtime-B1KJ7YOp.js +43 -0
- package/dist/{diagnostic-BCCMF3O_.js → diagnostic-BZmAxdu9.js} +2 -2
- package/dist/{env-aYXLHjfZ.js → env-lw2hsIUY.js} +1 -1
- package/dist/{fetch-bvgIiupu.js → fetch-C0iyt-Iz.js} +3 -3
- package/dist/{fetch-DCTUdr1U.js → fetch-CMLoICyN.js} +5 -5
- package/dist/{fetch-guard-CqpEmMQ2.js → fetch-guard-DCj3k042.js} +2 -2
- package/dist/{frontmatter-DjZuS525.js → frontmatter-C_obXuTp.js} +3 -3
- package/dist/{github-copilot-token-CQmATy5E.js → github-copilot-token-8N63GdbE.js} +7 -7
- package/dist/{image-Q8E1-lZn.js → image-Bt49ybRv.js} +4 -4
- package/dist/image-runtime-Cilhq73U.js +12 -0
- package/dist/{ir-CzM3SxId.js → ir-CVtBjUiL.js} +6 -6
- package/dist/llm-slug-generator.js +35 -35
- package/dist/{logger-ChbX1G7s.js → logger-CbUVl62f.js} +7 -7
- package/dist/{login-B0mtU11X.js → login-D0fUoX-p.js} +4 -4
- package/dist/{login-qr-DY_i60f5.js → login-qr-ClBxstxZ.js} +10 -10
- package/dist/{manager-FAQPC0uO.js → manager-DSfEj66R.js} +12 -12
- package/dist/manager-runtime-BrZlGJsj.js +15 -0
- package/dist/{model-selection-wf3OY5DX.js → model-selection-CMEj8bpy.js} +130 -130
- package/dist/{outbound-Bw0dOVS7.js → outbound-BxIJyMzV.js} +6 -6
- package/dist/{outbound-attachment-1R6r9Pg_.js → outbound-attachment-CVJwpypG.js} +2 -2
- package/dist/{paths-C0HLtPu0.js → paths-CehYKFsO.js} +7 -7
- package/dist/{paths-hfkBoC7i.js → paths-DkxwiA8g.js} +5 -5
- package/dist/{pi-embedded-BAHaY-Oh.js → pi-embedded-CHNPEUAv.js} +159 -159
- package/dist/{pi-model-discovery-ItS07aJB.js → pi-model-discovery-D-r5y7kV.js} +7 -7
- package/dist/pi-model-discovery-runtime-DZQXYmdu.js +12 -0
- package/dist/{pi-tools.before-tool-call.runtime-D_mthvtC.js → pi-tools.before-tool-call.runtime-DagGpfw0.js} +10 -10
- package/dist/{proxy-fetch-c1ZUFFcO.js → proxy-fetch-BOh1PLOW.js} +1 -1
- package/dist/{pw-ai-Ok6KGelf.js → pw-ai-CoIUdns_.js} +9 -9
- package/dist/{qmd-manager-DhfEz4Ar.js → qmd-manager-DEscZz5_.js} +6 -6
- package/dist/{query-expansion-GqNV2iIE.js → query-expansion-BErUY8P2.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-ChqE9BkX.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-yiy6jzKk.js +17 -0
- package/dist/{send-DPflcjM5.js → send-4rRrSKp9.js} +6 -6
- package/dist/{send-CEg4P96c.js → send-BKO1-P1t.js} +5 -5
- package/dist/{send-CS0ocZHl.js → send-EDBPXjTT.js} +3 -3
- package/dist/{send-6R8b9zsj.js → send-K2mAG7KC.js} +5 -5
- package/dist/{send-DwAoiT2p.js → send-V1MRV7QF.js} +25 -25
- package/dist/{session-BoIID5UR.js → session-CuVCho2m.js} +7 -7
- package/dist/{skill-commands-DhdiziMs.js → skill-commands-B55LOaMB.js} +9 -9
- package/dist/slash-commands.runtime-BchS0VkW.js +12 -0
- package/dist/slash-dispatch.runtime-BIKRY3fr.js +39 -0
- package/dist/slash-skill-commands.runtime-BP4jBHU9.js +13 -0
- package/dist/subagent-registry-runtime-DjEYzSyM.js +39 -0
- package/dist/{subsystem-C8z6w6xC.js → subsystem-DfXy5gUB.js} +14 -14
- package/dist/{tables-DQusRhkD.js → tables-BAGqh2XD.js} +1 -1
- package/dist/{target-errors-CfavnC9U.js → target-errors-CeBF8Pws.js} +1 -1
- package/dist/{tokens-BWDIKewp.js → tokens-6ul2IrzG.js} +1 -1
- package/dist/{web-CrcrTQ2c.js → web-BRSmQdtm.js} +39 -39
- package/dist/{whatsapp-actions-B0u0ZAme.js → whatsapp-actions-Dxb2K2Xh.js} +15 -15
- package/dist/{workspace-CWDYHR27.js → workspace-DGIcKCCW.js} +20 -20
- package/extensions/mfa-auth/README.md +33 -38
- package/extensions/mfa-auth/index.ts +97 -92
- package/extensions/mfa-auth/node_modules/.bin/qrcode-terminal +1 -6
- package/extensions/mfa-auth/node_modules/.bin/qrcode-terminal.cmd +17 -0
- package/extensions/mfa-auth/node_modules/.bin/qrcode-terminal.ps1 +0 -13
- package/extensions/mfa-auth/node_modules/.bin/tsx +1 -6
- package/extensions/mfa-auth/node_modules/.bin/tsx.cmd +17 -0
- package/extensions/mfa-auth/node_modules/.bin/tsx.ps1 +0 -13
- package/extensions/mfa-auth/node_modules/.package-lock.json +103 -0
- package/extensions/mfa-auth/package-lock.json +115 -0
- package/extensions/mfa-auth/package.json +1 -1
- package/extensions/mfa-auth/src/auth-manager.ts +4 -2
- package/extensions/mfa-auth/src/config.ts +1 -4
- package/extensions/mfa-auth/src/dabby-client.test.ts +68 -147
- package/extensions/mfa-auth/src/dabby-client.ts +70 -89
- package/extensions/mfa-auth/src/feishu-support/index.ts +2 -2
- package/extensions/mfa-auth/src/notification-service.ts +19 -14
- package/extensions/mfa-auth/src/providers/base.ts +0 -1
- package/extensions/mfa-auth/src/providers/qr-code.ts +3 -506
- package/extensions/mfa-auth/src/server.ts +3 -223
- package/extensions/mfa-auth/src/types.ts +13 -36
- package/package.json +458 -460
- package/dist/compact.runtime-BEn3giMt.js +0 -39
- package/dist/deliver-runtime-DkQ3XzGv.js +0 -19
- package/dist/deps-send-discord.runtime-BLpqSj6s.js +0 -19
- package/dist/deps-send-imessage.runtime-BFzyYqvR.js +0 -18
- package/dist/deps-send-signal.runtime-DT0TYCy1.js +0 -17
- package/dist/deps-send-slack.runtime-BhaGFfMX.js +0 -17
- package/dist/deps-send-telegram.runtime-B6Cic9NX.js +0 -20
- package/dist/deps-send-whatsapp.runtime-WtEhIq2S.js +0 -43
- package/dist/image-runtime-B1LFYfQ2.js +0 -12
- package/dist/manager-runtime-Da7ME9vS.js +0 -15
- package/dist/pi-model-discovery-runtime-DjM7Z1fx.js +0 -12
- package/dist/runtime-whatsapp-login.runtime-D4BRhQkK.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-DJPpS6g-.js +0 -17
- package/dist/slash-commands.runtime-Cu1lTjV9.js +0 -12
- package/dist/slash-dispatch.runtime-DRVJEF4l.js +0 -39
- package/dist/slash-skill-commands.runtime-C373PJjv.js +0 -13
- package/dist/subagent-registry-runtime-D7hWBo1G.js +0 -39
- package/extensions/mfa-auth/node_modules/.bin/qrcode-terminal.CMD +0 -12
- package/extensions/mfa-auth/node_modules/.bin/tsx.CMD +0 -12
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { A as resolveAgentDir, D as hasConfiguredModelFallbacks, E as runTasksWithConcurrency, F as resolveDefaultAgentId, G as resolveAgentModelFallbackValues, H as normalizeHyphenSlug, I as resolveEffectiveModelFallbacks, K as resolveAgentModelPrimaryValue, L as resolveRunModelFallbacksOverride, N as resolveAgentSkillsFilter, O as listAgentIds, P as resolveAgentWorkspaceDir, R as resolveSessionAgentId, S as redactSensitiveText, T as testRegexWithBoundedInput, U as normalizeStringEntries, V as normalizeAtHashSlug, W as normalizeStringEntriesLower, d as appendFileWithinRoot, f as copyFileWithinRoot, h as readFileWithinRoot, i as resolveSessionTranscriptPath, k as resolveAgentConfig, m as openFileWithinRoot, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, p as createRootScopedReadFile, q as toAgentModelListLike, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath, u as SafeOpenError, v as writeFileWithinRoot, w as compileSafeRegex, y as PATH_ALIAS_POLICIES, z as resolveSessionAgentIds } from "./paths-
|
|
2
|
-
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } from "./paths-
|
|
3
|
-
import { D as consumeRootOptionToken, E as resolvePreferredOpenClawTmpDir, _ as colorize, a as defaultRuntime, b as getChildLogger, c as unregisterActiveProgressLine, d as logVerbose, g as warn, i as createNonExitingRuntime, l as danger, m as shouldLogVerbose, n as sanitizeForLog, o as clearActiveProgressLine, p as setVerbose, s as registerActiveProgressLine, t as createSubsystemLogger, v as isRich, w as normalizeLogLevel, y as theme } from "./subsystem-
|
|
4
|
-
import { $ as isCronSessionKey, B as normalizeMainKey, F as buildAgentPeerSessionKey, H as resolveThreadSessionKeys, J as normalizeOptionalAccountId, K as DEFAULT_ACCOUNT_ID, L as classifySessionKeyShape, M as DEFAULT_AGENT_ID, N as DEFAULT_MAIN_KEY, P as buildAgentMainSessionKey, Q as isAcpSessionKey, R as isValidAgentId, S as openBoundaryFileSync, U as sanitizeAgentId, V as resolveAgentIdFromSessionKey, W as scopedHeartbeatWakeOptions, X as deriveSessionChatType, Y as isBlockedObjectKey, Z as getSubagentDepth, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, et as isSubagentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, h as resolveOpenClawPackageRootSync, j as normalizeWindowsPathForComparison, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, nt as resolveThreadParentSessionKey, q as normalizeAccountId$2, tt as parseAgentSessionKey, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as openBoundaryFile, z as normalizeAgentId } from "./workspace-
|
|
5
|
-
import { C as sleep$1, D as isPlainObject, E as truncateUtf16Safe, S as shortenHomePath, a as CONFIG_DIR, d as formatTerminalLink, f as isRecord$2, h as normalizeE164, i as logWarn, l as ensureDir$3, n as logError, r as logInfo, s as clampInt, t as logDebug, u as escapeRegExp, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./logger-
|
|
6
|
-
import { $ as normalizeThinkLevel, $a as describeUnknownError$1, $n as buildChannelAccountBindings, $o as executePluginCommand, $r as GATEWAY_CLIENT_NAMES, $s as resolveAuthStorePathForDisplay, $t as recordSessionMetaFromInbound, A as buildStreamErrorAssistantMessage, Aa as resolveSandboxConfigForAgent, Ai as saveMediaBuffer, An as mergeSessionEntry, Ao as loadPluginManifestRegistry, Ar as createDiscordActionGate, As as unwrapKnownShellMultiplexerInvocation, At as isContextOverflowError, B as markAuthProfileUsed, Ba as compileGlobPatterns, Bn as normalizeChannelId$1, Bo as listChatChannels, Br as normalizeChatType, Bs as resolveSlackStreamingMode, Bt as isTimeoutErrorMessage, C as resolveEnvApiKey, Ca as resolveBrowserControlAuth, Cn as resolveSessionKey, Co as parseDurationMs, Cs as matchAllowlist, Ct as formatBillingErrorMessage, D as createConfiguredOllamaStreamFn, Da as isLoopbackHost, Di as rawDataToString, Dn as resolveSessionResetType, Do as isPathWithinRoot, Dr as normalizeWhatsAppTarget, Ds as isDispatchWrapperExecutable, Dt as isBillingAssistantError, E as retryAsync, Ea as trimToUndefined, En as resolveSessionResetPolicy, Eo as isAvatarHttpUrl, Er as isWhatsAppGroupJid, Es as extractShellWrapperInlineCommand, Et as isAuthAssistantError, F as resolveAuthProfileOrder, Fa as mergeAlsoAllowPolicy, Fi as isAudioFileName, Fn as resolveExplicitAgentSessionKey, Fo as normalizePluginsConfig, Fr as resolveChannelGroupPolicy, Fs as applyMergePatch, Ft as isRawApiErrorPayload, G as validateAnthropicTurns, Ga as resolveBootstrapPromptTruncationWarningMode, Gn as resolveLineGroupHistoryKey, Go as getActivePluginRegistryKey, Gr as isInternalMessageChannel, Gs as getShellPathFromLoginShell, H as buildApiErrorObservationFields, Ha as buildBootstrapContextFiles, Hn as listChannelDocks, Ho as normalizeChannelId$2, Hr as INTERNAL_MESSAGE_CHANNEL, Ht as resolveSandboxContext, I as clearExpiredCooldowns, Ia as stripPluginOnlyAllowlist, Ii as isGifMedia, In as resolveMainSessionKey, Io as resolveEffectiveEnableState, Ir as resolveChannelGroupRequireMention, Is as isSafeExecutableValue, It as isTransientHttpError, J as formatThinkingLevels, Ja as redactIdentifier, Ji as formatErrorMessage, Jn as listEnabledTelegramAccounts, Jo as setActivePluginRegistry, Jr as normalizeMessageChannel, Js as resolveOwnerDisplaySetting, Jt as extractDeliveryInfo, K as validateGeminiTurns, Ka as resolveBootstrapTotalMaxChars, Kn as inspectTelegramAccount, Kr as isMarkdownCapableMessageChannel, Ks as resolveShellEnvFallbackTimeoutMs, Kt as resolveSessionTranscriptFile, L as getSoonestCooldownExpiry, La as expandToolGroups, Li as kindFromMime, Ln as deriveSessionMetaPatch, Lo as resolveMemorySlotDecision, Lr as resolveChannelGroupToolsPolicy, Ls as mapStreamingModeToSlackLegacyDraftStreamMode, Lt as parseImageDimensionError, M as isNonSecretApiKeyMarker, Ma as buildPluginToolGroups, Mi as extensionForMime, Mn as setSessionRuntimeModel, Mo as isPathInside, Mr as resolveDiscordAccount, Ms as SAFE_BIN_PROFILES, Mt as isFailoverErrorMessage, N as isSecretRefHeaderValueMarker, Na as collectExplicitAllowlist, Nn as canonicalizeMainSessionAlias, No as safeStatSync, Nr as resolveDiscordMaxLinesPerMessage, Ns as normalizeSafeBinProfileFixtures, Nt as isLikelyContextOverflowError, O as buildAssistantMessage, Oa as isSecureWebSocketUrl, Oi as MEDIA_MAX_BYTES, On as resolveThreadFlag, Oo as isSupportedLocalAvatarExtension, Os as isShellWrapperExecutable, Ot as isCloudCodeAssistFormatError, Pa as expandPolicyWithPluginGroups, Pi as imageMimeFromFormat, Po as applyTestPluginDefaults, Pr as normalizeDiscordToken, Ps as resolveSafeBinProfiles, Pt as isRateLimitAssistantError, Q as normalizeReasoningLevel, Qa as resolveSecretRefValues, Qn as resolveTelegramToken, Qo as clearPluginCommands, Qr as GATEWAY_CLIENT_MODES, Qs as ensureAuthProfileStore, Qt as readSessionUpdatedAt, R as isProfileInCooldown, Ra as normalizeToolName, Rn as getChannelPlugin, Ro as CHAT_CHANNEL_ORDER, Rr as resolveAccountEntry, Rs as resolveDiscordPreviewStreamMode, Rt as parseImageSizeError, S as resolveApiKeyForProvider, Sa as ensureBrowserControlAuth, Sn as jsonUtf8Bytes, So as secretRefKey, Ss as DEFAULT_SAFE_BINS, St as formatAssistantErrorText, T as resolveRetryConfig, Ta as resolveGatewayCredentialsFromConfig, Ti as ensureChromeExtensionRelayServer, Tn as resolveChannelResetConfig, To as isAvatarDataUrl, Tr as resolveIMessageAccount, Ts as resolveCommandResolutionFromArgv, Tt as getApiErrorPayloadFingerprint, U as buildTextObservationFields, Ua as ensureSessionHeader, Ui as DEFAULT_UPLOAD_DIR, Un as normalizeSignalMessagingTarget, Uo as normalizeChatChannelId, Ur as isDeliverableMessageChannel, Us as resolveAgentMaxConcurrent, Ut as resolveSandboxRuntimeStatus, V as resolveProfilesUnavailableReason, Va as matchesAnyGlobPattern, Vi as mediaKindFromMime, Vn as getChannelDock, Vo as normalizeAnyChannelId, Vr as resolveGroupSessionKey, Vt as ensureSandboxWorkspaceForSession, W as sanitizeForConsole, Wa as resolveBootstrapMaxChars, Wi as resolveExistingPathsWithinRoot, Wn as resolveLineGroupConfigEntry, Wo as getActivePluginRegistry, Wr as isGatewayMessageChannel, Ws as VERSION, Wt as appendAssistantMessageToSessionTranscript, Xa as resolveSecretRefString, Xi as readErrorName, Xn as resolveTelegramAccount, Xo as findOverlappingPluginHttpRoute, Xr as resolveMessageChannel, Xs as listProfilesForProvider, Xt as onSessionTranscriptUpdate, Y as formatXHighModelHint, Ya as resolveApiKeyForProfile, Yi as formatUncaughtError, Yn as listTelegramAccountIds, Yo as createPluginRegistry, Yr as resolveGatewayMessageChannel, Ys as dedupeProfileIds, Yt as emitSessionTranscriptUpdate, Z as normalizeElevatedLevel, Za as resolveSecretRefValue, Zn as resolveTelegramPollActionGateState, Zo as normalizePluginHttpPath, Zr as GATEWAY_CLIENT_IDS, Zs as markAuthProfileGood, Zt as loadSessionStore, _a as assertSandboxPath, _i as resizeToJpeg, _n as parseInlineDirectives$1, _s as validateSafeBinArgv, _t as downgradeOpenAIReasoningBlocks, a as isCliProvider, ai as createBrowserRouteContext, an as resolveCacheTtlMs$1, ao as loadConfig, ar as resolveSlackAppToken, as as getConfigOverrides, at as isMessagingToolDuplicateNormalized, b as getCustomProviderApiKey, ba as applySkillEnvOverrides, bn as hasInterSessionUserProvenance, bo as normalizeScpRemoteHost, br as readWebSelfId, bs as isWindowsPlatform, bt as classifyFailoverReason, c as normalizeProviderId, ca as normalizeHostname, cc as hasConfiguredSecretInput, ci as generateSecureUuid, cn as deliveryContextKey, co as resolveConfigSnapshotHash, cr as resolveSignalAccount, cs as unsetConfigOverride, ct as sanitizeImageBlocks, d as resolveDefaultModelForAgent, dc as resolveSecretInputRef, dn as normalizeSessionDeliveryFields, do as validateConfigObjectWithPlugins, dr as resolveWhatsAppAccount, ds as setConfigValueAtPath, dt as canonicalizeBase64, ec as resolveOpenClawAgentDir, ei as acquireSessionWriteLock, en as resolveSessionStoreEntry, eo as isNonEmptyString, er as listBindings, es as getPluginCommandSpecs, et as normalizeUsageDisplay, f as resolveModelRefFromString, fa as buildWorkspaceSkillSnapshot, fc as splitTrailingAuthProfile, fi as resolveLsofCommandSync, fn as normalizeAccountId$3, fo as TELEGRAM_COMMAND_NAME_PATTERN, fs as unsetConfigValueAtPath, ft as estimateBase64DecodedBytes, ga as assertMediaNotDataUrl, gn as extractToolCallNames, go as isInboundPathAllowed, gr as logoutWeb, gs as normalizeTrustedSafeBinDirs, gt as downgradeOpenAIFunctionCallReasoningPairs, h as resolveThinkingDefault, hc as DEFAULT_PROVIDER, hn as countToolResults, hr as logWebSelfId, hs as listWritableExplicitTrustedSafeBinDirs, ht as sanitizeToolCallIdsForCloudCodeAssist, i as findNormalizedProviderValue, ic as resolveAuthProfileDisplayLabel, ii as writeJsonAtomic, in as isCacheEnabled, ir as resolveSlackReplyToMode, is as resolveContextEngine, j as buildUsageWithNoCost, ja as applyOwnerOnlyToolPolicy, ji as detectMime, jn as resolveFreshSessionTotalTokens, jo as discoverOpenClawPlugins, jr as listEnabledDiscordAccounts, js as splitShellArgs, jt as isFailoverAssistantError, k as buildAssistantMessageWithZeroUsage, ka as DEFAULT_AI_SNAPSHOT_MAX_CHARS, ki as getMediaDir, kn as DEFAULT_RESET_TRIGGERS, ko as validateJsonSchemaValue, kr as inspectDiscordAccount, ks as unwrapKnownDispatchWrapperInvocation, kt as isCompactionFailureError, lc as normalizeResolvedSecretInputString, li as resolveBrowserConfig, ln as mergeDeliveryContext, lo as setRuntimeConfigSnapshot, lr as mapAllowFromEntries, ls as getConfigValueAtPath, lt as sanitizeToolResultImages, m as resolveSubagentSpawnModelSelection, ma as resolveSkillsPromptForRun, mc as DEFAULT_MODEL, mi as getImageMetadata, mn as capArrayByJsonBytes, mo as resolveTelegramCustomCommands, mr as getWebAuthAgeMs, ms as isTrustedSafeBinPath, mt as extractToolResultId, n as buildConfiguredAllowlistKeys, nc as formatCliCommand, ni as createAsyncLock, nn as updateSessionStore, no as parseDotPath, nr as inspectSlackAccount, ns as matchPluginCommand, nt as resolveResponseUsageMode, o as modelKey, oa as isBlockedHostnameOrIp, oc as normalizeSecretInput, oi as registerBrowserRoutes, on as parseFiniteNumber$1, oo as readConfigFileSnapshot, or as resolveSlackBotToken, os as resetConfigOverrides, ot as normalizeTextForComparison, p as resolveReasoningDefault, pa as loadWorkspaceSkillEntries, pc as DEFAULT_CONTEXT_TOKENS, pn as archiveSessionTranscripts, po as normalizeTelegramCommandName, ps as getTrustedSafeBinDirs, pt as extractToolCallsFromAssistant, q as pickFallbackThinkingLevel, qa as sanitizeGoogleTurnOrdering, qn as createTelegramActionGate, qo as requireActivePluginRegistry, qr as listDeliverableMessageChannels, qs as isDangerousHostEnvVarName, qt as resolveAndPersistSessionFile, r as buildModelAliasIndex, ra as SsrFBlockedError, rc as resolveCliName, ri as readJsonFile, rn as updateSessionStoreEntry, rr as resolveSlackAccount, rs as registerContextEngine, rt as supportsXHighThinking, s as normalizeModelRef$2, sc as coerceSecretRef, si as generateSecureToken, sn as deliveryContextFromSession, so as readConfigFileSnapshotForWrite, sr as listEnabledSignalAccounts, ss as setConfigOverride, st as sanitizeSessionMessagesImages, t as buildAllowedModelSet, tc as withFileLock, ti as resolveSessionLockMaxHoldFromTimeout, tn as updateLastRoute, to as isRecord$3, tr as listAcpBindings, ts as listPluginCommands, tt as normalizeVerboseLevel, u as resolveConfiguredModelRef, ua as getBridgeAuthForPort, uc as normalizeSecretInputString, ui as resolveProfile, un as normalizeDeliveryContext, uo as writeConfigFile, ur as hasAnyWhatsAppAuth, us as parseConfigPath, ut as resolveImageSanitizationLimits, va as resolveSandboxInputPath, vn as INPUT_PROVENANCE_KIND_VALUES, vo as resolveIMessageAttachmentRoots, vs as analyzeShellCommand, vt as isGoogleModelApi, w as resolveModelAuthMode, wa as GatewaySecretRefUnavailableError, wn as evaluateSessionFreshness, wr as webAuthExists, ws as resolveAllowlistCandidatePath, wt as formatRawAssistantErrorForUi, x as requireApiKey, xa as applySkillEnvOverridesFromSnapshot, xn as normalizeInputProvenance, xo as parseNonNegativeByteSize, xs as splitCommandChain, xt as classifyFailoverReasonFromHttpStatus, y as getApiKeyForModel, ya as resolveSandboxedMediaSource, yn as applyInputProvenanceToUserMessage, yo as resolveIMessageRemoteAttachmentRoots, ys as buildEnforcedShellCommand, yt as BILLING_ERROR_USER_MESSAGE, z as markAuthProfileFailure, za as resolveToolProfilePolicy, zi as MAX_IMAGE_BYTES, zn as listChannelPlugins, zo as getChatChannelMeta, zr as resolveConversationLabel, zs as resolveSlackNativeStreaming, zt as sanitizeUserFacingText } from "./model-selection-wf3OY5DX.js";
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
1
|
+
import { A as resolveAgentDir, D as hasConfiguredModelFallbacks, E as runTasksWithConcurrency, F as resolveDefaultAgentId, G as resolveAgentModelFallbackValues, H as normalizeHyphenSlug, I as resolveEffectiveModelFallbacks, K as resolveAgentModelPrimaryValue, L as resolveRunModelFallbacksOverride, N as resolveAgentSkillsFilter, O as listAgentIds, P as resolveAgentWorkspaceDir, R as resolveSessionAgentId, S as redactSensitiveText, T as testRegexWithBoundedInput, U as normalizeStringEntries, V as normalizeAtHashSlug, W as normalizeStringEntriesLower, d as appendFileWithinRoot, f as copyFileWithinRoot, h as readFileWithinRoot, i as resolveSessionTranscriptPath, k as resolveAgentConfig, m as openFileWithinRoot, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, p as createRootScopedReadFile, q as toAgentModelListLike, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath, u as SafeOpenError, v as writeFileWithinRoot, w as compileSafeRegex, y as PATH_ALIAS_POLICIES, z as resolveSessionAgentIds } from "./paths-CehYKFsO.js";
|
|
2
|
+
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } from "./paths-DkxwiA8g.js";
|
|
3
|
+
import { D as consumeRootOptionToken, E as resolvePreferredOpenClawTmpDir, _ as colorize, a as defaultRuntime, b as getChildLogger, c as unregisterActiveProgressLine, d as logVerbose, g as warn, i as createNonExitingRuntime, l as danger, m as shouldLogVerbose, n as sanitizeForLog, o as clearActiveProgressLine, p as setVerbose, s as registerActiveProgressLine, t as createSubsystemLogger, v as isRich, w as normalizeLogLevel, y as theme } from "./subsystem-DfXy5gUB.js";
|
|
4
|
+
import { $ as isCronSessionKey, B as normalizeMainKey, F as buildAgentPeerSessionKey, H as resolveThreadSessionKeys, J as normalizeOptionalAccountId, K as DEFAULT_ACCOUNT_ID, L as classifySessionKeyShape, M as DEFAULT_AGENT_ID, N as DEFAULT_MAIN_KEY, P as buildAgentMainSessionKey, Q as isAcpSessionKey, R as isValidAgentId, S as openBoundaryFileSync, U as sanitizeAgentId, V as resolveAgentIdFromSessionKey, W as scopedHeartbeatWakeOptions, X as deriveSessionChatType, Y as isBlockedObjectKey, Z as getSubagentDepth, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, et as isSubagentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, h as resolveOpenClawPackageRootSync, j as normalizeWindowsPathForComparison, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, nt as resolveThreadParentSessionKey, q as normalizeAccountId$2, tt as parseAgentSessionKey, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as openBoundaryFile, z as normalizeAgentId } from "./workspace-DGIcKCCW.js";
|
|
5
|
+
import { C as sleep$1, D as isPlainObject, E as truncateUtf16Safe, S as shortenHomePath, a as CONFIG_DIR, d as formatTerminalLink, f as isRecord$2, h as normalizeE164, i as logWarn, l as ensureDir$3, n as logError, r as logInfo, s as clampInt, t as logDebug, u as escapeRegExp, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./logger-CbUVl62f.js";
|
|
6
|
+
import { $ as normalizeThinkLevel, $a as describeUnknownError$1, $n as buildChannelAccountBindings, $o as executePluginCommand, $r as GATEWAY_CLIENT_NAMES, $s as resolveAuthStorePathForDisplay, $t as recordSessionMetaFromInbound, A as buildStreamErrorAssistantMessage, Aa as resolveSandboxConfigForAgent, Ai as saveMediaBuffer, An as mergeSessionEntry, Ao as loadPluginManifestRegistry, Ar as createDiscordActionGate, As as unwrapKnownShellMultiplexerInvocation, At as isContextOverflowError, B as markAuthProfileUsed, Ba as compileGlobPatterns, Bn as normalizeChannelId$1, Bo as listChatChannels, Br as normalizeChatType, Bs as resolveSlackStreamingMode, Bt as isTimeoutErrorMessage, C as resolveEnvApiKey, Ca as resolveBrowserControlAuth, Cn as resolveSessionKey, Co as parseDurationMs, Cs as matchAllowlist, Ct as formatBillingErrorMessage, D as createConfiguredOllamaStreamFn, Da as isLoopbackHost, Di as rawDataToString, Dn as resolveSessionResetType, Do as isPathWithinRoot, Dr as normalizeWhatsAppTarget, Ds as isDispatchWrapperExecutable, Dt as isBillingAssistantError, E as retryAsync, Ea as trimToUndefined, En as resolveSessionResetPolicy, Eo as isAvatarHttpUrl, Er as isWhatsAppGroupJid, Es as extractShellWrapperInlineCommand, Et as isAuthAssistantError, F as resolveAuthProfileOrder, Fa as mergeAlsoAllowPolicy, Fi as isAudioFileName, Fn as resolveExplicitAgentSessionKey, Fo as normalizePluginsConfig, Fr as resolveChannelGroupPolicy, Fs as applyMergePatch, Ft as isRawApiErrorPayload, G as validateAnthropicTurns, Ga as resolveBootstrapPromptTruncationWarningMode, Gn as resolveLineGroupHistoryKey, Go as getActivePluginRegistryKey, Gr as isInternalMessageChannel, Gs as getShellPathFromLoginShell, H as buildApiErrorObservationFields, Ha as buildBootstrapContextFiles, Hn as listChannelDocks, Ho as normalizeChannelId$2, Hr as INTERNAL_MESSAGE_CHANNEL, Ht as resolveSandboxContext, I as clearExpiredCooldowns, Ia as stripPluginOnlyAllowlist, Ii as isGifMedia, In as resolveMainSessionKey, Io as resolveEffectiveEnableState, Ir as resolveChannelGroupRequireMention, Is as isSafeExecutableValue, It as isTransientHttpError, J as formatThinkingLevels, Ja as redactIdentifier, Ji as formatErrorMessage, Jn as listEnabledTelegramAccounts, Jo as setActivePluginRegistry, Jr as normalizeMessageChannel, Js as resolveOwnerDisplaySetting, Jt as extractDeliveryInfo, K as validateGeminiTurns, Ka as resolveBootstrapTotalMaxChars, Kn as inspectTelegramAccount, Kr as isMarkdownCapableMessageChannel, Ks as resolveShellEnvFallbackTimeoutMs, Kt as resolveSessionTranscriptFile, L as getSoonestCooldownExpiry, La as expandToolGroups, Li as kindFromMime, Ln as deriveSessionMetaPatch, Lo as resolveMemorySlotDecision, Lr as resolveChannelGroupToolsPolicy, Ls as mapStreamingModeToSlackLegacyDraftStreamMode, Lt as parseImageDimensionError, M as isNonSecretApiKeyMarker, Ma as buildPluginToolGroups, Mi as extensionForMime, Mn as setSessionRuntimeModel, Mo as isPathInside, Mr as resolveDiscordAccount, Ms as SAFE_BIN_PROFILES, Mt as isFailoverErrorMessage, N as isSecretRefHeaderValueMarker, Na as collectExplicitAllowlist, Nn as canonicalizeMainSessionAlias, No as safeStatSync, Nr as resolveDiscordMaxLinesPerMessage, Ns as normalizeSafeBinProfileFixtures, Nt as isLikelyContextOverflowError, O as buildAssistantMessage, Oa as isSecureWebSocketUrl, Oi as MEDIA_MAX_BYTES, On as resolveThreadFlag, Oo as isSupportedLocalAvatarExtension, Os as isShellWrapperExecutable, Ot as isCloudCodeAssistFormatError, Pa as expandPolicyWithPluginGroups, Pi as imageMimeFromFormat, Po as applyTestPluginDefaults, Pr as normalizeDiscordToken, Ps as resolveSafeBinProfiles, Pt as isRateLimitAssistantError, Q as normalizeReasoningLevel, Qa as resolveSecretRefValues, Qn as resolveTelegramToken, Qo as clearPluginCommands, Qr as GATEWAY_CLIENT_MODES, Qs as ensureAuthProfileStore, Qt as readSessionUpdatedAt, R as isProfileInCooldown, Ra as normalizeToolName, Rn as getChannelPlugin, Ro as CHAT_CHANNEL_ORDER, Rr as resolveAccountEntry, Rs as resolveDiscordPreviewStreamMode, Rt as parseImageSizeError, S as resolveApiKeyForProvider, Sa as ensureBrowserControlAuth, Sn as jsonUtf8Bytes, So as secretRefKey, Ss as DEFAULT_SAFE_BINS, St as formatAssistantErrorText, T as resolveRetryConfig, Ta as resolveGatewayCredentialsFromConfig, Ti as ensureChromeExtensionRelayServer, Tn as resolveChannelResetConfig, To as isAvatarDataUrl, Tr as resolveIMessageAccount, Ts as resolveCommandResolutionFromArgv, Tt as getApiErrorPayloadFingerprint, U as buildTextObservationFields, Ua as ensureSessionHeader, Ui as DEFAULT_UPLOAD_DIR, Un as normalizeSignalMessagingTarget, Uo as normalizeChatChannelId, Ur as isDeliverableMessageChannel, Us as resolveAgentMaxConcurrent, Ut as resolveSandboxRuntimeStatus, V as resolveProfilesUnavailableReason, Va as matchesAnyGlobPattern, Vi as mediaKindFromMime, Vn as getChannelDock, Vo as normalizeAnyChannelId, Vr as resolveGroupSessionKey, Vt as ensureSandboxWorkspaceForSession, W as sanitizeForConsole, Wa as resolveBootstrapMaxChars, Wi as resolveExistingPathsWithinRoot, Wn as resolveLineGroupConfigEntry, Wo as getActivePluginRegistry, Wr as isGatewayMessageChannel, Ws as VERSION, Wt as appendAssistantMessageToSessionTranscript, Xa as resolveSecretRefString, Xi as readErrorName, Xn as resolveTelegramAccount, Xo as findOverlappingPluginHttpRoute, Xr as resolveMessageChannel, Xs as listProfilesForProvider, Xt as onSessionTranscriptUpdate, Y as formatXHighModelHint, Ya as resolveApiKeyForProfile, Yi as formatUncaughtError, Yn as listTelegramAccountIds, Yo as createPluginRegistry, Yr as resolveGatewayMessageChannel, Ys as dedupeProfileIds, Yt as emitSessionTranscriptUpdate, Z as normalizeElevatedLevel, Za as resolveSecretRefValue, Zn as resolveTelegramPollActionGateState, Zo as normalizePluginHttpPath, Zr as GATEWAY_CLIENT_IDS, Zs as markAuthProfileGood, Zt as loadSessionStore, _a as assertSandboxPath, _i as resizeToJpeg, _n as parseInlineDirectives$1, _s as validateSafeBinArgv, _t as downgradeOpenAIReasoningBlocks, a as isCliProvider, ai as createBrowserRouteContext, an as resolveCacheTtlMs$1, ao as loadConfig, ar as resolveSlackAppToken, as as getConfigOverrides, at as isMessagingToolDuplicateNormalized, b as getCustomProviderApiKey, ba as applySkillEnvOverrides, bn as hasInterSessionUserProvenance, bo as normalizeScpRemoteHost, br as readWebSelfId, bs as isWindowsPlatform, bt as classifyFailoverReason, c as normalizeProviderId, ca as normalizeHostname, cc as hasConfiguredSecretInput, ci as generateSecureUuid, cn as deliveryContextKey, co as resolveConfigSnapshotHash, cr as resolveSignalAccount, cs as unsetConfigOverride, ct as sanitizeImageBlocks, d as resolveDefaultModelForAgent, dc as resolveSecretInputRef, dn as normalizeSessionDeliveryFields, do as validateConfigObjectWithPlugins, dr as resolveWhatsAppAccount, ds as setConfigValueAtPath, dt as canonicalizeBase64, ec as resolveOpenClawAgentDir, ei as acquireSessionWriteLock, en as resolveSessionStoreEntry, eo as isNonEmptyString, er as listBindings, es as getPluginCommandSpecs, et as normalizeUsageDisplay, f as resolveModelRefFromString, fa as buildWorkspaceSkillSnapshot, fc as splitTrailingAuthProfile, fi as resolveLsofCommandSync, fn as normalizeAccountId$3, fo as TELEGRAM_COMMAND_NAME_PATTERN, fs as unsetConfigValueAtPath, ft as estimateBase64DecodedBytes, ga as assertMediaNotDataUrl, gn as extractToolCallNames, go as isInboundPathAllowed, gr as logoutWeb, gs as normalizeTrustedSafeBinDirs, gt as downgradeOpenAIFunctionCallReasoningPairs, h as resolveThinkingDefault, hc as DEFAULT_PROVIDER, hn as countToolResults, hr as logWebSelfId, hs as listWritableExplicitTrustedSafeBinDirs, ht as sanitizeToolCallIdsForCloudCodeAssist, i as findNormalizedProviderValue, ic as resolveAuthProfileDisplayLabel, ii as writeJsonAtomic, in as isCacheEnabled, ir as resolveSlackReplyToMode, is as resolveContextEngine, j as buildUsageWithNoCost, ja as applyOwnerOnlyToolPolicy, ji as detectMime, jn as resolveFreshSessionTotalTokens, jo as discoverOpenClawPlugins, jr as listEnabledDiscordAccounts, js as splitShellArgs, jt as isFailoverAssistantError, k as buildAssistantMessageWithZeroUsage, ka as DEFAULT_AI_SNAPSHOT_MAX_CHARS, ki as getMediaDir, kn as DEFAULT_RESET_TRIGGERS, ko as validateJsonSchemaValue, kr as inspectDiscordAccount, ks as unwrapKnownDispatchWrapperInvocation, kt as isCompactionFailureError, lc as normalizeResolvedSecretInputString, li as resolveBrowserConfig, ln as mergeDeliveryContext, lo as setRuntimeConfigSnapshot, lr as mapAllowFromEntries, ls as getConfigValueAtPath, lt as sanitizeToolResultImages, m as resolveSubagentSpawnModelSelection, ma as resolveSkillsPromptForRun, mc as DEFAULT_MODEL, mi as getImageMetadata, mn as capArrayByJsonBytes, mo as resolveTelegramCustomCommands, mr as getWebAuthAgeMs, ms as isTrustedSafeBinPath, mt as extractToolResultId, n as buildConfiguredAllowlistKeys, nc as formatCliCommand, ni as createAsyncLock, nn as updateSessionStore, no as parseDotPath, nr as inspectSlackAccount, ns as matchPluginCommand, nt as resolveResponseUsageMode, o as modelKey, oa as isBlockedHostnameOrIp, oc as normalizeSecretInput, oi as registerBrowserRoutes, on as parseFiniteNumber$1, oo as readConfigFileSnapshot, or as resolveSlackBotToken, os as resetConfigOverrides, ot as normalizeTextForComparison, p as resolveReasoningDefault, pa as loadWorkspaceSkillEntries, pc as DEFAULT_CONTEXT_TOKENS, pn as archiveSessionTranscripts, po as normalizeTelegramCommandName, ps as getTrustedSafeBinDirs, pt as extractToolCallsFromAssistant, q as pickFallbackThinkingLevel, qa as sanitizeGoogleTurnOrdering, qn as createTelegramActionGate, qo as requireActivePluginRegistry, qr as listDeliverableMessageChannels, qs as isDangerousHostEnvVarName, qt as resolveAndPersistSessionFile, r as buildModelAliasIndex, ra as SsrFBlockedError, rc as resolveCliName, ri as readJsonFile, rn as updateSessionStoreEntry, rr as resolveSlackAccount, rs as registerContextEngine, rt as supportsXHighThinking, s as normalizeModelRef$2, sc as coerceSecretRef, si as generateSecureToken, sn as deliveryContextFromSession, so as readConfigFileSnapshotForWrite, sr as listEnabledSignalAccounts, ss as setConfigOverride, st as sanitizeSessionMessagesImages, t as buildAllowedModelSet, tc as withFileLock, ti as resolveSessionLockMaxHoldFromTimeout, tn as updateLastRoute, to as isRecord$3, tr as listAcpBindings, ts as listPluginCommands, tt as normalizeVerboseLevel, u as resolveConfiguredModelRef, ua as getBridgeAuthForPort, uc as normalizeSecretInputString, ui as resolveProfile, un as normalizeDeliveryContext, uo as writeConfigFile, ur as hasAnyWhatsAppAuth, us as parseConfigPath, ut as resolveImageSanitizationLimits, va as resolveSandboxInputPath, vn as INPUT_PROVENANCE_KIND_VALUES, vo as resolveIMessageAttachmentRoots, vs as analyzeShellCommand, vt as isGoogleModelApi, w as resolveModelAuthMode, wa as GatewaySecretRefUnavailableError, wn as evaluateSessionFreshness, wr as webAuthExists, ws as resolveAllowlistCandidatePath, wt as formatRawAssistantErrorForUi, x as requireApiKey, xa as applySkillEnvOverridesFromSnapshot, xn as normalizeInputProvenance, xo as parseNonNegativeByteSize, xs as splitCommandChain, xt as classifyFailoverReasonFromHttpStatus, y as getApiKeyForModel, ya as resolveSandboxedMediaSource, yn as applyInputProvenanceToUserMessage, yo as resolveIMessageRemoteAttachmentRoots, ys as buildEnforcedShellCommand, yt as BILLING_ERROR_USER_MESSAGE, z as markAuthProfileFailure, za as resolveToolProfilePolicy, zi as MAX_IMAGE_BYTES, zn as listChannelPlugins, zo as getChatChannelMeta, zr as resolveConversationLabel, zs as resolveSlackNativeStreaming, zt as sanitizeUserFacingText } from "./model-selection-CMEj8bpy.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-8N63GdbE.js";
|
|
8
8
|
import { t as parseBooleanValue$1 } from "./boolean-C7Ct_klp.js";
|
|
9
|
-
import { t as isTruthyEnvValue } from "./env-
|
|
10
|
-
import { h as createInternalHookEvent, m as MANIFEST_KEY, y as triggerInternalHook } from "./frontmatter-
|
|
11
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
12
|
-
import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveOpenProviderRuntimeGroupPolicy, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as GROUP_POLICY_BLOCKED_LABEL, E as listThreadsDiscord, Et as evaluateMatchedGroupAccessForPolicy, F as fetchMemberInfoDiscord, Ft as buildChannelKeyCandidates, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, It as normalizeChannelSlug, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, Lt as resolveChannelEntryMatchWithFallback, M as banMemberDiscord, Mt as DiscordApiError, N as createScheduledEventDiscord, Nt as fetchDiscord, O as readMessagesDiscord, Ot as resolveAllowlistProviderRuntimeGroupPolicy, P as fetchChannelInfoDiscord, Pt as applyChannelMatchMeta, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as evaluateGroupRouteAccessForPolicy, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, jt as warnMissingProviderGroupPolicyFallbackOnce, k as searchMessagesDiscord, kt as resolveDefaultGroupPolicy, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-
|
|
13
|
-
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
14
|
-
import { A as normalizeTargetForProvider, C as isRenderablePayload, D as resolveReplyToMode, E as createReplyToModeFilterForChannel, M as initializeGlobalHookRunner, N as joinPresentTextSegments, O as buildTargetResolverSignature, S as filterMessagingToolMediaDuplicates, T as shouldSuppressReasoningPayload, _ as toPluginMessageSentEvent, a as normalizeReplyPayloadsForDelivery, b as applyReplyThreading, c as splitMediaFromOutput, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as toPluginMessageReceivedEvent, h as toPluginMessageContext, i as normalizeOutboundPayloadsForJson, j as getGlobalHookRunner, k as normalizeChannelTargetInput, l as buildCanonicalSentMessageHookContext, m as toInternalMessageTranscribedContext, n as formatOutboundPayloadLog, o as throwIfAborted, p as toInternalMessageSentContext, r as normalizeOutboundPayloads, s as parseReplyDirectives, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as fireAndForgetHook, w as shouldSuppressMessagingToolReplies, x as filterMessagingToolDuplicates, y as applyReplyTagsToPayload } from "./deliver-
|
|
15
|
-
import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, n as logLaneDequeue, o as logSessionStateChange, p as getDiagnosticSessionState, r as logLaneEnqueue, t as diag, u as logWebhookReceived } from "./diagnostic-
|
|
9
|
+
import { t as isTruthyEnvValue } from "./env-lw2hsIUY.js";
|
|
10
|
+
import { h as createInternalHookEvent, m as MANIFEST_KEY, y as triggerInternalHook } from "./frontmatter-C_obXuTp.js";
|
|
11
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BKO1-P1t.js";
|
|
12
|
+
import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveOpenProviderRuntimeGroupPolicy, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as GROUP_POLICY_BLOCKED_LABEL, E as listThreadsDiscord, Et as evaluateMatchedGroupAccessForPolicy, F as fetchMemberInfoDiscord, Ft as buildChannelKeyCandidates, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, It as normalizeChannelSlug, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, Lt as resolveChannelEntryMatchWithFallback, M as banMemberDiscord, Mt as DiscordApiError, N as createScheduledEventDiscord, Nt as fetchDiscord, O as readMessagesDiscord, Ot as resolveAllowlistProviderRuntimeGroupPolicy, P as fetchChannelInfoDiscord, Pt as applyChannelMatchMeta, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as evaluateGroupRouteAccessForPolicy, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, jt as warnMissingProviderGroupPolicyFallbackOnce, k as searchMessagesDiscord, kt as resolveDefaultGroupPolicy, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-4rRrSKp9.js";
|
|
13
|
+
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-6ul2IrzG.js";
|
|
14
|
+
import { A as normalizeTargetForProvider, C as isRenderablePayload, D as resolveReplyToMode, E as createReplyToModeFilterForChannel, M as initializeGlobalHookRunner, N as joinPresentTextSegments, O as buildTargetResolverSignature, S as filterMessagingToolMediaDuplicates, T as shouldSuppressReasoningPayload, _ as toPluginMessageSentEvent, a as normalizeReplyPayloadsForDelivery, b as applyReplyThreading, c as splitMediaFromOutput, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as toPluginMessageReceivedEvent, h as toPluginMessageContext, i as normalizeOutboundPayloadsForJson, j as getGlobalHookRunner, k as normalizeChannelTargetInput, l as buildCanonicalSentMessageHookContext, m as toInternalMessageTranscribedContext, n as formatOutboundPayloadLog, o as throwIfAborted, p as toInternalMessageSentContext, r as normalizeOutboundPayloads, s as parseReplyDirectives, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as fireAndForgetHook, w as shouldSuppressMessagingToolReplies, x as filterMessagingToolDuplicates, y as applyReplyTagsToPayload } from "./deliver-B6eTtXSk.js";
|
|
15
|
+
import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, n as logLaneDequeue, o as logSessionStateChange, p as getDiagnosticSessionState, r as logLaneEnqueue, t as diag, u as logWebhookReceived } from "./diagnostic-BZmAxdu9.js";
|
|
16
16
|
import { i as resolveTelegramTargetChatType, r as parseTelegramTarget } from "./targets-D4pwl9LR.js";
|
|
17
|
-
import { $ as toLocationContext, A as buildTypingThreadParams, B as resolveTelegramMediaPlaceholder, C as buildGroupLabel, D as buildTelegramGroupPeerId, E as buildTelegramGroupFrom, F as hasBotMention, G as normalizeAllowFrom$2, H as resolveTelegramStreamMode, I as normalizeForwardedContext, J as firstDefined$1, K as normalizeDmAllowFromWithStore$1, L as resolveTelegramDirectPeerId, M as expandTextLinks, N as extractTelegramLocation, O as buildTelegramParentPeer, P as getTelegramTextParts, Q as formatLocationText, R as resolveTelegramForumThreadId, S as resolveCronStorePath, T as buildSenderName, U as resolveTelegramThreadSpec, V as resolveTelegramReplyId, W as isSenderAllowed$1, X as mergeDmAllowFromSources, Y as isSenderIdAllowed, Z as resolveGroupAllowFromSources, _ as renderTelegramHtmlText, a as editMessageTelegram, at as writeJsonFileAtomically, b as withTelegramApiErrorLogging, c as sendPollTelegram, ct as isVoiceCompatibleAudio, d as resolveTelegramVoiceSend, et as addChannelAllowFromStoreEntry, f as wasSentByBot, g as markdownToTelegramHtml, h as markdownToTelegramChunks, i as editMessageReplyMarkupTelegram, it as readJsonFileWithFallback, j as describeReplyTarget, k as buildTelegramThreadParams, l as sendStickerTelegram, m as isSafeToRetrySendError, n as createForumTopicTelegram, nt as removeChannelAllowFromStoreEntry, o as reactMessageTelegram, ot as getPairingAdapter, p as isRecoverableTelegramNetworkError, q as resolveSenderAllowMatch$1, r as deleteMessageTelegram, rt as upsertChannelPairingRequest, s as sendMessageTelegram, st as listPairingChannels, t as buildInlineKeyboard, tt as readChannelAllowFromStore, u as sendTypingTelegram, v as wrapFileReferencesInHtml, w as buildSenderLabel, x as loadCronStore, y as splitTelegramCaption, z as resolveTelegramGroupAllowFromContext } from "./send-
|
|
18
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
19
|
-
import { C as isMinimaxVlmModel, E as ensureOpenClawModelsJson, S as extractTextFromChatContent, T as minimaxUnderstandImage, _ as formatToolSummary, a as resolveProviderVisionModelFromConfig, b as findCodeRegions, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as resolveToolDisplay, w as isMinimaxVlmProvider, x as isInsideCode, y as stripReasoningTagsFromText } from "./image-
|
|
20
|
-
import { C as loadModelCatalog, S as findModelInCatalog, _ as registerUnhandledRejectionHandler, a as resolveAutoImageModel, b as normalizeAttachments, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, g as buildRandomTempFilePath, h as DEFAULT_IMAGE_MODELS, i as normalizeMediaAttachments, l as resolveConcurrency, m as CLI_OUTPUT_MAX_BUFFER, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as AUTO_IMAGE_KEY_PROVIDERS, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, w as modelSupportsVision, x as resolveAttachmentKind, y as normalizeAttachmentPath } from "./audio-transcription-runner-
|
|
21
|
-
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-
|
|
17
|
+
import { $ as toLocationContext, A as buildTypingThreadParams, B as resolveTelegramMediaPlaceholder, C as buildGroupLabel, D as buildTelegramGroupPeerId, E as buildTelegramGroupFrom, F as hasBotMention, G as normalizeAllowFrom$2, H as resolveTelegramStreamMode, I as normalizeForwardedContext, J as firstDefined$1, K as normalizeDmAllowFromWithStore$1, L as resolveTelegramDirectPeerId, M as expandTextLinks, N as extractTelegramLocation, O as buildTelegramParentPeer, P as getTelegramTextParts, Q as formatLocationText, R as resolveTelegramForumThreadId, S as resolveCronStorePath, T as buildSenderName, U as resolveTelegramThreadSpec, V as resolveTelegramReplyId, W as isSenderAllowed$1, X as mergeDmAllowFromSources, Y as isSenderIdAllowed, Z as resolveGroupAllowFromSources, _ as renderTelegramHtmlText, a as editMessageTelegram, at as writeJsonFileAtomically, b as withTelegramApiErrorLogging, c as sendPollTelegram, ct as isVoiceCompatibleAudio, d as resolveTelegramVoiceSend, et as addChannelAllowFromStoreEntry, f as wasSentByBot, g as markdownToTelegramHtml, h as markdownToTelegramChunks, i as editMessageReplyMarkupTelegram, it as readJsonFileWithFallback, j as describeReplyTarget, k as buildTelegramThreadParams, l as sendStickerTelegram, m as isSafeToRetrySendError, n as createForumTopicTelegram, nt as removeChannelAllowFromStoreEntry, o as reactMessageTelegram, ot as getPairingAdapter, p as isRecoverableTelegramNetworkError, q as resolveSenderAllowMatch$1, r as deleteMessageTelegram, rt as upsertChannelPairingRequest, s as sendMessageTelegram, st as listPairingChannels, t as buildInlineKeyboard, tt as readChannelAllowFromStore, u as sendTypingTelegram, v as wrapFileReferencesInHtml, w as buildSenderLabel, x as loadCronStore, y as splitTelegramCaption, z as resolveTelegramGroupAllowFromContext } from "./send-V1MRV7QF.js";
|
|
18
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-D-r5y7kV.js";
|
|
19
|
+
import { C as isMinimaxVlmModel, E as ensureOpenClawModelsJson, S as extractTextFromChatContent, T as minimaxUnderstandImage, _ as formatToolSummary, a as resolveProviderVisionModelFromConfig, b as findCodeRegions, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as resolveToolDisplay, w as isMinimaxVlmProvider, x as isInsideCode, y as stripReasoningTagsFromText } from "./image-Bt49ybRv.js";
|
|
20
|
+
import { C as loadModelCatalog, S as findModelInCatalog, _ as registerUnhandledRejectionHandler, a as resolveAutoImageModel, b as normalizeAttachments, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, g as buildRandomTempFilePath, h as DEFAULT_IMAGE_MODELS, i as normalizeMediaAttachments, l as resolveConcurrency, m as CLI_OUTPUT_MAX_BUFFER, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as AUTO_IMAGE_KEY_PROVIDERS, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, w as modelSupportsVision, x as resolveAttachmentKind, y as normalizeAttachmentPath } from "./audio-transcription-runner-CQU4Eg1M.js";
|
|
21
|
+
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-CMLoICyN.js";
|
|
22
22
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Bj8qHhwJ.js";
|
|
23
|
-
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
24
|
-
import { n as makeProxyFetch } from "./proxy-fetch-
|
|
25
|
-
import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-
|
|
26
|
-
import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-
|
|
27
|
-
import { _ as isRestartEnabled, a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-
|
|
28
|
-
import { a as getRemoteSkillEligibility, c as pruneExpiredPending, i as resolveSkillCommandInvocation, l as resolvePairingPaths, n as listSkillCommandsForAgents, o as ensureSkillsWatcher, r as listSkillCommandsForWorkspace, s as getSkillsSnapshotVersion, t as listReservedChatSlashCommandNames } from "./skill-commands-
|
|
23
|
+
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-DCj3k042.js";
|
|
24
|
+
import { n as makeProxyFetch } from "./proxy-fetch-BOh1PLOW.js";
|
|
25
|
+
import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-CVtBjUiL.js";
|
|
26
|
+
import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-CeBF8Pws.js";
|
|
27
|
+
import { _ as isRestartEnabled, a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-CyLMCPuP.js";
|
|
28
|
+
import { a as getRemoteSkillEligibility, c as pruneExpiredPending, i as resolveSkillCommandInvocation, l as resolvePairingPaths, n as listSkillCommandsForAgents, o as ensureSkillsWatcher, r as listSkillCommandsForWorkspace, s as getSkillsSnapshotVersion, t as listReservedChatSlashCommandNames } from "./skill-commands-B55LOaMB.js";
|
|
29
29
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CeWULXBI.js";
|
|
30
30
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DzL3RRfj.js";
|
|
31
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
31
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-dT3cYb0e.js";
|
|
32
32
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-C-AlrR3n.js";
|
|
33
33
|
import { n as normalizePollInput, r as resolvePollMaxSelections } from "./polls-Dw-aNTWI.js";
|
|
34
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
35
|
-
import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-
|
|
36
|
-
import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-
|
|
37
|
-
import { t as resolveTelegramFetch } from "./fetch-
|
|
38
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
39
|
-
import { r as resolveMemorySearchConfig } from "./manager-
|
|
40
|
-
import { m as normalizeExtraMemoryPaths, n as isQueryStopWordToken, p as listMemoryFiles, t as extractKeywords } from "./query-expansion-
|
|
34
|
+
import { t as convertMarkdownTables } from "./tables-BAGqh2XD.js";
|
|
35
|
+
import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-EDBPXjTT.js";
|
|
36
|
+
import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-K2mAG7KC.js";
|
|
37
|
+
import { t as resolveTelegramFetch } from "./fetch-C0iyt-Iz.js";
|
|
38
|
+
import { t as getActiveWebListener } from "./active-listener-BLd27Pxd.js";
|
|
39
|
+
import { r as resolveMemorySearchConfig } from "./manager-DSfEj66R.js";
|
|
40
|
+
import { m as normalizeExtraMemoryPaths, n as isQueryStopWordToken, p as listMemoryFiles, t as extractKeywords } from "./query-expansion-BErUY8P2.js";
|
|
41
41
|
import { createRequire } from "node:module";
|
|
42
|
-
import * as fs$
|
|
42
|
+
import * as fs$1 from "node:fs/promises";
|
|
43
43
|
import fs, { appendFile, mkdir } from "node:fs/promises";
|
|
44
44
|
import os, { homedir } from "node:os";
|
|
45
45
|
import * as path$1 from "node:path";
|
|
46
46
|
import path, { isAbsolute } from "node:path";
|
|
47
|
-
import
|
|
47
|
+
import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
48
48
|
import JSON5 from "json5";
|
|
49
49
|
import { inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
50
50
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
@@ -54,7 +54,7 @@ import * as net$1 from "node:net";
|
|
|
54
54
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
55
55
|
import { Agent, EnvHttpProxyAgent, ProxyAgent, fetch as fetch$1, getGlobalDispatcher, setGlobalDispatcher } from "undici";
|
|
56
56
|
import { createServer } from "node:http";
|
|
57
|
-
import WebSocket
|
|
57
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
58
58
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
59
59
|
import { complete, completeSimple, createAssistantMessageEventStream, getApiProvider, registerApiProvider, streamSimple } from "@mariozechner/pi-ai";
|
|
60
60
|
import { EdgeTTS } from "node-edge-tts";
|
|
@@ -251,7 +251,7 @@ var LegacyContextEngine = class {
|
|
|
251
251
|
}
|
|
252
252
|
async afterTurn(_params) {}
|
|
253
253
|
async compact(params) {
|
|
254
|
-
const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-
|
|
254
|
+
const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-DGRl4st4.js");
|
|
255
255
|
const runtimeContext = params.runtimeContext ?? {};
|
|
256
256
|
const result = await compactEmbeddedPiSessionDirect({
|
|
257
257
|
...runtimeContext,
|
|
@@ -3561,7 +3561,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3561
3561
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3562
3562
|
if (workspaceDir) {
|
|
3563
3563
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3564
|
-
if (
|
|
3564
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3565
3565
|
}
|
|
3566
3566
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
3567
3567
|
cwd: params.cwd,
|
|
@@ -3570,7 +3570,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3570
3570
|
});
|
|
3571
3571
|
if (!packageRoot) return null;
|
|
3572
3572
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3573
|
-
return
|
|
3573
|
+
return syncFs.existsSync(packageDocs) ? packageDocs : null;
|
|
3574
3574
|
}
|
|
3575
3575
|
//#endregion
|
|
3576
3576
|
//#region src/agents/model-tool-support.ts
|
|
@@ -6761,7 +6761,7 @@ function resolveDefaultIdentityPath() {
|
|
|
6761
6761
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
6762
6762
|
}
|
|
6763
6763
|
function ensureDir$2(filePath) {
|
|
6764
|
-
|
|
6764
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
6765
6765
|
}
|
|
6766
6766
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
6767
6767
|
function base64UrlEncode(buf) {
|
|
@@ -6797,8 +6797,8 @@ function generateIdentity() {
|
|
|
6797
6797
|
}
|
|
6798
6798
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
6799
6799
|
try {
|
|
6800
|
-
if (
|
|
6801
|
-
const raw =
|
|
6800
|
+
if (syncFs.existsSync(filePath)) {
|
|
6801
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
6802
6802
|
const parsed = JSON.parse(raw);
|
|
6803
6803
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
6804
6804
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -6807,9 +6807,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
6807
6807
|
...parsed,
|
|
6808
6808
|
deviceId: derivedId
|
|
6809
6809
|
};
|
|
6810
|
-
|
|
6810
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
6811
6811
|
try {
|
|
6812
|
-
|
|
6812
|
+
syncFs.chmodSync(filePath, 384);
|
|
6813
6813
|
} catch {}
|
|
6814
6814
|
return {
|
|
6815
6815
|
deviceId: derivedId,
|
|
@@ -6834,9 +6834,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
6834
6834
|
privateKeyPem: identity.privateKeyPem,
|
|
6835
6835
|
createdAtMs: Date.now()
|
|
6836
6836
|
};
|
|
6837
|
-
|
|
6837
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
6838
6838
|
try {
|
|
6839
|
-
|
|
6839
|
+
syncFs.chmodSync(filePath, 384);
|
|
6840
6840
|
} catch {}
|
|
6841
6841
|
return identity;
|
|
6842
6842
|
}
|
|
@@ -7044,8 +7044,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
7044
7044
|
}
|
|
7045
7045
|
function readStore(filePath) {
|
|
7046
7046
|
try {
|
|
7047
|
-
if (!
|
|
7048
|
-
const raw =
|
|
7047
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
7048
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
7049
7049
|
const parsed = JSON.parse(raw);
|
|
7050
7050
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
7051
7051
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -7055,10 +7055,10 @@ function readStore(filePath) {
|
|
|
7055
7055
|
}
|
|
7056
7056
|
}
|
|
7057
7057
|
function writeStore(filePath, store) {
|
|
7058
|
-
|
|
7059
|
-
|
|
7058
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
7059
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
7060
7060
|
try {
|
|
7061
|
-
|
|
7061
|
+
syncFs.chmodSync(filePath, 384);
|
|
7062
7062
|
} catch {}
|
|
7063
7063
|
}
|
|
7064
7064
|
function loadDeviceAuthToken(params) {
|
|
@@ -8670,7 +8670,7 @@ var GatewayClient = class {
|
|
|
8670
8670
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8671
8671
|
});
|
|
8672
8672
|
}
|
|
8673
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
8673
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
8674
8674
|
this.ws.on("open", () => {
|
|
8675
8675
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8676
8676
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -8866,7 +8866,7 @@ var GatewayClient = class {
|
|
|
8866
8866
|
const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
|
|
8867
8867
|
if (this.connectTimer) clearTimeout(this.connectTimer);
|
|
8868
8868
|
this.connectTimer = setTimeout(() => {
|
|
8869
|
-
if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
|
|
8869
|
+
if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
|
|
8870
8870
|
this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
|
|
8871
8871
|
this.ws?.close(1008, "connect challenge timeout");
|
|
8872
8872
|
}, connectChallengeTimeoutMs);
|
|
@@ -8908,7 +8908,7 @@ var GatewayClient = class {
|
|
|
8908
8908
|
return null;
|
|
8909
8909
|
}
|
|
8910
8910
|
async request(method, params, opts) {
|
|
8911
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
8911
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
8912
8912
|
const id = randomUUID();
|
|
8913
8913
|
const frame = {
|
|
8914
8914
|
type: "req",
|
|
@@ -10432,7 +10432,7 @@ function normalizeReplyPayload(payload, opts = {}) {
|
|
|
10432
10432
|
*/
|
|
10433
10433
|
let deliverRuntimePromise$2 = null;
|
|
10434
10434
|
function loadDeliverRuntime$2() {
|
|
10435
|
-
deliverRuntimePromise$2 ??= import("./deliver-runtime-
|
|
10435
|
+
deliverRuntimePromise$2 ??= import("./deliver-runtime-CLDpY6AW.js");
|
|
10436
10436
|
return deliverRuntimePromise$2;
|
|
10437
10437
|
}
|
|
10438
10438
|
/**
|
|
@@ -11192,7 +11192,7 @@ function normalizeSessionKey$1(value) {
|
|
|
11192
11192
|
}
|
|
11193
11193
|
function readSessionStore(storePath) {
|
|
11194
11194
|
try {
|
|
11195
|
-
const raw =
|
|
11195
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
11196
11196
|
const parsed = JSON5.parse(raw);
|
|
11197
11197
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
11198
11198
|
} catch {}
|
|
@@ -11786,7 +11786,7 @@ const DEFAULT_SUBAGENT_ANNOUNCE_TIMEOUT_MS = 6e4;
|
|
|
11786
11786
|
const MAX_TIMER_SAFE_TIMEOUT_MS = 2147e6;
|
|
11787
11787
|
let subagentRegistryRuntimePromise = null;
|
|
11788
11788
|
function loadSubagentRegistryRuntime() {
|
|
11789
|
-
subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-
|
|
11789
|
+
subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-DjEYzSyM.js");
|
|
11790
11790
|
return subagentRegistryRuntimePromise;
|
|
11791
11791
|
}
|
|
11792
11792
|
const DIRECT_ANNOUNCE_TRANSIENT_RETRY_DELAYS_MS = FAST_TEST_MODE ? [
|
|
@@ -15374,7 +15374,7 @@ async function runWithConcurrency(tasks, limit) {
|
|
|
15374
15374
|
//#region src/media-understanding/echo-transcript.ts
|
|
15375
15375
|
let deliverRuntimePromise$1 = null;
|
|
15376
15376
|
function loadDeliverRuntime$1() {
|
|
15377
|
-
deliverRuntimePromise$1 ??= import("./deliver-runtime-
|
|
15377
|
+
deliverRuntimePromise$1 ??= import("./deliver-runtime-CLDpY6AW.js");
|
|
15378
15378
|
return deliverRuntimePromise$1;
|
|
15379
15379
|
}
|
|
15380
15380
|
function formatEchoTranscript(transcript, format) {
|
|
@@ -20952,7 +20952,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
20952
20952
|
}
|
|
20953
20953
|
function ensureDir$1(filePath) {
|
|
20954
20954
|
const dir = path.dirname(filePath);
|
|
20955
|
-
|
|
20955
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
20956
20956
|
}
|
|
20957
20957
|
function coerceAllowlistEntries(allowlist) {
|
|
20958
20958
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -21022,11 +21022,11 @@ function generateToken() {
|
|
|
21022
21022
|
function loadExecApprovals() {
|
|
21023
21023
|
const filePath = resolveExecApprovalsPath();
|
|
21024
21024
|
try {
|
|
21025
|
-
if (!
|
|
21025
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
21026
21026
|
version: 1,
|
|
21027
21027
|
agents: {}
|
|
21028
21028
|
});
|
|
21029
|
-
const raw =
|
|
21029
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
21030
21030
|
const parsed = JSON.parse(raw);
|
|
21031
21031
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
21032
21032
|
version: 1,
|
|
@@ -21043,9 +21043,9 @@ function loadExecApprovals() {
|
|
|
21043
21043
|
function saveExecApprovals(file) {
|
|
21044
21044
|
const filePath = resolveExecApprovalsPath();
|
|
21045
21045
|
ensureDir$1(filePath);
|
|
21046
|
-
|
|
21046
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
21047
21047
|
try {
|
|
21048
|
-
|
|
21048
|
+
syncFs.chmodSync(filePath, 384);
|
|
21049
21049
|
} catch {}
|
|
21050
21050
|
}
|
|
21051
21051
|
function ensureExecApprovals() {
|
|
@@ -21536,18 +21536,18 @@ function applyPathPrepend(env, prepend, options) {
|
|
|
21536
21536
|
function resolvePowerShellPath() {
|
|
21537
21537
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
21538
21538
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
21539
|
-
if (
|
|
21539
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
21540
21540
|
const programW6432 = process.env.ProgramW6432;
|
|
21541
21541
|
if (programW6432 && programW6432 !== programFiles) {
|
|
21542
21542
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
21543
|
-
if (
|
|
21543
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
21544
21544
|
}
|
|
21545
21545
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
21546
21546
|
if (pwshInPath) return pwshInPath;
|
|
21547
21547
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
21548
21548
|
if (systemRoot) {
|
|
21549
21549
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
21550
|
-
if (
|
|
21550
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
21551
21551
|
}
|
|
21552
21552
|
return "powershell.exe";
|
|
21553
21553
|
}
|
|
@@ -21585,7 +21585,7 @@ function resolveShellFromPath(name) {
|
|
|
21585
21585
|
for (const entry of entries) {
|
|
21586
21586
|
const candidate = path.join(entry, name);
|
|
21587
21587
|
try {
|
|
21588
|
-
|
|
21588
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
21589
21589
|
return candidate;
|
|
21590
21590
|
} catch {}
|
|
21591
21591
|
}
|
|
@@ -25098,7 +25098,7 @@ function ensureContextWindowCacheLoaded() {
|
|
|
25098
25098
|
await ensureOpenClawModelsJson(cfg);
|
|
25099
25099
|
} catch {}
|
|
25100
25100
|
try {
|
|
25101
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-
|
|
25101
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-D-r5y7kV.js").then((n) => n.r);
|
|
25102
25102
|
const agentDir = resolveOpenClawAgentDir();
|
|
25103
25103
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
25104
25104
|
applyDiscoveredContextWindows({
|
|
@@ -25249,7 +25249,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
25249
25249
|
function hasGitMarker(repoRoot) {
|
|
25250
25250
|
const gitPath = path.join(repoRoot, ".git");
|
|
25251
25251
|
try {
|
|
25252
|
-
const stat =
|
|
25252
|
+
const stat = syncFs.statSync(gitPath);
|
|
25253
25253
|
return stat.isDirectory() || stat.isFile();
|
|
25254
25254
|
} catch {
|
|
25255
25255
|
return false;
|
|
@@ -25261,10 +25261,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
25261
25261
|
function resolveGitDirFromMarker(repoRoot) {
|
|
25262
25262
|
const gitPath = path.join(repoRoot, ".git");
|
|
25263
25263
|
try {
|
|
25264
|
-
const stat =
|
|
25264
|
+
const stat = syncFs.statSync(gitPath);
|
|
25265
25265
|
if (stat.isDirectory()) return gitPath;
|
|
25266
25266
|
if (!stat.isFile()) return null;
|
|
25267
|
-
const match =
|
|
25267
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
25268
25268
|
if (!match?.[1]) return null;
|
|
25269
25269
|
return path.resolve(repoRoot, match[1].trim());
|
|
25270
25270
|
} catch {
|
|
@@ -25302,13 +25302,13 @@ const resolveCommitSearchDir = (options) => {
|
|
|
25302
25302
|
};
|
|
25303
25303
|
/** Read at most `limit` bytes from a file to avoid unbounded reads. */
|
|
25304
25304
|
const safeReadFilePrefix = (filePath, limit = 256) => {
|
|
25305
|
-
const fd =
|
|
25305
|
+
const fd = syncFs.openSync(filePath, "r");
|
|
25306
25306
|
try {
|
|
25307
25307
|
const buf = Buffer.alloc(limit);
|
|
25308
|
-
const bytesRead =
|
|
25308
|
+
const bytesRead = syncFs.readSync(fd, buf, 0, limit, 0);
|
|
25309
25309
|
return buf.subarray(0, bytesRead).toString("utf-8");
|
|
25310
25310
|
} finally {
|
|
25311
|
-
|
|
25311
|
+
syncFs.closeSync(fd);
|
|
25312
25312
|
}
|
|
25313
25313
|
};
|
|
25314
25314
|
const cacheGitCommit = (searchDir, commit) => {
|
|
@@ -25324,7 +25324,7 @@ const resolveGitLookupDepth = (searchDir, packageRoot) => {
|
|
|
25324
25324
|
const readCommitFromGit = (searchDir, packageRoot) => {
|
|
25325
25325
|
const headPath = resolveGitHeadPath(searchDir, { maxDepth: resolveGitLookupDepth(searchDir, packageRoot) });
|
|
25326
25326
|
if (!headPath) return;
|
|
25327
|
-
const head =
|
|
25327
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
25328
25328
|
if (!head) return null;
|
|
25329
25329
|
if (head.startsWith("ref:")) {
|
|
25330
25330
|
const refPath = resolveRefPath(headPath, head.replace(/^ref:\s*/i, "").trim());
|
|
@@ -25651,17 +25651,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
25651
25651
|
} catch {
|
|
25652
25652
|
return;
|
|
25653
25653
|
}
|
|
25654
|
-
if (!
|
|
25654
|
+
if (!syncFs.existsSync(logPath)) return;
|
|
25655
25655
|
try {
|
|
25656
25656
|
const TAIL_BYTES = 8192;
|
|
25657
|
-
const stat =
|
|
25657
|
+
const stat = syncFs.statSync(logPath);
|
|
25658
25658
|
const offset = Math.max(0, stat.size - TAIL_BYTES);
|
|
25659
25659
|
const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
|
|
25660
|
-
const fd =
|
|
25660
|
+
const fd = syncFs.openSync(logPath, "r");
|
|
25661
25661
|
try {
|
|
25662
|
-
|
|
25662
|
+
syncFs.readSync(fd, buf, 0, buf.length, offset);
|
|
25663
25663
|
} finally {
|
|
25664
|
-
|
|
25664
|
+
syncFs.closeSync(fd);
|
|
25665
25665
|
}
|
|
25666
25666
|
const tail = buf.toString("utf-8");
|
|
25667
25667
|
const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
|
|
@@ -27280,7 +27280,7 @@ function resolveRepoRoot(params) {
|
|
|
27280
27280
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
27281
27281
|
if (configured) try {
|
|
27282
27282
|
const resolved = path.resolve(configured);
|
|
27283
|
-
if (
|
|
27283
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
27284
27284
|
} catch {}
|
|
27285
27285
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
27286
27286
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -28076,7 +28076,7 @@ async function buildContextReply(params) {
|
|
|
28076
28076
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
28077
28077
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
28078
28078
|
function loadTemplate(fileName) {
|
|
28079
|
-
return
|
|
28079
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
28080
28080
|
}
|
|
28081
28081
|
function generateHtml(sessionData) {
|
|
28082
28082
|
const template = loadTemplate("template.html");
|
|
@@ -28150,7 +28150,7 @@ async function buildExportSessionReply(params) {
|
|
|
28150
28150
|
} catch (err) {
|
|
28151
28151
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
28152
28152
|
}
|
|
28153
|
-
if (!
|
|
28153
|
+
if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
28154
28154
|
const sessionManager = SessionManager.open(sessionFile);
|
|
28155
28155
|
const entries = sessionManager.getEntries();
|
|
28156
28156
|
const header = sessionManager.getHeader();
|
|
@@ -28171,8 +28171,8 @@ async function buildExportSessionReply(params) {
|
|
|
28171
28171
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
28172
28172
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
28173
28173
|
const outputDir = path.dirname(outputPath);
|
|
28174
|
-
if (!
|
|
28175
|
-
|
|
28174
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
28175
|
+
syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
28176
28176
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
28177
28177
|
return { text: [
|
|
28178
28178
|
"✅ Session exported!",
|
|
@@ -28312,8 +28312,8 @@ function resolveZaiApiKey() {
|
|
|
28312
28312
|
}
|
|
28313
28313
|
try {
|
|
28314
28314
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
28315
|
-
if (!
|
|
28316
|
-
const data = JSON.parse(
|
|
28315
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
28316
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
28317
28317
|
return data["z-ai"]?.access || data.zai?.access;
|
|
28318
28318
|
} catch {
|
|
28319
28319
|
return;
|
|
@@ -30092,7 +30092,7 @@ function shouldPersistAnyBindingState() {
|
|
|
30092
30092
|
}
|
|
30093
30093
|
function shouldPersistBindingMutations() {
|
|
30094
30094
|
if (shouldPersistAnyBindingState()) return true;
|
|
30095
|
-
return
|
|
30095
|
+
return syncFs.existsSync(resolveThreadBindingsPath());
|
|
30096
30096
|
}
|
|
30097
30097
|
function saveBindingsToDisk(params = {}) {
|
|
30098
30098
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -31167,7 +31167,7 @@ function relaunchGatewayScheduledTask(env = process.env) {
|
|
|
31167
31167
|
const scriptPath = path.join(resolvePreferredOpenClawTmpDir(), `openclaw-schtasks-restart-${randomUUID()}.cmd`);
|
|
31168
31168
|
const quotedScriptPath = quoteCmdScriptArg(scriptPath);
|
|
31169
31169
|
try {
|
|
31170
|
-
|
|
31170
|
+
syncFs.writeFileSync(scriptPath, `${buildScheduledTaskRestartScript(taskName)}\r\n`, "utf8");
|
|
31171
31171
|
spawn("cmd.exe", [
|
|
31172
31172
|
"/d",
|
|
31173
31173
|
"/s",
|
|
@@ -31185,7 +31185,7 @@ function relaunchGatewayScheduledTask(env = process.env) {
|
|
|
31185
31185
|
};
|
|
31186
31186
|
} catch (err) {
|
|
31187
31187
|
try {
|
|
31188
|
-
|
|
31188
|
+
syncFs.unlinkSync(scriptPath);
|
|
31189
31189
|
} catch {}
|
|
31190
31190
|
return {
|
|
31191
31191
|
ok: false,
|
|
@@ -31571,7 +31571,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
31571
31571
|
totals.totalCost += costTotal;
|
|
31572
31572
|
};
|
|
31573
31573
|
async function* readJsonlRecords(filePath) {
|
|
31574
|
-
const fileStream =
|
|
31574
|
+
const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
|
|
31575
31575
|
const rl = readline.createInterface({
|
|
31576
31576
|
input: fileStream,
|
|
31577
31577
|
crlfDelay: Infinity
|
|
@@ -31643,10 +31643,10 @@ async function loadCostUsageSummary(params) {
|
|
|
31643
31643
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
31644
31644
|
const totals = emptyTotals();
|
|
31645
31645
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
31646
|
-
const entries = await
|
|
31646
|
+
const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
31647
31647
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
31648
31648
|
const filePath = path.join(sessionsDir, entry.name);
|
|
31649
|
-
const stats = await
|
|
31649
|
+
const stats = await syncFs.promises.stat(filePath).catch(() => null);
|
|
31650
31650
|
if (!stats) return null;
|
|
31651
31651
|
if (stats.mtimeMs < sinceTime) return null;
|
|
31652
31652
|
return filePath;
|
|
@@ -31679,7 +31679,7 @@ async function loadCostUsageSummary(params) {
|
|
|
31679
31679
|
}
|
|
31680
31680
|
async function loadSessionCostSummary(params) {
|
|
31681
31681
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
31682
|
-
if (!sessionFile || !
|
|
31682
|
+
if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
|
|
31683
31683
|
const totals = emptyTotals();
|
|
31684
31684
|
let firstActivity;
|
|
31685
31685
|
let lastActivity;
|
|
@@ -31960,7 +31960,7 @@ function summarizeLifecycleForLog(record, defaults) {
|
|
|
31960
31960
|
function loadBindingsFromDisk(accountId) {
|
|
31961
31961
|
const filePath = resolveBindingsPath(accountId);
|
|
31962
31962
|
try {
|
|
31963
|
-
const raw =
|
|
31963
|
+
const raw = syncFs.readFileSync(filePath, "utf-8");
|
|
31964
31964
|
const parsed = JSON.parse(raw);
|
|
31965
31965
|
if (parsed?.version !== STORE_VERSION$1 || !Array.isArray(parsed.bindings)) return [];
|
|
31966
31966
|
const bindings = [];
|
|
@@ -34852,7 +34852,7 @@ async function createModelSelectionState(params) {
|
|
|
34852
34852
|
}
|
|
34853
34853
|
}
|
|
34854
34854
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
34855
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
34855
|
+
const { ensureAuthProfileStore } = await import("./model-selection-CMEj8bpy.js").then((n) => n.P);
|
|
34856
34856
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
34857
34857
|
const providerKey = normalizeProviderId(provider);
|
|
34858
34858
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -41368,7 +41368,7 @@ function asBoolean(value) {
|
|
|
41368
41368
|
}
|
|
41369
41369
|
function resolveTempPathParts(opts) {
|
|
41370
41370
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
41371
|
-
if (!opts.tmpDir)
|
|
41371
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
41372
41372
|
recursive: true,
|
|
41373
41373
|
mode: 448
|
|
41374
41374
|
});
|
|
@@ -41453,7 +41453,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
41453
41453
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
41454
41454
|
const body = res.body;
|
|
41455
41455
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
41456
|
-
const fileHandle = await fs$
|
|
41456
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
41457
41457
|
let thrown;
|
|
41458
41458
|
try {
|
|
41459
41459
|
const reader = body.getReader();
|
|
@@ -41471,7 +41471,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
41471
41471
|
await fileHandle.close();
|
|
41472
41472
|
}
|
|
41473
41473
|
if (thrown) {
|
|
41474
|
-
await fs$
|
|
41474
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
41475
41475
|
throw thrown;
|
|
41476
41476
|
}
|
|
41477
41477
|
} finally {
|
|
@@ -41484,7 +41484,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
41484
41484
|
}
|
|
41485
41485
|
async function writeBase64ToFile(filePath, base64) {
|
|
41486
41486
|
const buf = Buffer.from(base64, "base64");
|
|
41487
|
-
await fs$
|
|
41487
|
+
await fs$1.writeFile(filePath, buf);
|
|
41488
41488
|
return {
|
|
41489
41489
|
path: filePath,
|
|
41490
41490
|
bytes: buf.length
|
|
@@ -44792,9 +44792,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
44792
44792
|
const entries = [];
|
|
44793
44793
|
for (const rawPath of paths) {
|
|
44794
44794
|
const resolved = resolveUserPath(rawPath);
|
|
44795
|
-
if (!
|
|
44795
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
44796
44796
|
try {
|
|
44797
|
-
const payload = JSON.parse(
|
|
44797
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
44798
44798
|
entries.push(...parseCatalogEntries(payload));
|
|
44799
44799
|
} catch {}
|
|
44800
44800
|
}
|
|
@@ -48606,7 +48606,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
48606
48606
|
const root = resolveStateDir();
|
|
48607
48607
|
const agentsDir = path.join(root, "agents");
|
|
48608
48608
|
try {
|
|
48609
|
-
return
|
|
48609
|
+
return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
48610
48610
|
} catch {
|
|
48611
48611
|
return [];
|
|
48612
48612
|
}
|
|
@@ -54915,7 +54915,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
54915
54915
|
if (corruptedSessionId) {
|
|
54916
54916
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
54917
54917
|
try {
|
|
54918
|
-
|
|
54918
|
+
syncFs.unlinkSync(transcriptPath);
|
|
54919
54919
|
} catch {}
|
|
54920
54920
|
}
|
|
54921
54921
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -55751,7 +55751,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
55751
55751
|
if (!logPath) return {};
|
|
55752
55752
|
const snapshot = {};
|
|
55753
55753
|
if (params.includeByteSize) try {
|
|
55754
|
-
const stat = await
|
|
55754
|
+
const stat = await syncFs.promises.stat(logPath);
|
|
55755
55755
|
const size = Math.floor(stat.size);
|
|
55756
55756
|
snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
|
|
55757
55757
|
} catch {
|
|
@@ -55765,7 +55765,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
55765
55765
|
return snapshot;
|
|
55766
55766
|
}
|
|
55767
55767
|
async function readLastNonzeroUsageFromSessionLog(logPath) {
|
|
55768
|
-
const handle = await
|
|
55768
|
+
const handle = await syncFs.promises.open(logPath, "r");
|
|
55769
55769
|
try {
|
|
55770
55770
|
let position = (await handle.stat()).size;
|
|
55771
55771
|
let leadingPartial = "";
|
|
@@ -56546,9 +56546,9 @@ async function readPostCompactionContext(workspaceDir, cfg, nowMs) {
|
|
|
56546
56546
|
if (!opened.ok) return null;
|
|
56547
56547
|
const content = (() => {
|
|
56548
56548
|
try {
|
|
56549
|
-
return
|
|
56549
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
56550
56550
|
} finally {
|
|
56551
|
-
|
|
56551
|
+
syncFs.closeSync(opened.fd);
|
|
56552
56552
|
}
|
|
56553
56553
|
})();
|
|
56554
56554
|
const configuredSections = cfg?.agents?.defaults?.compaction?.postCompactionSections;
|
|
@@ -56783,7 +56783,7 @@ async function runReplyAgent(params) {
|
|
|
56783
56783
|
if (resolved) transcriptCandidates.add(resolved);
|
|
56784
56784
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
56785
56785
|
for (const candidate of transcriptCandidates) try {
|
|
56786
|
-
|
|
56786
|
+
syncFs.unlinkSync(candidate);
|
|
56787
56787
|
} catch {}
|
|
56788
56788
|
}
|
|
56789
56789
|
return true;
|
|
@@ -57723,7 +57723,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
|
|
|
57723
57723
|
const log$11 = createSubsystemLogger("session-maintenance-warning");
|
|
57724
57724
|
let deliverRuntimePromise = null;
|
|
57725
57725
|
function loadDeliverRuntime() {
|
|
57726
|
-
deliverRuntimePromise ??= import("./deliver-runtime-
|
|
57726
|
+
deliverRuntimePromise ??= import("./deliver-runtime-CLDpY6AW.js");
|
|
57727
57727
|
return deliverRuntimePromise;
|
|
57728
57728
|
}
|
|
57729
57729
|
function shouldSendWarning() {
|
|
@@ -57907,7 +57907,7 @@ function forkSessionFromParent(params) {
|
|
|
57907
57907
|
agentId: params.agentId,
|
|
57908
57908
|
sessionsDir: params.sessionsDir
|
|
57909
57909
|
});
|
|
57910
|
-
if (!parentSessionFile || !
|
|
57910
|
+
if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
|
|
57911
57911
|
try {
|
|
57912
57912
|
const manager = SessionManager.open(parentSessionFile);
|
|
57913
57913
|
const leafId = manager.getLeafId();
|
|
@@ -57931,7 +57931,7 @@ function forkSessionFromParent(params) {
|
|
|
57931
57931
|
cwd: manager.getCwd(),
|
|
57932
57932
|
parentSession: parentSessionFile
|
|
57933
57933
|
};
|
|
57934
|
-
|
|
57934
|
+
syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
57935
57935
|
return {
|
|
57936
57936
|
sessionId,
|
|
57937
57937
|
sessionFile
|
|
@@ -62782,7 +62782,7 @@ function getCacheStats() {
|
|
|
62782
62782
|
const STICKER_DESCRIPTION_PROMPT = "Describe this sticker image in 1-2 sentences. Focus on what the sticker depicts (character, object, action, emotion). Be concise and objective.";
|
|
62783
62783
|
let imageRuntimePromise = null;
|
|
62784
62784
|
function loadImageRuntime() {
|
|
62785
|
-
imageRuntimePromise ??= import("./image-runtime-
|
|
62785
|
+
imageRuntimePromise ??= import("./image-runtime-Cilhq73U.js");
|
|
62786
62786
|
return imageRuntimePromise;
|
|
62787
62787
|
}
|
|
62788
62788
|
/**
|
|
@@ -65555,7 +65555,7 @@ function identityHasValues(identity) {
|
|
|
65555
65555
|
}
|
|
65556
65556
|
function loadIdentityFromFile(identityPath) {
|
|
65557
65557
|
try {
|
|
65558
|
-
const parsed = parseIdentityMarkdown(
|
|
65558
|
+
const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
|
|
65559
65559
|
if (!identityHasValues(parsed)) return null;
|
|
65560
65560
|
return parsed;
|
|
65561
65561
|
} catch {
|
|
@@ -65578,7 +65578,7 @@ function resolveAvatarSource(cfg, agentId) {
|
|
|
65578
65578
|
}
|
|
65579
65579
|
function resolveExistingPath(value) {
|
|
65580
65580
|
try {
|
|
65581
|
-
return
|
|
65581
|
+
return syncFs.realpathSync(value);
|
|
65582
65582
|
} catch {
|
|
65583
65583
|
return path.resolve(value);
|
|
65584
65584
|
}
|
|
@@ -65596,7 +65596,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
65596
65596
|
reason: "unsupported_extension"
|
|
65597
65597
|
};
|
|
65598
65598
|
try {
|
|
65599
|
-
const stat =
|
|
65599
|
+
const stat = syncFs.statSync(realPath);
|
|
65600
65600
|
if (!stat.isFile()) return {
|
|
65601
65601
|
ok: false,
|
|
65602
65602
|
reason: "missing"
|
|
@@ -66950,7 +66950,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
66950
66950
|
hasTypedText
|
|
66951
66951
|
};
|
|
66952
66952
|
try {
|
|
66953
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66953
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-eV5m9mMp.js");
|
|
66954
66954
|
if (params.abortSignal?.aborted) return {
|
|
66955
66955
|
hasAudioAttachment,
|
|
66956
66956
|
hasTypedText
|
|
@@ -70521,27 +70521,27 @@ let slackSenderRuntimePromise = null;
|
|
|
70521
70521
|
let signalSenderRuntimePromise = null;
|
|
70522
70522
|
let imessageSenderRuntimePromise = null;
|
|
70523
70523
|
function loadWhatsAppSenderRuntime() {
|
|
70524
|
-
whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-
|
|
70524
|
+
whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-B1KJ7YOp.js");
|
|
70525
70525
|
return whatsappSenderRuntimePromise;
|
|
70526
70526
|
}
|
|
70527
70527
|
function loadTelegramSenderRuntime() {
|
|
70528
|
-
telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-
|
|
70528
|
+
telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-CEWc7ePn.js");
|
|
70529
70529
|
return telegramSenderRuntimePromise;
|
|
70530
70530
|
}
|
|
70531
70531
|
function loadDiscordSenderRuntime() {
|
|
70532
|
-
discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-
|
|
70532
|
+
discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-CxADlame.js");
|
|
70533
70533
|
return discordSenderRuntimePromise;
|
|
70534
70534
|
}
|
|
70535
70535
|
function loadSlackSenderRuntime() {
|
|
70536
|
-
slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-
|
|
70536
|
+
slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-CgX24hgT.js");
|
|
70537
70537
|
return slackSenderRuntimePromise;
|
|
70538
70538
|
}
|
|
70539
70539
|
function loadSignalSenderRuntime() {
|
|
70540
|
-
signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-
|
|
70540
|
+
signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-BDtzvsnR.js");
|
|
70541
70541
|
return signalSenderRuntimePromise;
|
|
70542
70542
|
}
|
|
70543
70543
|
function loadIMessageSenderRuntime() {
|
|
70544
|
-
imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-
|
|
70544
|
+
imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-Wi79xm6H.js");
|
|
70545
70545
|
return imessageSenderRuntimePromise;
|
|
70546
70546
|
}
|
|
70547
70547
|
function createDefaultDeps() {
|
|
@@ -74448,7 +74448,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
74448
74448
|
return super.registerClient(client);
|
|
74449
74449
|
}
|
|
74450
74450
|
createWebSocket(url) {
|
|
74451
|
-
return new WebSocket
|
|
74451
|
+
return new WebSocket(url, { agent: wsAgent });
|
|
74452
74452
|
}
|
|
74453
74453
|
}
|
|
74454
74454
|
return new ProxyGatewayPlugin();
|
|
@@ -77077,7 +77077,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
77077
77077
|
function readFileIfExists(filePath) {
|
|
77078
77078
|
if (!filePath) return;
|
|
77079
77079
|
try {
|
|
77080
|
-
return
|
|
77080
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
77081
77081
|
} catch {
|
|
77082
77082
|
return;
|
|
77083
77083
|
}
|
|
@@ -77720,7 +77720,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
77720
77720
|
prefix: "line-media",
|
|
77721
77721
|
extension: getExtensionForContentType(contentType)
|
|
77722
77722
|
});
|
|
77723
|
-
await
|
|
77723
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
77724
77724
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
77725
77725
|
return {
|
|
77726
77726
|
path: filePath,
|
|
@@ -83794,15 +83794,15 @@ let slashCommandsRuntimePromise = null;
|
|
|
83794
83794
|
let slashDispatchRuntimePromise = null;
|
|
83795
83795
|
let slashSkillCommandsRuntimePromise = null;
|
|
83796
83796
|
function loadSlashCommandsRuntime() {
|
|
83797
|
-
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-
|
|
83797
|
+
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-BchS0VkW.js");
|
|
83798
83798
|
return slashCommandsRuntimePromise;
|
|
83799
83799
|
}
|
|
83800
83800
|
function loadSlashDispatchRuntime() {
|
|
83801
|
-
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-
|
|
83801
|
+
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-BIKRY3fr.js");
|
|
83802
83802
|
return slashDispatchRuntimePromise;
|
|
83803
83803
|
}
|
|
83804
83804
|
function loadSlashSkillCommandsRuntime() {
|
|
83805
|
-
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-
|
|
83805
|
+
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-BP4jBHU9.js");
|
|
83806
83806
|
return slashSkillCommandsRuntimePromise;
|
|
83807
83807
|
}
|
|
83808
83808
|
const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
|
|
@@ -84818,7 +84818,7 @@ function collectTelegramUnmentionedGroupIds(groups) {
|
|
|
84818
84818
|
}
|
|
84819
84819
|
let auditMembershipRuntimePromise = null;
|
|
84820
84820
|
function loadAuditMembershipRuntime() {
|
|
84821
|
-
auditMembershipRuntimePromise ??= import("./audit-membership-runtime-
|
|
84821
|
+
auditMembershipRuntimePromise ??= import("./audit-membership-runtime-hXUuer4x.js");
|
|
84822
84822
|
return auditMembershipRuntimePromise;
|
|
84823
84823
|
}
|
|
84824
84824
|
async function auditTelegramGroupMembership(params) {
|
|
@@ -87308,7 +87308,7 @@ async function resolveTelegramInboundBody(params) {
|
|
|
87308
87308
|
const disableAudioPreflight = (topicConfig?.disableAudioPreflight ?? groupConfig?.disableAudioPreflight) === true;
|
|
87309
87309
|
let preflightTranscript;
|
|
87310
87310
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
|
|
87311
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
87311
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-eV5m9mMp.js");
|
|
87312
87312
|
preflightTranscript = await transcribeFirstAudio({
|
|
87313
87313
|
ctx: {
|
|
87314
87314
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -90974,7 +90974,7 @@ function createWhatsAppLoginTool() {
|
|
|
90974
90974
|
force: Type.Optional(Type.Boolean())
|
|
90975
90975
|
}),
|
|
90976
90976
|
execute: async (_toolCallId, args) => {
|
|
90977
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
90977
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-ClBxstxZ.js");
|
|
90978
90978
|
if ((args?.action ?? "start") === "wait") {
|
|
90979
90979
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
90980
90980
|
return {
|
|
@@ -91048,23 +91048,23 @@ let webOutboundPromise = null;
|
|
|
91048
91048
|
let webLoginPromise = null;
|
|
91049
91049
|
let whatsappActionsPromise = null;
|
|
91050
91050
|
function loadWebOutbound() {
|
|
91051
|
-
webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-
|
|
91051
|
+
webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-yiy6jzKk.js");
|
|
91052
91052
|
return webOutboundPromise;
|
|
91053
91053
|
}
|
|
91054
91054
|
function loadWebLogin() {
|
|
91055
|
-
webLoginPromise ??= import("./runtime-whatsapp-login.runtime-
|
|
91055
|
+
webLoginPromise ??= import("./runtime-whatsapp-login.runtime-ChqE9BkX.js");
|
|
91056
91056
|
return webLoginPromise;
|
|
91057
91057
|
}
|
|
91058
91058
|
function loadWebLoginQr() {
|
|
91059
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
91059
|
+
webLoginQrPromise ??= import("./login-qr-ClBxstxZ.js");
|
|
91060
91060
|
return webLoginQrPromise;
|
|
91061
91061
|
}
|
|
91062
91062
|
function loadWebChannel() {
|
|
91063
|
-
webChannelPromise ??= import("./web-
|
|
91063
|
+
webChannelPromise ??= import("./web-BRSmQdtm.js");
|
|
91064
91064
|
return webChannelPromise;
|
|
91065
91065
|
}
|
|
91066
91066
|
function loadWhatsAppActions() {
|
|
91067
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
91067
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-Dxb2K2Xh.js");
|
|
91068
91068
|
return whatsappActionsPromise;
|
|
91069
91069
|
}
|
|
91070
91070
|
function createRuntimeWhatsApp() {
|
|
@@ -91499,7 +91499,7 @@ const log$6 = createSubsystemLogger("memory");
|
|
|
91499
91499
|
const QMD_MANAGER_CACHE = /* @__PURE__ */ new Map();
|
|
91500
91500
|
let managerRuntimePromise = null;
|
|
91501
91501
|
function loadManagerRuntime() {
|
|
91502
|
-
managerRuntimePromise ??= import("./manager-runtime-
|
|
91502
|
+
managerRuntimePromise ??= import("./manager-runtime-BrZlGJsj.js");
|
|
91503
91503
|
return managerRuntimePromise;
|
|
91504
91504
|
}
|
|
91505
91505
|
async function getMemorySearchManager(params) {
|
|
@@ -91513,7 +91513,7 @@ async function getMemorySearchManager(params) {
|
|
|
91513
91513
|
if (cached) return { manager: cached };
|
|
91514
91514
|
}
|
|
91515
91515
|
try {
|
|
91516
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
91516
|
+
const { QmdMemoryManager } = await import("./qmd-manager-DEscZz5_.js");
|
|
91517
91517
|
const primary = await QmdMemoryManager.create({
|
|
91518
91518
|
cfg: params.cfg,
|
|
91519
91519
|
agentId: params.agentId,
|
|
@@ -92081,7 +92081,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
92081
92081
|
}
|
|
92082
92082
|
async function checkReadableFile(pathname) {
|
|
92083
92083
|
try {
|
|
92084
|
-
await fs.access(pathname,
|
|
92084
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
92085
92085
|
return { exists: true };
|
|
92086
92086
|
} catch (err) {
|
|
92087
92087
|
const code = err.code;
|
|
@@ -92140,7 +92140,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
92140
92140
|
}
|
|
92141
92141
|
let dirReadable = null;
|
|
92142
92142
|
try {
|
|
92143
|
-
await fs.access(memoryDir,
|
|
92143
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
92144
92144
|
dirReadable = true;
|
|
92145
92145
|
} catch (err) {
|
|
92146
92146
|
const code = err.code;
|
|
@@ -92630,7 +92630,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
92630
92630
|
srcFile: params.srcFile,
|
|
92631
92631
|
distFile: params.distFile,
|
|
92632
92632
|
modulePath
|
|
92633
|
-
})) if (
|
|
92633
|
+
})) if (syncFs.existsSync(candidate)) return candidate;
|
|
92634
92634
|
} catch {}
|
|
92635
92635
|
return null;
|
|
92636
92636
|
};
|
|
@@ -92646,7 +92646,7 @@ function listPluginSdkExportedSubpaths(params = {}) {
|
|
|
92646
92646
|
const cached = cachedPluginSdkExportedSubpaths.get(packageRoot);
|
|
92647
92647
|
if (cached) return cached;
|
|
92648
92648
|
try {
|
|
92649
|
-
const pkgRaw =
|
|
92649
|
+
const pkgRaw = syncFs.readFileSync(path.join(packageRoot, "package.json"), "utf-8");
|
|
92650
92650
|
const pkg = JSON.parse(pkgRaw);
|
|
92651
92651
|
const subpaths = Object.keys(pkg.exports ?? {}).filter((key) => key.startsWith("./plugin-sdk/")).map((key) => key.slice(13)).filter((subpath) => Boolean(subpath) && !subpath.includes("/")).toSorted();
|
|
92652
92652
|
cachedPluginSdkExportedSubpaths.set(packageRoot, subpaths);
|
|
@@ -93034,7 +93034,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
93034
93034
|
continue;
|
|
93035
93035
|
}
|
|
93036
93036
|
const safeSource = opened.path;
|
|
93037
|
-
|
|
93037
|
+
syncFs.closeSync(opened.fd);
|
|
93038
93038
|
let mod = null;
|
|
93039
93039
|
try {
|
|
93040
93040
|
mod = getJiti()(safeSource);
|
|
@@ -93153,7 +93153,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
93153
93153
|
}
|
|
93154
93154
|
function safeRealpathOrResolve(value) {
|
|
93155
93155
|
try {
|
|
93156
|
-
return
|
|
93156
|
+
return syncFs.realpathSync(value);
|
|
93157
93157
|
} catch {
|
|
93158
93158
|
return path.resolve(value);
|
|
93159
93159
|
}
|
|
@@ -93513,9 +93513,9 @@ function resolvePatchFileOps(options) {
|
|
|
93513
93513
|
});
|
|
93514
93514
|
assertBoundaryRead(opened, filePath);
|
|
93515
93515
|
try {
|
|
93516
|
-
return
|
|
93516
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
93517
93517
|
} finally {
|
|
93518
|
-
|
|
93518
|
+
syncFs.closeSync(opened.fd);
|
|
93519
93519
|
}
|
|
93520
93520
|
},
|
|
93521
93521
|
writeFile: async (filePath, content) => {
|
|
@@ -93792,7 +93792,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
|
|
|
93792
93792
|
const MAX_LOOP_WARNING_KEYS = 256;
|
|
93793
93793
|
let beforeToolCallRuntimePromise = null;
|
|
93794
93794
|
function loadBeforeToolCallRuntime() {
|
|
93795
|
-
beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-
|
|
93795
|
+
beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-DagGpfw0.js");
|
|
93796
93796
|
return beforeToolCallRuntimePromise;
|
|
93797
93797
|
}
|
|
93798
93798
|
function buildAdjustedParamsKey(params) {
|
|
@@ -96795,9 +96795,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
96795
96795
|
if (!opened.ok) return "";
|
|
96796
96796
|
const content = (() => {
|
|
96797
96797
|
try {
|
|
96798
|
-
return
|
|
96798
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
96799
96799
|
} finally {
|
|
96800
|
-
|
|
96800
|
+
syncFs.closeSync(opened.fd);
|
|
96801
96801
|
}
|
|
96802
96802
|
})();
|
|
96803
96803
|
let sections = extractSections(content, ["Session Startup", "Red Lines"]);
|
|
@@ -98285,7 +98285,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
98285
98285
|
if (!apiKeyInfo.apiKey) {
|
|
98286
98286
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
98287
98287
|
} else if (model.provider === "github-copilot") {
|
|
98288
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
98288
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-8N63GdbE.js").then((n) => n.n);
|
|
98289
98289
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
98290
98290
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
98291
98291
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -99915,7 +99915,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
99915
99915
|
* Throws if the connection is not open.
|
|
99916
99916
|
*/
|
|
99917
99917
|
send(event) {
|
|
99918
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
99918
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
99919
99919
|
this.ws.send(JSON.stringify(event));
|
|
99920
99920
|
}
|
|
99921
99921
|
/**
|
|
@@ -99932,7 +99932,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
99932
99932
|
* Returns true if the WebSocket is currently open and ready to send.
|
|
99933
99933
|
*/
|
|
99934
99934
|
isConnected() {
|
|
99935
|
-
return this.ws !== null && this.ws.readyState === WebSocket
|
|
99935
|
+
return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
|
|
99936
99936
|
}
|
|
99937
99937
|
/**
|
|
99938
99938
|
* Permanently closes the WebSocket connection and disables auto-reconnect.
|
|
@@ -99942,7 +99942,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
99942
99942
|
this._cancelRetryTimer();
|
|
99943
99943
|
if (this.ws) {
|
|
99944
99944
|
this.ws.removeAllListeners();
|
|
99945
|
-
if (this.ws.readyState === WebSocket
|
|
99945
|
+
if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
99946
99946
|
this.ws = null;
|
|
99947
99947
|
}
|
|
99948
99948
|
}
|
|
@@ -99952,7 +99952,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
99952
99952
|
reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
|
|
99953
99953
|
return;
|
|
99954
99954
|
}
|
|
99955
|
-
const socket = new WebSocket
|
|
99955
|
+
const socket = new WebSocket(this.wsUrl, { headers: {
|
|
99956
99956
|
Authorization: `Bearer ${this.apiKey}`,
|
|
99957
99957
|
"OpenAI-Beta": "responses-websocket=v1"
|
|
99958
99958
|
} });
|
|
@@ -100935,11 +100935,11 @@ function appendRawStream(payload) {
|
|
|
100935
100935
|
if (!rawStreamReady) {
|
|
100936
100936
|
rawStreamReady = true;
|
|
100937
100937
|
try {
|
|
100938
|
-
|
|
100938
|
+
syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
100939
100939
|
} catch {}
|
|
100940
100940
|
}
|
|
100941
100941
|
try {
|
|
100942
|
-
|
|
100942
|
+
syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
100943
100943
|
} catch {}
|
|
100944
100944
|
}
|
|
100945
100945
|
//#endregion
|
|
@@ -104822,7 +104822,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
104822
104822
|
await copilotTokenState.refreshInFlight;
|
|
104823
104823
|
return;
|
|
104824
104824
|
}
|
|
104825
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
104825
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-8N63GdbE.js").then((n) => n.n);
|
|
104826
104826
|
copilotTokenState.refreshInFlight = (async () => {
|
|
104827
104827
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
104828
104828
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -104914,7 +104914,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
104914
104914
|
return;
|
|
104915
104915
|
}
|
|
104916
104916
|
if (model.provider === "github-copilot") {
|
|
104917
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
104917
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-8N63GdbE.js").then((n) => n.n);
|
|
104918
104918
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
104919
104919
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
104920
104920
|
if (copilotTokenState) {
|