diff --git a/apps/server/src/mcp/toolkits/orchestrator/tools.ts b/apps/server/src/mcp/toolkits/orchestrator/tools.ts index 2d9ce98bbbe8f..66e19f083116c 100644 --- a/apps/server/src/mcp/toolkits/orchestrator/tools.ts +++ b/apps/server/src/mcp/toolkits/orchestrator/tools.ts @@ -253,7 +253,7 @@ const ThreadListTool = Tool.make("t3_thread_list", { const ThreadReadTool = Tool.make("t3_thread_read", { description: - "Read any thread by id. View `messages` (default) or `activity` (all items). Newest first; older: `beforePosition=earlierPosition`; from the start: `afterPosition=-1`, then `nextPosition`. Cut-off text: `itemId`, `textOffset=nextTextOffset`. Reading a child's final result marks it delivered. In your reply, name it as its `link` verbatim.", + "Read latest first: `messages` (default) or `activity` (all). Older: `beforePosition=earlierPosition`. From start: `afterPosition=-1`, then `nextPosition`. Resume text: `itemId`, `textOffset=nextTextOffset`. Reading a child's final result marks it delivered. Cite its exact `link`.", parameters: OrchestratorMcpThreadReadInput, success: OrchestratorMcpThreadReadResult, failure: OrchestratorMcpFailure, @@ -268,7 +268,7 @@ const ThreadReadTool = Tool.make("t3_thread_read", { const ThreadUpdateTool = Tool.make("t3_thread_update", { description: - "Update a thread; omit `threadId` for this one. When a founder must decide, review or approve, use `action:'request_decision'` with `decision`: the thread shows in their inbox until they reply there, `resolve_decision`, or settle. `action:'route'` refiles it with `inboxRouting`; a founder's or the shared inbox needs `inboxRouting.reason`. `rename` takes `title`; `regenerate_title`. `set_standing` takes `standing` (bot persona, or null for an ordinary thread). Workspace and branch cannot change here.", + "Default: this thread. Founder must decide/review/approve: `request_decision` with `decision`; stays in their inbox until reply, `resolve_decision` or settle. `route`: `inboxRouting`, `reason` for founder/shared. `rename`: `title`; `set_standing`: `standing`. Not workspace/branch.", // Keeps the input's action/field check, which rebuilding the struct would drop. parameters: ThreadMetadataMcpUpdateInput.mapFields( Struct.assign({ environmentId: OrchestratorMcpEnvironmentTarget }), @@ -285,7 +285,7 @@ const ThreadUpdateTool = Tool.make("t3_thread_update", { const ThreadSendTool = Tool.make("t3_thread_send", { description: - "Send a message to any thread. The target cannot run with broader modes than yours. `mode:'auto'` starts an idle thread, steers a running turn, or queues. `queue`: new turn. `steer`: mid-turn update. `restart`: interrupt and restart. `deliveryClass` overrides `mode`: `interrupt`, `steer_at_tool_boundary` (after the next tool result), `next_turn`, `when_idle` (once nothing runs), or `digest` (never starts a turn; rides with the next one, grouped by `digestCategory`). `coalesceKey` replaces an undelivered message with the same key; past `expiresAt` an undelivered one is dropped. A send to a finished child thread starts a fresh task and returns its `taskId`. In your reply, name it as its `link` verbatim.", + "Send within your modes. `auto` starts an idle thread, steers or queues. `queue`: new turn. `steer`: mid-turn. `restart`: interrupt and restart. `deliveryClass` overrides `mode`: `steer_at_tool_boundary` after the next tool result, `when_idle` when idle, `digest` with the next turn (never starts one), grouped by `digestCategory`. `coalesceKey` replaces undelivered matches. A finished child gets a new task and returns `taskId`. Cite its exact `link`.", parameters: OrchestratorMcpThreadSendInput, success: OrchestratorMcpThreadSendResult, failure: OrchestratorMcpFailure, diff --git a/apps/server/src/mcp/toolkits/thread/tools.ts b/apps/server/src/mcp/toolkits/thread/tools.ts index 30184102a3a21..b39d46216e4e4 100644 --- a/apps/server/src/mcp/toolkits/thread/tools.ts +++ b/apps/server/src/mcp/toolkits/thread/tools.ts @@ -33,7 +33,7 @@ import * as McpInvocationContext from "../../McpInvocationContext.ts"; const ThreadOrganizeTool = Tool.make("t3_thread_organize", { description: - "Pin, snooze, settle, archive, or mark a thread unread. Omit `threadId` for this thread. `snooze` needs `snoozedUntil`. Settling this thread applies at turn end. A failed turn or queued message leaves it active.", + "Organize this thread by default. `snooze` needs `snoozedUntil`. Self-settle waits for turn end; failure or a queued message keeps it active.", parameters: Schema.Struct({ environmentId: OrchestratorMcpEnvironmentTarget, threadId: Schema.optional(ThreadId), @@ -88,7 +88,7 @@ const QUEUE_READ_ACTIONS = ["list", "read"] as const; const QueueTool = Tool.make("t3_queue", { ...commandTool, description: - "Manage a thread's queued messages. Omit `threadId` for this thread. list: send order, paged by `cursor` and `limit`. read: up to 16,000 chars of one. edit: replace its `text`; attachments stay. cancel. reorder: before `beforeRunId`, or to the end with null. promote_to_steer: send it now as steering to active `targetRunId`. Entries show their `deliveryClass`, `coalesceKey` and `expiresAt`; a `digest` entry never starts a turn and goes out with the next one. Writes fail once the run is no longer queued.", + "Queue for this thread by default. `list`: send order (`cursor`, `limit`). `read`: up to 16,000 chars. `edit`: text only. `cancel`. `reorder`: before `beforeRunId` (null: end). `promote_to_steer`: into active `targetRunId`. Shows delivery metadata. Digests ride its next turn. Writes require a queued run.", parameters: Schema.Struct({ action: Schema.Literals([ ...QUEUE_READ_ACTIONS, @@ -133,7 +133,7 @@ const question = Schema.Struct({ const PendingRequestTool = Tool.make("t3_pending_request", { ...commandTool, description: - "Pending user questions in a thread. Omit `threadId` for this thread. list: their ids; approvals are not listed. read: one by `requestId`. respond: answer one with `answers`; this cannot approve a permission request.", + "User questions only (default: this thread). List IDs, read by `requestId`, respond with `answers`. No permission approvals.", parameters: Schema.Struct({ action: Schema.Literals(["list", "read", "respond"]), environmentId: OrchestratorMcpEnvironmentTarget, @@ -159,7 +159,7 @@ const threadConfiguration = Schema.Struct({ const ThreadConfigureTool = Tool.make("t3_thread_configure", { ...commandTool, description: - "Read a thread's provider, model, and modes, or set its provider, model, and options with `modelSelection`. Omit `threadId` for this thread. Permission modes stay. Values from `orchestrator_capabilities`.", + "Read provider, model and modes (default: this thread). Set provider, model and options via `modelSelection` from `orchestrator_capabilities`. Preserves permission modes.", parameters: Schema.Struct({ environmentId: OrchestratorMcpEnvironmentTarget, threadId: Schema.optional(ThreadId), @@ -171,7 +171,7 @@ const ThreadConfigureTool = Tool.make("t3_thread_configure", { const ThreadTransferTool = Tool.make("t3_thread_transfer", { ...commandTool, description: - "Move context between threads. Omit `threadId` for this thread. fork: copy it from `sourcePoint` (default latest stable run) into a new thread with the same setup; no turn runs yet. merge_back: merge it from `sourcePoint` into a related `targetThreadId` in the same project. status: its context transfers.", + "Transfer context from this thread by default. `fork`: same setup, no turn. `merge_back`: related same-project `targetThreadId`. Both take `sourcePoint` (fork defaults to latest stable run). `status`: list transfers.", parameters: Schema.Struct({ action: Schema.Literals(["fork", "merge_back", "status"]), environmentId: OrchestratorMcpEnvironmentTarget, diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts index f7516460c4ad1..fc20503f21a7a 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts @@ -284,12 +284,15 @@ function isClaudeEnvTruthy(value: string | undefined): boolean { const CLAUDE_COMPACT_OUTPUT_RESERVE = 20_000; const CLAUDE_COMPACT_FLOOR_GAP = 13_000; -function claudeCompactEffectiveWindow(contextWindow: number, modelMaxTokens: number | null): number { +function claudeCompactEffectiveWindow( + contextWindow: number, + modelMaxTokens: number | null, +): number { const window = modelMaxTokens === null ? contextWindow : Math.min(modelMaxTokens, contextWindow); return window - CLAUDE_COMPACT_OUTPUT_RESERVE; } -export function claudeAutoCompactPercent( +function claudeAutoCompactPercent( threadType: { readonly contextWindow: number; readonly compactAt: number }, modelMaxTokens: number | null = null, ): string { @@ -2337,7 +2340,10 @@ export function makeClaudeQueryOptions(input: { ? {} : { CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: claudeAutoCompactPercent( - { contextWindow: threadType.claudeContextWindow, compactAt: threadType.compactAt }, + { + contextWindow: threadType.claudeContextWindow, + compactAt: threadType.compactAt, + }, modelMaxTokens, ), CLAUDE_CODE_PROMPT_CACHE_TTL: threadType.cacheTtl, diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts index 41d37ff92dade..7cdd76c2a2810 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts @@ -1504,7 +1504,7 @@ const CODEX_T3_MCP_TOOL_TIMEOUT_SEC = 65 * 60; const CODEX_T3_DIRECT_MCP_SERVER = "t3-code-direct"; const CODEX_DIRECT_ONLY_T3_TOOLS = ["t3_thread_wait", "delegate_task"]; -export function codexThreadTypeConfig( +function codexThreadTypeConfig( threadType: ProviderAdapter.ProviderAdapterV2RuntimePolicy["threadType"], ): Readonly> { return threadType === undefined diff --git a/apps/server/src/orchestration-v2/RuntimePolicy.ts b/apps/server/src/orchestration-v2/RuntimePolicy.ts index e5e0494696f1f..dc1602448eadc 100644 --- a/apps/server/src/orchestration-v2/RuntimePolicy.ts +++ b/apps/server/src/orchestration-v2/RuntimePolicy.ts @@ -140,7 +140,7 @@ export const layerEnforcingCeiling: Layer.Layer< }), ); -export const applyThreadTypePolicy = Effect.fn("RuntimePolicyV2.applyThreadTypePolicy")(function* ( +const applyThreadTypePolicy = Effect.fn("RuntimePolicyV2.applyThreadTypePolicy")(function* ( policyPath: string, input: { readonly thread: OrchestrationV2AppThread; readonly modelSelection: ModelSelection }, ) { diff --git a/apps/server/src/orchestration-v2/ThreadEventAlerts.ts b/apps/server/src/orchestration-v2/ThreadEventAlerts.ts index 9433385c90967..34f0bf2dee6bf 100644 --- a/apps/server/src/orchestration-v2/ThreadEventAlerts.ts +++ b/apps/server/src/orchestration-v2/ThreadEventAlerts.ts @@ -101,7 +101,7 @@ const openPullRequests = (shell: WatchedShell) => ); /** A pending task, a watching PR, a delegated task or a snooze that will bring the thread back. */ -export function hasWakeHandle(shell: WatchedShell, remoteTaskCount: number, nowMs: number) { +function hasWakeHandle(shell: WatchedShell, remoteTaskCount: number, nowMs: number) { if ((shell.pendingBackgroundTasks ?? []).length > 0) return true; if (remoteTaskCount > 0) return true; if ((shell.pullRequests ?? []).some((link) => link.watch !== undefined)) return true; @@ -148,7 +148,7 @@ export interface StrandedQueue { readonly queueHeld?: boolean; } -export const strandedQueueSignature = (queue: StrandedQueue) => `stranded-queue:${queue.runId}`; +const strandedQueueSignature = (queue: StrandedQueue) => `stranded-queue:${queue.runId}`; export const isStrandedQueueSignature = (signature: string) => signature.startsWith("stranded-queue:"); diff --git a/apps/server/src/orchestration-v2/ThreadSearch.ts b/apps/server/src/orchestration-v2/ThreadSearch.ts index 3385454dd2a3f..d0affa7ddfbe1 100644 --- a/apps/server/src/orchestration-v2/ThreadSearch.ts +++ b/apps/server/src/orchestration-v2/ThreadSearch.ts @@ -227,7 +227,7 @@ export function buildSearchSnippet(text: string, matchStart: number): string { * among "people" but never Kameron's or Jeff's. A legacy scheduled-task prompt is known by its * server-made id; a message the server stamped with a person's client is a person's regardless. */ -export const messageSenderCondition = ( +const messageSenderCondition = ( sql: SqlClient.SqlClient, sender: OrchestrationSearchSenderFilter | null, ) => { diff --git a/apps/server/src/orchestration-v2/ThreadTypePolicy.ts b/apps/server/src/orchestration-v2/ThreadTypePolicy.ts index de3d4015d0069..8b1a2ddac8660 100644 --- a/apps/server/src/orchestration-v2/ThreadTypePolicy.ts +++ b/apps/server/src/orchestration-v2/ThreadTypePolicy.ts @@ -1,19 +1,12 @@ -import * as NodeOs from "node:os"; +import * as NodeOS from "node:os"; import { isDelegatedAppThread, OrchestrationV2AppThread, ThreadId } from "@t3tools/contracts"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Schema from "effect/Schema"; -export const THREAD_TYPE_POLICY_PATH_ENV = "T3_THREAD_TYPE_POLICY_PATH"; -export const THREAD_TYPES = [ - "standing", - "coding", - "review", - "research", - "ops", - "conversational", -] as const; +const THREAD_TYPE_POLICY_PATH_ENV = "T3_THREAD_TYPE_POLICY_PATH"; +const THREAD_TYPES = ["standing", "coding", "review", "research", "ops", "conversational"] as const; export type ThreadType = (typeof THREAD_TYPES)[number]; const ThreadTypeName = Schema.Literals(THREAD_TYPES); @@ -78,7 +71,7 @@ export const isThreadTypeModelRefusedError = Schema.is(ThreadTypeModelRefusedErr const TITLE_TAG = /^\s*\[([a-z]+)\]/i; -export function normalizeModel(model: string): string { +function normalizeModel(model: string): string { let value = model.trim().toLowerCase(); const slash = value.lastIndexOf("/"); if (slash >= 0) value = value.slice(slash + 1); @@ -134,7 +127,7 @@ export function resolveThreadTypeLaunch( }); } -export const SUMMARY_CAP_CHARS_PER_TOKEN = 2; +const SUMMARY_CAP_CHARS_PER_TOKEN = 2; export function carriedSummaryWithinCap(summaryCap: number, text: string): boolean { return Math.ceil(text.length / SUMMARY_CAP_CHARS_PER_TOKEN) <= summaryCap; @@ -152,7 +145,7 @@ export function threadTypePolicyPath(environment: NodeJS.ProcessEnv = process.en const override = environment[THREAD_TYPE_POLICY_PATH_ENV]; return override !== undefined && override.length > 0 ? override - : `${NodeOs.homedir()}/.config/closura/thread-type-policy.json`; + : `${NodeOS.homedir()}/.config/closura/thread-type-policy.json`; } const decodePolicy = Schema.decodeUnknownEffect(Schema.fromJsonString(ThreadTypePolicyFile)); @@ -162,13 +155,16 @@ const warnPolicyOnce = (path: string, state: string, message: string, detail?: u const key = `${state}|${path}`; if (policyWarningKeys.has(key)) return Effect.void; policyWarningKeys.add(key); - return Effect.logWarning(message, detail === undefined ? { path, state } : { path, state, detail }); + return Effect.logWarning( + message, + detail === undefined ? { path, state } : { path, state, detail }, + ); }; const classifyRulesCompile = (policy: ThreadTypePolicyFile): boolean => { for (const rule of policy.classify) { try { - new RegExp(rule.title, "i"); + void new RegExp(rule.title, "i"); } catch { return false; } diff --git a/apps/server/src/process/agentScope.ts b/apps/server/src/process/agentScope.ts index e5cd473d68899..ba69bdb86d894 100644 --- a/apps/server/src/process/agentScope.ts +++ b/apps/server/src/process/agentScope.ts @@ -56,7 +56,7 @@ const GiB = 1024 ** 3; * working. Small machines still give agents at least half of RAM before * throttling and three quarters before a kill. */ -export function agentSliceMemoryLimits(totalBytes: number, role: AgentHostRole = "headless") { +function agentSliceMemoryLimits(totalBytes: number, role: AgentHostRole = "headless") { if (role === "interactive") { // A person's computer keeps 4 GB or 40% for them before agents slow, and 3 GB or 30% // before one is killed. diff --git a/apps/server/src/provider/servedModel.ts b/apps/server/src/provider/servedModel.ts index 2126e4691153d..67beac72dea78 100644 --- a/apps/server/src/provider/servedModel.ts +++ b/apps/server/src/provider/servedModel.ts @@ -21,7 +21,7 @@ export function findServedModel, requested: string): string { +function servedModelsHint(models: ReadonlyArray, requested: string): string { const lastSegment = (slug: string) => slug.slice(slug.lastIndexOf("/") + 1).toLowerCase(); const wanted = lastSegment(requested); const close = models.filter((model) => lastSegment(model.slug) === wanted); diff --git a/apps/server/src/resourceTelemetry/MachinePresence.ts b/apps/server/src/resourceTelemetry/MachinePresence.ts index d5da20b04ca5b..47efdb3500167 100644 --- a/apps/server/src/resourceTelemetry/MachinePresence.ts +++ b/apps/server/src/resourceTelemetry/MachinePresence.ts @@ -21,7 +21,7 @@ function parseKeyValues(text: string): Map { } /** The graphical login's state from logind; a session that cannot be read counts as in use. */ -export function linuxSessionInUse(shown: string): boolean { +function linuxSessionInUse(shown: string): boolean { const values = parseKeyValues(shown); return !( values.get("Active") === "no" || @@ -31,7 +31,7 @@ export function linuxSessionInUse(shown: string): boolean { } /** A login at this machine's own screen, not a remote or text session. */ -export function isLocalGraphicalSession(shown: string): boolean { +function isLocalGraphicalSession(shown: string): boolean { const values = parseKeyValues(shown); const type = values.get("Type"); return (type === "x11" || type === "wayland" || type === "mir") && values.get("Remote") !== "yes"; @@ -46,7 +46,7 @@ type GraphicalLogin = | { readonly kind: "session"; readonly shown: string } | { readonly kind: "unknown" }; -export const make = Effect.gen(function* () { +const make = Effect.gen(function* () { const platform = yield* HostProcess.Platform; const runner = yield* ProcessRunner.ProcessRunner; const settingsService = yield* ServerSettings.ServerSettingsService; diff --git a/apps/web/src/components/bots/botPresence.ts b/apps/web/src/components/bots/botPresence.ts index 229aa5987e0f2..8830a3daf55fe 100644 --- a/apps/web/src/components/bots/botPresence.ts +++ b/apps/web/src/components/bots/botPresence.ts @@ -64,7 +64,7 @@ export function splitStandingThreads( } /** A shared bot belongs to both founders; every other standing bot is one's own. */ -export function isSharedBotThread(thread: { +function isSharedBotThread(thread: { readonly source: { readonly inbox?: { readonly audience?: string } | null | undefined }; }): boolean { return thread.source.inbox?.audience === "shared"; diff --git a/apps/web/src/components/chat/MessagesTimeline.logic.ts b/apps/web/src/components/chat/MessagesTimeline.logic.ts index f222edfb84a4c..9d8f132c296a9 100644 --- a/apps/web/src/components/chat/MessagesTimeline.logic.ts +++ b/apps/web/src/components/chat/MessagesTimeline.logic.ts @@ -2413,7 +2413,7 @@ const KEPT_ACTIVITY_ROW_KINDS = new Set([ "viewed-images", ]); -export function timelineRowIsHumanConversation(row: MessagesTimelineRow): boolean { +function timelineRowIsHumanConversation(row: MessagesTimelineRow): boolean { if (KEPT_ACTIVITY_ROW_KINDS.has(row.kind)) return true; // A secret or a link is answered only on its own card, so it must not fold away. if ( @@ -2434,7 +2434,10 @@ export function timelineRowIsHumanConversation(row: MessagesTimelineRow): boolea * streaming in and earlier history loading above it. A live turn's own rows use * constant ids that vanish when the turn settles, so they never anchor a pill. */ -function activityPillId(anchor: MessagesTimelineRow | undefined, run: MessagesTimelineRow[]): string { +function activityPillId( + anchor: MessagesTimelineRow | undefined, + run: MessagesTimelineRow[], +): string { return `activity:${anchor?.id ?? run[0]!.id}`; } diff --git a/apps/web/src/state/linkedSidebar.ts b/apps/web/src/state/linkedSidebar.ts index a1a04ce8a75ac..b14c7f3b814be 100644 --- a/apps/web/src/state/linkedSidebar.ts +++ b/apps/web/src/state/linkedSidebar.ts @@ -68,7 +68,7 @@ const linkedSidebarSupplementAtom = Atom.make((get) => { return next; }).pipe(Atom.keepAlive, Atom.withLabel("linked-sidebar:supplement")); -export const sidebarEnvironmentIdentitiesAtom = Atom.make((get) => { +const sidebarEnvironmentIdentitiesAtom = Atom.make((get) => { const catalog = get(environmentSummaries.identitiesAtom); const extra = get(linkedSidebarSupplementAtom).identities; const next = extra.length === 0 ? catalog : [...catalog, ...extra]; @@ -82,7 +82,7 @@ export const sidebarEnvironmentIdentitiesAtom = Atom.make((get) => { : next; }).pipe(Atom.withLabel("linked-sidebar:identities")); -export const sidebarProjectsAtom = Atom.make((get) => { +const sidebarProjectsAtom = Atom.make((get) => { const local = get(environmentProjects.projectsAtom); const extra = get(linkedSidebarSupplementAtom).projects; if (extra.length === 0) return local; @@ -95,7 +95,7 @@ export const sidebarProjectsAtom = Atom.make((get) => { : next; }).pipe(Atom.withLabel("linked-sidebar:projects")); -export const sidebarThreadShellsAtom = Atom.make((get) => { +const sidebarThreadShellsAtom = Atom.make((get) => { const local = get(environmentThreadShells.quietThreadShellsAtom); const extra = get(linkedSidebarSupplementAtom).threads; if (extra.length === 0) return local; diff --git a/evals/mcp-tool-use/backgroundWait.ts b/evals/mcp-tool-use/backgroundWait.ts index 24377c4247f8a..16d3a9d3dd9ac 100644 --- a/evals/mcp-tool-use/backgroundWait.ts +++ b/evals/mcp-tool-use/backgroundWait.ts @@ -39,6 +39,7 @@ import * as PeerLinkRequests from "../../apps/server/src/peer/PeerLinkRequests.t import * as PeerLinks from "../../apps/server/src/peer/PeerLinks.ts"; import * as RemoteDelegation from "../../apps/server/src/peer/RemoteDelegation.ts"; import * as SqlitePersistence from "../../apps/server/src/persistence/Sqlite.ts"; +import * as ProviderRegistryMock from "../../apps/server/src/provider/testUtils/providerRegistryMock.ts"; import * as ServerSettings from "../../apps/server/src/serverSettings.ts"; const threadId = ThreadId.make("mcp-tool-use-eval"); @@ -83,6 +84,7 @@ export const makeBackgroundWait = Effect.fn("evaluateMcpToolUse.makeBackgroundWa Layer.mock(ProviderSessionManager.ProviderSessionManagerV2)({ get: () => Effect.succeedSome(runtime), }), + ProviderRegistryMock.layer(), ServerSettings.layerTest(), CommandReceiptStore.layer.pipe(Layer.provide(SqlitePersistence.layerMemory)), ), diff --git a/knip.jsonc b/knip.jsonc index c096f2c2b5097..d2d9eeb406d0e 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -13,6 +13,8 @@ ".coderabbit.config.ts", ".github/scripts/thread-transfer-report.cjs", ".github/scripts/pr-limits.cjs", + // Upstream release workflows invoke the documented Play APK mirror by path. + ".github/scripts/mirror-play-apk.cjs", ], "vite": { "entry": [".github/**/*.test.cjs"] }, "vitest": { "entry": [".github/**/*.test.cjs"] }, @@ -42,6 +44,10 @@ // The daily upstream sync runs these by path. "fork-drift-receipt.mjs", "fork-sync-plan.mjs", + // release:smoke spawns the Nightly resolver by path. + "resolve-nightly-release.ts", + // The release runbook and upstream release-desktop workflow use this CLI. + "smoke-cli-archive.ts", "smoke-desktop-app.ts", "verify-windows-desktop-artifact.ts", ], @@ -104,7 +110,12 @@ "apps/web": { // Worktree setup (scripts/setup-worktree.ts) runs this directly, and evidence // fixtures run under node. - "entry": ["scripts/warm-dep-cache.ts", "test/fixtures/**/*.mjs"], + "entry": [ + // Upstream CI and release workflows invoke the built-client smoke check by path. + "scripts/verify-built-boot.ts", + "scripts/warm-dep-cache.ts", + "test/fixtures/**/*.mjs", + ], // UI component modules are copied and adapted as cohesive sets. Keep their // named subcomponents even before they have callers; the file audit still // reports an entire component module when nothing imports it. diff --git a/packages/client-runtime/src/messageSender.ts b/packages/client-runtime/src/messageSender.ts index 53424464a15df..9160c8a2f9afd 100644 --- a/packages/client-runtime/src/messageSender.ts +++ b/packages/client-runtime/src/messageSender.ts @@ -116,12 +116,12 @@ const DEVICE_TYPE_NAMES = { } satisfies Record; /** The person's name when someone assigned the client to them, else null. */ -export function messageSenderFounder(sender: MessageSender): Founder | null { +function messageSenderFounder(sender: MessageSender): Founder | null { return sender.kind === "person" ? (sender.sentBy?.founder ?? null) : null; } /** The client a person sent from, by its name in Connections, else by its kind. */ -export function messageSenderDevice(sentBy: OrchestrationV2MessageSentBy): string { +function messageSenderDevice(sentBy: OrchestrationV2MessageSentBy): string { return sentBy.device.trim() || DEVICE_TYPE_NAMES[sentBy.deviceType]; } diff --git a/packages/contracts/src/botAttention.ts b/packages/contracts/src/botAttention.ts index 169a2a7aded35..eec5d220f9ada 100644 --- a/packages/contracts/src/botAttention.ts +++ b/packages/contracts/src/botAttention.ts @@ -18,7 +18,7 @@ export type BotAttention = | { readonly kind: "sign-off"; readonly founders: ReadonlyArray }; /** Both founders, in the order the pill writes them. */ -export const JOINT_SIGN_OFF_FOUNDERS: readonly Founder[] = Founder.literals; +const JOINT_SIGN_OFF_FOUNDERS: readonly Founder[] = Founder.literals; /** How much of a message is scanned for an @-mention. The shell stores the names, not the text. */ export const ATTENTION_MENTION_TEXT_LIMIT = 2000; @@ -44,11 +44,6 @@ export function attentionMentionsFromText( return found.length > 0 ? found : undefined; } -/** True when the ask lists both founders, so one founder's answer is not enough. */ -export function isJointSignOff(signOff: ReadonlyArray | null | undefined): boolean { - return jointSignOff(signOff) !== null; -} - /** * The one thing the bot row shows. A joint sign-off outranks a badge, and a * badge outranks the FYI dot: a founder being asked must not look like chatter. diff --git a/packages/contracts/src/threadInbox.ts b/packages/contracts/src/threadInbox.ts index f39f8df0d168d..c19969a595ab7 100644 --- a/packages/contracts/src/threadInbox.ts +++ b/packages/contracts/src/threadInbox.ts @@ -94,7 +94,6 @@ export const ThreadInbox = Schema.Struct({ executorEnvironmentId: Schema.NullOr(EnvironmentId), }); export type ThreadInbox = typeof ThreadInbox.Type; -export const INBOX_CAPABILITY = "closura-founder-inbox-v2" as const; export const InboxView = Schema.Literals(["kameron", "jeff", "shared", "agents", "all"]); export type InboxView = typeof InboxView.Type; /** An inbox a thread can be filed into: every view except All. */