diff --git a/apps/server/src/orchestration-v2/AgentOutputGate.ts b/apps/server/src/orchestration-v2/AgentOutputGate.ts index b83c2904b25e..fb023b1e203c 100644 --- a/apps/server/src/orchestration-v2/AgentOutputGate.ts +++ b/apps/server/src/orchestration-v2/AgentOutputGate.ts @@ -17,7 +17,7 @@ import { const OUTPUT_GATE_BOUNCE_MESSAGE_PREFIX = "message:output-gate-bounce:"; export const OUTPUT_GATE_BOUNCE_PROMPT = - "Triggered by an agent/automation wake, not the user — plain assistant text stays folded and is not delivered. Route your response now: call `send_to_user` if it is for the founder, `t3_thread_send` or `ask_agent` if it is for another agent, or `silent_ack` if nothing needs delivery."; + "Triggered by an agent/automation wake, not the user. Plain assistant text stays folded and is not delivered. Route your response now: call `send_to_user` if it is for the founder, `t3_thread_send` or `ask_agent` if it is for another agent, or `silent_ack` if nothing needs delivery."; const EXPLICIT_CHANNEL_TOOL_IDS: ReadonlySet = new Set([ SEND_TO_USER_TOOL_NAME, @@ -35,7 +35,7 @@ export function outputGateBounceMessageId(runId: RunId): MessageId { return MessageId.make(`${OUTPUT_GATE_BOUNCE_MESSAGE_PREFIX}${runId}`); } -export function isOutputGateBounceMessageId(messageId: MessageId | null | undefined): boolean { +function isOutputGateBounceMessageId(messageId: MessageId | null | undefined): boolean { return typeof messageId === "string" && messageId.startsWith(OUTPUT_GATE_BOUNCE_MESSAGE_PREFIX); } @@ -55,7 +55,7 @@ export function isExplicitChannelToolName(toolName: string | null | undefined): * Only async agent/automation-originated turns are eligible for the turn-end output gate. * Human user turns (`createdBy === "user"` with no agent/automation wake metadata) are never gated. */ -export function isAgentOriginatedWake( +function isAgentOriginatedWake( message: | Pick< OrchestrationV2ConversationMessage, diff --git a/apps/server/src/peer/RemoteDelegation.ts b/apps/server/src/peer/RemoteDelegation.ts index dc40be891f2f..8a23ae6899e0 100644 --- a/apps/server/src/peer/RemoteDelegation.ts +++ b/apps/server/src/peer/RemoteDelegation.ts @@ -114,9 +114,9 @@ const FOLLOW_MAX_BACKOFF = Duration.minutes(5); /** A follower that hits this many defects in a row fails its task instead of retrying. */ const FOLLOW_MAX_DEFECTS = 3; /** How long a remote task may go without peer contact while polls fail before reporting unreachable. */ -export const REMOTE_PEER_UNREACHABLE_THRESHOLD = Duration.minutes(2); +const REMOTE_PEER_UNREACHABLE_THRESHOLD = Duration.minutes(2); /** How long without successful peer contact while failing before reporting unreachable; tests may override. */ -export const PeerUnreachableThreshold = Context.Reference( +const PeerUnreachableThreshold = Context.Reference( "t3/peer/RemoteDelegation/PeerUnreachableThreshold", { defaultValue: () => REMOTE_PEER_UNREACHABLE_THRESHOLD, diff --git a/apps/server/src/security/secretRedaction.ts b/apps/server/src/security/secretRedaction.ts index 3ba58d0f8b29..5c8a284a47a1 100644 --- a/apps/server/src/security/secretRedaction.ts +++ b/apps/server/src/security/secretRedaction.ts @@ -24,16 +24,19 @@ export function redactSecretText(input: string): SecretRedactionResult { redactedCount += 1; return SECRET_REDACTED; }); - const afterInline = afterValues.replace(INLINE_SECRET_PATTERN, (match, offset: number, full: string) => { - // INLINE_SECRET_PATTERN stops before ']', so values already replaced with - // '[redacted]' match up to '[redacted'. Skip double-counting those. - const prefix = SECRET_REDACTED.slice(0, -1); - if (match.endsWith(prefix) && full[offset + match.length] === "]") { - return match; - } - redactedCount += 1; - return SECRET_REDACTED; - }); + const afterInline = afterValues.replace( + INLINE_SECRET_PATTERN, + (match, offset: number, full: string) => { + // INLINE_SECRET_PATTERN stops before ']', so values already replaced with + // '[redacted]' match up to '[redacted'. Skip double-counting those. + const prefix = SECRET_REDACTED.slice(0, -1); + if (match.endsWith(prefix) && full[offset + match.length] === "]") { + return match; + } + redactedCount += 1; + return SECRET_REDACTED; + }, + ); return { text: afterInline, redactedCount }; } @@ -41,13 +44,17 @@ export function containsSecret(input: string): boolean { return redactSecretText(input).redactedCount > 0; } -export function isCredentialKeyName(key: string): boolean { +function isCredentialKeyName(key: string): boolean { return CREDENTIAL_KEY_PATTERN.test(key); } const MAX_DEEP_DEPTH = 24; -export function redactSecretsDeep(value: unknown, depth = 0, seen = new WeakSet()): unknown { +export function redactSecretsDeep( + value: unknown, + depth = 0, + seen = new WeakSet(), +): unknown { if (typeof value === "string") { return redactSecretText(value).text; } diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts index efbe985118bb..20bf2de2832c 100644 --- a/apps/web/src/components/Sidebar.logic.test.ts +++ b/apps/web/src/components/Sidebar.logic.test.ts @@ -1942,7 +1942,7 @@ describe("standing bots bound by a scheduled task", () => { audience: string, ) => ({ id, - standing, + standing: standing && { ...standing, avatarId: "bolt" as const, accent: "sky" as const }, lineage: { parentThreadId: null, rootThreadId: id, relationshipToParent: null }, source: { inbox: { audience } }, }); diff --git a/apps/web/src/components/bots/botOrgTree.test.ts b/apps/web/src/components/bots/botOrgTree.test.ts index dd3d9922cb21..5c9c17ea3978 100644 --- a/apps/web/src/components/bots/botOrgTree.test.ts +++ b/apps/web/src/components/bots/botOrgTree.test.ts @@ -1,3 +1,4 @@ +import { ThreadId } from "@t3tools/contracts"; import { describe, expect, it } from "vite-plus/test"; import { isFounderName, orderBotTree, visibleBotRows } from "./botOrgTree"; @@ -65,10 +66,16 @@ describe("founders are not bots", () => { }); it("keeps a founder thread out of the Bots shelf", () => { + const lineage = { + parentThreadId: null, + rootThreadId: ThreadId.make("root"), + relationshipToParent: null, + }; + const persona = (name: string) => ({ name, avatarId: "bolt", accent: "sky" }) as const; const { bots, rest } = splitStandingThreads([ - { id: "k", standing: { name: "Kameron" } }, - { id: "c", standing: { name: "CEO" } }, - { id: "w", standing: null }, + { id: "k", lineage, standing: persona("Kameron") }, + { id: "c", lineage, standing: persona("CEO") }, + { id: "w", lineage, standing: null }, ]); expect(bots.map((t) => t.id)).toEqual(["c"]); expect(rest.map((t) => t.id)).toEqual(["k", "w"]); diff --git a/knip.jsonc b/knip.jsonc index c29a934c8af5..a26d281281f8 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -15,6 +15,9 @@ ".github/scripts/pr-limits.cjs", // Upstream release workflows invoke the documented Play APK mirror by path. ".github/scripts/mirror-play-apk.cjs", + // The upstream release workflows (not kept in this fork) invoke the version-bump scripts by path. + ".github/scripts/set-mobile-version.cjs", + ".github/scripts/set-release-version.cjs", ], "vite": { "entry": [".github/**/*.test.cjs"] }, "vitest": { "entry": [".github/**/*.test.cjs"] },