From 284d3de3ccba38a0e892c53d5a4da60473fa3fa3 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Nov 2026 22:09:25 -0800 Subject: [PATCH 001/233] fix(web): a thread that finished while you were away opens at its end (#38963) --- apps/web/src/components/chat/MessagesTimeline.tsx | 5 ++++- apps/web/src/components/chat/ThreadTimeline.tsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index c730075b9d8c7..e94c052e40b37 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -234,6 +234,8 @@ interface MessagesTimelineProps { ) => boolean; onReplyToResponse?: TimelineRowSharedState["onReplyToResponse"]; isWorking: boolean; + /** The thread is catching up from a cached copy, whose working state may be stale. */ + syncing?: boolean; runlessWorkActive?: boolean; activeTurnStartedAt?: string | null; /** Replaces "Thinking" while the active run's provider has not started a turn. */ @@ -353,6 +355,7 @@ const ConversationTimeline = memo(function ConversationTimeline({ onCiteAssistantText, onReplyToResponse, isWorking, + syncing = false, runlessWorkActive = false, activeTurnStartedAt = null, providerStartingLabel = null, @@ -1472,7 +1475,7 @@ const ConversationTimeline = memo(function ConversationTimeline({ !liveFollowEnabled || fullscreenAppRowId !== null ? false - : isWorking && !prefersReducedMotion && settlingListIdentity === null + : isWorking && !syncing && !prefersReducedMotion && settlingListIdentity === null ? TIMELINE_MAINTAIN_SCROLL_AT_END_SMOOTH : TIMELINE_MAINTAIN_SCROLL_AT_END } diff --git a/apps/web/src/components/chat/ThreadTimeline.tsx b/apps/web/src/components/chat/ThreadTimeline.tsx index a68d494d8b0a0..d600e5b5e0659 100644 --- a/apps/web/src/components/chat/ThreadTimeline.tsx +++ b/apps/web/src/components/chat/ThreadTimeline.tsx @@ -54,5 +54,7 @@ export function ThreadTimeline({ } rememberReadyThreadTimeline({ threadKey: activeThreadKey, entries }); }, [activeThreadKey, detailLoading, entries]); - return ; + return ( + + ); } From 5db8cca50a03e23dcc1cabb869962db7228652e3 Mon Sep 17 00:00:00 2001 From: "Christian R. Kounatze" Date: Thu, 19 Nov 2026 07:10:05 +0100 Subject: [PATCH 002/233] fix(desktop): middle-click paste ignores the GNOME key outside GNOME (#38943) Co-authored-by: user Co-authored-by: Julius Marminge --- .../src/app/DesktopPrimaryPaste.test.ts | 59 ++++++++++++++----- apps/desktop/src/app/DesktopPrimaryPaste.ts | 25 +++++--- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/apps/desktop/src/app/DesktopPrimaryPaste.test.ts b/apps/desktop/src/app/DesktopPrimaryPaste.test.ts index 3bf5c2567da53..07ef1b8dadefd 100644 --- a/apps/desktop/src/app/DesktopPrimaryPaste.test.ts +++ b/apps/desktop/src/app/DesktopPrimaryPaste.test.ts @@ -6,13 +6,16 @@ import * as Sink from "effect/Sink"; import * as Stream from "effect/Stream"; import * as TestClock from "effect/testing/TestClock"; import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner"; +import * as HostProcess from "@t3tools/shared/HostProcess"; import { readGtkPrimaryPasteEnabled } from "./DesktopPrimaryPaste.ts"; const encoder = new TextEncoder(); -const spawnerWithStdout = (stdout: Stream.Stream) => - ChildProcessSpawner.make(() => +const spawnerWithStdout = ( + stdout: Stream.Stream | ((command: string) => Stream.Stream), +) => + ChildProcessSpawner.make((command) => Effect.succeed( ChildProcessSpawner.makeHandle({ pid: ChildProcessSpawner.ProcessId(1), @@ -21,7 +24,10 @@ const spawnerWithStdout = (stdout: Stream.Stream) => kill: () => Effect.void, unref: Effect.succeed(Effect.void), stdin: Sink.drain, - stdout, + stdout: + typeof stdout === "function" + ? stdout(command._tag === "StandardCommand" ? command.command : "") + : stdout, stderr: Stream.empty, all: Stream.empty, getInputFd: () => Sink.drain, @@ -30,9 +36,20 @@ const spawnerWithStdout = (stdout: Stream.Stream) => ), ); -const read = (spawner: ChildProcessSpawner.ChildProcessSpawner["Service"]) => +const notFound = PlatformError.systemError({ + _tag: "NotFound", + module: "ChildProcess", + method: "spawn", + description: "not found", +}); + +const read = ( + spawner: ChildProcessSpawner.ChildProcessSpawner["Service"], + desktop = "ubuntu:GNOME", +) => readGtkPrimaryPasteEnabled.pipe( Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner), + Effect.provideService(HostProcess.Environment, { XDG_CURRENT_DESKTOP: desktop }), ); describe("readGtkPrimaryPasteEnabled", () => { @@ -45,18 +62,32 @@ describe("readGtkPrimaryPasteEnabled", () => { }), ); - it.effect("stays enabled when gsettings cannot run", () => + it.effect("outside GNOME, honours only a value the user set", () => Effect.gen(function* () { - const missing = ChildProcessSpawner.make(() => - Effect.fail( - PlatformError.systemError({ - _tag: "NotFound", - module: "ChildProcess", - method: "spawn", - description: "gsettings not found", - }), - ), + // gsettings reports the schema default, which only GNOME applies; dconf prints nothing when unset. + const unset = spawnerWithStdout((command) => + command === "gsettings" ? Stream.make(encoder.encode("false\n")) : Stream.empty, + ); + assert.isFalse(yield* read(unset, "ubuntu:GNOME")); + assert.isTrue(yield* read(unset, "XFCE")); + assert.isTrue(yield* read(unset, "")); + const userSet = spawnerWithStdout((command) => + command === "dconf" ? Stream.make(encoder.encode("false\n")) : Stream.empty, + ); + assert.isFalse(yield* read(userSet, "Hyprland")); + // Without dconf-cli, the effective value is the best evidence of an opt-out. + const noDconf = ChildProcessSpawner.make((command) => + command._tag === "StandardCommand" && command.command === "dconf" + ? Effect.fail(notFound) + : spawnerWithStdout(Stream.make(encoder.encode("false\n"))).spawn(command), ); + assert.isFalse(yield* read(noDconf, "XFCE")); + }), + ); + + it.effect("stays enabled when gsettings cannot run", () => + Effect.gen(function* () { + const missing = ChildProcessSpawner.make(() => Effect.fail(notFound)); assert.isTrue(yield* read(missing)); }), ); diff --git a/apps/desktop/src/app/DesktopPrimaryPaste.ts b/apps/desktop/src/app/DesktopPrimaryPaste.ts index 0ae8f0d61fcee..2c7aa59a7989c 100644 --- a/apps/desktop/src/app/DesktopPrimaryPaste.ts +++ b/apps/desktop/src/app/DesktopPrimaryPaste.ts @@ -13,15 +13,26 @@ export class DesktopPrimaryPaste extends Context.Service< >()("@t3tools/desktop/app/DesktopPrimaryPaste") {} // Chrome applies gtk-enable-primary-paste from chrome/, which Electron does not include. +// GNOME applies the key's schema default (false since gsettings-desktop-schemas 50); elsewhere +// only a value the user set is a choice. `dconf read` prints nothing for an unset key, but it is +// an optional package (dconf-cli), so without it fall back to the effective value. +const gsettingsQuery = ChildProcess.make( + "gsettings", + ["get", "org.gnome.desktop.interface", "gtk-enable-primary-paste"], + { stdin: "ignore", stderr: "ignore" }, +); +const dconfQuery = ChildProcess.make( + "dconf", + ["read", "/org/gnome/desktop/interface/gtk-enable-primary-paste"], + { stdin: "ignore", stderr: "ignore" }, +); + export const readGtkPrimaryPasteEnabled = Effect.gen(function* () { + const env = yield* HostProcess.Environment; const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const output = yield* spawner.string( - ChildProcess.make( - "gsettings", - ["get", "org.gnome.desktop.interface", "gtk-enable-primary-paste"], - { stdin: "ignore", stderr: "ignore" }, - ), - ); + const output = yield* env.XDG_CURRENT_DESKTOP?.split(":").includes("GNOME") + ? spawner.string(gsettingsQuery) + : spawner.string(dconfQuery).pipe(Effect.catch(() => spawner.string(gsettingsQuery))); return output.trim() !== "false"; }).pipe( Effect.timeout("2 seconds"), From 6b73ca9e4bef9a51e5b38c55a20ec974e36a4398 Mon Sep 17 00:00:00 2001 From: Navid Nadali Date: Thu, 19 Nov 2026 06:13:47 +0000 Subject: [PATCH 003/233] fix(server): the Claude process poll forgets jobs that have ended (#38800) Co-authored-by: Julius Marminge --- .../Adapters/ClaudeAdapterV2.ts | 63 ++++++---- .../ClaudeAgentSdkQueryRunner.test.ts | 119 ++++++++++++++++++ 2 files changed, 161 insertions(+), 21 deletions(-) diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts index 4a9ed9093d66d..26e9b9fadd2cd 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts @@ -510,6 +510,43 @@ function claudeDescendants( return found; } +/** What a CLI started, by pid and start time, recorded from each process table read while it runs. */ +export function makeClaudeDescendantTracker( + cliPid: number, + readProcessTable: Effect.Effect>, +) { + const tracked = new Map(); + const identity = (row: ClaudeProcessRow) => `${row.pid} ${row.started}`; + // The poll, a session close and the exit read one at a time, so each table is newer than all + // recorded here, and a pid and start time it no longer lists never run again. + const reading = Semaphore.makeUnsafe(1); + // After exit the CLI's pid may belong to an unrelated process, so only tracked jobs are roots. + const refresh = Effect.fn("ClaudeAgentSdkQueryRunner.trackDescendants")( + function* (cliRunning: boolean) { + const rows = yield* readProcessTable; + const running = new Set(rows.map(identity)); + // `ps -A` lists itself, so no rows is a failed read. + if (rows.length === 0) return running; + const roots = cliRunning ? [cliPid] : []; + for (const [key, row] of tracked) { + if (running.has(key)) roots.push(row.pid); + else tracked.delete(key); + } + for (const row of claudeDescendants(rows, roots)) tracked.set(identity(row), row); + return running; + }, + (effect) => reading.withPermits(1)(effect), + ); + return { + tracked: tracked as ReadonlyMap, + refresh: refresh(true).pipe(Effect.asVoid), + /** Reads the table after the CLI exited: what it left that is still the same process. */ + leftovers: refresh(false).pipe( + Effect.map((running) => [...tracked.values()].filter((row) => running.has(identity(row)))), + ), + }; +} + export const ClaudeProviderCapabilitiesV2 = { sessions: { supportsMultipleProviderThreadsPerSession: false, @@ -1433,29 +1470,13 @@ export const layerQueryRunner: Layer.Layer< // re-parented once the CLI exits. So the CLI's tree is recorded while it runs, and what is // still the same process (pid and start time) is stopped after it exits. const trackDescendants = (cliPid: number) => { - const tracked = new Map(); - const identity = (row: ClaudeProcessRow) => `${row.pid} ${row.started}`; - // After exit the CLI's pid may belong to an unrelated process, so only tracked jobs are roots. - const refresh = Effect.fn("ClaudeAgentSdkQueryRunner.trackDescendants")(function* ( - cliRunning: boolean, - ) { - const rows = yield* readProcessTable; - const running = new Set(rows.map(identity)); - const roots = [ - ...(cliRunning ? [cliPid] : []), - ...[...tracked.values()].flatMap((row) => (running.has(identity(row)) ? [row.pid] : [])), - ]; - for (const row of claudeDescendants(rows, roots)) tracked.set(identity(row), row); - return running; - }); - const stop = refresh(false).pipe( - Effect.map((running) => { - for (const row of tracked.values()) { - if (running.has(identity(row))) killClaudeDescendant(row); - } + const tracker = makeClaudeDescendantTracker(cliPid, readProcessTable); + const stop = tracker.leftovers.pipe( + Effect.map((rows) => { + for (const row of rows) killClaudeDescendant(row); }), ); - return { refresh: refresh(true).pipe(Effect.asVoid), stop }; + return { refresh: tracker.refresh, stop }; }; // The open span below is the tracing boundary for both attempts. diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts index 4d279d1c8584c..2a2a861ffb3ac 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts @@ -31,6 +31,7 @@ import { ClaudeAgentSdkQueryRunner, type ClaudeAgentSdkQueryOpenInput, layerQueryRunner, + makeClaudeDescendantTracker, spawnClaudeProcessGroup, } from "./ClaudeAdapterV2.ts"; @@ -721,6 +722,124 @@ describe.skipIf(HostProcess.Platform.defaultValue() === "win32")("Claude CLI pro }), ); + const processRow = (pid: number, ppid: number, startedSecond: number) => ({ + pid, + ppid, + pgid: pid, + started: `Sun Nov 15 10:00:0${startedSecond} 2026`, + }); + const byNumber = (left: number, right: number) => left - right; + + it.effect( + "keeps only the descendants the CLI still has running, however many jobs it ran", + () => { + let table: ReadonlyArray> = []; + const tracker = makeClaudeDescendantTracker( + 1000, + Effect.sync(() => table), + ); + const jobs = (poll: number) => [0, 1, 2, 3].map((job) => 1100 + poll * 4 + job); + return Effect.gen(function* () { + for (let poll = 0; poll < 50; poll++) { + table = [ + processRow(1000, 10, 0), + processRow(1001, 1000, 0), + // A job that outlives the shell that started it is re-parented. + ...(poll === 0 ? [processRow(1003, 1000, 0)] : []), + processRow(1002, poll === 0 ? 1003 : 1, 0), + ...jobs(poll).map((pid) => processRow(pid, 1001, 1)), + ]; + yield* tracker.refresh; + // A failed `ps` reads as no rows. + table = []; + yield* tracker.refresh; + } + assert.strictEqual(tracker.tracked.size, 6); + assert.deepStrictEqual( + [...tracker.tracked.values()].map((row) => row.pid).toSorted(byNumber), + [1001, 1002, ...jobs(49)], + ); + }); + }, + ); + + it.effect( + "stops at exit only what the CLI left running, never a process that took a job's pid", + () => { + const orphan = processRow(1300, 1, 1); + // Unrelated processes take both finished jobs' pids, one in the second its job started. + const unrelated = [processRow(1100, 1, 2), processRow(1200, 1, 1)]; + const tables = [ + [ + processRow(1000, 10, 0), + processRow(1001, 1000, 0), + processRow(1100, 1001, 1), + processRow(1200, 1001, 1), + processRow(1300, 1001, 1), + ], + [processRow(1000, 10, 0), orphan], + [processRow(1000, 10, 0), ...unrelated, orphan], + [...unrelated, orphan], + ]; + const tracker = makeClaudeDescendantTracker( + 1000, + Effect.sync(() => tables.shift() ?? []), + ); + return Effect.gen(function* () { + yield* tracker.refresh; + yield* tracker.refresh; + yield* tracker.refresh; + assert.deepStrictEqual( + (yield* tracker.leftovers).map((row) => row.pid), + [1300], + ); + }); + }, + ); + + // The poll and a session close read the table independently. The older table still lists a + // re-parented job and the child it just started; the newer one lists a job started since. + it.effect( + "stops at exit what the poll and a session close found, reading at the same time", + () => { + type Table = ReadonlyArray>; + const cli = processRow(1000, 10, 0); + const olderReadStarted = Deferred.makeUnsafe(); + const olderRead = Deferred.makeUnsafe(); + let read: Effect.Effect
= Effect.succeed([ + cli, + processRow(1001, 1000, 0), + processRow(1100, 1001, 1), + ]); + const tracker = makeClaudeDescendantTracker( + 1000, + Effect.suspend(() => read), + ); + return Effect.gen(function* () { + yield* tracker.refresh; + read = Deferred.succeed(olderReadStarted, undefined).pipe( + Effect.andThen(Deferred.await(olderRead)), + ); + const older = yield* tracker.refresh.pipe(Effect.forkChild); + yield* Deferred.await(olderReadStarted); + read = Effect.succeed([cli, processRow(1200, 1, 1), processRow(1300, 1000, 2)]); + const newer = yield* tracker.refresh.pipe(Effect.forkChild({ startImmediately: true })); + yield* Deferred.succeed(olderRead, [ + cli, + processRow(1100, 1, 1), + processRow(1200, 1100, 1), + ]); + yield* Fiber.join(older); + yield* Fiber.join(newer); + read = Effect.succeed([processRow(1200, 1, 1), processRow(1300, 1, 2)]); + assert.deepStrictEqual( + (yield* tracker.leftovers).map((row) => row.pid).toSorted(byNumber), + [1200, 1300], + ); + }); + }, + ); + const rootRefusal = "--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons"; From 292a8e448b3970b4ea556ff29816d09ffa76b69d Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Nov 2026 22:14:00 -0800 Subject: [PATCH 004/233] fix(server): list skills from plugins in the Antigravity instance profile (#38960) --- .../src/provider/Drivers/AntigravityDriver.ts | 2 +- .../Drivers/AntigravitySkills.test.ts | 28 ++++++++++++ .../src/provider/Drivers/AntigravitySkills.ts | 44 +++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/apps/server/src/provider/Drivers/AntigravityDriver.ts b/apps/server/src/provider/Drivers/AntigravityDriver.ts index 2491b5ef46442..6d9361d3e6a03 100644 --- a/apps/server/src/provider/Drivers/AntigravityDriver.ts +++ b/apps/server/src/provider/Drivers/AntigravityDriver.ts @@ -566,7 +566,7 @@ export const AntigravityDriver: ProviderDriver< snapshotForCwd: (cwd) => !enabled ? provider.snapshot.getSnapshot - : discoverAntigravitySkills({ cwd, userHome }).pipe( + : discoverAntigravitySkills({ cwd, userHome, profileDirectory }).pipe( Effect.provideService(FileSystem.FileSystem, fileSystem), Effect.provideService(Path.Path, path), Effect.flatMap((skills) => provider.snapshotForCwd(cwd, skills)), diff --git a/apps/server/src/provider/Drivers/AntigravitySkills.test.ts b/apps/server/src/provider/Drivers/AntigravitySkills.test.ts index c81b38a00dbcb..79f9bc438447c 100644 --- a/apps/server/src/provider/Drivers/AntigravitySkills.test.ts +++ b/apps/server/src/provider/Drivers/AntigravitySkills.test.ts @@ -25,6 +25,7 @@ const makeWorkspace = Effect.fn("makeWorkspace")(function* () { return { cwd: path.join(temporaryDirectory, "workspace"), userHome: path.join(temporaryDirectory, "home"), + profileDirectory: path.join(temporaryDirectory, "profile"), }; }); @@ -93,6 +94,33 @@ it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => { }), ); + it.effect("reads skills from enabled plugins in the instance's Antigravity profile", () => + Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const workspace = yield* makeWorkspace(); + const profileDirectory = path.join(workspace.userHome, "t3", "providers", "antigravity", "p"); + const plugins = path.join(profileDirectory, "config", "plugins"); + for (const plugin of ["demo", "off"]) { + yield* writeSkill( + path.join(plugins, plugin, "skills", `${plugin}-skill`), + `---\nname: ${plugin}-skill\ndescription: From ${plugin}.\n---\n`, + ); + } + yield* fileSystem.writeFileString( + path.join(profileDirectory, "config", "config.json"), + JSON.stringify({ plugins: { off: { enabled: false } } }), + ); + yield* fileSystem.writeFileString(path.join(plugins, ".DS_Store"), "x"); + const input = { ...workspace, profileDirectory }; + + assert.deepEqual( + (yield* discoverAntigravitySkills(input)).map((skill) => skill.name), + ["demo-skill"], + ); + }), + ); + it.effect("uses native root order for duplicate names", () => Effect.gen(function* () { const fileSystem = yield* FileSystem.FileSystem; diff --git a/apps/server/src/provider/Drivers/AntigravitySkills.ts b/apps/server/src/provider/Drivers/AntigravitySkills.ts index 96e1fe61109f4..ddea4239745e8 100644 --- a/apps/server/src/provider/Drivers/AntigravitySkills.ts +++ b/apps/server/src/provider/Drivers/AntigravitySkills.ts @@ -45,6 +45,15 @@ const SkillFrontmatter = Schema.Struct({ description: Schema.optional(Schema.NullOr(Schema.String)), }); const decodeSkillFrontmatter = Schema.decodeUnknownSync(SkillFrontmatter); +const decodePluginPreferences = Schema.decodeUnknownOption( + Schema.fromJsonString( + Schema.Struct({ + plugins: Schema.optional( + Schema.Record(Schema.String, Schema.Struct({ enabled: Schema.optional(Schema.Boolean) })), + ), + }), + ), +); export class AntigravitySkillsProbeError extends Schema.TaggedError()( "AntigravitySkillsProbeError", @@ -166,6 +175,8 @@ const readSkillFrontmatter = Effect.fn("readAntigravitySkill")(function* ( export const discoverAntigravitySkills = Effect.fn("discoverAntigravitySkills")(function* (input: { readonly cwd: string; readonly userHome: string; + /** The instance's GEMINI_HOME, where agy loads plugins from. */ + readonly profileDirectory: string; }): Effect.fn.Return< ReadonlyArray, AntigravitySkillsProbeError, @@ -239,5 +250,38 @@ export const discoverAntigravitySkills = Effect.fn("discoverAntigravitySkills")( for (const root of roots) { yield* scanDirectory(root.directory, root.scope, true); } + + const pluginsDirectory = path.join(input.profileDirectory, "config", "plugins"); + const plugins = yield* readIfPresent( + fileSystem.readDirectory(pluginsDirectory), + pluginsDirectory, + ); + if (plugins !== undefined && plugins.length > 0) { + const configPath = path.join(input.profileDirectory, "config", "config.json"); + const configInfo = yield* readIfPresent(fileSystem.stat(configPath), configPath); + if (configInfo?.type === "File" && configInfo.size > BigInt(MAX_SKILL_BYTES)) { + return yield* new AntigravitySkillsProbeError({ + reason: "scan-budget-exhausted", + path: configPath, + }); + } + const config = + configInfo?.type === "File" + ? yield* readIfPresent(fileSystem.readFileString(configPath), configPath) + : undefined; + const preferences = config === undefined ? undefined : decodePluginPreferences(config); + const disabled = new Set( + Object.entries( + (preferences?._tag === "Some" ? preferences.value.plugins : undefined) ?? {}, + ).flatMap(([name, plugin]) => (plugin.enabled === false ? [name] : [])), + ); + for (const plugin of plugins.toSorted()) { + if (disabled.has(plugin)) continue; + const pluginDirectory = path.join(pluginsDirectory, plugin); + const info = yield* readIfPresent(fileSystem.stat(pluginDirectory), pluginDirectory); + if (info?.type !== "Directory") continue; + yield* scanDirectory(path.join(pluginDirectory, "skills"), "user", true); + } + } return [...skillsByName.values()].sort((left, right) => left.name.localeCompare(right.name)); }); From 23c339e8be81e7660a192f8fd11f66c5b4a0de7e Mon Sep 17 00:00:00 2001 From: Alb11747 Date: Thu, 19 Nov 2026 01:14:26 -0500 Subject: [PATCH 005/233] fix(server): preserve native history in busy Codex forks (#29239) Co-authored-by: GPT-6.1 Sol at high effort Co-authored-by: Julius Marminge Co-authored-by: Claude Opus 5.5 at medium effort, merge integration --- .../Adapters/CodexAdapterV2.ts | 1 + .../orchestration-v2/CommandPolicy.test.ts | 78 +++++-- .../src/orchestration-v2/CommandPolicy.ts | 20 +- .../src/orchestration-v2/Orchestrator.ts | 3 + .../ProviderTurnStartService.test.ts | 202 +++++++++++++++--- .../ProviderTurnStartService.ts | 31 ++- 6 files changed, 276 insertions(+), 59 deletions(-) diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts index f82cbde34d3f6..4c164b86ab1e7 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts @@ -273,6 +273,7 @@ export const CodexProviderCapabilitiesV2 = { canRollbackThread: true, canForkThread: true, canForkFromTurn: true, + canForkWhileSourceRunning: true, canForkFromSubagentThread: true, exposesNativeThreadId: true, }, diff --git a/apps/server/src/orchestration-v2/CommandPolicy.test.ts b/apps/server/src/orchestration-v2/CommandPolicy.test.ts index 087b24646ef4e..e9f829524948b 100644 --- a/apps/server/src/orchestration-v2/CommandPolicy.test.ts +++ b/apps/server/src/orchestration-v2/CommandPolicy.test.ts @@ -312,6 +312,7 @@ layer("CommandPolicyV2", (it) => { capabilities: CursorProviderCapabilitiesV2, sameProvider: true, hasStrongNativeSource: true, + hasNativeTurnBoundary: false, sourceRunStatus: "completed", fromSpecificTurn: true, sourceBusy: false, @@ -321,29 +322,60 @@ layer("CommandPolicyV2", (it) => { }), ); - it.effect("forks a busy source natively only where the provider supports it", () => - Effect.gen(function* () { - const policy = yield* CommandPolicy.CommandPolicyV2; - const decide = ( - provider: "codex" | "claudeAgent", - capabilities: OrchestrationV2ProviderCapabilities, - sourceBusy: boolean, - ) => - policy.decideForkExecution({ - commandId, - threadId, - providerInstanceId: ProviderInstanceId.make(provider), - capabilities, - sameProvider: true, - hasStrongNativeSource: true, - sourceRunStatus: "completed", - fromSpecificTurn: true, - sourceBusy, - }); + it.effect.each([ + { + provider: "codex", + capabilities: CodexProviderCapabilitiesV2, + hasNativeTurnBoundary: true, + busyStrategy: "native_fork", + }, + { + provider: "codex without busy forks", + capabilities: { + ...CodexProviderCapabilitiesV2, + threads: { ...CodexProviderCapabilitiesV2.threads, canForkWhileSourceRunning: undefined }, + }, + hasNativeTurnBoundary: true, + busyStrategy: "portable_context", + }, + { + provider: "codex", + capabilities: CodexProviderCapabilitiesV2, + hasNativeTurnBoundary: false, + busyStrategy: "portable_context", + }, + { + provider: "claudeAgent", + capabilities: ClaudeProviderCapabilitiesV2, + hasNativeTurnBoundary: false, + busyStrategy: "native_fork", + }, + ] satisfies ReadonlyArray<{ + provider: string; + capabilities: OrchestrationV2ProviderCapabilities; + hasNativeTurnBoundary: boolean; + busyStrategy: CommandPolicy.ForkExecutionPolicyV2; + }>)( + "forks a busy $provider source with hasNativeTurnBoundary=$hasNativeTurnBoundary as $busyStrategy", + ({ capabilities, hasNativeTurnBoundary, busyStrategy }) => + Effect.gen(function* () { + const policy = yield* CommandPolicy.CommandPolicyV2; + const decide = (sourceBusy: boolean) => + policy.decideForkExecution({ + commandId, + threadId, + providerInstanceId: ProviderInstanceId.make("custom-instance"), + capabilities, + sameProvider: true, + hasStrongNativeSource: true, + hasNativeTurnBoundary, + sourceRunStatus: "completed", + fromSpecificTurn: true, + sourceBusy, + }); - assert.equal(yield* decide("codex", CodexProviderCapabilitiesV2, false), "native_fork"); - assert.equal(yield* decide("codex", CodexProviderCapabilitiesV2, true), "portable_context"); - assert.equal(yield* decide("claudeAgent", ClaudeProviderCapabilitiesV2, true), "native_fork"); - }), + assert.equal(yield* decide(false), "native_fork"); + assert.equal(yield* decide(true), busyStrategy); + }), ); }); diff --git a/apps/server/src/orchestration-v2/CommandPolicy.ts b/apps/server/src/orchestration-v2/CommandPolicy.ts index c49d229949a77..0191163e8bc75 100644 --- a/apps/server/src/orchestration-v2/CommandPolicy.ts +++ b/apps/server/src/orchestration-v2/CommandPolicy.ts @@ -123,6 +123,20 @@ export function isActiveRun(run: OrchestrationV2Run): boolean { ); } +/** + * Providers that key forks on native turn ids can only fork a busy source from a turn with one; + * a synthetic or missing boundary would fork the live conversation, including the running turn. + */ +export function canForkBusySourceNatively( + capabilities: OrchestrationV2ProviderCapabilities, + hasNativeTurnBoundary: boolean, +): boolean { + return ( + capabilities.threads.canForkWhileSourceRunning === true && + (hasNativeTurnBoundary || !capabilities.turns.exposesNativeTurnId) + ); +} + /** The run a follow-up to a finished child binds to: the latest active one, else the last that ran. */ export function followUpOwnerRun( runs: ReadonlyArray, @@ -226,9 +240,10 @@ export interface CommandPolicyV2Shape { input: CapabilityCheckInput & { readonly sameProvider: boolean; readonly hasStrongNativeSource: boolean; + readonly hasNativeTurnBoundary: boolean; readonly sourceRunStatus: OrchestrationV2Run["status"]; readonly fromSpecificTurn: boolean; - /** Later source runs are still active; providers cannot fork a thread mid-turn. */ + /** Later source runs are still active. */ readonly sourceBusy: boolean; }, ) => Effect.Effect; @@ -395,7 +410,8 @@ const decideForkExecution: CommandPolicyV2Shape["decideForkExecution"] = (input) (input.sourceRunStatus === "completed" || input.sourceRunStatus === "waiting") && input.sameProvider && input.hasStrongNativeSource && - (!input.sourceBusy || input.capabilities.threads.canForkWhileSourceRunning === true) && + (!input.sourceBusy || + canForkBusySourceNatively(input.capabilities, input.hasNativeTurnBoundary)) && input.capabilities.threads.canForkThread && (!input.fromSpecificTurn || input.capabilities.threads.canForkFromTurn) && input.capabilities.identity.nativeThreadIds === "strong"; diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 1ae3ef3b7bcb7..9bbdac7d0ac0b 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -8620,6 +8620,9 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio sameProvider: pendingForkTransfer.sourceProviderInstanceId === modelSelection.instanceId, hasStrongNativeSource: sourceProviderThread?.nativeThreadRef?.strength === "strong", + hasNativeTurnBoundary: + sourceProjection?.providerTurns.find((turn) => turn.id === sourceProviderTurnId) + ?.nativeTurnRef != null, sourceRunStatus: sourceRun.status, fromSpecificTurn: sourceRun !== null, sourceBusy: sourceRunsAfterFork.some(isActiveRun), diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts index e5c2e6e7cfd3b..b3d39ef1c6077 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts @@ -23,6 +23,7 @@ import { RunAttemptId, RunId, ThreadId, + TurnItemId, ProjectId, EnvironmentId, PROVIDER_SEND_TURN_MAX_INPUT_CHARS, @@ -456,6 +457,7 @@ function makeLocalCommandHarness(input: { readonly steeringRestart?: boolean; readonly nativeGoals?: boolean; readonly canForkWhileSourceRunning?: boolean; + readonly exposesNativeTurnId?: boolean; readonly goalDriver?: "opencode" | "antigravity"; readonly worktreePath?: string; readonly worktreesDir?: string; @@ -497,6 +499,8 @@ function makeLocalCommandHarness(input: { readonly acceptedResume?: boolean; readonly restartedResume?: boolean; readonly nativeForkFrom?: "idle" | "busy"; + readonly sourceBoundary?: "native" | "synthetic"; + readonly sourceRolledBack?: boolean; readonly switchedProvider?: boolean; readonly threadRuntimeMode?: OrchestrationV2ThreadProjection["thread"]["runtimeMode"]; }; @@ -702,11 +706,14 @@ function makeLocalCommandHarness(input: { providerThreadId: parentProviderThread.id, nodeId: rootNodeId, runAttemptId: RunAttemptId.make(`side-chat-parent-attempt-${ordinal}`), - nativeTurnRef: { - driver: providerThread.driver, - nativeId: `side-chat-parent-native-turn-${ordinal}`, - strength: "strong" as const, - }, + nativeTurnRef: + ordinal === 1 && input.sideChat?.sourceBoundary === "synthetic" + ? null + : { + driver: providerThread.driver, + nativeId: `side-chat-parent-native-turn-${ordinal}`, + strength: "strong" as const, + }, ordinal, status: "completed" as const, startedAt: now, @@ -729,7 +736,10 @@ function makeLocalCommandHarness(input: { ordinal: 1, providerThreadId: parentProviderThread.id, activeAttemptId: parentTurns[0]!.attempt.id, - status: "completed" as const, + status: + input.sideChat?.sourceRolledBack === true + ? ("rolled_back" as const) + : ("completed" as const), completedAt: now, }, { @@ -1101,10 +1111,14 @@ function makeLocalCommandHarness(input: { ...CodexProviderCapabilitiesV2, threads: { ...CodexProviderCapabilitiesV2.threads, - canForkWhileSourceRunning: input.canForkWhileSourceRunning, + canForkWhileSourceRunning: + input.canForkWhileSourceRunning ?? + CodexProviderCapabilitiesV2.threads.canForkWhileSourceRunning, }, turns: { ...CodexProviderCapabilitiesV2.turns, + exposesNativeTurnId: + input.exposesNativeTurnId ?? CodexProviderCapabilitiesV2.turns.exposesNativeTurnId, ...(input.nativeGoals === undefined ? {} : { supportsNativeGoals: input.nativeGoals }), }, }, @@ -1135,7 +1149,7 @@ function makeLocalCommandHarness(input: { strength: "strong" as const, }, }; - const forkThread = vi.fn((_fork: ProviderAdapter.ProviderAdapterV2ForkThreadInput) => + const forkThread = vi.fn(() => Effect.succeed(sideChatThread), ); const sideChatSession = { @@ -1258,6 +1272,21 @@ function makeLocalCommandHarness(input: { const getThreadRecords = vi.fn((id) => Effect.succeed(id === parentThreadId ? parentRecords : projection), ); + const prepareProviderHandoff = vi.fn< + ContextHandoffService.ContextHandoffServiceV2["Service"]["prepareProviderHandoff"] + >((handoff) => + input.sideChat?.nativeForkFrom === undefined + ? Effect.die("history read must fail first") + : Effect.succeed({ + ...handoff, + id: ContextHandoffId.make("side-chat-fork-context"), + createdByProviderInstanceId: handoff.toProviderInstanceId, + status: "ready", + summaryMessageId: null, + summaryText: "PARENT_HISTORY", + updatedAt: handoff.createdAt, + }), + ); const getTurnStartContext = vi.fn(() => Effect.succeed({ ...projection, @@ -1297,18 +1326,7 @@ function makeLocalCommandHarness(input: { Layer.provide( Layer.mergeAll( Layer.mock(ContextHandoffService.ContextHandoffServiceV2)({ - prepareProviderHandoff: (handoff) => - input.sideChat?.nativeForkFrom === undefined - ? Effect.die("history read must fail first") - : Effect.succeed({ - ...handoff, - id: ContextHandoffId.make("side-chat-fork-context"), - createdByProviderInstanceId: handoff.toProviderInstanceId, - status: "ready", - summaryMessageId: null, - summaryText: "PARENT_HISTORY", - updatedAt: handoff.createdAt, - }), + prepareProviderHandoff, }), Layer.mock(EventSink.EventSinkV2)({ writeIfRunCurrent, @@ -1403,6 +1421,7 @@ function makeLocalCommandHarness(input: { startRootRun, startTurn, forkThread, + prepareProviderHandoff, interruptTurn, tryHandlePromptCommand, events, @@ -2345,9 +2364,34 @@ effectIt.effect.each([ ); effectIt.effect.each([ - { nativeForkFrom: "idle", forks: true, transferStatus: "consumed", handoffIds: [] }, + { + nativeForkFrom: "idle", + canForkWhileSourceRunning: false, + sourceBoundary: "native", + forks: true, + transferStatus: "consumed", + handoffIds: [], + }, { nativeForkFrom: "busy", + canForkWhileSourceRunning: true, + sourceBoundary: "native", + forks: true, + transferStatus: "consumed", + handoffIds: [], + }, + { + nativeForkFrom: "busy", + canForkWhileSourceRunning: false, + sourceBoundary: "native", + forks: false, + transferStatus: "resolved_portable", + handoffIds: ["side-chat-fork-context"], + }, + { + nativeForkFrom: "busy", + canForkWhileSourceRunning: true, + sourceBoundary: "synthetic", forks: false, transferStatus: "resolved_portable", handoffIds: ["side-chat-fork-context"], @@ -2355,17 +2399,19 @@ effectIt.effect.each([ { nativeForkFrom: "busy", canForkWhileSourceRunning: true, + exposesNativeTurnId: false, + sourceBoundary: "synthetic", forks: true, transferStatus: "consumed", handoffIds: [], }, ] as const)( - "runs a planned native side chat fork when the parent is $nativeForkFrom (fork while running: $canForkWhileSourceRunning)", - ({ nativeForkFrom, forks, transferStatus, handoffIds, ...capability }) => + "runs a planned native side chat fork when the parent is $nativeForkFrom with canForkWhileSourceRunning=$canForkWhileSourceRunning, sourceBoundary=$sourceBoundary and exposesNativeTurnId=$exposesNativeTurnId", + ({ nativeForkFrom, sourceBoundary, forks, transferStatus, handoffIds, ...capability }) => Effect.gen(function* () { const harness = makeLocalCommandHarness({ text: "What is the main thread doing?", - sideChat: { contextRun: "current", nativeForkFrom }, + sideChat: { contextRun: "current", nativeForkFrom, sourceBoundary }, ...capability, }); @@ -2376,6 +2422,11 @@ effectIt.effect.each([ expect( harness.forkThread.mock.calls[0]?.[0].sourceProviderTurns?.map((turn) => turn.id), ).toEqual(forks ? ["side-chat-parent-turn-1"] : undefined); + if (forks) { + expect(harness.forkThread).toHaveBeenCalledWith( + expect.objectContaining({ providerTurnId: "side-chat-parent-turn-1" }), + ); + } expect(harness.projection().contextTransfers).toMatchObject([ { id: "side-chat-fork", status: transferStatus }, ]); @@ -2430,6 +2481,109 @@ effectIt.effect.each( }), ); +effectIt.effect.each(["before-start", "during-fork"] as const)( + "recovers a planned native fork after the parent rolls back %s", + (rollback) => + Effect.gen(function* () { + const harness = makeLocalCommandHarness({ + text: "Continue from the selected turn", + sideChat: { + contextRun: "current", + nativeForkFrom: "idle", + sourceRolledBack: rollback === "before-start", + }, + }); + const parentThreadId = ThreadId.make("side-chat-parent"); + let parent = { + ...harness.projection(), + ...(yield* harness.getThreadRecords(parentThreadId, [ + "runs", + "attempts", + "providerThreads", + "providerTurns", + "turnItems", + ])), + }; + const selectedRun = parent.runs[0]!; + const earlierRun = { + ...selectedRun, + id: RunId.make("side-chat-kept-run"), + ordinal: 1, + activeAttemptId: null, + status: "completed" as const, + }; + const items = [earlierRun, selectedRun].map((sourceRun, ordinal) => ({ + type: "user_message" as const, + id: TurnItemId.make(`parent-item-${ordinal}`), + threadId: parentThreadId, + runId: sourceRun.id, + nodeId: null, + providerThreadId: sourceRun.providerThreadId, + providerTurnId: null, + nativeItemRef: null, + parentItemId: null, + ordinal, + status: "completed" as const, + title: null, + startedAt: parent.updatedAt, + completedAt: parent.updatedAt, + updatedAt: parent.updatedAt, + createdBy: "user" as const, + creationSource: "server" as const, + messageId: MessageId.make(`parent-message-${ordinal}`), + text: ordinal === 0 ? "KEPT_HISTORY" : "ROLLED_BACK_HISTORY", + inputIntent: "turn_start" as const, + attachments: [], + })); + parent = { + ...parent, + runs: [ + earlierRun, + ...parent.runs.map((sourceRun) => ({ ...sourceRun, ordinal: sourceRun.ordinal + 1 })), + ], + turnItems: items, + }; + harness.getThreadRecords.mockImplementation((id) => + Effect.succeed(id === parentThreadId ? parent : harness.projection()), + ); + harness.forkThread.mockImplementation(() => + Effect.sync(() => { + parent = { + ...parent, + runs: parent.runs.map((sourceRun) => + sourceRun.id === selectedRun.id ? { ...sourceRun, status: "rolled_back" } : sourceRun, + ), + }; + }).pipe( + Effect.andThen( + Effect.fail( + new ProviderAdapter.ProviderAdapterForkThreadError({ + driver: ProviderDriverKind.make("codex"), + providerThreadId: ProviderThreadId.make("side-chat-parent-provider-thread"), + cause: "Selected native turn was removed by rollback", + }), + ), + ), + ), + ); + + yield* harness.start; + + expect(harness.forkThread).toHaveBeenCalledTimes(rollback === "before-start" ? 0 : 1); + expect(harness.projection().contextTransfers).toMatchObject([ + { id: "side-chat-fork", status: "resolved_portable" }, + ]); + expect(harness.startTurn.mock.calls[0]?.[0].message.text).toContain("PARENT_HISTORY"); + expect(harness.projection().providerThreads[0]?.handoffIds).toEqual([ + "side-chat-fork-context", + ]); + expect(harness.settledRuns).toEqual([]); + expect( + harness.prepareProviderHandoff.mock.calls[0]?.[0].items.map((item) => item.id), + ).toEqual([items[0]!.id]); + }), +); + effectIt.effect.each([ { runStatus: "failed", turnStatus: "completed" }, { runStatus: "completed", turnStatus: "completed" }, diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts index 5110a25f7d432..cf332e010d6a1 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.ts @@ -45,7 +45,7 @@ import { makeRestoreMissingWorktree } from "../workspace/restoreMissingWorktree. import * as EventSink from "./EventSink.ts"; import * as ProviderUsageAnalytics from "../telemetry/ProviderUsageAnalytics.ts"; import * as ContextHandoffService from "./ContextHandoffService.ts"; -import { isActiveRun } from "./CommandPolicy.ts"; +import { canForkBusySourceNatively, isActiveRun } from "./CommandPolicy.ts"; import { contextBoundaryOrdinal } from "./contextBoundary.ts"; import { DEFAULT_HANDOFF_TOKEN_CAP, @@ -1260,7 +1260,7 @@ export const layer: Layer.Layer< let recoveryTurnItem: OrchestrationV2TurnItem | undefined; const loadedProviderThread = yield* Effect.gen(function* () { if (nativeForkTransfer !== undefined) { - const sourceProjection = yield* projectionStore.getThreadRecords( + let sourceProjection = yield* projectionStore.getThreadRecords( nativeForkTransfer.sourceThreadId, ["runs", "providerThreads", "attempts", "providerTurns"], ); @@ -1284,15 +1284,19 @@ export const layer: Layer.Layer< cause: `Native fork transfer ${nativeForkTransfer.id} has no source provider execution.`, }); } - // Most providers refuse to fork a busy thread, so a source that started a turn after - // dispatch planned this fork gets the portable context dispatch gives a busy source. - const sourceBusy = - session.providerSession.capabilities.threads.canForkWhileSourceRunning !== true && - sourceProjection.runs.some( - (candidate) => candidate.ordinal > sourceRun.ordinal && isActiveRun(candidate), - ); + // The source may have started a turn after dispatch planned this fork. + const sourceBusy = sourceProjection.runs.some( + (candidate) => candidate.ordinal > sourceRun.ordinal && isActiveRun(candidate), + ); let nativeForkFailure: string | undefined; - if (!sourceBusy) { + if ( + (sourceRun.status === "completed" || sourceRun.status === "waiting") && + (!sourceBusy || + canForkBusySourceNatively( + session.providerSession.capabilities, + sourceProviderTurn?.nativeTurnRef != null, + )) + ) { // Rolled-back turns are no longer in the source conversation, so they cannot bound a fork. const rolledBackAttemptIds = new Set( sourceProjection.attempts @@ -1335,6 +1339,13 @@ export const layer: Layer.Layer< message: startFailureMessage(forked.failure), class: "provider_error", }).message; + sourceProjection = { + ...sourceProjection, + ...(yield* projectionStore.getThreadRecords(nativeForkTransfer.sourceThreadId, [ + "runs", + "attempts", + ])), + }; } const nativeForkFailed = nativeForkFailure !== undefined; const sourceItems = yield* ContextHandoffService.readForkHistoryItems( From ae3c7a68b4d430a8f763d90a24203fb14d4b4713 Mon Sep 17 00:00:00 2001 From: Jackson Miller Date: Thu, 19 Nov 2026 01:14:44 -0500 Subject: [PATCH 006/233] fix(server): archiving a thread also archives its side chats (#32213) Co-authored-by: Claude Opus 5.5 Co-authored-by: Julius Marminge --- .../src/orchestration-v2/Orchestrator.ts | 81 +++++++--- .../ThreadFork.execution.test.ts | 146 ++++++++++++++++++ docs/user/thread-sidebar.md | 3 +- 3 files changed, 208 insertions(+), 22 deletions(-) diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 9bbdac7d0ac0b..7edd289748d8e 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -1538,6 +1538,14 @@ const nativeSubagentRef = (subagent: OrchestrationV2Subagent): DyingNativeSubage providerInstanceId: subagent.providerInstanceId, }); +const hasRunningDelegatedTasks = (subagents: ReadonlyArray) => + subagents.some( + (task) => + task.origin === "app_owned" && + task.childThreadId !== null && + isOrchestrationV2WorkActive(task.status), + ); + const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(function* () { const checkpointService = yield* CheckpointServiceV2; const commandPolicy = yield* CommandPolicyV2; @@ -1817,7 +1825,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio .findThread(threadId) .pipe(Effect.mapError((cause) => new OrchestratorProjectionError({ threadId, cause }))); - /** Side chats live inside their parent, so deleting the parent deletes them too. */ + /** Side chats live inside their parent, so deleting or archiving the parent takes them too. */ const liveSideChatIds = Effect.fn("Orchestrator.liveSideChatIds")( function* (threadId: ThreadId) { const { contextTransfers } = yield* projectionStore @@ -4260,14 +4268,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio const records = yield* projectionStore .getThreadRecords(command.threadId, ["subagents"]) .pipe(mapDispatchError(command)); - if ( - records.subagents.some( - (task) => - task.origin === "app_owned" && - task.childThreadId !== null && - isOrchestrationV2WorkActive(task.status), - ) - ) { + if (hasRunningDelegatedTasks(records.subagents)) { return yield* new OrchestratorDispatchError({ commandId: command.commandId, commandType: command.type, @@ -15207,7 +15208,39 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio }; } case "thread.archive": - case "thread.unarchive": + case "thread.unarchive": { + const parentArchivedAt = (yield* findThread(command.threadId))?.archivedAt ?? null; + yield* dispatchThreadMutation(command, events, effects); + // Unarchive restores the side chats this parent's archive took, not ones archived before it. + for (const threadId of sideChatIds) { + const sideChatArchivedAt = (yield* findThread(threadId))?.archivedAt ?? null; + const follows = + command.type === "thread.archive" + ? sideChatArchivedAt === null + : sideChatArchivedAt !== null && + parentArchivedAt !== null && + DateTime.toEpochMillis(sideChatArchivedAt) >= + DateTime.toEpochMillis(parentArchivedAt); + if (!follows) continue; + // Archive refuses a side chat still waiting on delegated tasks, so it stays active. + if (command.type === "thread.archive") { + const { subagents } = yield* projectionStore + .getThreadRecords(threadId, ["subagents"]) + .pipe(mapDispatchError(command)); + if (hasRunningDelegatedTasks(subagents)) continue; + } + yield* dispatchThreadMutation( + { + ...command, + commandId: CommandId.make(`${command.commandId}:side-chat:${threadId}`), + threadId, + }, + events, + effects, + ); + } + break; + } case "thread.settle": case "thread.unsettle": case "thread.snooze": @@ -15552,7 +15585,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio } satisfies OrchestratorV2DispatchResult; }); - /** `sideChatIds` are the live side chats a `thread.delete` cascades to, read under their locks. */ + /** `sideChatIds` are the live side chats a delete, archive, or unarchive cascades to, read under their locks. */ const dispatchWithReceiptEffect = Effect.fn("orchestrationV2.dispatch.withReceipt")(function* ( command: OrchestrationV2ServerCommand, sideChatIds: ReadonlyArray = [], @@ -15853,20 +15886,26 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio ? dispatch : threadDispatch.withLock(command.sourceThreadId, dispatch); } - if (command.type === "thread.delete") - return yield* threadDispatch.withDeletionLock( - threadDispatch.withLock( - command.threadId, - liveSideChatIds(command.threadId).pipe( - Effect.flatMap((sideChatIds) => - sideChatIds.reduce( - (locked, sideChatId) => threadDispatch.withLock(sideChatId, locked), - dispatchWithReceiptEffect(command, sideChatIds), - ), + if ( + command.type === "thread.delete" || + command.type === "thread.archive" || + command.type === "thread.unarchive" + ) { + const cascade = threadDispatch.withLock( + command.threadId, + liveSideChatIds(command.threadId).pipe( + Effect.flatMap((sideChatIds) => + sideChatIds.reduce( + (locked, sideChatId) => threadDispatch.withLock(sideChatId, locked), + dispatchWithReceiptEffect(command, sideChatIds), ), ), ), ); + return yield* command.type === "thread.delete" + ? threadDispatch.withDeletionLock(cascade) + : cascade; + } // Taken before the lineage read, so a message whose read yields keeps its // place ahead of later messages to the same thread. const message = diff --git a/apps/server/src/orchestration-v2/ThreadFork.execution.test.ts b/apps/server/src/orchestration-v2/ThreadFork.execution.test.ts index f77510383b732..9b963d42687d7 100644 --- a/apps/server/src/orchestration-v2/ThreadFork.execution.test.ts +++ b/apps/server/src/orchestration-v2/ThreadFork.execution.test.ts @@ -10,6 +10,7 @@ import { ProjectId, ProviderDriverKind, ProviderInstanceId, + ProviderSessionId, ProviderThreadId, ProviderTurnId, RunAttemptId, @@ -1230,6 +1231,151 @@ it.effect("closing a side chat deletes it only while unused; a deleted parent ta }).pipe(Effect.provide(forkCases[0]!.layer)), ); +it.effect( + "archiving a parent stops and archives its side chats; unarchiving brings them back", + () => + Effect.gen(function* () { + const orchestrator = yield* Orchestrator.OrchestratorV2; + const eventSink = yield* EventSink.EventSinkV2; + const { driver, instanceId } = forkCases[0]!; + const parentId = ThreadId.make("side-chat-archive-parent"); + const busy = ThreadId.make("side-chat-archive-busy"); + const archivedFirst = ThreadId.make("side-chat-archive-archived-first"); + const delegating = ThreadId.make("side-chat-archive-delegating"); + yield* createParent(parentId); + yield* writeParentRun({ + threadId: parentId, + runId: RunId.make("side-chat-archive-parent-run"), + ordinal: 1, + status: "completed", + text: "Parent work", + stable: true, + }); + yield* forkSideChat("side-chat-archive-fork-busy", parentId, busy); + yield* forkSideChat("side-chat-archive-fork-archived-first", parentId, archivedFirst); + yield* forkSideChat("side-chat-archive-fork-delegating", parentId, delegating); + const runningRunId = RunId.make("side-chat-archive-busy-running"); + const queuedRunId = RunId.make("side-chat-archive-busy-queued"); + yield* writeParentRun({ + threadId: busy, + runId: runningRunId, + ordinal: 1, + status: "running", + text: "Run a long command", + }); + yield* writeParentRun({ + threadId: busy, + runId: queuedRunId, + ordinal: 2, + status: "queued", + text: "Then this", + }); + const now = yield* DateTime.now; + for (const threadId of [parentId, busy]) { + yield* eventSink.write({ + events: [ + { + id: EventId.make(`${threadId}:session`), + type: "provider-session.attached", + threadId, + driver, + providerInstanceId: instanceId, + occurredAt: now, + payload: { + id: ProviderSessionId.make(`${threadId}:session`), + driver, + providerInstanceId: instanceId, + status: "running", + cwd: "/workspace", + model: "test-model", + capabilities: CodexProviderCapabilitiesV2, + createdAt: now, + updatedAt: now, + lastError: null, + }, + }, + ], + }); + } + const delegatingRunId = RunId.make("side-chat-archive-delegating-run"); + yield* writeParentRun({ + threadId: delegating, + runId: delegatingRunId, + ordinal: 1, + status: "completed", + text: "Delegate a review", + }); + const taskId = NodeId.make("side-chat-archive-delegated-task"); + yield* eventSink.write({ + events: [ + { + id: EventId.make(`${taskId}:running`), + type: "subagent.updated", + threadId: delegating, + occurredAt: now, + payload: { + id: taskId, + threadId: delegating, + runId: delegatingRunId, + parentNodeId: NodeId.make("side-chat-archive-delegating-node"), + origin: "app_owned", + createdBy: "agent", + driver, + providerInstanceId: instanceId, + providerThreadId: null, + childThreadId: ThreadId.make("side-chat-archive-delegated-child"), + nativeTaskRef: null, + prompt: "Review the changes", + title: null, + model: null, + status: "running", + result: null, + startedAt: now, + completedAt: null, + updatedAt: now, + }, + }, + ], + }); + const archive = (commandId: string, threadId: ThreadId) => + orchestrator.dispatch({ + type: "thread.archive", + commandId: CommandId.make(commandId), + threadId, + }); + const archivedAt = (threadId: ThreadId) => + orchestrator + .getThreadProjection(threadId) + .pipe(Effect.map(({ thread }) => thread.archivedAt)); + + // Archiving a side chat on its own leaves its parent alone. + yield* archive("side-chat-archive-only-child", archivedFirst); + const childArchivedAt = yield* archivedAt(archivedFirst); + assert.isNotNull(childArchivedAt); + assert.isNull(yield* archivedAt(parentId)); + yield* TestClock.adjust("1 second"); + + yield* archive("side-chat-archive-parent", parentId); + assert.isNotNull(yield* archivedAt(parentId)); + const archivedBusy = yield* orchestrator.getThreadProjection(busy); + assert.isNotNull(archivedBusy.thread.archivedAt); + assert.equal(archivedBusy.runs.find((run) => run.id === queuedRunId)?.status, "cancelled"); + assert.isEmpty(archivedBusy.providerSessions); + assert.deepEqual(yield* archivedAt(archivedFirst), childArchivedAt); + // Archive refuses a thread still waiting on delegated tasks, so the cascade leaves it active. + assert.isNull(yield* archivedAt(delegating)); + + yield* orchestrator.dispatch({ + type: "thread.unarchive", + commandId: CommandId.make("side-chat-archive-unarchive-parent"), + threadId: parentId, + }); + assert.isNull(yield* archivedAt(parentId)); + assert.isNull(yield* archivedAt(busy)); + assert.deepEqual(yield* archivedAt(archivedFirst), childArchivedAt); + }).pipe(Effect.provide(forkCases[0]!.layer)), +); + it.effect("a side chat opened during the parent's first turn starts from a digest", () => Effect.gen(function* () { const orchestrator = yield* Orchestrator.OrchestratorV2; diff --git a/docs/user/thread-sidebar.md b/docs/user/thread-sidebar.md index 905f3a5bfbe9c..38dd4684723f9 100644 --- a/docs/user/thread-sidebar.md +++ b/docs/user/thread-sidebar.md @@ -317,7 +317,8 @@ your next message there. Bring back is available while the thread is idle. Closing a side chat you never sent a message in deletes it. To delete one you used, choose **Delete** at the top of the side chat. Deleting a thread also deletes its -side chats. +side chats. Archiving a thread also archives its side chats and stops their work, and +unarchiving the thread brings them back. On mobile, a thread lists its side chats above the composer. Tap one to open it and answer its questions. From 94245bc8ecc04d748e079f54839e808d8bfbc8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Oliveira?= Date: Thu, 19 Nov 2026 03:14:57 -0300 Subject: [PATCH 007/233] perf(server): sending to a long compacted thread skips its old prompts (#36289) Co-authored-by: Claude Sonnet 5.5 --- .../src/orchestration-v2/Orchestrator.ts | 8 +- .../orchestration-v2/ProjectionStore.test.ts | 105 ++++++++++++++++-- .../src/orchestration-v2/ProjectionStore.ts | 103 +++++++++++++++-- .../src/orchestration-v2/contextBoundary.ts | 2 +- .../src/orchestration-v2/modelSwitch.ts | 35 ++++-- 5 files changed, 218 insertions(+), 35 deletions(-) diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 7edd289748d8e..4342ba684b5c7 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -6856,9 +6856,9 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio events: Ref.Ref>, effects: Ref.Ref>, ) { - // A compacted thread reads every run and turn item, but attempts, nodes, messages and provider - // turns only for its recent runs and the runs this command names. An idle compaction reads - // in full: its busy check below looks for a delegated result's message under any old run. + // A compacted thread reads every run, but attempts, nodes, messages, provider turns and prompts + // only for its recent runs and the runs this command names. An idle compaction reads in full: + // its busy check below looks for a delegated result's message under any old run. let projection = yield* getProjectionWithPendingEvents( command.threadId, events, @@ -7130,7 +7130,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio } const userMessages = projection.messages.filter((message) => message.role === "user"); // The recent runs of a compacted thread can hold only a `/compact` while an older prompt - // exists. Every prompt's turn item is loaded; without one, every user message is checked. + // exists, so when every loaded prompt is one, every user message is checked. const onlyMaintenanceHistory = [ ...userMessages, ...projection.turnItems.flatMap((item) => (item.type === "user_message" ? [item] : [])), diff --git a/apps/server/src/orchestration-v2/ProjectionStore.test.ts b/apps/server/src/orchestration-v2/ProjectionStore.test.ts index f9f1cae9f3b6a..a1c9ff8eebc46 100644 --- a/apps/server/src/orchestration-v2/ProjectionStore.test.ts +++ b/apps/server/src/orchestration-v2/ProjectionStore.test.ts @@ -859,7 +859,7 @@ it.effect("idle compaction filters keep the latest run, live work and the newest // One thread holds every way a run can still matter after a compaction. A run is requested at // its ordinal in minutes and ends 30 seconds later, unless the table says otherwise. -it.effect("a compacted thread reads every run, and run records only for its recent runs", () => +it.effect("a compacted thread reads every run, but records and prompts only for recent ones", () => Effect.gen(function* () { const store = yield* ProjectionStore.ProjectionStoreV2; const threadId = yield* addRolledBackRecoveryCandidate("compacted"); @@ -905,9 +905,10 @@ it.effect("a compacted thread reads every run, and run records only for its rece driver, }, }); - for (const [ordinal, status, endedAt] of [ + for (const [ordinal, status, endedAt, fresh] of [ [2, "queued", null], - [3, "completed"], + // A fresh-context run starts its own conversation, so its prompt is read for the schedule check. + [3, "completed", undefined, true], // A held queue ran this old run after the compactions. [4, "completed", at(11.5)], [5, "completed"], @@ -951,6 +952,7 @@ it.effect("a compacted thread reads every run, and run records only for its rece completedAt: ended, checkpointId: null, contextHandoffId: null, + ...(fresh === true ? { freshContext: true } : {}), }, }); yield* store.apply({ @@ -1086,19 +1088,44 @@ it.effect("a compacted thread reads every run, and run records only for its rece })), ); const all = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; - // Every run and every turn item is read, so a model switch is still measured from the last - // prompt. Run 1, the helper's, holds only a command item. - const expected = (recent: ReadonlyArray) => ({ + // Every run is read. Turn items are the failed errors of every run, and the prompts of the + // recent runs, of the fresh-context run 3 and of the run a model switch is measured from. + // Run 1, the helper's, holds only a command item. + const expected = ( + recent: ReadonlyArray, + prompts: ReadonlyArray = [...recent, 3], + ) => ({ runs: 15, attempts: recent, nodes: recent, providerTurns: recent, messages: recent, - turnItems: [1, ...all], + turnItems: [...new Set([5, ...prompts])].toSorted((a, b) => a - b), }); - // Nothing is compacted yet, so the whole history is current. - assert.deepEqual(yield* read(), expected(all)); + // Run 5 failed, and nothing is compacted yet, so the whole history is current. + yield* store.apply({ + id: EventId.make("event:compacted:error-5"), + type: "turn-item.updated", + threadId, + runId: runId(5), + nodeId: rootNodeId(5), + driver, + occurredAt: at(5), + payload: { + ...item(5, 52, "failed"), + id: TurnItemId.make("item:compacted:error-5"), + type: "error", + failure: { + class: "usage_limit", + message: "Plan limit reached.", + resetAt: "2099-01-01T00:00:00.000Z", + code: "usageLimitExceeded", + retryable: null, + }, + }, + }); + assert.deepEqual(yield* read(), { ...expected(all), turnItems: [1, ...all] }); // The window starts at the compaction's run. Queued run 2 and held run 4 are older but had // not ended by then. @@ -1122,6 +1149,20 @@ it.effect("a compacted thread reads every run, and run records only for its rece expected([2, 3, 4, 6, 11, 12, 13, 14, 15]), ); + // Only an unfiltered read with runs narrows its prompts; any other read keeps its filter. + const itemRuns = (fields: ReadonlyArray<"runs" | "turnItems">, filter: object) => + store + .getThreadRecords(threadId, fields, { + sinceLastCompaction: { keepRunIds: [], keepMessageId: messageId(0) }, + ...filter, + }) + .pipe(Effect.map((records) => ordinals(records.turnItems.map((row) => row.runId)))); + assert.deepEqual(yield* itemRuns(["runs", "turnItems"], { turnItemRunIds: [runId(5)] }), [5]); + assert.deepEqual(yield* itemRuns(["runs", "turnItems"], { turnItemRunIds: [] }), []); + assert.deepEqual(yield* itemRuns(["runs", "turnItems"], { turnItemRunId: runId(5) }), [5]); + assert.deepEqual(yield* itemRuns(["runs", "turnItems"], { runIds: [runId(15)] }), [1, ...all]); + assert.deepEqual(yield* itemRuns(["turnItems"], {}), [1, ...all]); + // A command also skips the node and the provider thread of each settled task. Tasks ended on // both sides of the compaction; one ran in the provider thread the thread's own runs use. const addProviderThread = (id: ProviderThreadId, appThreadId: ThreadId) => @@ -1268,11 +1309,12 @@ it.effect("a compacted thread reads every run, and run records only for its rece assert.deepEqual(unsettled.providerThreads, ["compacted", "old-pending", "recent-pending"]); assert.lengthOf(unsettled.rootNodes, all.length); assert.lengthOf(unsettled.runs, 15); - // Together: every run, every turn item and the provider thread the runs use stay, and the - // windowed records are read for the recent and named runs, less each settled task's node. + // Together: every run and the provider thread the runs use stay, and the windowed records are + // read for the recent and named runs, less each settled task's node. const recentRuns = ["11", "12", "13", "14", "15", "2", "3", "4", "6"]; assert.deepEqual(both, { ...unsettled, + turnItems: windowed.turnItems, attempts: recentRuns, rootNodes: recentRuns, taskNodes: ["recent-pending"], @@ -1289,6 +1331,47 @@ it.effect("a compacted thread reads every run, and run records only for its rece ), both, ); + + // A prompt that clients do not show cannot anchor a model switch. With the recent ones, and + // run 4's, folded into async answers, the switch is measured from run 10, so its prompt is + // read, with run 9's from the same batch. + const storedRuns = (yield* store.getThreadRecords(threadId, ["runs"])).runs; + for (const ordinal of [4, 11, 12, 14, 15]) { + yield* store.apply({ + id: EventId.make(`event:compacted:async-run-${ordinal}`), + type: "run.updated", + threadId, + occurredAt: at(ordinal), + payload: { + ...storedRuns.find((run) => run.id === runId(ordinal))!, + userMessageId: MessageId.make(`async-answer:${ordinal}`), + }, + }); + yield* store.apply({ + id: EventId.make(`event:compacted:async-${ordinal}`), + type: "turn-item.updated", + threadId, + runId: runId(ordinal), + nodeId: rootNodeId(ordinal), + driver, + occurredAt: at(ordinal), + payload: { + createdBy: "user", + creationSource: "web", + ...item(ordinal, ordinal * 10, "completed"), + id: TurnItemId.make(`item:compacted:prompt-${ordinal}`), + type: "user_message", + messageId: MessageId.make(`async-answer:${ordinal}`), + inputIntent: "turn_start", + text: `Answer ${ordinal}`, + attachments: [], + }, + }); + } + assert.deepEqual( + (yield* read()).turnItems, + expected([2, 4, 11, 12, 13, 14, 15], [2, 3, 4, 9, 10, 11, 12, 13, 14, 15]).turnItems, + ); }).pipe(Effect.provide(layerTest)), ); diff --git a/apps/server/src/orchestration-v2/ProjectionStore.ts b/apps/server/src/orchestration-v2/ProjectionStore.ts index f3ac98ca9c252..94cd70fd05fd3 100644 --- a/apps/server/src/orchestration-v2/ProjectionStore.ts +++ b/apps/server/src/orchestration-v2/ProjectionStore.ts @@ -15,10 +15,16 @@ import type { import { latestRootProviderFailure, latestUnheldRun, + runRanAfter, threadErrorSummary, usageLimitRunPresentedAsLatest, } from "@t3tools/shared/orchestrationV2ThreadError"; import { threadPullRequestsOf } from "../sourceControl/threadPullRequests.ts"; +import { + anchorsModelSwitch, + isModelSwitchCandidate, + isShownUserMessageItem, +} from "./modelSwitch.ts"; import type { OrchestrationV2AppThread, OrchestrationV2Checkpoint, @@ -346,6 +352,17 @@ export interface ProjectionRuntimeResponseContext { readonly session: OrchestrationV2ThreadProjection["providerSessions"][number] | undefined; } +const PROMPT_NARROWING_BLOCKING_FILTERS = [ + "runIds", + "runStatuses", + "latestRunLimit", + "turnItemRunId", + "turnItemRunIds", + "turnItemNodeIds", + "turnItemRequestIds", + "turnItemStatuses", +] as const satisfies ReadonlyArray; + export interface ProjectionRecordFilter { readonly providerThreadIds?: ReadonlyArray; readonly providerTurnIds?: ReadonlyArray; @@ -392,9 +409,10 @@ export interface ProjectionRecordFilter { */ readonly omitSettledSubagentRecords?: boolean; /** - * For a compacted thread: reads attempts, nodes, messages and provider turns only for runs from - * the latest completed compaction's run on, runs that had not ended when that run was - * requested, and the runs named here. Runs and turn items are not narrowed. + * For a compacted thread, reads attempts, nodes, messages and provider turns of the recent runs + * and the runs named here. Turn items are the failed errors of every run and the prompts of the + * recent, fresh-context and model-switch runs. `turnItemTypes` does not apply. A read without `runs`, or with a run or turn-item + * filter, keeps its filtered items. Runs stay whole. */ readonly sinceLastCompaction?: { readonly keepRunIds: ReadonlyArray; @@ -3701,7 +3719,7 @@ export const layer: Layer.Layer = const threadColumn = (ids: ReadonlyArray | undefined, column = "thread_id") => sql.literal(ids === undefined ? column : `+${column}`); - /** The runs whose records a new message reads. Null when nothing was compacted. */ + /** The ids of the runs whose records a new message reads. Null when nothing was compacted. */ const runIdsSinceLastCompaction = Effect.fn("ProjectionStore.runIdsSinceLastCompaction")( function* ( threadId: ThreadId, @@ -3740,10 +3758,67 @@ export const layer: Layer.Layer = // The compaction's own run is always recent, so no rows means no compaction. return recent.length === 0 ? null - : encodeIdList([...recent.map((row) => row.run_id), ...keep.keepRunIds]); + : [...recent.map((row) => row.run_id), ...keep.keepRunIds]; }, ); + /** + * What a command reads of a compacted thread's prompts and errors: the failed errors of every + * run, and the prompts of the recent runs, of fresh-context runs, and of the newest runs back + * to the one `modelSwitchSince` measures from. That one can be older than the compaction. + */ + const commandTurnItems = Effect.fn("ProjectionStore.commandTurnItems")(function* ( + threadId: ThreadId, + runs: ReadonlyArray, + recentRunIds: ReadonlyArray, + ) { + const errors = yield* sql` + SELECT payload_json + FROM orchestration_v2_projection_turn_items + INDEXED BY orchestration_v2_projection_turn_items_failed_error_idx + WHERE thread_id = ${threadId} AND type = 'error' AND status = 'failed' + `.pipe(Effect.flatMap(decodeRows(decodeTurnItemPayload, threadId))); + const readPrompts = (runIds: ReadonlyArray) => + sql` + SELECT payload_json + FROM orchestration_v2_projection_turn_items + INDEXED BY orchestration_v2_projection_turn_items_thread_run_idx + WHERE thread_id = ${threadId} AND type = 'user_message' + AND run_id IN (SELECT value FROM json_each(${encodeIdList(runIds)})) + `.pipe(Effect.flatMap(decodeRows(decodeTurnItemPayload, threadId))); + const read = new Set(recentRunIds); + for (const run of runs) if (run.freshContext === true) read.add(run.id); + const prompts = yield* readPrompts([...read]); + const shownMessageIds = new Set(); + const showPrompts = (items: ReadonlyArray) => { + for (const item of items) { + if (item.type === "user_message" && isShownUserMessageItem(item)) { + shownMessageIds.add(item.messageId); + } + } + }; + showPrompts(prompts); + const newestFirst = runs + .filter(isModelSwitchCandidate) + .toSorted((left, right) => (runRanAfter(left, right) ? -1 : 1)); + // The batches double, so a thread with no such run takes few queries. + for (let start = 0, size = 1; start < newestFirst.length; start += size, size *= 2) { + const batch = newestFirst.slice(start, start + size); + const unread = batch.filter((run) => !read.has(run.id)); + if (unread.length > 0) { + for (const run of unread) read.add(run.id); + const more = yield* readPrompts(unread.map((run) => run.id)); + showPrompts(more); + prompts.push(...more); + } + if (batch.some((run) => anchorsModelSwitch(run, shownMessageIds))) break; + } + return [...errors, ...prompts].toSorted( + (left, right) => + left.ordinal - right.ordinal || (left.id < right.id ? -1 : left.id > right.id ? 1 : 0), + ); + }); + const readCanonicalProjection = Effect.fn("ProjectionStore.readCanonicalProjection")( function* ( threadId: ThreadId, @@ -3761,10 +3836,15 @@ export const layer: Layer.Layer = if (!threadRow) { return yield* new ProjectionStoreThreadNotFoundError({ threadId }); } - const recentRunIds = + const recentRuns = window === undefined && filter?.sinceLastCompaction !== undefined ? yield* runIdsSinceLastCompaction(threadId, filter.sinceLastCompaction) : null; + const recentRunIds = recentRuns === null ? null : encodeIdList(recentRuns); + const readsWholeHistory = + (fields === undefined || fields.includes("runs")) && + PROMPT_NARROWING_BLOCKING_FILTERS.every((key) => filter?.[key] === undefined); + const promptRuns = readsWholeHistory ? recentRuns : null; const inRecentRuns = (column: string) => recentRunIds === null ? sql`` @@ -3782,6 +3862,8 @@ export const layer: Layer.Layer = }; const boundedTurnItemRows: ReadonlyArray = (fields !== undefined && !fields.includes("turnItems")) || + // A compacted thread reads its items once its runs are known. + promptRuns !== null || (window === undefined && matchesNothing( filter?.turnItemRequestIds, @@ -3831,7 +3913,7 @@ export const layer: Layer.Layer = decodeTurnItemPayload, threadId, )(boundedTurnItemRows); - const turnItems = decodedTurnItems.map((item, index) => { + const storedTurnItems = decodedTurnItems.map((item, index) => { const row = boundedTurnItemRows[index]!; return row.work_last_id == null || row.work_item_count == null || @@ -3854,7 +3936,7 @@ export const layer: Layer.Layer = }); const cohortJson = (field: string) => JSON.stringify( - turnItems.flatMap((payload) => { + storedTurnItems.flatMap((payload) => { const value = nullableStringField(payload, field); return value === null ? [] : [value]; }), @@ -4523,12 +4605,17 @@ export const layer: Layer.Layer = decodeRows(decodeContextHandoffPayload, threadId)(contextHandoffRows), decodeRows(decodeContextTransferPayload, threadId)(contextTransferRows), ]); + const turnItems = + promptRuns === null || (fields !== undefined && !fields.includes("turnItems")) + ? storedTurnItems + : yield* commandTurnItems(threadId, runs, promptRuns); const messageOrdinals = new Map(); // Only user items can name a user message, so a user-only read needs no assistant items. const userOnly = messages.every((message) => message.role === "user"); // The loaded items already order the messages when they hold every item the lookup reads. const loadsEveryItemOf = (type: OrchestrationV2TurnItem["type"]) => window === undefined && + promptRuns === null && (fields === undefined || fields.includes("turnItems")) && filter?.turnItemRequestIds === undefined && filter?.turnItemStatuses === undefined && diff --git a/apps/server/src/orchestration-v2/contextBoundary.ts b/apps/server/src/orchestration-v2/contextBoundary.ts index 1d9ca8d552fa2..54b265c2d5394 100644 --- a/apps/server/src/orchestration-v2/contextBoundary.ts +++ b/apps/server/src/orchestration-v2/contextBoundary.ts @@ -7,7 +7,7 @@ export function isScheduledFreshRun( run: Pick, turnItems: OrchestrationV2ThreadProjection["turnItems"], ): boolean { - // Turn items, unlike messages, are not narrowed to the runs since the latest compaction. + // A compacted thread's command read loads these prompts for every fresh-context run. return ( run.freshContext === true && turnItems.some( diff --git a/apps/server/src/orchestration-v2/modelSwitch.ts b/apps/server/src/orchestration-v2/modelSwitch.ts index 5b893cd0026d2..9b904500fc661 100644 --- a/apps/server/src/orchestration-v2/modelSwitch.ts +++ b/apps/server/src/orchestration-v2/modelSwitch.ts @@ -7,6 +7,27 @@ import { import { modelSelectionsEqual } from "@t3tools/shared/model"; import { runRanAfter } from "@t3tools/shared/orchestrationV2ThreadError"; +/** + * Clients hide pending queued messages, fold async answers into their question, and replace + * `/compact` with a compaction row. + */ +export const isShownUserMessageItem = (item: OrchestrationV2TurnItem): boolean => + item.type === "user_message" && + !(item.inputIntent === "queued_turn" && item.status === "pending") && + !item.messageId.startsWith("async-answer:") && + !isCompactionCommandMessage({ role: "user", ...item }); + +type ModelSwitchRun = OrchestrationV2ThreadProjection["runs"][number]; + +/** A run that has not been undone and has started or can start. */ +export const isModelSwitchCandidate = (run: ModelSwitchRun): boolean => + run.status !== "rolled_back" && run.status !== "queued"; + +/** A run `modelSwitchSince` can measure from: its prompt is shown, or its handoff row shows it. */ +export const anchorsModelSwitch = (run: ModelSwitchRun, shownMessageIds: ReadonlySet) => + isModelSwitchCandidate(run) && + (shownMessageIds.has(run.userMessageId) || run.contextHandoffId !== null); + /** * The model or effort change a new run brings, measured from the latest run the timeline shows * through its message or its handoff row, so consecutive dividers always chain. `baseline` stands @@ -18,23 +39,15 @@ export function modelSwitchSince( to: ModelSelection, baseline?: ModelSelection, ): Pick, "modelSwitch"> { - // Clients hide pending queued messages, fold async answers into their question, and replace - // `/compact` with a compaction row. const shown = new Set( projection.turnItems.flatMap((item) => - item.type === "user_message" && - !(item.inputIntent === "queued_turn" && item.status === "pending") && - !item.messageId.startsWith("async-answer:") && - !isCompactionCommandMessage({ role: "user", ...item }) - ? [item.messageId] - : [], + item.type === "user_message" && isShownUserMessageItem(item) ? [item.messageId] : [], ), ); - let previous: OrchestrationV2ThreadProjection["runs"][number] | undefined; + let previous: ModelSwitchRun | undefined; for (const run of projection.runs) { - if (run.status === "rolled_back" || run.status === "queued") continue; // A wake shows as a notification, but its context handoff row still shows the swap. - if (!shown.has(run.userMessageId) && run.contextHandoffId === null) continue; + if (!anchorsModelSwitch(run, shown)) continue; if (previous === undefined || runRanAfter(run, previous)) previous = run; } const from = previous?.modelSelection ?? baseline; From 5d05902ddd1981d18ce0497317cd96d1a10325e1 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Nov 2026 22:16:08 -0800 Subject: [PATCH 008/233] feat(server): agents read, open, update, respond to, and merge PRs through MCP tools (#26751) Co-authored-by: Claude Opus 5.5 --- apps/mobile/src/i18n/translations/de.json | 25 + apps/mobile/src/i18n/translations/en.json | 25 + apps/mobile/src/i18n/translations/es.json | 25 + apps/mobile/src/i18n/translations/fr.json | 25 + apps/mobile/src/i18n/translations/ja.json | 25 + apps/mobile/src/i18n/translations/ko.json | 25 + apps/mobile/src/i18n/translations/pt-BR.json | 25 + apps/mobile/src/i18n/translations/ru.json | 25 + apps/mobile/src/i18n/translations/sv.json | 25 + apps/mobile/src/i18n/translations/zh.json | 25 + apps/server/src/git/GitManager.test.ts | 87 ++- apps/server/src/git/GitManager.ts | 188 ++++-- apps/server/src/mcp/McpHttpServer.test.ts | 200 +++--- apps/server/src/mcp/McpHttpServer.ts | 28 +- apps/server/src/mcp/McpInvocationContext.ts | 9 + .../toolkits/pullRequests/handlers.test.ts | 430 ++++++++++++ .../src/mcp/toolkits/pullRequests/handlers.ts | 610 +++++++++++++++++- .../src/mcp/toolkits/pullRequests/tools.ts | 357 ++++++++++ .../ProviderTurnStartService.testkit.ts | 2 + .../multi_turn/muse_transcript.ndjson | 12 +- .../muse_permission/muse_transcript.ndjson | 12 +- .../muse_transcript.ndjson | 6 +- .../muse_transcript.ndjson | 6 +- .../muse_workflow/muse_transcript.ndjson | 6 +- .../fixtures/simple/muse_transcript.ndjson | 6 +- .../subagent_v2/muse_transcript.ndjson | 6 +- .../turn_interrupt/muse_transcript.ndjson | 6 +- .../src/provider/AgentContextBudget.test.ts | 2 + .../src/provider/agentContextBudget.json | 6 +- .../pullRequest/PullRequestService.test.ts | 27 + .../src/pullRequest/PullRequestService.ts | 40 +- .../pullRequestReviewGuideNormalize.ts | 4 +- .../pullRequestReviewPosition.test.ts | 55 ++ .../pullRequest/pullRequestReviewPosition.ts | 53 ++ apps/server/src/server.ts | 2 + apps/web/src/i18n/translations/de.json | 41 +- apps/web/src/i18n/translations/en.json | 41 +- apps/web/src/i18n/translations/es.json | 41 +- apps/web/src/i18n/translations/fr.json | 41 +- apps/web/src/i18n/translations/ja.json | 41 +- apps/web/src/i18n/translations/ko.json | 41 +- apps/web/src/i18n/translations/pt-BR.json | 41 +- apps/web/src/i18n/translations/ru.json | 41 +- apps/web/src/i18n/translations/sv.json | 41 +- apps/web/src/i18n/translations/zh.json | 41 +- docs/user/source-control.md | 4 + evals/mcp-tool-use/cases/pull-requests.ndjson | 16 +- evals/mcp-tool-use/run.test.ts | 173 +++++ evals/mcp-tool-use/run.ts | 238 ++++++- .../client-runtime/src/t3ToolSummary.test.ts | 27 + packages/client-runtime/src/t3ToolSummary.ts | 155 +++++ packages/contracts/src/pullRequest.ts | 2 + .../src/server/runtimeInstructions.ts | 2 +- packages/shared/src/t3McpToolPresentation.ts | 38 ++ .../shared/src/t3McpToolPresentationCopy.ts | 7 + .../src/server/PullRequestProvider.ts | 2 + .../src/server/GitHubPullRequestApi.ts | 5 +- .../src/server/GitHubPullRequestProvider.ts | 3 + .../src/server/GitLabPullRequestCli.test.ts | 42 ++ .../src/server/GitLabPullRequestCli.ts | 20 +- .../src/server/GitLabPullRequestProvider.ts | 3 + 61 files changed, 3305 insertions(+), 252 deletions(-) create mode 100644 apps/server/src/pullRequest/pullRequestReviewPosition.test.ts create mode 100644 apps/server/src/pullRequest/pullRequestReviewPosition.ts diff --git a/apps/mobile/src/i18n/translations/de.json b/apps/mobile/src/i18n/translations/de.json index e75c87010d88f..1eb4ffaf914b2 100644 --- a/apps/mobile/src/i18n/translations/de.json +++ b/apps/mobile/src/i18n/translations/de.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten, {failed} fehlgeschlagen} other {Versucht, {started} Review-Leitfäden zu starten, {failed} fehlgeschlagen}}", "672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}", "5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}", + "a60e5be5b4865ce9": "{count, plural, one {{count} Pull Request gelesen} other {{count} Pull Requests gelesen}}", + "c74296822829ad9d": "{count, plural, one {Versucht, {count} Pull Request zu lesen} other {Versucht, {count} Pull Requests zu lesen}}", + "833fc9b60bf40749": "{count, plural, one {Pull Requests {count}-mal aufgelistet} other {Pull Requests {count}-mal aufgelistet}}", + "ccae2617d4c92f7d": "{count, plural, one {Versucht, Pull Requests {count}-mal aufzulisten} other {Versucht, Pull Requests {count}-mal aufzulisten}}", + "630a8e9a6597b5de": "{count, plural, one {Versucht, {count} Pull Request zu öffnen} other {Versucht, {count} Pull Requests zu öffnen}}", + "af6bb8e1d69c255f": "{count, plural, one {{count} offenen Pull Request gefunden} other {{count} offene Pull Requests gefunden}}", + "c1751c0d62ccacb0": "{count, plural, one {{count} Pull Request geöffnet} other {{count} Pull Requests geöffnet}}", + "6963f76ce8860984": "{opened, plural, one {{opened} Pull Request geöffnet, {existing} offen gefunden} other {{opened} Pull Requests geöffnet, {existing} offen gefunden}}", + "b64d48025a0904a5": "{count, plural, one {{count} Pull Request aktualisiert} other {{count} Pull Requests aktualisiert}}", + "f62092fc584c5dcc": "{count, plural, one {Versucht, {count} Pull Request zu aktualisieren} other {Versucht, {count} Pull Requests zu aktualisieren}}", + "23cc59ef4ccb7a85": "{count, plural, one {{count}-mal auf Pull Requests geantwortet} other {{count}-mal auf Pull Requests geantwortet}}", + "2b682a59792b6c07": "{count, plural, one {{count}-mal versucht, auf Pull Requests zu antworten} other {{count}-mal versucht, auf Pull Requests zu antworten}}", + "998ef072ea79ff62": "{count, plural, one {Versucht, {count} Pull Request zu mergen} other {Versucht, {count} Pull Requests zu mergen}}", + "80e8102a93dc5a75": "{count, plural, one {{count} Pull Request zum Mergen eingereiht} other {{count} Pull Requests zum Mergen eingereiht}}", + "a742473f42c9a609": "{count, plural, one {{count} Pull Request gemergt} other {{count} Pull Requests gemergt}}", + "40e3528651297351": "{merged, plural, one {{merged} Pull Request gemergt, {queued} eingereiht} other {{merged} Pull Requests gemergt, {queued} eingereiht}}", + "8146ee71f7426683": "{count, plural, one {{count} Pull Request reviewt} other {{count} Pull Requests reviewt}}", + "638678077ba2e050": "{count, plural, one {Versucht, {count} Pull Request zu reviewen} other {Versucht, {count} Pull Requests zu reviewen}}", "420bea546d5f8802": "Thread kopiert", "2efb2dd3bf170f67": "Thread konnte nicht kopiert werden", "6c03545936b55e0b": "PR-Link kopiert", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Beobachtung eines Pull Requests beenden", "52b8917fbd7ea9d5": "Review-Leitfäden schreiben", "722d3fd5ecc61ff3": "Review-Leitfaden lesen", + "96d54fd56d8b65ce": "Pull Request lesen", + "1af212db47b37813": "Pull Requests auflisten", + "a01b71c7c36d05f5": "Pull Request öffnen", + "5ddfea667ccceecf": "Pull Request aktualisieren", + "c87d85c418b791a5": "Auf Pull Request antworten", + "4bcd613be5a48aa2": "Pull Request reviewen", + "81b284c3afb54ec6": "Pull Request mergen", "3227c712130a4187": "Issues auflisten", "3f461f26681450d6": "Ein Issue lesen", "fff9316cf5e449b4": "Ein Issue erstellen", diff --git a/apps/mobile/src/i18n/translations/en.json b/apps/mobile/src/i18n/translations/en.json index 39a8cd4d9401b..f4c5f7b4603d8 100644 --- a/apps/mobile/src/i18n/translations/en.json +++ b/apps/mobile/src/i18n/translations/en.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tried to start {started} review guide, {failed} failed} other {Tried to start {started} review guides, {failed} failed}}", "672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}", "5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}", + "a60e5be5b4865ce9": "{count, plural, one {Read {count} pull request} other {Read {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Tried to read {count} pull request} other {Tried to read {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listed pull requests {count} time} other {Listed pull requests {count} times}}", + "ccae2617d4c92f7d": "{count, plural, one {Tried to list pull requests {count} time} other {Tried to list pull requests {count} times}}", + "630a8e9a6597b5de": "{count, plural, one {Tried to open {count} pull request} other {Tried to open {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Found {count} open pull request} other {Found {count} open pull requests}}", + "c1751c0d62ccacb0": "{count, plural, one {Opened {count} pull request} other {Opened {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Opened {opened} pull request, found {existing} open} other {Opened {opened} pull requests, found {existing} open}}", + "b64d48025a0904a5": "{count, plural, one {Updated {count} pull request} other {Updated {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Tried to update {count} pull request} other {Tried to update {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Responded on pull requests {count} time} other {Responded on pull requests {count} times}}", + "2b682a59792b6c07": "{count, plural, one {Tried to respond on pull requests {count} time} other {Tried to respond on pull requests {count} times}}", + "998ef072ea79ff62": "{count, plural, one {Tried to merge {count} pull request} other {Tried to merge {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Queued {count} pull request to merge} other {Queued {count} pull requests to merge}}", + "a742473f42c9a609": "{count, plural, one {Merged {count} pull request} other {Merged {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Merged {merged} pull request, queued {queued}} other {Merged {merged} pull requests, queued {queued}}}", + "8146ee71f7426683": "{count, plural, one {Reviewed {count} pull request} other {Reviewed {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Tried to review {count} pull request} other {Tried to review {count} pull requests}}", "420bea546d5f8802": "Thread copied", "2efb2dd3bf170f67": "Failed to copy thread", "6c03545936b55e0b": "PR link copied", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Stop watching a pull request", "52b8917fbd7ea9d5": "Write review guides", "722d3fd5ecc61ff3": "Read a review guide", + "96d54fd56d8b65ce": "Read a pull request", + "1af212db47b37813": "List pull requests", + "a01b71c7c36d05f5": "Open a pull request", + "5ddfea667ccceecf": "Update a pull request", + "c87d85c418b791a5": "Respond on a pull request", + "4bcd613be5a48aa2": "Review a pull request", + "81b284c3afb54ec6": "Merge a pull request", "3227c712130a4187": "List issues", "3f461f26681450d6": "Read an issue", "fff9316cf5e449b4": "File an issue", diff --git a/apps/mobile/src/i18n/translations/es.json b/apps/mobile/src/i18n/translations/es.json index a10de0b05a3e5..3f74d6081e75f 100644 --- a/apps/mobile/src/i18n/translations/es.json +++ b/apps/mobile/src/i18n/translations/es.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Intentó iniciar {started} guía de revisión, {failed} con errores} other {Intentó iniciar {started} guías de revisión, {failed} con errores}}", "672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}", "5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}", + "a60e5be5b4865ce9": "{count, plural, one {Leyó {count} pull request} other {Leyó {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Intentó leer {count} pull request} other {Intentó leer {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listó pull requests {count} vez} other {Listó pull requests {count} veces}}", + "ccae2617d4c92f7d": "{count, plural, one {Intentó listar pull requests {count} vez} other {Intentó listar pull requests {count} veces}}", + "630a8e9a6597b5de": "{count, plural, one {Intentó abrir {count} pull request} other {Intentó abrir {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Encontró {count} pull request abierta} other {Encontró {count} pull requests abiertas}}", + "c1751c0d62ccacb0": "{count, plural, one {Abrió {count} pull request} other {Abrió {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Abrió {opened} pull request, encontró {existing} abiertas} other {Abrió {opened} pull requests, encontró {existing} abiertas}}", + "b64d48025a0904a5": "{count, plural, one {Actualizó {count} pull request} other {Actualizó {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Intentó actualizar {count} pull request} other {Intentó actualizar {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Respondió en pull requests {count} vez} other {Respondió en pull requests {count} veces}}", + "2b682a59792b6c07": "{count, plural, one {Intentó responder en pull requests {count} vez} other {Intentó responder en pull requests {count} veces}}", + "998ef072ea79ff62": "{count, plural, one {Intentó fusionar {count} pull request} other {Intentó fusionar {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Puso {count} pull request en cola para fusionar} other {Puso {count} pull requests en cola para fusionar}}", + "a742473f42c9a609": "{count, plural, one {Fusionó {count} pull request} other {Fusionó {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Fusionó {merged} pull request, {queued} en cola} other {Fusionó {merged} pull requests, {queued} en cola}}", + "8146ee71f7426683": "{count, plural, one {Revisó {count} pull request} other {Revisó {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Intentó revisar {count} pull request} other {Intentó revisar {count} pull requests}}", "420bea546d5f8802": "Hilo copiado", "2efb2dd3bf170f67": "No se pudo copiar el hilo", "6c03545936b55e0b": "Enlace de la PR copiado", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Dejar de seguir una pull request", "52b8917fbd7ea9d5": "Escribir guías de revisión", "722d3fd5ecc61ff3": "Leer una guía de revisión", + "96d54fd56d8b65ce": "Leer una pull request", + "1af212db47b37813": "Listar pull requests", + "a01b71c7c36d05f5": "Abrir una pull request", + "5ddfea667ccceecf": "Actualizar una pull request", + "c87d85c418b791a5": "Responder en una pull request", + "4bcd613be5a48aa2": "Revisar una pull request", + "81b284c3afb54ec6": "Fusionar una pull request", "3227c712130a4187": "Listar issues", "3f461f26681450d6": "Leer una issue", "fff9316cf5e449b4": "Abrir una issue", diff --git a/apps/mobile/src/i18n/translations/fr.json b/apps/mobile/src/i18n/translations/fr.json index 32698d32a9111..3da47a5f56352 100644 --- a/apps/mobile/src/i18n/translations/fr.json +++ b/apps/mobile/src/i18n/translations/fr.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tentative de lancer {started} guide de revue, {failed} en échec} other {Tentative de lancer {started} guides de revue, {failed} en échec}}", "672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}", "5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}", + "a60e5be5b4865ce9": "{count, plural, one {{count} pull request lue} other {{count} pull requests lues}}", + "c74296822829ad9d": "{count, plural, one {Tentative de lecture de {count} pull request} other {Tentative de lecture de {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Pull requests listées {count} fois} other {Pull requests listées {count} fois}}", + "ccae2617d4c92f7d": "{count, plural, one {Tentative de liste des pull requests {count} fois} other {Tentative de liste des pull requests {count} fois}}", + "630a8e9a6597b5de": "{count, plural, one {Tentative d'ouverture de {count} pull request} other {Tentative d'ouverture de {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {{count} pull request ouverte trouvée} other {{count} pull requests ouvertes trouvées}}", + "c1751c0d62ccacb0": "{count, plural, one {{count} pull request ouverte} other {{count} pull requests ouvertes}}", + "6963f76ce8860984": "{opened, plural, one {{opened} pull request ouverte, {existing} déjà ouvertes trouvées} other {{opened} pull requests ouvertes, {existing} déjà ouvertes trouvées}}", + "b64d48025a0904a5": "{count, plural, one {{count} pull request mise à jour} other {{count} pull requests mises à jour}}", + "f62092fc584c5dcc": "{count, plural, one {Tentative de mise à jour de {count} pull request} other {Tentative de mise à jour de {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Réponse sur des pull requests {count} fois} other {Réponses sur des pull requests {count} fois}}", + "2b682a59792b6c07": "{count, plural, one {Tentative de réponse sur des pull requests {count} fois} other {Tentatives de réponse sur des pull requests {count} fois}}", + "998ef072ea79ff62": "{count, plural, one {Tentative de fusion de {count} pull request} other {Tentative de fusion de {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {{count} pull request mise en file pour fusion} other {{count} pull requests mises en file pour fusion}}", + "a742473f42c9a609": "{count, plural, one {{count} pull request fusionnée} other {{count} pull requests fusionnées}}", + "40e3528651297351": "{merged, plural, one {{merged} pull request fusionnée, {queued} en file} other {{merged} pull requests fusionnées, {queued} en file}}", + "8146ee71f7426683": "{count, plural, one {{count} pull request relue} other {{count} pull requests relues}}", + "638678077ba2e050": "{count, plural, one {Tentative de revue de {count} pull request} other {Tentative de revue de {count} pull requests}}", "420bea546d5f8802": "Fil copié", "2efb2dd3bf170f67": "Échec de la copie du fil", "6c03545936b55e0b": "Lien de la PR copié", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Arrêter de suivre une pull request", "52b8917fbd7ea9d5": "Rédiger des guides de revue", "722d3fd5ecc61ff3": "Lire un guide de revue", + "96d54fd56d8b65ce": "Lire une pull request", + "1af212db47b37813": "Lister les pull requests", + "a01b71c7c36d05f5": "Ouvrir une pull request", + "5ddfea667ccceecf": "Mettre à jour une pull request", + "c87d85c418b791a5": "Répondre sur une pull request", + "4bcd613be5a48aa2": "Relire une pull request", + "81b284c3afb54ec6": "Fusionner une pull request", "3227c712130a4187": "Lister les tickets", "3f461f26681450d6": "Lire un ticket", "fff9316cf5e449b4": "Ouvrir un ticket", diff --git a/apps/mobile/src/i18n/translations/ja.json b/apps/mobile/src/i18n/translations/ja.json index dbd171818bcdd..8a50fd448dafe 100644 --- a/apps/mobile/src/i18n/translations/ja.json +++ b/apps/mobile/src/i18n/translations/ja.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました。{failed} 件失敗しました}}", "672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}", "5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}", + "a60e5be5b4865ce9": "{count, plural, other {{count} 件のプルリクエストを読み取りました}}", + "c74296822829ad9d": "{count, plural, other {{count} 件のプルリクエストの読み取りを試みました}}", + "833fc9b60bf40749": "{count, plural, other {プルリクエストを {count} 回一覧表示しました}}", + "ccae2617d4c92f7d": "{count, plural, other {プルリクエストの一覧表示を {count} 回試みました}}", + "630a8e9a6597b5de": "{count, plural, other {{count} 件のプルリクエストの作成を試みました}}", + "af6bb8e1d69c255f": "{count, plural, other {オープンなプルリクエストが {count} 件見つかりました}}", + "c1751c0d62ccacb0": "{count, plural, other {{count} 件のプルリクエストを作成しました}}", + "6963f76ce8860984": "{opened, plural, other {{opened} 件のプルリクエストを作成し、オープンなものを {existing} 件見つけました}}", + "b64d48025a0904a5": "{count, plural, other {{count} 件のプルリクエストを更新しました}}", + "f62092fc584c5dcc": "{count, plural, other {{count} 件のプルリクエストの更新を試みました}}", + "23cc59ef4ccb7a85": "{count, plural, other {プルリクエストに {count} 回返信しました}}", + "2b682a59792b6c07": "{count, plural, other {プルリクエストへの返信を {count} 回試みました}}", + "998ef072ea79ff62": "{count, plural, other {{count} 件のプルリクエストのマージを試みました}}", + "80e8102a93dc5a75": "{count, plural, other {{count} 件のプルリクエストをマージ待ちにしました}}", + "a742473f42c9a609": "{count, plural, other {{count} 件のプルリクエストをマージしました}}", + "40e3528651297351": "{merged, plural, other {{merged} 件のプルリクエストをマージし、{queued} 件をマージ待ちにしました}}", + "8146ee71f7426683": "{count, plural, other {{count} 件のプルリクエストをレビューしました}}", + "638678077ba2e050": "{count, plural, other {{count} 件のプルリクエストのレビューを試みました}}", "420bea546d5f8802": "スレッドをコピーしました", "2efb2dd3bf170f67": "スレッドをコピーできませんでした", "6c03545936b55e0b": "PR のリンクをコピーしました", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "プルリクエストのウォッチを解除", "52b8917fbd7ea9d5": "レビューガイドを作成", "722d3fd5ecc61ff3": "レビューガイドを読み取る", + "96d54fd56d8b65ce": "プルリクエストを読む", + "1af212db47b37813": "プルリクエストを一覧表示", + "a01b71c7c36d05f5": "プルリクエストを作成", + "5ddfea667ccceecf": "プルリクエストを更新", + "c87d85c418b791a5": "プルリクエストに返信", + "4bcd613be5a48aa2": "プルリクエストをレビュー", + "81b284c3afb54ec6": "プルリクエストをマージ", "3227c712130a4187": "Issue を一覧表示", "3f461f26681450d6": "Issue を読み取る", "fff9316cf5e449b4": "Issue を作成", diff --git a/apps/mobile/src/i18n/translations/ko.json b/apps/mobile/src/i18n/translations/ko.json index b84f6efb68005..f4d4e9ce2c79a 100644 --- a/apps/mobile/src/i18n/translations/ko.json +++ b/apps/mobile/src/i18n/translations/ko.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {검토 가이드 {started}개 시작 시도함, {failed}개 실패}}", "672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}", "5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}", + "a60e5be5b4865ce9": "{count, plural, other {풀 리퀘스트 {count}개를 읽음}}", + "c74296822829ad9d": "{count, plural, other {풀 리퀘스트 {count}개 읽기를 시도함}}", + "833fc9b60bf40749": "{count, plural, other {풀 리퀘스트 목록을 {count}번 조회함}}", + "ccae2617d4c92f7d": "{count, plural, other {풀 리퀘스트 목록 조회를 {count}번 시도함}}", + "630a8e9a6597b5de": "{count, plural, other {풀 리퀘스트 {count}개 열기를 시도함}}", + "af6bb8e1d69c255f": "{count, plural, other {열린 풀 리퀘스트 {count}개를 찾음}}", + "c1751c0d62ccacb0": "{count, plural, other {풀 리퀘스트 {count}개를 엶}}", + "6963f76ce8860984": "{opened, plural, other {풀 리퀘스트 {opened}개를 열고, 열린 풀 리퀘스트 {existing}개를 찾음}}", + "b64d48025a0904a5": "{count, plural, other {풀 리퀘스트 {count}개를 업데이트함}}", + "f62092fc584c5dcc": "{count, plural, other {풀 리퀘스트 {count}개 업데이트를 시도함}}", + "23cc59ef4ccb7a85": "{count, plural, other {풀 리퀘스트에 {count}번 응답함}}", + "2b682a59792b6c07": "{count, plural, other {풀 리퀘스트 응답을 {count}번 시도함}}", + "998ef072ea79ff62": "{count, plural, other {풀 리퀘스트 {count}개 병합을 시도함}}", + "80e8102a93dc5a75": "{count, plural, other {풀 리퀘스트 {count}개를 병합 대기열에 넣음}}", + "a742473f42c9a609": "{count, plural, other {풀 리퀘스트 {count}개를 병합함}}", + "40e3528651297351": "{merged, plural, other {풀 리퀘스트 {merged}개를 병합하고 {queued}개를 대기열에 넣음}}", + "8146ee71f7426683": "{count, plural, other {풀 리퀘스트 {count}개를 검토함}}", + "638678077ba2e050": "{count, plural, other {풀 리퀘스트 {count}개 검토를 시도함}}", "420bea546d5f8802": "스레드 복사됨", "2efb2dd3bf170f67": "스레드를 복사하지 못했습니다", "6c03545936b55e0b": "PR 링크 복사됨", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "풀 리퀘스트 지켜보기 중지", "52b8917fbd7ea9d5": "검토 가이드 작성", "722d3fd5ecc61ff3": "검토 가이드 읽기", + "96d54fd56d8b65ce": "풀 리퀘스트 읽기", + "1af212db47b37813": "풀 리퀘스트 목록 보기", + "a01b71c7c36d05f5": "풀 리퀘스트 열기", + "5ddfea667ccceecf": "풀 리퀘스트 업데이트", + "c87d85c418b791a5": "풀 리퀘스트에 응답", + "4bcd613be5a48aa2": "풀 리퀘스트 검토", + "81b284c3afb54ec6": "풀 리퀘스트 병합", "3227c712130a4187": "이슈 목록 조회", "3f461f26681450d6": "이슈 읽기", "fff9316cf5e449b4": "이슈 작성", diff --git a/apps/mobile/src/i18n/translations/pt-BR.json b/apps/mobile/src/i18n/translations/pt-BR.json index e806ac68f3715..aa24dac16b1be 100644 --- a/apps/mobile/src/i18n/translations/pt-BR.json +++ b/apps/mobile/src/i18n/translations/pt-BR.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tentou iniciar {started} guia de revisão, {failed} com falha} other {Tentou iniciar {started} guias de revisão, {failed} com falha}}", "672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}", "5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}", + "a60e5be5b4865ce9": "{count, plural, one {Leu {count} pull request} other {Leu {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Tentou ler {count} pull request} other {Tentou ler {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listou pull requests {count} vez} other {Listou pull requests {count} vezes}}", + "ccae2617d4c92f7d": "{count, plural, one {Tentou listar pull requests {count} vez} other {Tentou listar pull requests {count} vezes}}", + "630a8e9a6597b5de": "{count, plural, one {Tentou abrir {count} pull request} other {Tentou abrir {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Encontrou {count} pull request aberto} other {Encontrou {count} pull requests abertos}}", + "c1751c0d62ccacb0": "{count, plural, one {Abriu {count} pull request} other {Abriu {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Abriu {opened} pull request, encontrou {existing} abertos} other {Abriu {opened} pull requests, encontrou {existing} abertos}}", + "b64d48025a0904a5": "{count, plural, one {Atualizou {count} pull request} other {Atualizou {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Tentou atualizar {count} pull request} other {Tentou atualizar {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Respondeu em pull requests {count} vez} other {Respondeu em pull requests {count} vezes}}", + "2b682a59792b6c07": "{count, plural, one {Tentou responder em pull requests {count} vez} other {Tentou responder em pull requests {count} vezes}}", + "998ef072ea79ff62": "{count, plural, one {Tentou mesclar {count} pull request} other {Tentou mesclar {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Enfileirou {count} pull request para mesclar} other {Enfileirou {count} pull requests para mesclar}}", + "a742473f42c9a609": "{count, plural, one {Mesclou {count} pull request} other {Mesclou {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Mesclou {merged} pull request, {queued} na fila} other {Mesclou {merged} pull requests, {queued} na fila}}", + "8146ee71f7426683": "{count, plural, one {Revisou {count} pull request} other {Revisou {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Tentou revisar {count} pull request} other {Tentou revisar {count} pull requests}}", "420bea546d5f8802": "Thread copiada", "2efb2dd3bf170f67": "Falha ao copiar a thread", "6c03545936b55e0b": "Link do PR copiado", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Parar de acompanhar um pull request", "52b8917fbd7ea9d5": "Escrever guias de revisão", "722d3fd5ecc61ff3": "Ler um guia de revisão", + "96d54fd56d8b65ce": "Ler um pull request", + "1af212db47b37813": "Listar pull requests", + "a01b71c7c36d05f5": "Abrir um pull request", + "5ddfea667ccceecf": "Atualizar um pull request", + "c87d85c418b791a5": "Responder em um pull request", + "4bcd613be5a48aa2": "Revisar um pull request", + "81b284c3afb54ec6": "Mesclar um pull request", "3227c712130a4187": "Listar issues", "3f461f26681450d6": "Ler uma issue", "fff9316cf5e449b4": "Abrir uma issue", diff --git a/apps/mobile/src/i18n/translations/ru.json b/apps/mobile/src/i18n/translations/ru.json index 345781ca01d5a..9e39a5ba5dffc 100644 --- a/apps/mobile/src/i18n/translations/ru.json +++ b/apps/mobile/src/i18n/translations/ru.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Попытка начать {started} руководство по ревью, ошибок: {failed}} few {Попытка начать {started} руководства по ревью, ошибок: {failed}} many {Попытка начать {started} руководств по ревью, ошибок: {failed}} other {Попытка начать {started} руководства по ревью, ошибок: {failed}}}", "672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}", "5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}", + "a60e5be5b4865ce9": "{count, plural, one {Прочитано {count} пул-реквест} few {Прочитано {count} пул-реквеста} many {Прочитано {count} пул-реквестов} other {Прочитано {count} пул-реквеста}}", + "c74296822829ad9d": "{count, plural, one {Не удалось прочитать {count} пул-реквест} few {Не удалось прочитать {count} пул-реквеста} many {Не удалось прочитать {count} пул-реквестов} other {Не удалось прочитать {count} пул-реквеста}}", + "833fc9b60bf40749": "{count, plural, one {Список пул-реквестов получен {count} раз} few {Список пул-реквестов получен {count} раза} many {Список пул-реквестов получен {count} раз} other {Список пул-реквестов получен {count} раза}}", + "ccae2617d4c92f7d": "{count, plural, one {Попытка получить список пул-реквестов: {count} раз} few {Попытка получить список пул-реквестов: {count} раза} many {Попытка получить список пул-реквестов: {count} раз} other {Попытка получить список пул-реквестов: {count} раза}}", + "630a8e9a6597b5de": "{count, plural, one {Не удалось открыть {count} пул-реквест} few {Не удалось открыть {count} пул-реквеста} many {Не удалось открыть {count} пул-реквестов} other {Не удалось открыть {count} пул-реквеста}}", + "af6bb8e1d69c255f": "{count, plural, one {Найден {count} открытый пул-реквест} few {Найдено {count} открытых пул-реквеста} many {Найдено {count} открытых пул-реквестов} other {Найдено {count} открытого пул-реквеста}}", + "c1751c0d62ccacb0": "{count, plural, one {Открыто {count} пул-реквест} few {Открыто {count} пул-реквеста} many {Открыто {count} пул-реквестов} other {Открыто {count} пул-реквеста}}", + "6963f76ce8860984": "{opened, plural, one {Открыт {opened} пул-реквест, найдено открытых: {existing}} few {Открыто {opened} пул-реквеста, найдено открытых: {existing}} many {Открыто {opened} пул-реквестов, найдено открытых: {existing}} other {Открыто {opened} пул-реквеста, найдено открытых: {existing}}}", + "b64d48025a0904a5": "{count, plural, one {Обновлено {count} пул-реквест} few {Обновлено {count} пул-реквеста} many {Обновлено {count} пул-реквестов} other {Обновлено {count} пул-реквеста}}", + "f62092fc584c5dcc": "{count, plural, one {Не удалось обновить {count} пул-реквест} few {Не удалось обновить {count} пул-реквеста} many {Не удалось обновить {count} пул-реквестов} other {Не удалось обновить {count} пул-реквеста}}", + "23cc59ef4ccb7a85": "{count, plural, one {Ответ в пул-реквестах: {count} раз} few {Ответ в пул-реквестах: {count} раза} many {Ответ в пул-реквестах: {count} раз} other {Ответ в пул-реквестах: {count} раза}}", + "2b682a59792b6c07": "{count, plural, one {Попытка ответить в пул-реквестах: {count} раз} few {Попытка ответить в пул-реквестах: {count} раза} many {Попытка ответить в пул-реквестах: {count} раз} other {Попытка ответить в пул-реквестах: {count} раза}}", + "998ef072ea79ff62": "{count, plural, one {Не удалось слить {count} пул-реквест} few {Не удалось слить {count} пул-реквеста} many {Не удалось слить {count} пул-реквестов} other {Не удалось слить {count} пул-реквеста}}", + "80e8102a93dc5a75": "{count, plural, one {В очередь на слияние поставлен {count} пул-реквест} few {В очередь на слияние поставлено {count} пул-реквеста} many {В очередь на слияние поставлено {count} пул-реквестов} other {В очередь на слияние поставлено {count} пул-реквеста}}", + "a742473f42c9a609": "{count, plural, one {Слито {count} пул-реквест} few {Слито {count} пул-реквеста} many {Слито {count} пул-реквестов} other {Слито {count} пул-реквеста}}", + "40e3528651297351": "{merged, plural, one {Слит {merged} пул-реквест, в очереди: {queued}} few {Слито {merged} пул-реквеста, в очереди: {queued}} many {Слито {merged} пул-реквестов, в очереди: {queued}} other {Слито {merged} пул-реквеста, в очереди: {queued}}}", + "8146ee71f7426683": "{count, plural, one {Проверено {count} пул-реквест} few {Проверено {count} пул-реквеста} many {Проверено {count} пул-реквестов} other {Проверено {count} пул-реквеста}}", + "638678077ba2e050": "{count, plural, one {Не удалось проверить {count} пул-реквест} few {Не удалось проверить {count} пул-реквеста} many {Не удалось проверить {count} пул-реквестов} other {Не удалось проверить {count} пул-реквеста}}", "420bea546d5f8802": "Тред скопирован", "2efb2dd3bf170f67": "Не удалось скопировать тред", "6c03545936b55e0b": "Ссылка на PR скопирована", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Прекратить отслеживание пул-реквеста", "52b8917fbd7ea9d5": "Написать руководства по ревью", "722d3fd5ecc61ff3": "Прочитать руководство по ревью", + "96d54fd56d8b65ce": "Прочитать пул-реквест", + "1af212db47b37813": "Список пул-реквестов", + "a01b71c7c36d05f5": "Открыть пул-реквест", + "5ddfea667ccceecf": "Обновить пул-реквест", + "c87d85c418b791a5": "Ответить в пул-реквесте", + "4bcd613be5a48aa2": "Проверить пул-реквест", + "81b284c3afb54ec6": "Слить пул-реквест", "3227c712130a4187": "Получить список issue", "3f461f26681450d6": "Прочитать issue", "fff9316cf5e449b4": "Создать issue", diff --git a/apps/mobile/src/i18n/translations/sv.json b/apps/mobile/src/i18n/translations/sv.json index 6f2ccdee856b3..5767aa2976f79 100644 --- a/apps/mobile/src/i18n/translations/sv.json +++ b/apps/mobile/src/i18n/translations/sv.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Försökte starta {started} granskningsguide, {failed} misslyckades} other {Försökte starta {started} granskningsguider, {failed} misslyckades}}", "672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}", "5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}", + "a60e5be5b4865ce9": "{count, plural, one {Läste {count} pull request} other {Läste {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Försökte läsa {count} pull request} other {Försökte läsa {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listade pull requests {count} gång} other {Listade pull requests {count} gånger}}", + "ccae2617d4c92f7d": "{count, plural, one {Försökte lista pull requests {count} gång} other {Försökte lista pull requests {count} gånger}}", + "630a8e9a6597b5de": "{count, plural, one {Försökte öppna {count} pull request} other {Försökte öppna {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Hittade {count} öppen pull request} other {Hittade {count} öppna pull requests}}", + "c1751c0d62ccacb0": "{count, plural, one {Öppnade {count} pull request} other {Öppnade {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Öppnade {opened} pull request, hittade {existing} öppna} other {Öppnade {opened} pull requests, hittade {existing} öppna}}", + "b64d48025a0904a5": "{count, plural, one {Uppdaterade {count} pull request} other {Uppdaterade {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Försökte uppdatera {count} pull request} other {Försökte uppdatera {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Svarade på pull requests {count} gång} other {Svarade på pull requests {count} gånger}}", + "2b682a59792b6c07": "{count, plural, one {Försökte svara på pull requests {count} gång} other {Försökte svara på pull requests {count} gånger}}", + "998ef072ea79ff62": "{count, plural, one {Försökte merga {count} pull request} other {Försökte merga {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Köade {count} pull request för merge} other {Köade {count} pull requests för merge}}", + "a742473f42c9a609": "{count, plural, one {Mergade {count} pull request} other {Mergade {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Mergade {merged} pull request, köade {queued}} other {Mergade {merged} pull requests, köade {queued}}}", + "8146ee71f7426683": "{count, plural, one {Granskade {count} pull request} other {Granskade {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Försökte granska {count} pull request} other {Försökte granska {count} pull requests}}", "420bea546d5f8802": "Tråden kopierades", "2efb2dd3bf170f67": "Det gick inte att kopiera tråden", "6c03545936b55e0b": "PR-länken kopierades", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "Sluta bevaka en pull request", "52b8917fbd7ea9d5": "Skriv granskningsguider", "722d3fd5ecc61ff3": "Läs en granskningsguide", + "96d54fd56d8b65ce": "Läs en pull request", + "1af212db47b37813": "Lista pull requests", + "a01b71c7c36d05f5": "Öppna en pull request", + "5ddfea667ccceecf": "Uppdatera en pull request", + "c87d85c418b791a5": "Svara på en pull request", + "4bcd613be5a48aa2": "Granska en pull request", + "81b284c3afb54ec6": "Merga en pull request", "3227c712130a4187": "Lista ärenden", "3f461f26681450d6": "Läs ett ärende", "fff9316cf5e449b4": "Skapa ett ärende", diff --git a/apps/mobile/src/i18n/translations/zh.json b/apps/mobile/src/i18n/translations/zh.json index e01c9bf7289f3..1d18ae10b4e11 100644 --- a/apps/mobile/src/i18n/translations/zh.json +++ b/apps/mobile/src/i18n/translations/zh.json @@ -306,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {尝试开始 {started} 份审查导览,{failed} 份失败}}", "672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}", "5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}", + "a60e5be5b4865ce9": "{count, plural, other {已读取 {count} 个 PR}}", + "c74296822829ad9d": "{count, plural, other {尝试读取 {count} 个 PR}}", + "833fc9b60bf40749": "{count, plural, other {列出 PR {count} 次}}", + "ccae2617d4c92f7d": "{count, plural, other {尝试列出 PR {count} 次}}", + "630a8e9a6597b5de": "{count, plural, other {尝试创建 {count} 个 PR}}", + "af6bb8e1d69c255f": "{count, plural, other {找到 {count} 个打开的 PR}}", + "c1751c0d62ccacb0": "{count, plural, other {已创建 {count} 个 PR}}", + "6963f76ce8860984": "{opened, plural, other {已创建 {opened} 个 PR,找到 {existing} 个打开的 PR}}", + "b64d48025a0904a5": "{count, plural, other {已更新 {count} 个 PR}}", + "f62092fc584c5dcc": "{count, plural, other {尝试更新 {count} 个 PR}}", + "23cc59ef4ccb7a85": "{count, plural, other {在 PR 上回复 {count} 次}}", + "2b682a59792b6c07": "{count, plural, other {尝试在 PR 上回复 {count} 次}}", + "998ef072ea79ff62": "{count, plural, other {尝试合并 {count} 个 PR}}", + "80e8102a93dc5a75": "{count, plural, other {已将 {count} 个 PR 加入合并队列}}", + "a742473f42c9a609": "{count, plural, other {已合并 {count} 个 PR}}", + "40e3528651297351": "{merged, plural, other {已合并 {merged} 个 PR,{queued} 个在队列中}}", + "8146ee71f7426683": "{count, plural, other {已审查 {count} 个 PR}}", + "638678077ba2e050": "{count, plural, other {尝试审查 {count} 个 PR}}", "420bea546d5f8802": "已复制会话", "2efb2dd3bf170f67": "无法复制会话", "6c03545936b55e0b": "已复制 PR 链接", @@ -1041,6 +1059,13 @@ "96ac3f7e2336b02b": "停止关注 PR", "52b8917fbd7ea9d5": "编写审查导览", "722d3fd5ecc61ff3": "读取审查导览", + "96d54fd56d8b65ce": "读取 PR", + "1af212db47b37813": "列出 PR", + "a01b71c7c36d05f5": "创建 PR", + "5ddfea667ccceecf": "更新 PR", + "c87d85c418b791a5": "在 PR 上回复", + "4bcd613be5a48aa2": "审查 PR", + "81b284c3afb54ec6": "合并 PR", "3227c712130a4187": "列出 issue", "3f461f26681450d6": "读取 issue", "fff9316cf5e449b4": "提交 issue", diff --git a/apps/server/src/git/GitManager.test.ts b/apps/server/src/git/GitManager.test.ts index 2db95349f1021..73da4ec2a6bac 100644 --- a/apps/server/src/git/GitManager.test.ts +++ b/apps/server/src/git/GitManager.test.ts @@ -1,6 +1,6 @@ import * as BackgroundPolicy from "../background/BackgroundPolicy.ts"; import * as VcsStatusBroadcaster from "../vcs/VcsStatusBroadcaster.ts"; -import { SourceControlProviderKind } from "@t3tools/contracts"; +import { type PullRequestActionInput, SourceControlProviderKind } from "@t3tools/contracts"; // @effect-diagnostics nodeBuiltinImport:off import * as NodeFS from "node:fs"; import * as NodePath from "node:path"; @@ -64,6 +64,7 @@ import * as SourceControlProviderRegistry from "../sourceControl/SourceControlPr import * as ServerConfig from "../config.ts"; import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; import * as ProjectStore from "../orchestration-v2/ProjectStore.ts"; +import * as PullRequestService from "../pullRequest/PullRequestService.ts"; import * as SqlitePersistence from "../persistence/Sqlite.ts"; import * as ProjectSetupScriptRunner from "../project/ProjectSetupScriptRunner.ts"; import * as ProviderRegistry from "../provider/ProviderRegistry.ts"; @@ -628,6 +629,7 @@ function preparePullRequestThread( function makeManager(input?: { providerScenario?: FakeProviderScenario; + pullRequests?: Partial; sourceControlProvider?: SourceControlProvider["Service"]; textGeneration?: Partial; serverSettings?: Parameters[0]; @@ -736,6 +738,7 @@ function makeManager(input?: { const layerManager = Layer.mergeAll( Layer.succeed(TextGeneration.TextGeneration, textGeneration), + Layer.mock(PullRequestService.PullRequestService)(input?.pullRequests ?? {}), Layer.mock(ProviderRegistry.ProviderRegistry)({ getProviders: Effect.succeed([]), }), @@ -4418,6 +4421,88 @@ it.layer(layerGitManagerTest)("GitManager", (it) => { }), ); + it.effect("createPullRequest refuses a branch with commits it has not pushed", () => + Effect.gen(function* () { + const repoDir = yield* makeTempDir("t3code-git-manager-"); + yield* initRepo(repoDir); + const remoteDir = yield* createBareRemote(); + yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); + yield* runGit(repoDir, ["push", "-u", "origin", "main"]); + yield* runGit(repoDir, ["checkout", "-b", "feature/unpushed"]); + yield* runGit(repoDir, ["push", "-u", "origin", "feature/unpushed"]); + NodeFS.writeFileSync(NodePath.join(repoDir, "late.txt"), "late\n"); + yield* runGit(repoDir, ["add", "late.txt"]); + yield* runGit(repoDir, ["commit", "-m", "Late commit"]); + const { manager, providerCalls } = yield* makeManager({ + providerScenario: { prListSequence: [[], []] }, + }); + + const error = yield* Effect.flip( + manager.createPullRequest({ + cwd: repoDir, + projectId: ProjectId.make("project-1"), + title: "Feature", + body: "Body", + }), + ); + + expect(error.message).toContain("1 unpushed commit"); + expect(created(providerCalls)).toEqual([]); + + // An open PR is returned as it is; returning it publishes nothing. + const open = { + number: 7, + title: "Feature", + url: "https://github.com/pingdotgg/codething-mvp/pull/7", + baseRefName: "main", + headRefName: "feature/unpushed", + }; + const existing = yield* makeManager({ providerScenario: { prListSequence: [[open]] } }); + const found = yield* existing.manager.createPullRequest({ + cwd: repoDir, + projectId: ProjectId.make("project-1"), + title: "Feature", + body: "Body", + }); + expect(found).toMatchObject({ status: "opened_existing", number: 7 }); + + // A retry after a failed draft finds the open PR and still drafts it. + const actions: Array = []; + const retried = yield* makeManager({ + providerScenario: { prListSequence: [[open]] }, + pullRequests: { + summary: () => Effect.succeed({ isDraft: false } as never), + runAction: (action) => Effect.sync(() => void actions.push(action)), + }, + }); + yield* retried.manager.createPullRequest({ + cwd: repoDir, + projectId: ProjectId.make("project-1"), + title: "Feature", + body: "Body", + draft: true, + }); + expect(actions).toMatchObject([ + { repository: "pingdotgg/codething-mvp", number: 7, action: "draft" }, + ]); + + // A draft of a PR the host does not list yet fails, so a retry drafts it. + yield* runGit(repoDir, ["push"]); + const unlisted = yield* makeManager({ providerScenario: { prListSequence: [[], []] } }); + const notListed = yield* Effect.flip( + unlisted.manager.createPullRequest({ + cwd: repoDir, + projectId: ProjectId.make("project-1"), + title: "Feature", + body: "Body", + draft: true, + }), + ); + expect(notListed.message).toContain("does not list it yet"); + expect(created(unlisted.providerCalls)).toHaveLength(1); + }), + ); + it.effect("generates PR content from the created worktree's selected remote base", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); diff --git a/apps/server/src/git/GitManager.ts b/apps/server/src/git/GitManager.ts index 92d693a17382b..77acae07dee63 100644 --- a/apps/server/src/git/GitManager.ts +++ b/apps/server/src/git/GitManager.ts @@ -81,6 +81,8 @@ import { import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; import * as ProjectStore from "../orchestration-v2/ProjectStore.ts"; import * as ProjectSetupScriptRunner from "../project/ProjectSetupScriptRunner.ts"; +import * as PullRequestService from "../pullRequest/PullRequestService.ts"; +import { createdPullRequestKey } from "./linkCreatedPullRequest.ts"; import * as ProviderRegistry from "../provider/ProviderRegistry.ts"; import { extractBranchNameFromRemoteRef } from "./remoteRefs.ts"; import { detachStackFrame } from "./detachStackFrame.ts"; @@ -125,6 +127,16 @@ interface SourceControlTextGenerationSettings { readonly style: SourceControlWritingStyleSettings; } +export interface GitCreatePullRequestResult { + readonly status: "created" | "opened_existing"; + /** Absent when the host accepted the PR but did not list it back yet. */ + readonly url?: string; + readonly number?: number; + readonly baseBranch: string; + readonly headBranch: string; + readonly title: string; +} + export class GitManager extends Context.Service< GitManager, { @@ -175,6 +187,15 @@ export class GitManager extends Context.Service< input: GitRunStackedActionInput, options?: GitRunStackedActionOptions, ) => Effect.Effect; + /** Opens a PR for the checkout's pushed branch, or returns the one already open. */ + readonly createPullRequest: (input: { + readonly cwd: string; + readonly projectId: ProjectId; + readonly title: string; + readonly body: string; + readonly baseBranch?: string | undefined; + readonly draft?: boolean | undefined; + }) => Effect.Effect; readonly subscribePullRequestStateChanges: Effect.Effect< Stream.Stream, never, @@ -747,6 +768,7 @@ export const make = Effect.gen(function* () { ); }); const serverSettingsService = yield* ServerSettings.ServerSettingsService; + const pullRequests = yield* PullRequestService.PullRequestService; const threads = yield* ProjectionStore.ProjectionStoreV2; const projects = yield* ProjectStore.ProjectStoreV2; const projectSettingsFor = Effect.fnUntraced(function* (input: { @@ -2437,13 +2459,18 @@ export const make = Effect.gen(function* () { }); }); - const runPrStep = Effect.fn("runPrStep")(function* ( - settings: SourceControlTextGenerationSettings, + const openPrFromBranch = Effect.fn("openPrFromBranch")(function* ( cwd: string, fallbackBranch: string | null, - threadId: ThreadId | undefined, emit: GitActionProgressEmitter, - pushRemoteRef?: { readonly remoteName: string; readonly upstreamRef: string }, + pushRemoteRef: { readonly remoteName: string; readonly upstreamRef: string } | undefined, + requestedBase: string | undefined, + content: (input: { + readonly provider: SourceControlProvider.SourceControlProvider["Service"]; + readonly baseBranch: string; + readonly baseRef: string; + readonly headBranch: string; + }) => Effect.Effect<{ readonly title: string; readonly body: string }, E>, ) { const provider = yield* sourceControlProvider(cwd); const terms = sourceControlDefinitions.get(provider.kind).changeRequest; @@ -2483,42 +2510,22 @@ export const make = Effect.gen(function* () { }; } - const { baseBranch, baseRef } = yield* resolvePrBase( - cwd, - branch, - details.upstreamRef, - headContext, - ); - yield* emit({ - kind: "phase_started", - phase: "pr", - label: `Generating ${terms.shortLabel} content...`, - }); - const baseRangeRef = yield* resolveBaseRangeRef(cwd, baseRef); - const rangeContext = yield* gitCore.readRangeContext(cwd, baseRangeRef); - const policy = yield* resolveStylePolicy(cwd, settings); - const changeRequestTemplate = - settings.style.followChangeRequestTemplates && provider.readChangeRequestTemplate - ? Option.getOrUndefined( - yield* provider.readChangeRequestTemplate({ cwd, treeish: baseRangeRef }), - ) - : undefined; - const threadContext = yield* readThreadContext(threadId); - - const generated = yield* textGeneration.generatePrContent({ - cwd, + // A PR opened from the remote branch would leave out commits not pushed yet. + if (details.aheadCount > 0) { + return yield* new GitManagerError({ + operation: "runPrStep", + cwd, + detail: `The branch has ${details.aheadCount} unpushed commit${details.aheadCount === 1 ? "" : "s"}. Push before opening the PR.`, + }); + } + const resolved = yield* resolvePrBase(cwd, branch, details.upstreamRef, headContext); + const baseBranch = requestedBase ?? resolved.baseBranch; + const generated = yield* content({ + provider, baseBranch, + baseRef: requestedBase ?? resolved.baseRef, headBranch: headContext.headBranch, - commitSummary: limitContext(rangeContext.commitSummary, 20_000), - diffSummary: limitContext(rangeContext.diffSummary, 20_000), - diffPatch: limitContext(rangeContext.diffPatch, 60_000), - ...(changeRequestTemplate ? { changeRequestTemplate } : {}), - ...(threadContext ? { threadContext } : {}), - ...(policy ? { policy } : {}), - modelSelection: settings.modelSelection, - projectId: settings.projectId, }); - const bodyFile = path.join( tempDir, `t3code-pr-body-${process.pid}-${yield* randomUUIDv4(cwd)}.md`, @@ -2587,6 +2594,112 @@ export const make = Effect.gen(function* () { }; }); + const runPrStep = ( + settings: SourceControlTextGenerationSettings, + cwd: string, + fallbackBranch: string | null, + threadId: ThreadId | undefined, + emit: GitActionProgressEmitter, + pushRemoteRef?: { readonly remoteName: string; readonly upstreamRef: string }, + ) => + openPrFromBranch( + cwd, + fallbackBranch, + emit, + pushRemoteRef, + undefined, + ({ provider, baseBranch, baseRef, headBranch }) => + Effect.gen(function* () { + const terms = sourceControlDefinitions.get(provider.kind).changeRequest; + yield* emit({ + kind: "phase_started", + phase: "pr", + label: `Generating ${terms.shortLabel} content...`, + }); + const baseRangeRef = yield* resolveBaseRangeRef(cwd, baseRef); + const rangeContext = yield* gitCore.readRangeContext(cwd, baseRangeRef); + const policy = yield* resolveStylePolicy(cwd, settings); + const changeRequestTemplate = + settings.style.followChangeRequestTemplates && provider.readChangeRequestTemplate + ? Option.getOrUndefined( + yield* provider.readChangeRequestTemplate({ cwd, treeish: baseRangeRef }), + ) + : undefined; + const threadContext = yield* readThreadContext(threadId); + + return yield* textGeneration.generatePrContent({ + cwd, + baseBranch, + headBranch, + commitSummary: limitContext(rangeContext.commitSummary, 20_000), + diffSummary: limitContext(rangeContext.diffSummary, 20_000), + diffPatch: limitContext(rangeContext.diffPatch, 60_000), + ...(changeRequestTemplate ? { changeRequestTemplate } : {}), + ...(threadContext ? { threadContext } : {}), + ...(policy ? { policy } : {}), + modelSelection: settings.modelSelection, + projectId: settings.projectId, + }); + }), + ); + + const createPullRequest: GitManager["Service"]["createPullRequest"] = Effect.fn( + "GitManager.createPullRequest", + )(function* (input) { + const result = yield* openPrFromBranch( + input.cwd, + null, + () => Effect.void, + undefined, + input.baseBranch, + () => Effect.succeed({ title: input.title, body: input.body }), + ); + // The thread's branch PR comes from status, which may hold the lookup from before. + if (result.status === "created") yield* invalidateStatus(input.cwd); + if (input.draft === true && !(yield* draftOpened(input, result))) { + // A retry finds the open PR and drafts it then. + return yield* new GitManagerError({ + operation: "createPullRequest", + cwd: input.cwd, + detail: "Opened the pull request, but the host does not list it yet to make it a draft.", + }); + } + return result; + }); + + /** A retry after a failed draft finds the PR it opened, so an open one is checked too. */ + const draftOpened = Effect.fn("GitManager.draftOpened")( + function* ( + input: { readonly cwd: string; readonly projectId: ProjectId }, + result: GitCreatePullRequestResult, + ) { + const project = yield* projects.getShell(input.projectId).pipe( + Effect.map(Option.getOrUndefined), + Effect.orElseSucceed(() => undefined), + ); + const key = createdPullRequestKey({ pr: result }, project); + if (key === null) return false; + const ref = { projectId: input.projectId, ...key }; + const isDraft = + result.status === "opened_existing" && + (yield* pullRequests.summary({ ...ref, allowStale: false })).isDraft; + if (!isDraft) yield* pullRequests.runAction({ ...ref, action: "draft" }); + return true; + }, + (effect, input) => + effect.pipe( + Effect.mapError( + (cause) => + new GitManagerError({ + operation: "createPullRequest", + cwd: input.cwd, + detail: `Opened the pull request, but could not make it a draft: ${cause.message}`, + cause, + }), + ), + ), + ); + const localStatus: GitManager["Service"]["localStatus"] = Effect.fn("localStatus")( function* (input, options) { const cacheKey = yield* normalizeStatusCacheKey(input.cwd); @@ -3726,6 +3839,7 @@ export const make = Effect.gen(function* () { resolvePullRequest, preparePullRequestThread, runStackedAction, + createPullRequest, subscribePullRequestStateChanges: PubSub.subscribe(pullRequestStateChanges).pipe( Effect.map((subscription) => Stream.fromSubscription(subscription)), ), diff --git a/apps/server/src/mcp/McpHttpServer.test.ts b/apps/server/src/mcp/McpHttpServer.test.ts index 5f9f8fec837c6..9e96da001b941 100644 --- a/apps/server/src/mcp/McpHttpServer.test.ts +++ b/apps/server/src/mcp/McpHttpServer.test.ts @@ -12,6 +12,7 @@ import { OrchestratorMcpEnvironmentTarget, OrchestratorMcpFailure, PreviewTabId, + ProjectId, ProviderInstanceId, ProviderInteractionMode, RuntimeMode, @@ -46,6 +47,7 @@ import * as ManagedPolicy from "../policy/ManagedPolicy.ts"; import * as PreviewManager from "../preview/Manager.ts"; import * as DeviceService from "../device/DeviceService.ts"; +import * as GitManager from "../git/GitManager.ts"; import * as PullRequestReviewGuideService from "../pullRequest/PullRequestReviewGuideService.ts"; import * as PullRequestService from "../pullRequest/PullRequestService.ts"; import * as ServerConfig from "../config.ts"; @@ -108,6 +110,7 @@ const layerPullRequestsTest = McpHttpServer.layerPullRequestsToolkit.pipe( Layer.mock(ProjectService.ProjectService)({}), Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}), Layer.mock(PullRequestService.PullRequestService)({}), + Layer.mock(GitManager.GitManager)({}), Layer.mock(Orchestrator.OrchestratorV2)({}), Layer.mock(ProjectionStore.ProjectionStoreV2)({}), NodeServices.layer, @@ -1755,95 +1758,122 @@ it.effect("hides tools for links and refuses another environment while the beta ).pipe(Effect.provide(NodeHttpServer.layerTest)), ); -it.effect("lists pull request watch tools only to threads that are not delegated children", () => - Effect.scoped( - Effect.gen(function* () { - const scopeFor = ( - token: string, - subagent: boolean, - ): McpInvocationContext.McpThreadInvocationScope => ({ - environmentId, - requestNamespace: token, - thread: { - threadId: ThreadId.make(`thread-${token}`), - providerSessionId: token, - providerInstanceId: ProviderInstanceId.make("codex"), - subagent, - }, - client: undefined, - capabilities: new Set(["pull-requests"]), - issuedAt: 1, - }); - const scopes = new Map([ - ["parentToken", scopeFor("parentToken", false)], - ["childToken", scopeFor("childToken", true)], - ]); - const serverLayer = McpHttpServer.layerMcpTransport( - McpHttpServer.layerPullRequestsToolkit, - ).pipe( - Layer.provide(ServerSettings.layerTest()), - Layer.provide( - Layer.mock(McpSessionRegistry.McpSessionRegistry)({ - resolve: (token) => Effect.succeed(scopes.get(token)), - }), - ), - Layer.provide( - Layer.mergeAll( - McpToolAccessTestkit.liveThreadsLayer, - Layer.mock(ProjectService.ProjectService)({}), - Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}), - Layer.mock(PullRequestService.PullRequestService)({}), - Layer.mock(Orchestrator.OrchestratorV2)({}), - Layer.mock(ProjectionStore.ProjectionStoreV2)({}), - NodeServices.layer, - NodeCrypto.layer, +it.effect( + "lists watch tools only to threads that are not delegated children, and forge tools only where the project has a forge", + () => + Effect.scoped( + Effect.gen(function* () { + const scopeFor = ( + token: string, + subagent: boolean, + ): McpInvocationContext.McpThreadInvocationScope => ({ + environmentId, + requestNamespace: token, + thread: { + threadId: ThreadId.make(`thread-${token}`), + providerSessionId: token, + providerInstanceId: ProviderInstanceId.make("codex"), + subagent, + }, + client: undefined, + capabilities: new Set(["pull-requests"]), + issuedAt: 1, + }); + const scopes = new Map([ + ["parentToken", scopeFor("parentToken", false)], + ["childToken", scopeFor("childToken", true)], + ["noForgeToken", scopeFor("noForgeToken", false)], + ]); + const serverLayer = McpHttpServer.layerMcpTransport( + McpHttpServer.layerPullRequestsToolkit, + ).pipe( + Layer.provide(ServerSettings.layerTest()), + Layer.provide( + Layer.mock(McpSessionRegistry.McpSessionRegistry)({ + resolve: (token) => Effect.succeed(scopes.get(token)), + }), ), - ), - ); - yield* HttpRouter.serve(serverLayer, { disableListenLog: true, disableLogger: true }).pipe( - Layer.build, - ); - const httpClient = yield* HttpClient.HttpClient; - const listedTools = (token: string) => - Effect.gen(function* () { - const headers = { - accept: "application/json, text/event-stream", - authorization: `Bearer ${token}`, - }; - const initialize = yield* httpClient.post("/mcp", { - headers, - body: HttpBody.text( - `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1.0.0"}}}`, - "application/json", - ), - }); - const listed = yield* httpClient.post("/mcp", { - headers: { - ...headers, - "mcp-session-id": initialize.headers["mcp-session-id"]!, - "mcp-protocol-version": "2025-06-18", - }, - body: HttpBody.text( - `{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}`, - "application/json", + Layer.provide( + Layer.mergeAll( + McpToolAccessTestkit.liveThreadsLayer, + Layer.mock(ProjectService.ProjectService)({}), + Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}), + Layer.mock(PullRequestService.PullRequestService)({ + servesProject: (projectId) => Effect.succeed(projectId !== "project-noForgeToken"), + }), + Layer.mock(GitManager.GitManager)({}), + Layer.mock(Orchestrator.OrchestratorV2)({}), + Layer.mock(ProjectionStore.ProjectionStoreV2)({ + getThreadShell: (threadId) => + Effect.succeed({ + projectId: ProjectId.make(threadId.replace("thread-", "project-")), + } as never), + }), + NodeServices.layer, + NodeCrypto.layer, ), + ), + ); + yield* HttpRouter.serve(serverLayer, { disableListenLog: true, disableLogger: true }).pipe( + Layer.build, + ); + const httpClient = yield* HttpClient.HttpClient; + const listedTools = (token: string) => + Effect.gen(function* () { + const headers = { + accept: "application/json, text/event-stream", + authorization: `Bearer ${token}`, + }; + const initialize = yield* httpClient.post("/mcp", { + headers, + body: HttpBody.text( + `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1.0.0"}}}`, + "application/json", + ), + }); + const listed = yield* httpClient.post("/mcp", { + headers: { + ...headers, + "mcp-session-id": initialize.headers["mcp-session-id"]!, + "mcp-protocol-version": "2025-06-18", + }, + body: HttpBody.text( + `{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}`, + "application/json", + ), + }); + const body = (yield* listed.json) as { + readonly result: { readonly tools: ReadonlyArray<{ readonly name: string }> }; + }; + return body.result.tools.map((tool) => tool.name); }); - const body = (yield* listed.json) as { - readonly result: { readonly tools: ReadonlyArray<{ readonly name: string }> }; - }; - return body.result.tools.map((tool) => tool.name); - }); - const parentTools = yield* listedTools("parentToken"); - const childTools = yield* listedTools("childToken"); - expect(parentTools).toEqual( - expect.arrayContaining(["link_pull_request", "watch_pull_request", "unwatch_pull_request"]), - ); - expect(childTools).toContain("link_pull_request"); - expect(childTools).not.toContain("watch_pull_request"); - expect(childTools).not.toContain("unwatch_pull_request"); - }), - ).pipe(Effect.provide(NodeHttpServer.layerTest)), + const parentTools = yield* listedTools("parentToken"); + const childTools = yield* listedTools("childToken"); + expect(parentTools).toEqual( + expect.arrayContaining([ + "link_pull_request", + "watch_pull_request", + "unwatch_pull_request", + ]), + ); + expect(childTools).toContain("link_pull_request"); + expect(childTools).not.toContain("watch_pull_request"); + expect(childTools).not.toContain("unwatch_pull_request"); + expect(parentTools).toEqual( + expect.arrayContaining([ + "pull_request_read", + "pull_request_review", + "pull_request_merge", + ]), + ); + const noForgeTools = yield* listedTools("noForgeToken"); + expect(noForgeTools).toEqual( + expect.arrayContaining(["link_pull_request", "watch_pull_request"]), + ); + expect(noForgeTools.filter((name) => name.startsWith("pull_request_"))).toEqual([]); + }), + ).pipe(Effect.provide(NodeHttpServer.layerTest)), ); it.effect( diff --git a/apps/server/src/mcp/McpHttpServer.ts b/apps/server/src/mcp/McpHttpServer.ts index fe28850d08ef0..53d232aad842a 100644 --- a/apps/server/src/mcp/McpHttpServer.ts +++ b/apps/server/src/mcp/McpHttpServer.ts @@ -1,6 +1,8 @@ +import * as Cache from "effect/Cache"; import * as Cause from "effect/Cause"; import * as Clock from "effect/Clock"; import * as Context from "effect/Context"; +import * as Duration from "effect/Duration"; import * as SecureRandom from "effect/crypto/SecureRandom"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; @@ -33,6 +35,8 @@ import * as DeviceService from "../device/DeviceService.ts"; import * as HtmlRender from "../htmlRender/HtmlRender.ts"; import * as ThreadCommandExecutor from "../orchestration-v2/ThreadCommandExecutor.ts"; import * as ThreadManagementService from "../orchestration-v2/ThreadManagementService.ts"; +import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; +import * as PullRequestService from "../pullRequest/PullRequestService.ts"; import * as PullRequestWatchService from "../pullRequest/PullRequestWatchService.ts"; import * as ProviderRegistry from "../provider/ProviderRegistry.ts"; import * as AnalyticsService from "../telemetry/AnalyticsService.ts"; @@ -277,6 +281,24 @@ const makeMcpAuthMiddleware = Effect.gen(function* () { Effect.map((settings) => settings.linkedEnvironmentsEnabled), Effect.orElseSucceed(() => false), ); + const pullRequests = yield* Effect.serviceOption(PullRequestService.PullRequestService); + const projections = yield* Effect.serviceOption(ProjectionStore.ProjectionStoreV2); + // Every request reads it, and a remote added mid-thread shows the tools within a minute. + const forgeOfThread = yield* Cache.make({ + capacity: 1_000, + timeToLive: Duration.minutes(1), + lookup: (threadId: ThreadId): Effect.Effect => + Option.isNone(pullRequests) || Option.isNone(projections) + ? Effect.undefined + : projections.value.getThreadShell(threadId).pipe( + Effect.flatMap((thread) => + thread === null + ? Effect.undefined + : pullRequests.value.servesProject(thread.projectId), + ), + Effect.orElseSucceed(() => undefined), + ), + }); const authenticateRequest = Effect.fn("McpHttpServer.authenticateRequest")(function* ( request: HttpServerRequest.HttpServerRequest, ) { @@ -310,7 +332,11 @@ const makeMcpAuthMiddleware = Effect.gen(function* () { const linkedEnvironments = yield* linksEnabled; if (limited.client?.linked === true && !linkedEnvironments) return linkedEnvironmentsOff; const origin = Option.getOrUndefined(Option.map(requestUrl(request), (url) => url.origin)); - return { ...limited, linkedEnvironments, origin }; + const forge = + limited.thread === undefined + ? undefined + : yield* Cache.get(forgeOfThread, limited.thread.threadId); + return { ...limited, linkedEnvironments, origin, ...(forge === undefined ? {} : { forge }) }; }); // Untraced: a span here would wrap the tool call; the HTTP server span already covers it. return Effect.fnUntraced(function* (httpEffect) { diff --git a/apps/server/src/mcp/McpInvocationContext.ts b/apps/server/src/mcp/McpInvocationContext.ts index 7e9b6ebeb0d93..97d2f8e5747ab 100644 --- a/apps/server/src/mcp/McpInvocationContext.ts +++ b/apps/server/src/mcp/McpInvocationContext.ts @@ -147,6 +147,8 @@ export interface McpInvocationScope { * see the URL they were configured with, so links they must fetch carry it. Unset in-process. */ readonly origin?: string | undefined; + /** False when the calling thread's project is on no forge T3 reads; `/mcp` reads it per request. */ + readonly forge?: boolean; } /** @@ -199,6 +201,13 @@ export const hiddenWhileLinksOff = (): boolean => { return scope?.linkedEnvironments !== false; }; +/** `McpSchema.EnabledWhen` for tools that act on the thread's forge, hidden where it has none. */ +export const hiddenWithoutForge = (): boolean => { + const fiber = Fiber.getCurrent(); + const scope = fiber && Context.getOrUndefined(fiber.context, McpInvocationContext); + return scope?.forge !== false; +}; + export type McpCapabilityError = C extends "preview" ? PreviewAutomationUnavailableError : McpCapabilityUnavailableError; diff --git a/apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts b/apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts index 3c454cbe6e48c..d6bc3a061656c 100644 --- a/apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts +++ b/apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts @@ -6,6 +6,12 @@ import { type OrchestrationV2ServerCommand as OrchestrationCommand, PullRequestOperationError, type OrchestrationProjectShell, + type PullRequestActionInput, + type PullRequestDiffResult, + type PullRequestSubmitReviewInput, + type PullRequestActivity, + type PullRequestListInput, + type PullRequestDetail, type PullRequestRef, type PullRequestReviewGuideResult, type ThreadPullRequestLink, @@ -14,12 +20,14 @@ import { import { describe, expect, it } from "@effect/vitest"; import * as SecureRandom from "effect/crypto/SecureRandom"; import * as Effect from "effect/Effect"; +import * as Base64Url from "effect/encoding/Base64Url"; import * as Layer from "effect/Layer"; import * as Option from "effect/Option"; import * as Ref from "effect/Ref"; import * as Stream from "effect/Stream"; import type { Tool } from "effect/ai"; +import * as GitManager from "../../../git/GitManager.ts"; import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts"; import { type PullRequestTestThread, @@ -28,6 +36,7 @@ import { import * as ProjectService from "../../../project/ProjectService.ts"; import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts"; import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts"; +import * as PullRequestService from "../../../pullRequest/PullRequestService.ts"; import * as McpInvocationContext from "../../McpInvocationContext.ts"; import * as McpToolAccess from "../../McpToolAccess.ts"; import * as McpToolAccessTestkit from "../../McpToolAccess.testkit.ts"; @@ -144,6 +153,8 @@ interface HarnessOptions { PullRequestReviewGuideResult & { started: boolean }, PullRequestOperationError >; + readonly pullRequests?: Partial; + readonly git?: Partial; } const NO_GUIDE: PullRequestReviewGuideResult = { guide: null, run: null, currentHeadSha: "head-1" }; @@ -196,6 +207,8 @@ const makeHarness = Effect.fn("makePullRequestsToolkitHarness")(function* ( Effect.succeed(id === thread?.id ? v2PullRequestThread(thread) : null), dispatch, }), + Layer.mock(PullRequestService.PullRequestService)(options.pullRequests ?? {}), + Layer.mock(GitManager.GitManager)(options.git ?? {}), Layer.succeed(SecureRandom.SecureRandom, testCrypto), McpToolAccessTestkit.liveThreadsLayer, ); @@ -784,3 +797,420 @@ describe("pull request guide tools", () => { }), ); }); + +describe("source control tools", () => { + const branchThread = { + ...makeThread([]), + worktreePath: "/workspace/worktree", + branchPullRequest: { + projectId: PROJECT_ID, + repository: "t3tools/t3code", + number: 42, + url: "https://github.com/t3tools/t3code/pull/42", + }, + }; + const detail = { + title: "Add tools", + body: "Adds tools.", + state: "open", + isDraft: false, + author: null, + headBranch: "tools", + baseBranch: "main", + headSha: "abc123", + mergeability: "mergeable", + additions: 1, + deletions: 0, + changedFiles: 1, + labels: [], + reviewers: [], + checks: [{ name: "CI", status: "success", description: null, url: null }], + } as unknown as PullRequestDetail; + const reviewThread = (id: string, isResolved: boolean) => ({ + id, + path: "a.ts", + line: 1, + side: "right" as const, + isResolved, + isOutdated: false, + comments: [], + }); + const activity: PullRequestActivity = { + comments: [], + commentCount: 0, + commentsTruncated: false, + reviewThreads: [reviewThread("open-thread", false), reviewThread("done-thread", true)], + commits: [], + }; + + it.effect("reads the thread's branch PR, only the sections asked, without resolved threads", () => + Effect.gen(function* () { + const asked: Array = []; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + detail: (ref) => Effect.sync(() => asked.push(ref)).pipe(Effect.as(detail)), + activity: () => Effect.succeed(activity), + }, + }); + const result = yield* harness.call("pull_request_read", { + sections: ["summary", "conversation"], + }); + expect(asked).toEqual([ + { + projectId: PROJECT_ID, + host: "github.com", + repository: "t3tools/t3code", + number: 42, + allowStale: false, + }, + ]); + expect(result.summary?.headSha).toBe("abc123"); + expect(result.checks).toBeUndefined(); + expect(result.conversation?.reviewThreads.map((thread) => thread.id)).toEqual([ + "open-thread", + ]); + expect(result.conversation?.hiddenResolvedThreads).toBe(1); + }), + ); + + it.effect("pages a long conversation and the PR list through the cursors they return", () => + Effect.gen(function* () { + const comment = (body: string) => + ({ id: body.slice(0, 8), author: null, body, createdAt: "2026-11-01T00:00:00Z" }) as never; + const long = (id: string) => ({ + ...reviewThread(id, false), + comments: [comment("x".repeat(20_000))], + }); + const listed: Array = []; + let firstResolved = false; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + activity: () => + Effect.sync(() => ({ + ...activity, + reviewThreads: [ + { + ...long("first"), + isResolved: firstResolved, + nextCommentsCursor: "later", + }, + long("second"), + reviewThread("done-thread", true), + ], + })), + threadComments: (input) => + Effect.succeed( + input.cursor === "later" + ? { comments: [comment("reply")], nextCursor: null } + : { comments: [], nextCursor: null }, + ), + list: (input) => + Effect.sync(() => listed.push(input)).pipe( + Effect.as({ + viewers: {}, + providers: [], + entries: [], + errors: [], + truncated: input.cursors === undefined, + nextCursors: input.cursors === undefined ? { "t3tools/t3code": "page-2" } : {}, + }), + ), + }, + }); + const first = yield* harness.call("pull_request_read", { sections: ["conversation"] }); + expect(first.conversation?.reviewThreads).toMatchObject([ + { id: "first", moreComments: false, comments: [{}, { body: "reply" }] }, + ]); + const cursor = first.conversation?.nextCursor; + expect(cursor).toEqual(expect.any(String)); + // The agent resolves what it read; the next page still starts at the next thread. + firstResolved = true; + const second = yield* harness.call("pull_request_read", { cursor: cursor! }); + expect(second.summary).toBeUndefined(); + expect(second.conversation?.reviewThreads.map((thread) => thread.id)).toEqual(["second"]); + expect(second.conversation?.nextCursor).toBeNull(); + // A cursor past the current end finishes instead of repeating an empty page. + const stale = Base64Url.encode( + JSON.stringify({ threads: 99, comments: 99, includeResolved: false }), + ); + const past = yield* harness.call("pull_request_read", { cursor: stale }); + expect(past.conversation).toMatchObject({ reviewThreads: [], nextCursor: null }); + + const page = yield* harness.call("pull_request_list", {}); + yield* harness.call("pull_request_list", { cursor: page.nextCursor! }); + expect(listed.map((input) => input.cursors)).toEqual([ + undefined, + { "t3tools/t3code": "page-2" }, + ]); + const invalid = yield* harness + .call("pull_request_read", { cursor: "not-a-cursor" }) + .pipe(Effect.flip); + expect(invalid._tag).toBe("PullRequestCursorInvalidError"); + }), + ); + + it.effect("asks for a number when the thread's branch has no PR", () => + Effect.gen(function* () { + const harness = yield* makeHarness(); + const error = yield* harness.call("pull_request_read", {}).pipe(Effect.flip); + expect(error._tag).toBe("PullRequestBranchHasNoneError"); + }), + ); + + it.effect("reads the PR this thread opened before status sync reports it", () => + Effect.gen(function* () { + const asked: Array = []; + const opened = (headBranch: string) => + makeHarness({ + thread: { ...makeThread([makeLink(43, { source: "created" })]), branch: "tools" }, + pullRequests: { + summary: () => Effect.succeed({ state: "open", headBranch } as never), + detail: (ref) => Effect.sync(() => asked.push(ref)).pipe(Effect.as(detail)), + }, + }); + const harness = yield* opened("tools"); + yield* harness.call("pull_request_read", { sections: ["summary"] }); + expect(asked).toMatchObject([{ number: 43 }]); + + // Before sync, the host says which branch it came from; another branch's is not this one. + const moved = yield* opened("old"); + const unsynced = yield* moved.call("pull_request_read", {}).pipe(Effect.flip); + expect(unsynced._tag).toBe("PullRequestBranchHasNoneError"); + + // After a switch to another branch, the PR opened from the old one is not the branch's. + const switched = yield* makeHarness({ + thread: { + ...makeThread([makeLink(43, { source: "created", headBranch: "old" })]), + branch: "new", + }, + }); + const error = yield* switched + .call("pull_request_update", { title: "New title" }) + .pipe(Effect.flip); + expect(error._tag).toBe("PullRequestBranchHasNoneError"); + }), + ); + + it.effect("merges pinned to the head the agent checked", () => + Effect.gen(function* () { + const actions: Array = []; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + runAction: (input) => Effect.sync(() => void actions.push(input)), + summary: () => Effect.succeed({ state: "open" } as never), + }, + }); + const result = yield* harness.call("pull_request_merge", { + expectedHeadSha: "abc123", + method: "squash", + auto: true, + }); + expect(result).toMatchObject({ number: 42, state: "open" }); + expect(actions).toMatchObject([ + { + number: 42, + action: "enable-auto-merge", + expectedHeadSha: "abc123", + mergeMethod: "squash", + }, + ]); + }), + ); + + it.effect("opens a PR from the thread's worktree and links it even if dismissed", () => + Effect.gen(function* () { + const opened: Array<{ readonly cwd: string; readonly draft: boolean | undefined }> = []; + const harness = yield* makeHarness({ + thread: { + ...makeThread([makeLink(43, { source: "stack-dismissed" })]), + worktreePath: "/workspace/worktree", + }, + git: { + createPullRequest: (input) => + Effect.sync(() => opened.push({ cwd: input.cwd, draft: input.draft })).pipe( + Effect.as({ + status: "created" as const, + url: "https://github.com/t3tools/t3code/pull/43", + number: 43, + baseBranch: "main", + headBranch: "tools", + title: input.title, + }), + ), + }, + }); + const result = yield* harness.call("pull_request_create", { + title: "Add tools", + body: "Adds tools.", + draft: true, + }); + expect(result).toMatchObject({ number: 43, created: true }); + expect(opened).toEqual([{ cwd: "/workspace/worktree", draft: true }]); + expect(yield* Ref.get(harness.commands)).toMatchObject([ + { type: "thread.pull-request.link", number: 43, source: "created" }, + ]); + }), + ); + + it.effect("replies to and resolves a review thread, and refuses resolving without one", () => + Effect.gen(function* () { + const calls: Array = []; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + replyToThread: (input) => Effect.sync(() => calls.push(`reply ${input.threadId}`)), + setThreadResolution: (input) => + input.threadId === "locked-thread" + ? Effect.fail( + new PullRequestOperationError({ + operation: "setThreadResolution", + detail: "Locked.", + }), + ) + : Effect.sync(() => void calls.push(`resolve ${input.threadId} ${input.resolved}`)), + }, + }); + const result = yield* harness.call("pull_request_respond", { + reviewThreadId: "open-thread", + body: "Fixed.", + resolved: true, + }); + expect(result).toMatchObject({ replied: true, resolved: true }); + expect(calls).toEqual(["reply open-thread", "resolve open-thread true"]); + const partial = yield* harness + .call("pull_request_respond", { + reviewThreadId: "locked-thread", + body: "Fixed.", + resolved: true, + }) + .pipe(Effect.flip); + expect(partial.message).toContain("The reply was posted"); + const error = yield* harness + .call("pull_request_respond", { body: "Done", resolved: true }) + .pipe(Effect.flip); + expect(error._tag).toBe("PullRequestNothingToDoError"); + }), + ); + + it.effect("places review comments by the diff page that shows their line", () => + Effect.gen(function* () { + const reviews: Array = []; + const pages: Record = { + first: { + patch: + "diff --git a/a.ts b/a.ts\n--- a/a.ts\n+++ b/a.ts\n@@ -1,2 +1,2 @@\n-old\n+new\n same\n", + truncated: false, + nextCursor: "second", + }, + second: { + patch: + "diff --git a/b.ts b/b.ts\n--- a/b.ts\n+++ b/b.ts\n@@ -9,1 +9,2 @@\n kept\n+added\n", + truncated: false, + nextCursor: null, + }, + }; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + diff: (input) => Effect.succeed(pages[input.cursor ?? "first"]!), + submitReview: (input) => Effect.sync(() => void reviews.push(input)), + }, + }); + yield* harness.call("pull_request_review", { + verdict: "request-changes", + body: "Two things.", + comments: [ + { path: "b.ts", line: 10, startLine: 9, body: "Why?" }, + { path: "a.ts", line: 1, side: "old", body: "Keep this." }, + ], + }); + expect(reviews).toMatchObject([ + { + number: 42, + verdict: "request-changes", + body: "Two things.", + comments: [ + { + path: "b.ts", + position: { kind: "added", newLine: 10 }, + startPosition: { kind: "context", oldLine: 9, newLine: 9, side: "right" }, + }, + { path: "a.ts", position: { kind: "deleted", oldLine: 1 } }, + ], + }, + ]); + + // A line the diff never shows fails before anything is posted. + const error = yield* harness + .call("pull_request_review", { + verdict: "comment", + comments: [{ path: "a.ts", line: 40, body: "Here?" }], + }) + .pipe(Effect.flip); + expect(error.message).toContain("a.ts line 40 (new side) is not in this PR's diff"); + expect(reviews).toHaveLength(1); + }), + ); + + it.effect("updates labels, requests reviewers by login, and closes the PR", () => + Effect.gen(function* () { + const calls: Array = []; + const harness = yield* makeHarness({ + thread: branchThread, + pullRequests: { + setLabels: (input) => + Effect.sync(() => void calls.push(["labels", input.labels, input.applied])), + reviewerCandidates: (input) => + Effect.succeed({ + candidates: [ + { + id: "MDQ6VXNlcjE=", + kind: "user", + login: input.query === "Octo" ? "octo" : "x", + name: null, + avatarUrl: null, + isRequested: false, + }, + { + id: "core", + kind: "team", + login: "acme/core", + name: null, + avatarUrl: null, + isRequested: false, + }, + ], + } as never), + requestReviewers: (input) => + Effect.sync(() => void calls.push(["reviewers", input.reviewers])), + runAction: (input) => Effect.sync(() => void calls.push(["action", input.action])), + }, + }); + yield* harness.call("pull_request_update", { + addLabels: ["bug"], + removeLabels: ["wip"], + requestReviewers: ["Octo", "acme/core"], + state: "closed", + }); + expect(calls).toEqual([ + ["labels", ["bug"], true], + ["labels", ["wip"], false], + [ + "reviewers", + [ + { id: "MDQ6VXNlcjE=", kind: "user" }, + { id: "core", kind: "team" }, + ], + ], + ["action", "close"], + ]); + const unknown = yield* harness + .call("pull_request_update", { requestReviewers: ["nobody"] }) + .pipe(Effect.flip); + expect(unknown.message).toContain("No reviewer named nobody"); + }), + ); +}); diff --git a/apps/server/src/mcp/toolkits/pullRequests/handlers.ts b/apps/server/src/mcp/toolkits/pullRequests/handlers.ts index 46afff241f408..eeb17ffe576c0 100644 --- a/apps/server/src/mcp/toolkits/pullRequests/handlers.ts +++ b/apps/server/src/mcp/toolkits/pullRequests/handlers.ts @@ -1,22 +1,34 @@ import { CommandId, + NonNegativeInt, + type PullRequestActivity, + PullRequestListCursors, + type PullRequestRef, + type PullRequestReviewCommentDraft, + type PullRequestReviewThread, type OrchestrationProjectShell, type PullRequestState, type PullRequestWatchUntil, type OrchestrationV2ThreadShell, type ThreadId, type ThreadPullRequestLink, + TrimmedNonEmptyString, } from "@t3tools/contracts"; import * as Cause from "effect/Cause"; import * as SecureRandom from "effect/crypto/SecureRandom"; import * as Effect from "effect/Effect"; +import * as Base64Url from "effect/encoding/Base64Url"; import * as Option from "effect/Option"; +import * as Schema from "effect/Schema"; +import * as GitManager from "../../../git/GitManager.ts"; import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts"; import * as ProjectService from "../../../project/ProjectService.ts"; import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts"; import { resolveTarget, type ResolvedTarget } from "../../../pullRequest/pullRequestTarget.ts"; import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts"; +import * as PullRequestService from "../../../pullRequest/PullRequestService.ts"; +import { reviewPositionInPatch } from "../../../pullRequest/pullRequestReviewPosition.ts"; import { pullRequestSyncKey } from "../../../pullRequest/pullRequestSyncKey.ts"; import { sourceControlDefinitions } from "../../../sourceControl/sourceControlDefinitions.ts"; import { @@ -32,6 +44,14 @@ import * as McpToolAccess from "../../McpToolAccess.ts"; import { threadNotFound } from "../../threadAccess.ts"; import { type ListThreadPullRequestsResult, + PullRequestBranchHasNoneError, + PullRequestCursorInvalidError, + PullRequestForgeError, + PullRequestNothingToDoError, + type PullRequestReadSection, + type ReadPullRequestResult, + type ReviewLineComment, + type ThreadPullRequestInput, PullRequestLinkFailedError, PullRequestUnlinkFailedError, PullRequestListFailedError, @@ -44,6 +64,97 @@ import { CHILD_PULL_REQUEST_REPORT_NEXT, } from "./tools.ts"; +const ReadCursor = Schema.Union([ + Schema.Struct({ diff: TrimmedNonEmptyString }), + Schema.Struct({ + threads: NonNegativeInt, + comments: NonNegativeInt, + includeResolved: Schema.Boolean, + }), +]); +type ReadCursor = typeof ReadCursor.Type; + +const ReadCursorJson = Schema.fromJsonString(ReadCursor); +const ListCursorsJson = Schema.fromJsonString(PullRequestListCursors); +const encodeReadCursorJson = Schema.encodeSync(ReadCursorJson); +const encodeListCursorsJson = Schema.encodeSync(ListCursorsJson); +const decodeReadCursorJson = Schema.decodeUnknownEffect(ReadCursorJson); +const decodeListCursorsJson = Schema.decodeUnknownEffect(ListCursorsJson); + +const decodeCursorText = (cursor: string) => + Effect.fromResult(Base64Url.decodeString(cursor)).pipe( + Effect.mapError(() => new PullRequestCursorInvalidError({})), + ); + +const readCursors = { + encode: (value: ReadCursor) => Base64Url.encode(encodeReadCursorJson(value)), + decode: (cursor: string) => + decodeCursorText(cursor).pipe( + Effect.flatMap(decodeReadCursorJson), + Effect.mapError(() => new PullRequestCursorInvalidError({})), + ), +}; + +const listCursors = { + encode: (value: PullRequestListCursors) => Base64Url.encode(encodeListCursorsJson(value)), + decode: (cursor: string) => + decodeCursorText(cursor).pipe( + Effect.flatMap(decodeListCursorsJson), + Effect.mapError(() => new PullRequestCursorInvalidError({})), + ), +}; + +/** Keeps one conversation page near the size of a capped CI log. */ +const CONVERSATION_PAGE_CHARS = 32_000; +const THREAD_COMMENT_PAGES = 4; +/** Diff pages searched for review comment lines; a PR past this is too big to review by line. */ +const REVIEW_DIFF_PAGES = 10; + +function conversationPage( + activity: PullRequestActivity, + start: { readonly threads: number; readonly comments: number }, + includeResolved: boolean, +) { + // Offsets index the unfiltered lists, whose order resolving a thread does not change. + const { reviewThreads, comments } = activity; + const pageThreads: Array = []; + const pageComments: Array = []; + let size = 0; + let thread = Math.min(start.threads, reviewThreads.length); + let comment = Math.min(start.comments, comments.length); + const fits = (item: unknown) => { + const next = size + JSON.stringify(item).length; + if (next > CONVERSATION_PAGE_CHARS && pageThreads.length + pageComments.length > 0) { + return false; + } + size = next; + return true; + }; + // Review threads come first: they hold the feedback an agent acts on. + while (thread < reviewThreads.length) { + const next = reviewThreads[thread]!; + if (includeResolved || !next.isResolved) { + if (!fits(next)) break; + pageThreads.push(next); + } + thread += 1; + } + if (thread === reviewThreads.length) { + while (comment < comments.length && fits(comments[comment])) { + pageComments.push(comments[comment++]!); + } + } + const done = thread === reviewThreads.length && comment === comments.length; + return { + threads: pageThreads, + comments: pageComments, + hiddenResolvedThreads: includeResolved + ? 0 + : reviewThreads.filter((candidate) => candidate.isResolved).length, + next: done ? null : { threads: thread, comments: comment, includeResolved }, + }; +} + function entryOf( link: ThreadPullRequestLink, chains: ReturnType, @@ -148,6 +259,8 @@ const make = Effect.gen(function* () { const engine = yield* Orchestrator.OrchestratorV2; const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService; const watches = yield* PullRequestWatchService.PullRequestWatchService; + const pullRequests = yield* PullRequestService.PullRequestService; + const git = yield* GitManager.GitManager; const projects = yield* ProjectService.ProjectService; const random = yield* SecureRandom.SecureRandom; @@ -162,7 +275,8 @@ const make = Effect.gen(function* () { Failure: | typeof PullRequestLinkFailedError | typeof PullRequestUnlinkFailedError - | typeof PullRequestListFailedError, + | typeof PullRequestListFailedError + | typeof PullRequestForgeError, requested: ThreadId | undefined, ) { const scope = yield* McpInvocationContext.requireMcpCapability("pull-requests"); @@ -182,7 +296,10 @@ const make = Effect.gen(function* () { const projectOf = ( thread: OrchestrationV2ThreadShell, - Failure: typeof PullRequestLinkFailedError | typeof PullRequestUnlinkFailedError, + Failure: + | typeof PullRequestLinkFailedError + | typeof PullRequestUnlinkFailedError + | typeof PullRequestForgeError, ) => projects.getShell(thread.projectId).pipe( Effect.map(Option.getOrUndefined), @@ -280,6 +397,269 @@ const make = Effect.gen(function* () { handle: (params: P) => Effect.Effect, ) => McpToolAccess.writesThreads((params: P) => [params.threadId], handle); + const forgeFailure = (error: { readonly message: string }) => + new PullRequestForgeError({ detail: error.message, cause: error }); + + /** A login or org/team, matched to the host's own reviewer id. */ + const reviewerNamed = (ref: PullRequestRef, name: string) => + pullRequests.reviewerCandidates({ ...ref, query: name }).pipe( + Effect.mapError(forgeFailure), + Effect.flatMap(({ candidates }) => { + const wanted = name.toLowerCase(); + const match = candidates.find( + (candidate) => + candidate.login.toLowerCase() === wanted || candidate.id.toLowerCase() === wanted, + ); + return match === undefined + ? Effect.fail( + new PullRequestForgeError({ + detail: `No reviewer named ${name} can be requested on this PR.`, + }), + ) + : Effect.succeed({ id: match.id, kind: match.kind }); + }), + ); + + /** Line comments placed by the PR's diff, which says whether each line was added, removed, or kept. */ + const reviewComments = Effect.fn("PullRequestsToolkit.reviewComments")(function* ( + ref: PullRequestRef, + comments: ReadonlyArray, + ) { + const placed = new Map(); + const unplaced = () => comments.filter((comment) => !placed.has(comment)); + let cursor: string | undefined; + for (let page = 0; page < REVIEW_DIFF_PAGES && unplaced().length > 0; page += 1) { + const diff = yield* pullRequests + .diff({ ...ref, ...(cursor === undefined ? {} : { cursor }) }) + .pipe(Effect.mapError(forgeFailure)); + for (const comment of unplaced()) { + const side = comment.side ?? "new"; + const position = reviewPositionInPatch(diff.patch, comment.path, comment.line, side); + const start = + comment.startLine === undefined + ? undefined + : reviewPositionInPatch(diff.patch, comment.path, comment.startLine, side); + if (position === null || start === null) continue; + placed.set(comment, { + path: comment.path, + position, + ...(start === undefined ? {} : { startPosition: start }), + body: comment.body, + }); + } + if (diff.nextCursor === null) break; + cursor = diff.nextCursor; + } + const missing = unplaced()[0]; + if (missing !== undefined) { + return yield* new PullRequestForgeError({ + detail: `${missing.path} line ${missing.startLine ?? missing.line} (${missing.side ?? "new"} side) is not in this PR's diff. Comment on a changed line or one shown around it.`, + }); + } + return comments.map((comment) => placed.get(comment)!); + }); + + /** The thread's checkout, its project, and the PR the input names (default: the branch's). */ + const locate = Effect.fn("PullRequestsToolkit.locate")(function* (input: ThreadPullRequestInput) { + const thread = yield* requireThread(PullRequestForgeError, undefined); + const project = yield* projectOf(thread, PullRequestForgeError); + if (project === undefined) { + return yield* new PullRequestProjectNotFoundError({ repository: input.repository ?? "" }); + } + // Status sync sets branchPullRequest later, so a PR this thread just opened counts too, + // unless it is another branch's. + const opened = + thread.branchPullRequest === null || thread.branchPullRequest === undefined + ? threadPullRequestsOf(thread).findLast( + (link) => + link.source === "created" && + (link.snapshot === null || link.snapshot.headBranch === thread.branch), + ) + : undefined; + const branchPullRequest = thread.branchPullRequest ?? opened ?? null; + const branchRepository = + project.repositoryIdentity == null + ? undefined + : (sourceControlDefinitions.repositorySelector(project.repositoryIdentity) ?? undefined); + const named = + input.number !== undefined + ? { number: input.number, repository: input.repository ?? branchRepository } + : branchPullRequest === null + ? null + : { number: branchPullRequest.number, repository: branchPullRequest.repository }; + if (named === null) return yield* new PullRequestBranchHasNoneError(); + const target = yield* resolveTarget(named, project); + const ref: PullRequestRef = { + projectId: project.id, + host: target.host, + repository: target.repository, + number: target.number, + }; + if (input.number === undefined && opened !== undefined && opened.snapshot === null) { + // Not synced yet, so only the host knows which branch it was opened from. + const summary = yield* pullRequests.summary(ref).pipe(Effect.mapError(forgeFailure)); + if (summary.headBranch !== thread.branch) return yield* new PullRequestBranchHasNoneError(); + } + return { thread, project, target, ref }; + }); + + const identityOf = (target: ResolvedTarget) => ({ + host: target.host, + repository: target.repository, + number: target.number, + url: target.url, + }); + + /** The thread's comments past its first page, when the host pages them. */ + const restOfThread = Effect.fn("PullRequestsToolkit.restOfThread")(function* ( + ref: PullRequestRef, + thread: PullRequestReviewThread, + ) { + const comments: Array = []; + let cursor = thread.nextCommentsCursor; + for (let page = 0; cursor !== undefined && page < THREAD_COMMENT_PAGES; page += 1) { + const read = yield* pullRequests + .threadComments({ ...ref, threadId: thread.id, cursor }) + .pipe(Effect.option); + if (Option.isNone(read)) break; + comments.push(...read.value.comments); + cursor = read.value.nextCursor ?? undefined; + } + return { comments, moreComments: cursor !== undefined }; + }); + + const readSections = Effect.fn("PullRequestsToolkit.readSections")(function* ( + ref: PullRequestRef, + sections: ReadonlyArray, + includeResolved: boolean, + cursor: ReadCursor | undefined, + ) { + const wants = (section: PullRequestReadSection) => sections.includes(section); + const diffCursor = cursor !== undefined && "diff" in cursor ? cursor.diff : undefined; + const [detail, activity, diff] = yield* Effect.all( + [ + // Agents pin merges to this headSha, so it must not come from a stale snapshot. + wants("summary") || wants("checks") + ? pullRequests.detail({ ...ref, allowStale: false }).pipe(Effect.asSome) + : Effect.succeedNone, + wants("conversation") ? pullRequests.activity(ref).pipe(Effect.asSome) : Effect.succeedNone, + wants("diff") + ? pullRequests + .diff({ ...ref, ...(diffCursor === undefined ? {} : { cursor: diffCursor }) }) + .pipe(Effect.asSome) + : Effect.succeedNone, + ], + { concurrency: "unbounded" }, + ).pipe(Effect.mapError(forgeFailure)); + const page = Option.map(activity, (value) => + conversationPage( + value, + cursor !== undefined && "threads" in cursor ? cursor : { threads: 0, comments: 0 }, + includeResolved, + ), + ); + const threadRests = Option.isSome(page) + ? yield* Effect.forEach(page.value.threads, (thread) => restOfThread(ref, thread), { + concurrency: 4, + }) + : []; + const result: Omit = { + ...(Option.isSome(detail) && wants("summary") + ? { + summary: { + title: detail.value.title, + body: detail.value.body, + state: detail.value.state, + isDraft: detail.value.isDraft, + author: detail.value.author?.login ?? null, + headBranch: detail.value.headBranch, + baseBranch: detail.value.baseBranch, + headSha: detail.value.headSha ?? null, + mergeability: detail.value.mergeability, + behindBy: detail.value.behindBy ?? null, + autoMergeEnabled: detail.value.autoMergeEnabled ?? null, + additions: detail.value.additions, + deletions: detail.value.deletions, + changedFiles: detail.value.changedFiles, + labels: detail.value.labels.map((label) => label.name), + reviewers: detail.value.reviewers.map((reviewer) => reviewer.login), + }, + } + : {}), + ...(Option.isSome(detail) && wants("checks") ? { checks: detail.value.checks } : {}), + ...(Option.isSome(activity) && Option.isSome(page) + ? { + conversation: { + comments: page.value.comments.map((comment) => ({ + id: comment.id, + kind: comment.kind, + author: comment.author?.login ?? null, + body: comment.body, + createdAt: comment.createdAt, + path: comment.path, + reviewState: comment.reviewState, + })), + reviewThreads: page.value.threads.map((thread, index) => ({ + id: thread.id, + path: thread.path, + line: thread.line, + isResolved: thread.isResolved, + isOutdated: thread.isOutdated, + comments: [...thread.comments, ...threadRests[index]!.comments].map((comment) => ({ + author: comment.author?.login ?? null, + body: comment.body, + createdAt: comment.createdAt, + })), + moreComments: threadRests[index]!.moreComments, + })), + hiddenResolvedThreads: page.value.hiddenResolvedThreads, + truncated: + activity.value.commentsTruncated || activity.value.reviewThreadsTruncated === true, + nextCursor: page.value.next === null ? null : readCursors.encode(page.value.next), + }, + } + : {}), + ...(Option.isSome(diff) + ? { + diff: { + patch: diff.value.patch, + truncated: diff.value.truncated, + nextCursor: + diff.value.nextCursor === null + ? null + : readCursors.encode({ diff: diff.value.nextCursor }), + }, + } + : {}), + }; + return result; + }); + + const linkToThread = Effect.fn("PullRequestsToolkit.linkToThread")(function* ( + thread: OrchestrationV2ThreadShell, + target: ResolvedTarget, + ) { + if ( + threadPullRequestsOf(thread).some( + (link) => link.source !== "stack-dismissed" && threadPullRequestKeysEqual(link, target), + ) + ) { + return; + } + yield* engine + .dispatch({ + type: "thread.pull-request.link", + commandId: yield* commandId("mcp-pr-create", thread.id), + threadId: thread.id, + host: target.host, + repository: target.repository, + number: target.number, + url: target.url, + source: "created", + }) + .pipe(Effect.catchCause(dispatchFailure(PullRequestLinkFailedError))); + }); + return { link_pull_request: writesThread((input) => Effect.gen(function* () { @@ -539,6 +919,232 @@ const make = Effect.gen(function* () { }; }), ), + pull_request_read: McpToolAccess.reads((input) => + Effect.gen(function* () { + const cursor = + input.cursor === undefined ? undefined : yield* readCursors.decode(input.cursor); + const { target, ref } = yield* locate(input); + // A cursor continues the one section it came from, with that read's options. + const sections: ReadonlyArray = + cursor === undefined + ? (input.sections ?? ["summary", "checks"]) + : "diff" in cursor + ? ["diff"] + : ["conversation"]; + const includeResolved = + cursor !== undefined && "includeResolved" in cursor + ? cursor.includeResolved + : input.includeResolved === true; + return { + ...identityOf(target), + ...(yield* readSections(ref, sections, includeResolved, cursor)), + }; + }), + ), + pull_request_list: McpToolAccess.reads((input) => + Effect.gen(function* () { + const thread = yield* requireThread(PullRequestForgeError, undefined); + const listed = yield* pullRequests + .list({ + projectId: thread.projectId, + state: input.state ?? "open", + involvement: input.involvement ?? "all", + limit: input.limit ?? 30, + ...(input.query === undefined ? {} : { query: input.query }), + ...(input.cursor === undefined + ? {} + : { cursors: yield* listCursors.decode(input.cursor) }), + }) + .pipe(Effect.mapError(forgeFailure)); + const failure = listed.errors[0]; + if (listed.entries.length === 0 && failure !== undefined) { + return yield* new PullRequestForgeError({ detail: failure.message }); + } + return { + pullRequests: listed.entries.map((entry) => ({ + number: entry.number, + title: entry.title, + url: entry.url, + author: entry.author?.login ?? null, + headBranch: entry.headBranch, + baseBranch: entry.baseBranch, + state: entry.state, + isDraft: entry.isDraft, + reviewDecision: entry.reviewDecision ?? null, + checksState: entry.checksState ?? null, + updatedAt: entry.updatedAt, + })), + truncated: listed.truncated, + nextCursor: + Object.keys(listed.nextCursors).length === 0 + ? null + : listCursors.encode(listed.nextCursors), + }; + }), + ), + pull_request_create: McpToolAccess.writesWithCapability((input) => + Effect.gen(function* () { + const thread = yield* requireThread(PullRequestForgeError, undefined); + const project = yield* projectOf(thread, PullRequestForgeError); + if (project === undefined) { + return yield* new PullRequestProjectNotFoundError({ repository: "" }); + } + const created = yield* git + .createPullRequest({ + cwd: thread.worktreePath ?? project.workspaceRoot, + projectId: project.id, + title: input.title, + body: input.body, + baseBranch: input.base, + draft: input.draft, + }) + .pipe(Effect.mapError(forgeFailure)); + if (created.url === undefined) { + return yield* new PullRequestForgeError({ + detail: + "The host accepted the PR but does not list it yet. Find it with pull_request_list.", + }); + } + const target = yield* resolveTarget({ url: created.url }, project); + yield* linkToThread(thread, target); + return { + ...identityOf(target), + created: created.status === "created", + ...(thread.lineage.relationshipToParent === "subagent" + ? { next: CHILD_PULL_REQUEST_REPORT_NEXT } + : {}), + }; + }), + ), + pull_request_update: McpToolAccess.writesWithCapability((input) => + Effect.gen(function* () { + if ( + input.title === undefined && + input.body === undefined && + input.ready === undefined && + input.state === undefined && + input.addLabels === undefined && + input.removeLabels === undefined && + input.requestReviewers === undefined + ) { + return yield* new PullRequestNothingToDoError({ + detail: "Pass title, body, ready, state, addLabels, removeLabels, or requestReviewers.", + }); + } + const { target, ref } = yield* locate(input); + if (input.title !== undefined || input.body !== undefined) { + yield* pullRequests + .update({ + ...ref, + ...(input.title === undefined ? {} : { title: input.title }), + ...(input.body === undefined ? {} : { body: input.body }), + }) + .pipe(Effect.mapError(forgeFailure)); + } + for (const [labels, applied] of [ + [input.addLabels, true], + [input.removeLabels, false], + ] as const) { + if (labels !== undefined) { + yield* pullRequests + .setLabels({ ...ref, labels, applied }) + .pipe(Effect.mapError(forgeFailure)); + } + } + if (input.requestReviewers !== undefined) { + const reviewers = yield* Effect.forEach(input.requestReviewers, (name) => + reviewerNamed(ref, name), + ); + yield* pullRequests + .requestReviewers({ ...ref, reviewers, requested: true }) + .pipe(Effect.mapError(forgeFailure)); + } + if (input.ready !== undefined) { + yield* pullRequests + .runAction({ ...ref, action: input.ready ? "ready" : "draft" }) + .pipe(Effect.mapError(forgeFailure)); + } + if (input.state !== undefined) { + yield* pullRequests + .runAction({ ...ref, action: input.state === "closed" ? "close" : "reopen" }) + .pipe(Effect.mapError(forgeFailure)); + } + return identityOf(target); + }), + ), + pull_request_respond: McpToolAccess.writesWithCapability((input) => + Effect.gen(function* () { + if ( + input.body === undefined && + (input.reviewThreadId === undefined || input.resolved === undefined) + ) { + return yield* new PullRequestNothingToDoError({ + detail: "Pass body, or reviewThreadId with resolved.", + }); + } + if (input.reviewThreadId === undefined && input.resolved !== undefined) { + return yield* new PullRequestNothingToDoError({ + detail: "resolved needs reviewThreadId.", + }); + } + const { target, ref } = yield* locate(input); + const reviewThreadId = input.reviewThreadId; + if (input.body !== undefined) { + yield* ( + reviewThreadId === undefined + ? pullRequests.comment({ ...ref, body: input.body }) + : pullRequests.replyToThread({ ...ref, threadId: reviewThreadId, body: input.body }) + ).pipe(Effect.mapError(forgeFailure)); + } + if (reviewThreadId !== undefined && input.resolved !== undefined) { + yield* pullRequests + .setThreadResolution({ ...ref, threadId: reviewThreadId, resolved: input.resolved }) + .pipe( + Effect.mapError((error) => + input.body === undefined + ? forgeFailure(error) + : new PullRequestForgeError({ + // A retry with the body would post the reply twice. + detail: `The reply was posted, but setting resolved failed: ${error.message} Retry without body.`, + cause: error, + }), + ), + ); + } + return { + ...identityOf(target), + replied: input.body !== undefined, + resolved: input.resolved ?? null, + }; + }), + ), + pull_request_review: McpToolAccess.writesWithCapability((input) => + Effect.gen(function* () { + const { target, ref } = yield* locate(input); + const comments = yield* reviewComments(ref, input.comments ?? []); + yield* pullRequests + .submitReview({ ...ref, verdict: input.verdict, body: input.body ?? "", comments }) + .pipe(Effect.mapError(forgeFailure)); + return identityOf(target); + }), + ), + pull_request_merge: McpToolAccess.writesWithCapability((input) => + Effect.gen(function* () { + const { target, ref } = yield* locate(input); + yield* pullRequests + .runAction({ + ...ref, + action: input.auto === true ? "enable-auto-merge" : "merge", + expectedHeadSha: input.expectedHeadSha, + ...(input.method === undefined ? {} : { mergeMethod: input.method }), + }) + .pipe(Effect.mapError(forgeFailure)); + const after = yield* pullRequests + .summary({ ...ref, allowStale: false }) + .pipe(Effect.mapError(forgeFailure)); + return { ...identityOf(target), state: after.state }; + }), + ), } satisfies McpToolAccess.Handlers; }); diff --git a/apps/server/src/mcp/toolkits/pullRequests/tools.ts b/apps/server/src/mcp/toolkits/pullRequests/tools.ts index 685cfd02782b5..2eca402582722 100644 --- a/apps/server/src/mcp/toolkits/pullRequests/tools.ts +++ b/apps/server/src/mcp/toolkits/pullRequests/tools.ts @@ -3,6 +3,15 @@ import { OrchestratorMcpEnvironmentTarget, OrchestratorMcpFailure, PositiveInt, + PullRequestCheck, + PullRequestCommentKind, + PullRequestChecksState, + PullRequestInvolvement, + PullRequestListState, + PullRequestMergeability, + PullRequestMergeMethod, + PullRequestReviewVerdict, + PullRequestReviewDecision, PullRequestReviewGuide, PullRequestReviewGuideRun, PullRequestState, @@ -20,6 +29,7 @@ import * as Toolkit from "effect/ai/Toolkit"; import * as McpInvocationContext from "../../McpInvocationContext.ts"; import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts"; import * as ThreadManagementService from "../../../orchestration-v2/ThreadManagementService.ts"; +import * as GitManager from "../../../git/GitManager.ts"; import * as ProjectService from "../../../project/ProjectService.ts"; import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts"; import { @@ -28,6 +38,7 @@ import { PullRequestHostRequiredError, PullRequestUrlUnavailableError, } from "../../../pullRequest/pullRequestTarget.ts"; +import * as PullRequestService from "../../../pullRequest/PullRequestService.ts"; import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts"; const dependencies = [ @@ -37,6 +48,8 @@ const dependencies = [ ProjectService.ProjectService, ]; +const forgeDependencies = [...dependencies, PullRequestService.PullRequestService]; + const guideDependencies = [ ...dependencies, PullRequestReviewGuideService.PullRequestReviewGuideService, @@ -124,6 +137,42 @@ export class PullRequestGuideFailedError extends Schema.TaggedError()( + "PullRequestForgeError", + { detail: Schema.optional(Schema.String), cause: Schema.optional(Schema.Defect()) }, +) { + override get message(): string { + return this.detail ?? "Could not read this thread's project."; + } +} + +export class PullRequestBranchHasNoneError extends Schema.TaggedError()( + "PullRequestBranchHasNoneError", + {}, +) { + override get message(): string { + return "This thread's branch has no known PR. Pass number, or open one with pull_request_create."; + } +} + +export class PullRequestCursorInvalidError extends Schema.TaggedError()( + "PullRequestCursorInvalidError", + {}, +) { + override get message(): string { + return "This cursor is not from this tool. Pass a nextCursor from its last result."; + } +} + +export class PullRequestNothingToDoError extends Schema.TaggedError()( + "PullRequestNothingToDoError", + { detail: Schema.String }, +) { + override get message(): string { + return this.detail; + } +} + export const PullRequestToolError = Schema.Union([ OrchestratorMcpFailure, McpCapabilityUnavailableError, @@ -141,6 +190,10 @@ export const PullRequestToolError = Schema.Union([ PullRequestWatchService.PullRequestWatchFromSubagentError, PullRequestProjectNotFoundError, PullRequestGuideFailedError, + PullRequestForgeError, + PullRequestBranchHasNoneError, + PullRequestNothingToDoError, + PullRequestCursorInvalidError, ]); export type PullRequestToolError = typeof PullRequestToolError.Type; @@ -429,6 +482,303 @@ const ReadPullRequestGuideTool = Tool.make("read_pull_request_guide", { .annotate(Tool.Idempotent, true) .annotate(Tool.OpenWorld, true); +export const ThreadPullRequestInput = Schema.Struct({ + environmentId: OrchestratorMcpEnvironmentTarget, + number: Schema.optional(PositiveInt.annotate({ description: "Default: the branch's PR." })), + repository: Schema.optional(TrimmedNonEmptyString), +}); +export type ThreadPullRequestInput = typeof ThreadPullRequestInput.Type; + +export const PullRequestReadSection = Schema.Literals([ + "summary", + "checks", + "conversation", + "diff", +]); +export type PullRequestReadSection = typeof PullRequestReadSection.Type; + +const ReadComment = Schema.Struct({ + author: Schema.NullOr(Schema.String), + body: Schema.String, + createdAt: Schema.String, +}); + +export const ReadPullRequestResult = Schema.Struct({ + ...PullRequestIdentity, + summary: Schema.optional( + Schema.Struct({ + title: Schema.String, + body: Schema.String, + state: PullRequestState, + isDraft: Schema.Boolean, + author: Schema.NullOr(Schema.String), + headBranch: Schema.String, + baseBranch: Schema.String, + headSha: Schema.NullOr(Schema.String), + mergeability: PullRequestMergeability, + behindBy: Schema.NullOr(Schema.Int), + autoMergeEnabled: Schema.NullOr(Schema.Boolean), + additions: Schema.Int, + deletions: Schema.Int, + changedFiles: Schema.Int, + labels: Schema.Array(Schema.String), + reviewers: Schema.Array(Schema.String), + }), + ), + checks: Schema.optional(Schema.Array(PullRequestCheck)), + conversation: Schema.optional( + Schema.Struct({ + comments: Schema.Array( + Schema.Struct({ + ...ReadComment.fields, + id: Schema.String, + kind: PullRequestCommentKind, + path: Schema.NullOr(Schema.String), + reviewState: Schema.NullOr(Schema.String), + }), + ), + reviewThreads: Schema.Array( + Schema.Struct({ + id: Schema.String, + path: Schema.String, + line: Schema.NullOr(Schema.Int), + isResolved: Schema.Boolean, + isOutdated: Schema.Boolean, + comments: Schema.Array(ReadComment), + moreComments: Schema.Boolean, + }), + ), + hiddenResolvedThreads: Schema.Int, + truncated: Schema.Boolean, + nextCursor: Schema.NullOr(Schema.String), + }), + ), + diff: Schema.optional( + Schema.Struct({ + patch: Schema.String, + truncated: Schema.Boolean, + nextCursor: Schema.NullOr(Schema.String), + }), + ), +}); +export type ReadPullRequestResult = typeof ReadPullRequestResult.Type; + +export const ListPullRequestsResult = Schema.Struct({ + pullRequests: Schema.Array( + Schema.Struct({ + number: Schema.Int, + title: Schema.String, + url: Schema.String, + author: Schema.NullOr(Schema.String), + headBranch: Schema.String, + baseBranch: Schema.String, + state: PullRequestState, + isDraft: Schema.Boolean, + reviewDecision: Schema.NullOr(PullRequestReviewDecision), + checksState: Schema.NullOr(PullRequestChecksState), + updatedAt: Schema.String, + }), + ), + truncated: Schema.Boolean, + nextCursor: Schema.NullOr(Schema.String), +}); +export type ListPullRequestsResult = typeof ListPullRequestsResult.Type; + +export const CreatePullRequestResult = Schema.Struct({ + ...PullRequestIdentity, + created: Schema.Boolean.annotate({ + description: "False when the branch already had an open PR.", + }), + next: Schema.optional(Schema.String), +}); +export type CreatePullRequestResult = typeof CreatePullRequestResult.Type; + +export const RespondToPullRequestResult = Schema.Struct({ + ...PullRequestIdentity, + replied: Schema.Boolean, + resolved: Schema.NullOr(Schema.Boolean), +}); +export type RespondToPullRequestResult = typeof RespondToPullRequestResult.Type; + +export const MergePullRequestResult = Schema.Struct({ + ...PullRequestIdentity, + state: PullRequestState.annotate({ + description: "open while auto-merge or a merge queue waits for checks.", + }), +}); +export type MergePullRequestResult = typeof MergePullRequestResult.Type; + +const ReadPullRequestTool = Tool.make("pull_request_read", { + description: "Read a PR's state, checks, review comments, or diff. Use instead of gh or cafe.", + parameters: Schema.Struct({ + ...ThreadPullRequestInput.fields, + sections: Schema.optional( + Schema.Array(PullRequestReadSection).annotate({ + description: "Default: summary, checks. conversation has review threads.", + }), + ), + includeResolved: Schema.optional(Schema.Boolean), + cursor: Schema.optional(TrimmedNonEmptyString), + }), + success: ReadPullRequestResult, + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "Read pull request") + .annotate(Tool.Readonly, true) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, true) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +const ListPullRequestsTool = Tool.make("pull_request_list", { + description: "List PRs in this thread's repository, recently updated first.", + parameters: Schema.Struct({ + environmentId: OrchestratorMcpEnvironmentTarget, + state: Schema.optional(PullRequestListState.annotate({ description: "Default: open." })), + involvement: Schema.optional(PullRequestInvolvement), + query: Schema.optional(TrimmedNonEmptyString.check(Schema.isMaxLength(200))), + limit: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 }))), + cursor: Schema.optional(TrimmedNonEmptyString), + }), + success: ListPullRequestsResult, + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "List pull requests") + .annotate(Tool.Readonly, true) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, true) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +const CreatePullRequestTool = Tool.make("pull_request_create", { + description: "Open a PR from this thread's pushed branch and link it, or return its open PR.", + parameters: Schema.Struct({ + environmentId: OrchestratorMcpEnvironmentTarget, + title: TrimmedNonEmptyString, + body: Schema.String, + base: Schema.optional(TrimmedNonEmptyString), + draft: Schema.optional(Schema.Boolean), + }), + success: CreatePullRequestResult, + failure: PullRequestToolError, + dependencies: [...forgeDependencies, GitManager.GitManager], +}) + .annotate(Tool.Title, "Create pull request") + .annotate(Tool.Readonly, false) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, true) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +const UpdateNames = Schema.Array(TrimmedNonEmptyString).check( + Schema.isMinLength(1), + Schema.isMaxLength(25), +); + +const UpdatePullRequestTool = Tool.make("pull_request_update", { + description: + "Edit a PR's title, body, labels, or reviewers, close or reopen it, or set ready (false: back to draft).", + parameters: Schema.Struct({ + ...ThreadPullRequestInput.fields, + title: Schema.optional(TrimmedNonEmptyString), + body: Schema.optional(Schema.String), + ready: Schema.optional(Schema.Boolean), + state: Schema.optional(Schema.Literals(["open", "closed"])), + addLabels: Schema.optional(UpdateNames), + removeLabels: Schema.optional(UpdateNames), + requestReviewers: Schema.optional( + UpdateNames.annotate({ description: "Logins, or org/team for a team." }), + ), + }), + success: Schema.Struct(PullRequestIdentity), + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "Update pull request") + .annotate(Tool.Readonly, false) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, true) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +const RespondToPullRequestTool = Tool.make("pull_request_respond", { + description: + "Reply to, resolve, or reopen a review thread. Without reviewThreadId, comment on the PR.", + parameters: Schema.Struct({ + ...ThreadPullRequestInput.fields, + reviewThreadId: Schema.optional(TrimmedNonEmptyString), + body: Schema.optional(TrimmedNonEmptyString), + resolved: Schema.optional(Schema.Boolean), + }), + success: RespondToPullRequestResult, + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "Respond on pull request") + .annotate(Tool.Readonly, false) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, false) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +export const ReviewLineComment = Schema.Struct({ + path: TrimmedNonEmptyString, + line: PositiveInt, + startLine: Schema.optional(PositiveInt), + side: Schema.optional( + Schema.Literals(["new", "old"]).annotate({ + description: "Default new. old: line numbers in the base, for removed lines.", + }), + ), + body: TrimmedNonEmptyString, +}); +export type ReviewLineComment = typeof ReviewLineComment.Type; + +const ReviewPullRequestTool = Tool.make("pull_request_review", { + description: + "Submit a review: approve, request changes, or comment, with optional line comments.", + parameters: Schema.Struct({ + ...ThreadPullRequestInput.fields, + verdict: PullRequestReviewVerdict, + body: Schema.optional(Schema.String), + comments: Schema.optional(Schema.Array(ReviewLineComment).check(Schema.isMaxLength(50))), + }), + success: Schema.Struct(PullRequestIdentity), + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "Review pull request") + .annotate(Tool.Readonly, false) + .annotate(Tool.Destructive, false) + .annotate(Tool.Idempotent, false) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + +const MergePullRequestTool = Tool.make("pull_request_merge", { + description: "Merge a PR. Refuses if the head moved from expectedHeadSha (summary.headSha).", + parameters: Schema.Struct({ + ...ThreadPullRequestInput.fields, + expectedHeadSha: TrimmedNonEmptyString, + method: Schema.optional(PullRequestMergeMethod), + auto: Schema.optional( + Schema.Boolean.annotate({ + description: "Merge when required checks pass, including later pushes.", + }), + ), + }), + success: MergePullRequestResult, + failure: PullRequestToolError, + dependencies: forgeDependencies, +}) + .annotate(Tool.Title, "Merge pull request") + .annotate(Tool.Readonly, false) + .annotate(Tool.Destructive, true) + .annotate(Tool.Idempotent, false) + .annotate(Tool.OpenWorld, true) + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge); + export const PullRequestsToolkit = Toolkit.make( LinkPullRequestTool, LinkPullRequestsTool, @@ -439,4 +789,11 @@ export const PullRequestsToolkit = Toolkit.make( UnwatchPullRequestTool, WritePullRequestGuidesTool, ReadPullRequestGuideTool, + ReadPullRequestTool, + ListPullRequestsTool, + CreatePullRequestTool, + UpdatePullRequestTool, + RespondToPullRequestTool, + ReviewPullRequestTool, + MergePullRequestTool, ); diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts index fb3fb72fd76e3..e5b72cd9f337a 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts @@ -14,6 +14,7 @@ import * as SourceControlProviderRegistry from "../sourceControl/SourceControlPr import * as TextGeneration from "../textGeneration/TextGeneration.ts"; import * as ProjectionStore from "./ProjectionStore.ts"; import * as ProjectStore from "./ProjectStore.ts"; +import * as PullRequestService from "../pullRequest/PullRequestService.ts"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; @@ -52,6 +53,7 @@ export const layerRealGit = GitWorkflow.layer.pipe( Layer.mock(ProjectSetupScriptRunner.ProjectSetupScriptRunner)({}), Layer.mock(ProjectionStore.ProjectionStoreV2)({}), Layer.mock(ProjectStore.ProjectStoreV2)({}), + Layer.mock(PullRequestService.PullRequestService)({}), ServerSettings.layerTest(), ), ), diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/muse_transcript.ndjson index 85c228e5e0a0c..41968276ff73f 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6b-707e-7000-9bb5-4079c7772ad0/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:30:11.238412Z","updatedAt":"2026-10-08T07:30:11.238416Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791444611408}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6b-707e-7000-9bb5-4079c7772ad0/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:30:11.238412Z","updatedAt":"2026-10-08T07:30:11.238416Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:1","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"37b19bd1-b212-4532-a0c9-a6677f303e26","sequence":5},"last":{"id":"37b19bd1-b212-4532-a0c9-a6677f303e26","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a11a6b-707e-7001-b2f4-23db74e60097","clientName":"t3_code"},"emittedAtMs":1791444611412}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with exactly: first fixture turn complete"}],"displayText":"Respond with exactly: first fixture turn complete","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with exactly: first fixture turn complete"}],"displayText":"Respond with exactly: first fixture turn complete","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:2","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"2c530748-943b-4467-8473-da8b04c511c3","sequence":16},"last":{"id":"2c530748-943b-4467-8473-da8b04c511c3","sequence":16}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444611661}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","status":"accepted","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","status":"running","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:3"},"emittedAtMs":1791444611674}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:3","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18},"last":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18}},"turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"},"emittedAtMs":1791444611675}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18},"last":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18}},"item":{"itemId":"1b470279-ee8c-4c74-a298-f37184145584","kind":"userMessage","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":1,"status":"completed","recordedAt":"2026-10-08T07:30:11.66263Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611675}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"31b500d6-40fc-4f4c-b097-6b7be8d77cee","sequence":20},"last":{"id":"31b500d6-40fc-4f4c-b097-6b7be8d77cee","sequence":20}},"item":{"itemId":"1b470279-ee8c-4c74-a298-f37184145584","kind":"userMessage","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":2,"status":"completed","recordedAt":"2026-10-08T07:30:11.680942Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: first fixture turn complete","displayText":"Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611689}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18},"last":{"id":"2be0c9b5-9dc4-48f0-9b86-06aef4de31f3","sequence":18}},"item":{"itemId":"1b470279-ee8c-4c74-a298-f37184145584","kind":"userMessage","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":1,"status":"completed","recordedAt":"2026-10-08T07:30:11.66263Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611675}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"31b500d6-40fc-4f4c-b097-6b7be8d77cee","sequence":20},"last":{"id":"31b500d6-40fc-4f4c-b097-6b7be8d77cee","sequence":20}},"item":{"itemId":"1b470279-ee8c-4c74-a298-f37184145584","kind":"userMessage","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":2,"status":"completed","recordedAt":"2026-10-08T07:30:11.680942Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: first fixture turn complete","displayText":"Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611689}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:6","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"077780ea-0dc9-4d7a-879c-ee368f3adbe0","sequence":37},"last":{"id":"077780ea-0dc9-4d7a-879c-ee368f3adbe0","sequence":37}},"item":{"itemId":"077780ea-0dc9-4d7a-879c-ee368f3adbe0","kind":"reminderChild","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:30:11.790301Z","fallbackText":"Reminder child session","childSessionId":"c13379db-6761-40b4-a974-b0f1a58717aa","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6b-72ac-7972-a1df-b343b7804b38"}},"emittedAtMs":1791444611795}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:6.1","item":{"itemId":"f99b90e1-9d8b-4bf2-8e7a-e240e1cf9321","kind":"agentMessage","turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","revision":1,"status":"inProgress","text":""}},"emittedAtMs":1791444618068}} {"type":"emit_inbound","label":"item/delta","frame":{"jsonrpc":"2.0","method":"item/delta","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:6.2","itemId":"f99b90e1-9d8b-4bf2-8e7a-e240e1cf9321","field":"text","delta":"first fixture turn complete"},"emittedAtMs":1791444618068}} @@ -29,12 +29,12 @@ {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","status":"idle","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:16"},"emittedAtMs":1791444621046}} {"type":"emit_inbound","label":"turn/completed","frame":{"jsonrpc":"2.0","method":"turn/completed","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:16","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"688a69c5-e353-4db9-bd8c-1beb033902ba","sequence":79},"last":{"id":"688a69c5-e353-4db9-bd8c-1beb033902ba","sequence":79}},"turnId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4","terminal":"completed","durationMs":9378,"timeToFirstTokenMs":6406},"emittedAtMs":1791444621047}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:17","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"36753b8a-26ce-4935-8127-bc9191cb328b","sequence":80},"last":{"id":"36753b8a-26ce-4935-8127-bc9191cb328b","sequence":80}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444621054}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":4,"method":"turn/start","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with exactly: second fixture turn complete"}],"displayText":"Respond with exactly: second fixture turn complete","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":4,"method":"turn/start","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with exactly: second fixture turn complete"}],"displayText":"Respond with exactly: second fixture turn complete","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":4,"result":{"commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","status":"accepted","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","status":"running","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:18"},"emittedAtMs":1791444621333}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:18","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87},"last":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87}},"turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"},"emittedAtMs":1791444621334}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:19","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87},"last":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87}},"item":{"itemId":"90719a5d-d2c1-46dc-ad4d-274adda02344","kind":"userMessage","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":1,"status":"completed","recordedAt":"2026-10-08T07:30:21.321391Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621334}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:20","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"dc502e2c-d81c-4f0e-ad86-dd11d1368677","sequence":89},"last":{"id":"dc502e2c-d81c-4f0e-ad86-dd11d1368677","sequence":89}},"item":{"itemId":"90719a5d-d2c1-46dc-ad4d-274adda02344","kind":"userMessage","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":2,"status":"completed","recordedAt":"2026-10-08T07:30:21.338944Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: second fixture turn complete","displayText":"Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621347}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:19","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87},"last":{"id":"4aba96d5-f984-4bc0-bda4-7fb97f527686","sequence":87}},"item":{"itemId":"90719a5d-d2c1-46dc-ad4d-274adda02344","kind":"userMessage","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":1,"status":"completed","recordedAt":"2026-10-08T07:30:21.321391Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621334}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:20","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"dc502e2c-d81c-4f0e-ad86-dd11d1368677","sequence":89},"last":{"id":"dc502e2c-d81c-4f0e-ad86-dd11d1368677","sequence":89}},"item":{"itemId":"90719a5d-d2c1-46dc-ad4d-274adda02344","kind":"userMessage","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":2,"status":"completed","recordedAt":"2026-10-08T07:30:21.338944Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with exactly: second fixture turn complete","displayText":"Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621347}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:21","sourceRange":{"stream":{"kind":"session","id":"01a11a6b-707e-7000-9bb5-4079c7772ad0"},"first":{"id":"09cb4c2a-03c2-4089-ba12-8d5d31f7ea48","sequence":106},"last":{"id":"09cb4c2a-03c2-4089-ba12-8d5d31f7ea48","sequence":106}},"item":{"itemId":"09cb4c2a-03c2-4089-ba12-8d5d31f7ea48","kind":"reminderChild","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:30:21.446966Z","fallbackText":"Reminder child session","childSessionId":"cd97261a-3ea9-480f-9e54-5e59bb077da2","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6b-9869-7061-a4f3-42daa3e3a8f1"}},"emittedAtMs":1791444621455}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:21.1","item":{"itemId":"2de26c0d-26b4-4533-8810-918ee44fcd82","kind":"agentMessage","turnId":"01a11a6b-97ec-7000-bd1b-d7afbea11045","revision":1,"status":"inProgress","text":""}},"emittedAtMs":1791444623127}} {"type":"emit_inbound","label":"item/delta","frame":{"jsonrpc":"2.0","method":"item/delta","params":{"sessionId":"01a11a6b-707e-7000-9bb5-4079c7772ad0","viewCursor":"v:01a11a6b-707e-7000-9bb5-4079c7772ad0:21.2","itemId":"2de26c0d-26b4-4533-8810-918ee44fcd82","field":"text","delta":"second fixture turn complete"},"emittedAtMs":1791444623127}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/muse_permission/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/muse_permission/muse_transcript.ndjson index 157e5b91a07a4..aa94be95b4dcc 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/muse_permission/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/muse_permission/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6d-39bb-7000-8c93-4594c98e6a11/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:32:08.30084Z","updatedAt":"2026-10-08T07:32:08.300844Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"promptUnmatched","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791444728496}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6d-39bb-7000-8c93-4594c98e6a11/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:32:08.30084Z","updatedAt":"2026-10-08T07:32:08.300844Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"promptUnmatched","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:1","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"b05fb8ec-7b58-4cf7-a369-379938395230","sequence":5},"last":{"id":"b05fb8ec-7b58-4cf7-a369-379938395230","sequence":5}},"mode":"promptUnmatched","source":"approvalReconfigure","commandId":"01a11a6d-39bb-7001-923e-425cc6129ce7","clientName":"t3_code"},"emittedAtMs":1791444728501}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE."}],"displayText":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE."}],"displayText":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:2","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"6159e84a-ae1e-4fae-ae8b-49f41ca34509","sequence":16},"last":{"id":"6159e84a-ae1e-4fae-ae8b-49f41ca34509","sequence":16}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444728769}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","status":"accepted","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","status":"running","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:3"},"emittedAtMs":1791444728783}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:3","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18},"last":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18}},"turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"},"emittedAtMs":1791444728783}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18},"last":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18}},"item":{"itemId":"dde9573b-650f-434b-ab99-60cfc820a0a5","kind":"userMessage","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:08.769894Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728784}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"76c57706-1378-4167-8bbf-f76d959804e8","sequence":20},"last":{"id":"76c57706-1378-4167-8bbf-f76d959804e8","sequence":20}},"item":{"itemId":"dde9573b-650f-434b-ab99-60cfc820a0a5","kind":"userMessage","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:08.791728Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","displayText":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728800}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18},"last":{"id":"09218c3a-88fd-4bc8-ab45-d1aa69bea95a","sequence":18}},"item":{"itemId":"dde9573b-650f-434b-ab99-60cfc820a0a5","kind":"userMessage","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:08.769894Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728784}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"76c57706-1378-4167-8bbf-f76d959804e8","sequence":20},"last":{"id":"76c57706-1378-4167-8bbf-f76d959804e8","sequence":20}},"item":{"itemId":"dde9573b-650f-434b-ab99-60cfc820a0a5","kind":"userMessage","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:08.791728Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","displayText":"Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728800}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:6","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"29180105-84c4-4f9e-8bfd-003392b93b73","sequence":38},"last":{"id":"29180105-84c4-4f9e-8bfd-003392b93b73","sequence":38}},"item":{"itemId":"29180105-84c4-4f9e-8bfd-003392b93b73","kind":"reminderChild","turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:32:08.905989Z","fallbackText":"Reminder child session","childSessionId":"7c9485f9-26aa-4b56-8ca2-f36cb9cfb8c4","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6d-3c27-73f2-8c27-cd06a3b7dadf"}},"emittedAtMs":1791444728910}} {"type":"emit_inbound","label":"session/tokenUsage","frame":{"jsonrpc":"2.0","method":"session/tokenUsage","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:7","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"b1dab1f5-3c9e-4d92-b955-841a2269c23c","sequence":54},"last":{"id":"b1dab1f5-3c9e-4d92-b955-841a2269c23c","sequence":54}},"turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","modelId":"muse-spark-1.3-contributor","usage":{"inputTokens":32618,"outputTokens":315,"cachedTokens":0,"cacheWriteTokens":0,"cacheReadTokens":0,"reasoningTokens":227},"promptTokens":32618,"totalTokens":32933,"finishReason":"tool_calls","durationMs":2684,"cumulative":{"promptTokens":32618,"outputTokens":315,"totalTokens":32933,"cost":{"usd":0.0033248,"partial":false}}},"emittedAtMs":1791444731684}} {"type":"emit_inbound","label":"session/contextUsage","frame":{"jsonrpc":"2.0","method":"session/contextUsage","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:8","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"b1dab1f5-3c9e-4d92-b955-841a2269c23c","sequence":54},"last":{"id":"b1dab1f5-3c9e-4d92-b955-841a2269c23c","sequence":54}},"windowTokens":1007997,"usedTokens":32933,"pressure":"normal"},"emittedAtMs":1791444731684}} @@ -42,12 +42,12 @@ {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","status":"idle","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:23"},"emittedAtMs":1791444747386}} {"type":"emit_inbound","label":"turn/completed","frame":{"jsonrpc":"2.0","method":"turn/completed","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:23","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"7c29ac76-7e09-48c1-a18f-f336126e27d1","sequence":120},"last":{"id":"7c29ac76-7e09-48c1-a18f-f336126e27d1","sequence":120}},"turnId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6","terminal":"completed","durationMs":18608,"timeToFirstTokenMs":4791},"emittedAtMs":1791444747387}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:24","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"1e4afe30-d924-444c-8665-5e763f524e70","sequence":121},"last":{"id":"1e4afe30-d924-444c-8665-5e763f524e70","sequence":121}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444747394}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":5,"method":"turn/start","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED."}],"displayText":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":5,"method":"turn/start","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED."}],"displayText":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":5,"result":{"commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29","status":"accepted","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","status":"running","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:25"},"emittedAtMs":1791444747660}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:25","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128},"last":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128}},"turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"},"emittedAtMs":1791444747660}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:26","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128},"last":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128}},"item":{"itemId":"27473708-71e0-4d3c-811c-a8bae6bbaa3b","kind":"userMessage","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:27.650913Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747660}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:27","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"4a056a03-469a-4c9f-94a9-78eb815023ad","sequence":130},"last":{"id":"4a056a03-469a-4c9f-94a9-78eb815023ad","sequence":130}},"item":{"itemId":"27473708-71e0-4d3c-811c-a8bae6bbaa3b","kind":"userMessage","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:27.66745Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","displayText":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747676}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:26","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128},"last":{"id":"4a1cf90d-7457-448d-a2b5-d82108636b3b","sequence":128}},"item":{"itemId":"27473708-71e0-4d3c-811c-a8bae6bbaa3b","kind":"userMessage","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:27.650913Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747660}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:27","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"4a056a03-469a-4c9f-94a9-78eb815023ad","sequence":130},"last":{"id":"4a056a03-469a-4c9f-94a9-78eb815023ad","sequence":130}},"item":{"itemId":"27473708-71e0-4d3c-811c-a8bae6bbaa3b","kind":"userMessage","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:27.66745Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRun the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","displayText":"Run the shell command `touch muse-declined.txt` with your shell tool once. If it is rejected, do not retry; reply REJECTED.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747676}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:28","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"3b28955d-a87a-4acb-97e9-14cad87fd41f","sequence":148},"last":{"id":"3b28955d-a87a-4acb-97e9-14cad87fd41f","sequence":148}},"item":{"itemId":"3b28955d-a87a-4acb-97e9-14cad87fd41f","kind":"reminderChild","turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:32:27.787099Z","fallbackText":"Reminder child session","childSessionId":"efd21bf1-4fd1-49a2-9c55-91b7fc099765","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6d-85ed-7b91-8d91-c4ce76b6dfef"}},"emittedAtMs":1791444747794}} {"type":"emit_inbound","label":"session/tokenUsage","frame":{"jsonrpc":"2.0","method":"session/tokenUsage","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:29","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"b032c01d-eae1-437e-910c-8756aedc6084","sequence":164},"last":{"id":"b032c01d-eae1-437e-910c-8756aedc6084","sequence":164}},"turnId":"01a11a6d-8566-7000-8ad1-6269ac187a29","modelId":"muse-spark-1.3-contributor","usage":{"inputTokens":33401,"outputTokens":201,"cachedTokens":33009,"cacheWriteTokens":0,"cacheReadTokens":33009,"reasoningTokens":108},"promptTokens":33401,"totalTokens":33602,"finishReason":"tool_calls","durationMs":2522,"cumulative":{"promptTokens":99045,"outputTokens":538,"totalTokens":99583,"cacheReadTokens":65506,"cost":{"usd":0.003592512,"partial":false}}},"emittedAtMs":1791444750395}} {"type":"emit_inbound","label":"session/contextUsage","frame":{"jsonrpc":"2.0","method":"session/contextUsage","params":{"sessionId":"01a11a6d-39bb-7000-8c93-4594c98e6a11","viewCursor":"v:01a11a6d-39bb-7000-8c93-4594c98e6a11:30","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-39bb-7000-8c93-4594c98e6a11"},"first":{"id":"b032c01d-eae1-437e-910c-8756aedc6084","sequence":164},"last":{"id":"b032c01d-eae1-437e-910c-8756aedc6084","sequence":164}},"windowTokens":1007997,"usedTokens":33602,"pressure":"normal"},"emittedAtMs":1791444750395}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_approval/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_approval/muse_transcript.ndjson index 8cdfe31903aab..76ea464de6126 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_approval/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_approval/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","path":"~/.local/share/muse/sessions/2026/10/11/01a12d1d-a1b7-7000-9697-d430c2e2afd8/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:37:59.14136Z","updatedAt":"2026-10-11T22:37:59.141364Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"promptUnmatched","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791758279294}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","path":"~/.local/share/muse/sessions/2026/10/11/01a12d1d-a1b7-7000-9697-d430c2e2afd8/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:37:59.14136Z","updatedAt":"2026-10-11T22:37:59.141364Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"promptUnmatched","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:1","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"ed95a9db-eada-4751-a7e6-22ccc9bdabd5","sequence":5},"last":{"id":"ed95a9db-eada-4751-a7e6-22ccc9bdabd5","sequence":5}},"mode":"promptUnmatched","source":"approvalReconfigure","commandId":"01a12d1d-a1b8-7000-8d6c-f1324b724cdb","clientName":"t3_code"},"emittedAtMs":1791758279297}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:2","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"4f170229-d428-4a64-9516-7a355ff3bcdb","sequence":15},"last":{"id":"4f170229-d428-4a64-9516-7a355ff3bcdb","sequence":15}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791758279531}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","status":"accepted","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","status":"running","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:3"},"emittedAtMs":1791758279541}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:3","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17},"last":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17}},"turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"},"emittedAtMs":1791758279542}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:4","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17},"last":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17}},"item":{"itemId":"a4b3de8d-842b-4065-8769-aed18e62e9fc","kind":"userMessage","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":1,"status":"completed","recordedAt":"2026-10-11T22:37:59.531477Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279542}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:5","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"5a63e348-5bf6-4262-b37f-d31d307ea6d8","sequence":19},"last":{"id":"5a63e348-5bf6-4262-b37f-d31d307ea6d8","sequence":19}},"item":{"itemId":"a4b3de8d-842b-4065-8769-aed18e62e9fc","kind":"userMessage","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":2,"status":"completed","recordedAt":"2026-10-11T22:37:59.545908Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","displayText":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279553}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:4","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17},"last":{"id":"429e8ecf-d532-4b14-a303-b9f832c36a51","sequence":17}},"item":{"itemId":"a4b3de8d-842b-4065-8769-aed18e62e9fc","kind":"userMessage","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":1,"status":"completed","recordedAt":"2026-10-11T22:37:59.531477Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279542}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:5","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"5a63e348-5bf6-4262-b37f-d31d307ea6d8","sequence":19},"last":{"id":"5a63e348-5bf6-4262-b37f-d31d307ea6d8","sequence":19}},"item":{"itemId":"a4b3de8d-842b-4065-8769-aed18e62e9fc","kind":"userMessage","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":2,"status":"completed","recordedAt":"2026-10-11T22:37:59.545908Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","displayText":"Do not run any commands yourself. Spawn one subagent whose only task is to run this exact shell command: printf 'subagent approval fixture' > subagent-approval.txt and then reply with exactly: Written. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279553}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:6","sourceRange":{"stream":{"kind":"session","id":"01a12d1d-a1b7-7000-9697-d430c2e2afd8"},"first":{"id":"d55286a9-a9e2-4d7b-be97-d44360bcca2b","sequence":37},"last":{"id":"d55286a9-a9e2-4d7b-be97-d44360bcca2b","sequence":37}},"item":{"itemId":"d55286a9-a9e2-4d7b-be97-d44360bcca2b","kind":"reminderChild","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":1,"status":"inProgress","recordedAt":"2026-10-11T22:37:59.660065Z","fallbackText":"Reminder child session","childSessionId":"0779d605-54b8-45dc-90b6-91dc58b9a52c","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a12d1d-a3d4-7712-8b98-26f3c4f9bf38"}},"emittedAtMs":1791758279666}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:6.1","item":{"itemId":"21b74b34-fe9f-457c-83f0-cf49257b5948","kind":"reasoning","turnId":"01a12d1d-a348-7000-ae97-9d27b5f80bce","revision":1,"status":"inProgress","summary":[""]}},"emittedAtMs":1791758282481}} {"type":"emit_inbound","label":"item/delta","frame":{"jsonrpc":"2.0","method":"item/delta","params":{"sessionId":"01a12d1d-a1b7-7000-9697-d430c2e2afd8","viewCursor":"v:01a12d1d-a1b7-7000-9697-d430c2e2afd8:6.2","itemId":"21b74b34-fe9f-457c-83f0-cf49257b5948","field":"summary.0","delta":"Spawning a subagent via muse_subagent_spawn to run a shell command and return its exact output, while avoiding direct command execution."},"emittedAtMs":1791758282481}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_interrupt/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_interrupt/muse_transcript.ndjson index 769f02f88c7ed..7d2184b6b2ea3 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_interrupt/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_interrupt/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","path":"~/.local/share/muse/sessions/2026/10/11/01a12d28-7788-7000-a946-c407f380868e/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:49:49.235205Z","updatedAt":"2026-10-11T22:49:49.235209Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791758989388}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","path":"~/.local/share/muse/sessions/2026/10/11/01a12d28-7788-7000-a946-c407f380868e/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:49:49.235205Z","updatedAt":"2026-10-11T22:49:49.235209Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:1","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"29d4e769-78f7-48fa-90cd-3ac9f8fa04bf","sequence":5},"last":{"id":"29d4e769-78f7-48fa-90cd-3ac9f8fa04bf","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a12d28-7788-7001-a223-c10e52187cdf","clientName":"t3_code"},"emittedAtMs":1791758989391}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:2","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"660e2cfd-318a-4d2d-87bb-0b1375d79fdf","sequence":15},"last":{"id":"660e2cfd-318a-4d2d-87bb-0b1375d79fdf","sequence":15}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791758989619}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a12d28-7912-7000-993a-afd019e6ac5c","status":"accepted","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","status":"running","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:3"},"emittedAtMs":1791758989632}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:3","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17},"last":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17}},"turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"},"emittedAtMs":1791758989632}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:4","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17},"last":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17}},"item":{"itemId":"5e234d9d-0744-4757-9629-761ea4e7f062","kind":"userMessage","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","revision":1,"status":"completed","recordedAt":"2026-10-11T22:49:49.620067Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989632}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:5","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"5724636e-9398-4d23-87ac-1e9a2b83ad9f","sequence":19},"last":{"id":"5724636e-9398-4d23-87ac-1e9a2b83ad9f","sequence":19}},"item":{"itemId":"5e234d9d-0744-4757-9629-761ea4e7f062","kind":"userMessage","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","revision":2,"status":"completed","recordedAt":"2026-10-11T22:49:49.635395Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","displayText":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989642}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:4","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17},"last":{"id":"5cb199bd-04e5-40d9-a299-8760be80e0a4","sequence":17}},"item":{"itemId":"5e234d9d-0744-4757-9629-761ea4e7f062","kind":"userMessage","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","revision":1,"status":"completed","recordedAt":"2026-10-11T22:49:49.620067Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989632}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:5","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"5724636e-9398-4d23-87ac-1e9a2b83ad9f","sequence":19},"last":{"id":"5724636e-9398-4d23-87ac-1e9a2b83ad9f","sequence":19}},"item":{"itemId":"5e234d9d-0744-4757-9629-761ea4e7f062","kind":"userMessage","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","revision":2,"status":"completed","recordedAt":"2026-10-11T22:49:49.635395Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","displayText":"Spawn one subagent whose only task is to run the shell command `sleep 30` and then reply with exactly: Done. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989642}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:6","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"44afb415-d6e4-4d51-9002-4deb196d463a","sequence":36},"last":{"id":"44afb415-d6e4-4d51-9002-4deb196d463a","sequence":36}},"item":{"itemId":"44afb415-d6e4-4d51-9002-4deb196d463a","kind":"reminderChild","turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","revision":1,"status":"inProgress","recordedAt":"2026-10-11T22:49:49.743418Z","fallbackText":"Reminder child session","childSessionId":"4dd3511e-2115-4fbb-a4c4-383cbb383d63","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a12d28-7997-79d0-8a69-8ac0acf92a56"}},"emittedAtMs":1791758989750}} {"type":"emit_inbound","label":"session/tokenUsage","frame":{"jsonrpc":"2.0","method":"session/tokenUsage","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:7","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"c94f5484-20b7-4057-a736-303e97bc097c","sequence":52},"last":{"id":"c94f5484-20b7-4057-a736-303e97bc097c","sequence":52}},"turnId":"01a12d28-7912-7000-993a-afd019e6ac5c","modelId":"muse-spark-1.3-contributor","usage":{"inputTokens":32911,"outputTokens":264,"cachedTokens":0,"cacheWriteTokens":0,"cacheReadTokens":0,"reasoningTokens":143},"promptTokens":32911,"totalTokens":33175,"finishReason":"tool_calls","durationMs":3651,"cumulative":{"promptTokens":32911,"outputTokens":264,"totalTokens":33175,"cost":{"usd":0.0033439000000000003,"partial":false}}},"emittedAtMs":1791758993485}} {"type":"emit_inbound","label":"session/contextUsage","frame":{"jsonrpc":"2.0","method":"session/contextUsage","params":{"sessionId":"01a12d28-7788-7000-a946-c407f380868e","viewCursor":"v:01a12d28-7788-7000-a946-c407f380868e:8","sourceRange":{"stream":{"kind":"session","id":"01a12d28-7788-7000-a946-c407f380868e"},"first":{"id":"c94f5484-20b7-4057-a736-303e97bc097c","sequence":52},"last":{"id":"c94f5484-20b7-4057-a736-303e97bc097c","sequence":52}},"windowTokens":1007997,"usedTokens":33175,"pressure":"normal"},"emittedAtMs":1791758993485}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/muse_workflow/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/muse_workflow/muse_transcript.ndjson index 0ba946164c9ed..cb9e047c5acbc 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/muse_workflow/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/muse_workflow/muse_transcript.ndjson @@ -8,13 +8,13 @@ {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","path":"~/.local/share/muse/sessions/2026/10/11/01a12d5d-405f-7000-89a3-5aa62af6ea23/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T23:47:28.587276Z","updatedAt":"2026-10-11T23:47:28.587281Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:2"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:1","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"0c13b14b-877c-4c5b-b05f-8ad250dfd381","sequence":5},"last":{"id":"0c13b14b-877c-4c5b-b05f-8ad250dfd381","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a12d5d-4060-7000-b6cd-aaabe26f80de","clientName":"t3_code"},"emittedAtMs":1791762448807}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:2","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"28b1f3f4-4448-4a21-a1a0-2df72ad1d326","sequence":6},"last":{"id":"28b1f3f4-4448-4a21-a1a0-2df72ad1d326","sequence":6}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791762448807}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it."}],"displayText":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it."}],"displayText":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:3","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"3f1880e1-81a0-4f21-b536-6b4fa5cf9d12","sequence":16},"last":{"id":"3f1880e1-81a0-4f21-b536-6b4fa5cf9d12","sequence":16}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791762449097}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","status":"accepted","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","status":"running","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:4"},"emittedAtMs":1791762449102}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:4","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18},"last":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18}},"turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"},"emittedAtMs":1791762449103}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:5","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18},"last":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18}},"item":{"itemId":"0c1ceda9-41f7-4c3e-990e-4c53873c7ef5","kind":"userMessage","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":1,"status":"completed","recordedAt":"2026-10-11T23:47:29.098117Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nUse your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449103}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:6","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"0411a5c8-2c8a-4c9e-bb67-25fa3cef21a3","sequence":20},"last":{"id":"0411a5c8-2c8a-4c9e-bb67-25fa3cef21a3","sequence":20}},"item":{"itemId":"0c1ceda9-41f7-4c3e-990e-4c53873c7ef5","kind":"userMessage","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":2,"status":"completed","recordedAt":"2026-10-11T23:47:29.107019Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nUse your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","displayText":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449131}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:5","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18},"last":{"id":"7a830825-f571-4781-8e4f-a4ef5e085bb7","sequence":18}},"item":{"itemId":"0c1ceda9-41f7-4c3e-990e-4c53873c7ef5","kind":"userMessage","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":1,"status":"completed","recordedAt":"2026-10-11T23:47:29.098117Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nUse your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449103}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:6","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"0411a5c8-2c8a-4c9e-bb67-25fa3cef21a3","sequence":20},"last":{"id":"0411a5c8-2c8a-4c9e-bb67-25fa3cef21a3","sequence":20}},"item":{"itemId":"0c1ceda9-41f7-4c3e-990e-4c53873c7ef5","kind":"userMessage","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":2,"status":"completed","recordedAt":"2026-10-11T23:47:29.107019Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nUse your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","displayText":"Use your workflow tool to launch a workflow with exactly TWO agents: one labeled 'ping' that replies with the word PING, and one labeled 'pong' that replies with the word PONG. Launch it and end your turn; do not wait for it.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449131}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:7","sourceRange":{"stream":{"kind":"session","id":"01a12d5d-405f-7000-89a3-5aa62af6ea23"},"first":{"id":"95574bfe-853f-44cc-81f6-88b05d6c8c16","sequence":38},"last":{"id":"95574bfe-853f-44cc-81f6-88b05d6c8c16","sequence":38}},"item":{"itemId":"95574bfe-853f-44cc-81f6-88b05d6c8c16","kind":"reminderChild","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":1,"status":"inProgress","recordedAt":"2026-10-11T23:47:29.328939Z","fallbackText":"Reminder child session","childSessionId":"b16dbb52-7f62-4a5a-84c2-f68d7ea22b18","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a12d5d-4375-7d72-b5b2-4b096d0df507"}},"emittedAtMs":1791762449336}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:7.1","item":{"itemId":"3ce724bc-dacf-400e-af9a-995104717cb1","kind":"reasoning","turnId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5","revision":1,"status":"inProgress","summary":[""]}},"emittedAtMs":1791762451554}} {"type":"emit_inbound","label":"item/delta","frame":{"jsonrpc":"2.0","method":"item/delta","params":{"sessionId":"01a12d5d-405f-7000-89a3-5aa62af6ea23","viewCursor":"v:01a12d5d-405f-7000-89a3-5aa62af6ea23:7.2","itemId":"3ce724bc-dacf-400e-af9a-995104717cb1","field":"summary.0","delta":"Launching a two-agent ping-pong workflow via the workflow tool while skipping skill reading for a trivial task."},"emittedAtMs":1791762451554}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/simple/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/simple/muse_transcript.ndjson index e8299c5796054..536404934d30d 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/simple/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/simple/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6a-bbb5-7000-ad0b-0c9e728406e5/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:29:25.018803Z","updatedAt":"2026-10-08T07:29:25.018807Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791444565334}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6a-bbb5-7000-ad0b-0c9e728406e5/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:29:25.018803Z","updatedAt":"2026-10-08T07:29:25.018807Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:1","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"cfd043e8-8728-493d-ba28-252ef91e8a80","sequence":5},"last":{"id":"cfd043e8-8728-493d-ba28-252ef91e8a80","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a11a6a-bbb6-7000-b1a4-a01ea59676ef","clientName":"t3_code"},"emittedAtMs":1791444565340}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with the following text: fixture simple ok"}],"displayText":"Respond with the following text: fixture simple ok","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Respond with the following text: fixture simple ok"}],"displayText":"Respond with the following text: fixture simple ok","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:2","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"0f64f4ea-a08c-43e1-af53-cf85cee1a11c","sequence":16},"last":{"id":"0f64f4ea-a08c-43e1-af53-cf85cee1a11c","sequence":16}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444565612}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","status":"accepted","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","status":"running","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:3"},"emittedAtMs":1791444565635}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:3","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18},"last":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18}},"turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"},"emittedAtMs":1791444565635}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18},"last":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18}},"item":{"itemId":"23294b54-8e67-4896-a7f3-681119e1ddbe","kind":"userMessage","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":1,"status":"completed","recordedAt":"2026-10-08T07:29:25.627042Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565635}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"8c00aa21-7809-4cb2-89f7-b499aaa8746d","sequence":20},"last":{"id":"8c00aa21-7809-4cb2-89f7-b499aaa8746d","sequence":20}},"item":{"itemId":"23294b54-8e67-4896-a7f3-681119e1ddbe","kind":"userMessage","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":2,"status":"completed","recordedAt":"2026-10-08T07:29:25.643029Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with the following text: fixture simple ok","displayText":"Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565652}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18},"last":{"id":"1f33a521-7829-4cc3-97db-a3b5a6e7deaf","sequence":18}},"item":{"itemId":"23294b54-8e67-4896-a7f3-681119e1ddbe","kind":"userMessage","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":1,"status":"completed","recordedAt":"2026-10-08T07:29:25.627042Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565635}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"8c00aa21-7809-4cb2-89f7-b499aaa8746d","sequence":20},"last":{"id":"8c00aa21-7809-4cb2-89f7-b499aaa8746d","sequence":20}},"item":{"itemId":"23294b54-8e67-4896-a7f3-681119e1ddbe","kind":"userMessage","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":2,"status":"completed","recordedAt":"2026-10-08T07:29:25.643029Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nRespond with the following text: fixture simple ok","displayText":"Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565652}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:6","sourceRange":{"stream":{"kind":"session","id":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5"},"first":{"id":"ed1680a5-6f99-4b0f-b9ea-d12193f0de1f","sequence":37},"last":{"id":"ed1680a5-6f99-4b0f-b9ea-d12193f0de1f","sequence":37}},"item":{"itemId":"ed1680a5-6f99-4b0f-b9ea-d12193f0de1f","kind":"reminderChild","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:29:25.781511Z","fallbackText":"Reminder child session","childSessionId":"9785bf9d-382d-4781-ab3b-3817c9e6a604","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6a-bef1-7032-974a-059b8765c487"}},"emittedAtMs":1791444565789}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:6.1","item":{"itemId":"0a68e576-f554-4700-8853-a68ad2b7179b","kind":"agentMessage","turnId":"01a11a6a-be41-7000-8db9-1d84c1b8be48","revision":1,"status":"inProgress","text":""}},"emittedAtMs":1791444567707}} {"type":"emit_inbound","label":"item/delta","frame":{"jsonrpc":"2.0","method":"item/delta","params":{"sessionId":"01a11a6a-bbb5-7000-ad0b-0c9e728406e5","viewCursor":"v:01a11a6a-bbb5-7000-ad0b-0c9e728406e5:6.2","itemId":"0a68e576-f554-4700-8853-a68ad2b7179b","field":"text","delta":"fixture simple ok"},"emittedAtMs":1791444567707}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/subagent_v2/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/subagent_v2/muse_transcript.ndjson index ad2bd13e75b6f..4f252e73eefb0 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/subagent_v2/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/subagent_v2/muse_transcript.ndjson @@ -7,13 +7,13 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","path":"~/.local/share/muse/sessions/2026/10/11/01a12d17-75fa-7000-9157-e8365ce94492/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:31:14.73121Z","updatedAt":"2026-10-11T22:31:14.731214Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791757874894}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","path":"~/.local/share/muse/sessions/2026/10/11/01a12d17-75fa-7000-9157-e8365ce94492/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-11T22:31:14.73121Z","updatedAt":"2026-10-11T22:31:14.731214Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"sideFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:1","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"94d1e1ed-1d3e-4cd5-91bf-a51394fc8a0a","sequence":5},"last":{"id":"94d1e1ed-1d3e-4cd5-91bf-a51394fc8a0a","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a12d17-75fa-7001-a940-79b5d7c648a4","clientName":"t3_code"},"emittedAtMs":1791757874898}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said."}],"displayText":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:2","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"1dc98410-05c3-4618-a431-3638055e20df","sequence":15},"last":{"id":"1dc98410-05c3-4618-a431-3638055e20df","sequence":15}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791757875120}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a12d17-7790-7000-967d-3f2246f38a60","status":"accepted","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","startedNewTurn":true,"disposition":"started"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","status":"running","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:3"},"emittedAtMs":1791757875131}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:3","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17},"last":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17}},"turnId":"01a12d17-7790-7000-967d-3f2246f38a60","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"},"emittedAtMs":1791757875132}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:4","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17},"last":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17}},"item":{"itemId":"95c179c8-e8f8-4629-80df-e28243a234ea","kind":"userMessage","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","revision":1,"status":"completed","recordedAt":"2026-10-11T22:31:15.120499Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875132}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:5","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"dcf03486-5149-4377-b325-dea3e118628a","sequence":19},"last":{"id":"dcf03486-5149-4377-b325-dea3e118628a","sequence":19}},"item":{"itemId":"95c179c8-e8f8-4629-80df-e28243a234ea","kind":"userMessage","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","revision":2,"status":"completed","recordedAt":"2026-10-11T22:31:15.136047Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","displayText":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875144}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:4","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17},"last":{"id":"766cb840-a6f1-41f2-8c7e-8c372d0470cd","sequence":17}},"item":{"itemId":"95c179c8-e8f8-4629-80df-e28243a234ea","kind":"userMessage","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","revision":1,"status":"completed","recordedAt":"2026-10-11T22:31:15.120499Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875132}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:5","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"dcf03486-5149-4377-b325-dea3e118628a","sequence":19},"last":{"id":"dcf03486-5149-4377-b325-dea3e118628a","sequence":19}},"item":{"itemId":"95c179c8-e8f8-4629-80df-e28243a234ea","kind":"userMessage","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","revision":2,"status":"completed","recordedAt":"2026-10-11T22:31:15.136047Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nSpawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","displayText":"Spawn one subagent whose only task is to reply with exactly: Hello. Wait for it to finish, then reply with exactly what it said.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875144}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:6","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"599a220a-d212-4a81-a60d-7284ff290284","sequence":36},"last":{"id":"599a220a-d212-4a81-a60d-7284ff290284","sequence":36}},"item":{"itemId":"599a220a-d212-4a81-a60d-7284ff290284","kind":"reminderChild","turnId":"01a12d17-7790-7000-967d-3f2246f38a60","revision":1,"status":"inProgress","recordedAt":"2026-10-11T22:31:15.249949Z","fallbackText":"Reminder child session","childSessionId":"0b3f4f01-850a-43bd-af36-9b011699354f","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a12d17-7819-7212-8057-3558c2bdd46d"}},"emittedAtMs":1791757875258}} {"type":"emit_inbound","label":"session/tokenUsage","frame":{"jsonrpc":"2.0","method":"session/tokenUsage","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:7","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"9198dd8d-eede-487a-9109-a48d2563c371","sequence":51},"last":{"id":"9198dd8d-eede-487a-9109-a48d2563c371","sequence":51}},"turnId":"01a12d17-7790-7000-967d-3f2246f38a60","modelId":"muse-spark-1.3-contributor","usage":{"inputTokens":32900,"outputTokens":129,"cachedTokens":0,"cacheWriteTokens":0,"cacheReadTokens":0,"reasoningTokens":36},"promptTokens":32900,"totalTokens":33029,"finishReason":"tool_calls","durationMs":2354,"cumulative":{"promptTokens":32900,"outputTokens":129,"totalTokens":33029,"cost":{"usd":0.0033158000000000003,"partial":false}}},"emittedAtMs":1791757877764}} {"type":"emit_inbound","label":"session/contextUsage","frame":{"jsonrpc":"2.0","method":"session/contextUsage","params":{"sessionId":"01a12d17-75fa-7000-9157-e8365ce94492","viewCursor":"v:01a12d17-75fa-7000-9157-e8365ce94492:8","sourceRange":{"stream":{"kind":"session","id":"01a12d17-75fa-7000-9157-e8365ce94492"},"first":{"id":"9198dd8d-eede-487a-9109-a48d2563c371","sequence":51},"last":{"id":"9198dd8d-eede-487a-9109-a48d2563c371","sequence":51}},"windowTokens":1007997,"usedTokens":33029,"pressure":"normal"},"emittedAtMs":1791757877764}} diff --git a/apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt/muse_transcript.ndjson b/apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt/muse_transcript.ndjson index 12394dd806314..e96547fcbe917 100644 --- a/apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt/muse_transcript.ndjson +++ b/apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt/muse_transcript.ndjson @@ -7,14 +7,14 @@ {"type":"emit_inbound","label":"session/started","frame":{"jsonrpc":"2.0","method":"session/started","params":{"session":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6d-2d3d-7000-8178-411fdb90bc34/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:32:05.094285Z","updatedAt":"2026-10-08T07:32:05.094289Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"}},"emittedAtMs":1791444725265}} {"type":"emit_inbound","label":"response:session/start","frame":{"jsonrpc":"2.0","id":2,"result":{"session":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","path":"~/.local/share/muse/sessions/2026/10/08/01a11a6d-2d3d-7000-8178-411fdb90bc34/session.jsonl","status":"idle","activeTurnId":null,"createdAt":"2026-10-08T07:32:05.094285Z","updatedAt":"2026-10-08T07:32:05.094289Z","workspaceRoot":"","providerId":"meta","modelId":"muse-spark-1.3-contributor","turnCount":0,"forkedFrom":null,"approvalMode":{"mode":"allowAll","source":"startup","lastCommandId":null},"createdByClient":{"name":"t3_code","version":"1"},"kind":"root"},"viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:1"}}} {"type":"emit_inbound","label":"session/approvalModeChanged","frame":{"jsonrpc":"2.0","method":"session/approvalModeChanged","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:1","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"9865268e-0a39-43a0-89d0-251a820ec8a3","sequence":5},"last":{"id":"9865268e-0a39-43a0-89d0-251a820ec8a3","sequence":5}},"mode":"allowAll","source":"approvalReconfigure","commandId":"01a11a6d-2d3e-7000-b0e7-f04c53ee070b","clientName":"t3_code"},"emittedAtMs":1791444725268}} -{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally."}],"displayText":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}}} +{"type":"expect_outbound","label":"turn/start","frame":{"jsonrpc":"2.0","id":3,"method":"turn/start","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","input":[{"type":"text","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\n"},{"type":"text","text":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally."}],"displayText":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","workspaceRoots":[""],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}}} {"type":"emit_inbound","label":"session/branchChanged","frame":{"jsonrpc":"2.0","method":"session/branchChanged","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:2","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"531b0e9e-c96d-4fa5-a6dd-5cc7d4569543","sequence":16},"last":{"id":"531b0e9e-c96d-4fa5-a6dd-5cc7d4569543","sequence":16}},"workspaceRoot":"","branch":"main","vcs":"git"},"emittedAtMs":1791444725509}} {"type":"emit_inbound","label":"response:turn/start","frame":{"jsonrpc":"2.0","id":3,"result":{"commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","status":"accepted","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","startedNewTurn":true,"disposition":"started"}}} {"type":"expect_outbound","label":"turn/interrupt","frame":{"jsonrpc":"2.0","id":4,"method":"turn/interrupt","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","commandId":"01a11a6d-2f0b-7000-a1d4-359cf54e471a"}}} {"type":"emit_inbound","label":"session/statusChanged","frame":{"jsonrpc":"2.0","method":"session/statusChanged","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","status":"running","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:3"},"emittedAtMs":1791444725522}} {"type":"emit_inbound","label":"turn/started","frame":{"jsonrpc":"2.0","method":"turn/started","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:3","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18},"last":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18}},"turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"},"emittedAtMs":1791444725523}} -{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18},"last":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18}},"item":{"itemId":"cfa989ad-2359-4da2-9fca-562855cc0ae8","kind":"userMessage","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:05.510508Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725523}} -{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"5db75d92-0e52-4bce-bb81-40e254b40bc3","sequence":20},"last":{"id":"5db75d92-0e52-4bce-bb81-40e254b40bc3","sequence":20}},"item":{"itemId":"cfa989ad-2359-4da2-9fca-562855cc0ae8","kind":"userMessage","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:05.530992Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","displayText":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725539}} +{"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:4","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18},"last":{"id":"50d1fd8c-232b-47b9-9bfa-9b543961bbc9","sequence":18}},"item":{"itemId":"cfa989ad-2359-4da2-9fca-562855cc0ae8","kind":"userMessage","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":1,"status":"completed","recordedAt":"2026-10-08T07:32:05.510508Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725523}} +{"type":"emit_inbound","label":"item/updated","frame":{"jsonrpc":"2.0","method":"item/updated","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:5","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"5db75d92-0e52-4bce-bb81-40e254b40bc3","sequence":20},"last":{"id":"5db75d92-0e52-4bce-bb81-40e254b40bc3","sequence":20}},"item":{"itemId":"cfa989ad-2359-4da2-9fca-562855cc0ae8","kind":"userMessage","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":2,"status":"completed","recordedAt":"2026-10-08T07:32:05.530992Z","text":"In case you're asked: you are running in T3 Code through the Muse Code harness, as muse-spark-1.3-contributor with high reasoning effort. No need to mention this otherwise. You can embed images, video, and audio using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.\n\n\nLink each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools don't link for you. If linking fails, say so. Skip PRs you only read or review and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR , head , checks and reviews . Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. When pull_request_* tools are listed, use them, not gh or cafe, to read, list, open, edit, review, reply on, close, or merge PRs. pull_request_create links for you.\nIf available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.\nDo not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","displayText":"Do not answer immediately. First run the local shell command `sleep 30`, then respond with exactly: interrupt fixture should not finish naturally.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725539}} {"type":"emit_inbound","label":"item/started","frame":{"jsonrpc":"2.0","method":"item/started","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:6","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"ae604001-22b9-479c-a45b-3dcfed45996c","sequence":37},"last":{"id":"ae604001-22b9-479c-a45b-3dcfed45996c","sequence":37}},"item":{"itemId":"ae604001-22b9-479c-a45b-3dcfed45996c","kind":"reminderChild","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":1,"status":"inProgress","recordedAt":"2026-10-08T07:32:05.638142Z","fallbackText":"Reminder child session","childSessionId":"1f58196a-6bf6-42da-9499-8f53a439e6e1","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6d-2f65-70b1-bb8f-69b33bb4fc62"}},"emittedAtMs":1791444725646}} {"type":"emit_inbound","label":"response:turn/interrupt","frame":{"jsonrpc":"2.0","id":4,"result":{"commandId":"01a11a6d-2f0b-7000-a1d4-359cf54e471a","status":"accepted","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}}} {"type":"emit_inbound","label":"item/completed","frame":{"jsonrpc":"2.0","method":"item/completed","params":{"sessionId":"01a11a6d-2d3d-7000-8178-411fdb90bc34","viewCursor":"v:01a11a6d-2d3d-7000-8178-411fdb90bc34:7","sourceRange":{"stream":{"kind":"session","id":"01a11a6d-2d3d-7000-8178-411fdb90bc34"},"first":{"id":"ae604001-22b9-479c-a45b-3dcfed45996c","sequence":37},"last":{"id":"3962d8d1-4608-4dda-8fdc-39a1804474aa","sequence":50}},"item":{"itemId":"ae604001-22b9-479c-a45b-3dcfed45996c","kind":"reminderChild","turnId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5","revision":2,"status":"cancelled","recordedAt":"2026-10-08T07:32:05.727236Z","fallbackText":"Reminder child session","failureReason":"main run cancelled","childSessionId":"1f58196a-6bf6-42da-9499-8f53a439e6e1","reminderAgentId":"skill-reminder","generationId":1,"taskId":"01a11a6d-2f65-70b1-bb8f-69b33bb4fc62"}},"emittedAtMs":1791444725734}} diff --git a/apps/server/src/provider/AgentContextBudget.test.ts b/apps/server/src/provider/AgentContextBudget.test.ts index 5a2cf9188599f..c0a11aa3e6114 100644 --- a/apps/server/src/provider/AgentContextBudget.test.ts +++ b/apps/server/src/provider/AgentContextBudget.test.ts @@ -12,6 +12,7 @@ import { ServerSecretStore } from "../auth/ServerSecretStore.ts"; import { ServerConfig } from "../config.ts"; import { DeviceService } from "../device/DeviceService.ts"; import { ServerEnvironment } from "../environment/ServerEnvironment.ts"; +import { GitManager } from "../git/GitManager.ts"; import { GitWorkflowService } from "../git/GitWorkflowService.ts"; import * as McpHttpServer from "../mcp/McpHttpServer.ts"; import { PreviewAutomationBroker } from "../mcp/PreviewAutomationBroker.ts"; @@ -75,6 +76,7 @@ const toolHandlerServices = Layer.mergeAll( Layer.mock(ProviderRegistry)({}), Layer.mock(PullRequestReviewGuideService)({}), Layer.mock(PullRequestService)({}), + Layer.mock(GitManager)({}), Layer.mock(RemoteDelegation)({}), Layer.mock(ScheduledTaskService)({}), Layer.mock(SecretRequests)({}), diff --git a/apps/server/src/provider/agentContextBudget.json b/apps/server/src/provider/agentContextBudget.json index f1a1aa442807f..04814464bf2f1 100644 --- a/apps/server/src/provider/agentContextBudget.json +++ b/apps/server/src/provider/agentContextBudget.json @@ -1,5 +1,5 @@ { - "claudeSystemAppendBytes": 6037, - "codexAdditionalContextBytes": 7431, - "mcpToolListJsonBytes": 52519 + "claudeSystemAppendBytes": 6202, + "codexAdditionalContextBytes": 7596, + "mcpToolListJsonBytes": 56461 } diff --git a/apps/server/src/pullRequest/PullRequestService.test.ts b/apps/server/src/pullRequest/PullRequestService.test.ts index 827acef899357..cb4a35cd708a9 100644 --- a/apps/server/src/pullRequest/PullRequestService.test.ts +++ b/apps/server/src/pullRequest/PullRequestService.test.ts @@ -422,6 +422,9 @@ it.effect("lists GitHub Enterprise PRs for a stored unknown repository after hos result.entries.map(({ host, number }) => [host, number]), [["code.example.test", 42]], ); + // Agents get the forge tools only where the host is one T3 reads. + assert.isTrue(yield* service.servesProject("p1" as ProjectId)); + assert.isFalse(yield* service.servesProject("p2" as ProjectId)); }), ); @@ -1428,6 +1431,30 @@ it.effect( }), ); +it.effect("refuses a merge whose head moved past expectedHeadSha and pins the host merge", () => + Effect.gen(function* () { + const pinned: Array = []; + const service = yield* makeService({ + projects: [project({ id: "p1", title: "web", workspaceRoot: "/a", repository: "acme/web" })], + providers: [ + fakePullRequestProvider(SourceControlProviderKind.make("github"), { + getChangeRequest: () => + Effect.succeed({ ...hostedChangeRequest("Body"), headSha: "new-head" }), + getChangeRequestSummary: () => Effect.succeed(changeRequest(1, "2026-09-03T00:00:00Z")), + runAction: (input) => Effect.sync(() => void pinned.push(input.expectedHeadSha)), + }), + ], + }); + const reference = { projectId: "p1" as ProjectId, repository: "acme/web", number: 1 }; + const refused = yield* Effect.flip( + service.runAction({ ...reference, action: "merge", expectedHeadSha: "reviewed-head" }), + ); + assert.include(refused.message, "new-head"); + yield* service.runAction({ ...reference, action: "merge", expectedHeadSha: "new-head" }); + assert.deepStrictEqual(pinned, ["new-head"]); + }), +); + it.effect("publishes a merge for immediate settlement only after host confirmation", () => Effect.gen(function* () { const mergedAt = "2026-09-03T02:00:00.000Z"; diff --git a/apps/server/src/pullRequest/PullRequestService.ts b/apps/server/src/pullRequest/PullRequestService.ts index 271a3a62ef94e..cab1dc358c28c 100644 --- a/apps/server/src/pullRequest/PullRequestService.ts +++ b/apps/server/src/pullRequest/PullRequestService.ts @@ -250,6 +250,8 @@ export class PullRequestService extends Context.Service< ) => Effect.Effect; /** Emits when the host reports a change; empty where the host has no event feed. */ readonly changes: (input: PullRequestRef) => Stream.Stream; + /** Whether the project's checkout is on a forge T3 reads change requests from. */ + readonly servesProject: (projectId: ProjectId) => Effect.Effect; readonly threadComments: ( input: PullRequestThreadCommentsInput, ) => Effect.Effect; @@ -1131,6 +1133,13 @@ export const make = Effect.gen(function* () { }; }); + // A failed read keeps the tools: their calls report the failure. + const servesProject: PullRequestService["Service"]["servesProject"] = (projectId) => + listWorkspaceProjects({ projectId }).pipe( + Effect.map(({ supported }) => supported.length > 0), + Effect.orElseSucceed(() => true), + ); + const changes: PullRequestService["Service"]["changes"] = (input) => Stream.unwrap( requireProject(input).pipe( @@ -2255,7 +2264,32 @@ export const make = Effect.gen(function* () { ), ) : Effect.succeed(false); - return mergeSettings.pipe( + // Hosts that cannot pin a merge to a commit still refuse a head that already moved. + const headPinned = + input.expectedHeadSha === undefined + ? Effect.void + : project.api + .getChangeRequest({ + cwd: project.project.workspaceRoot, + repository: project.repository, + host: project.host, + number: input.number, + }) + .pipe( + Effect.mapError(toPullRequestError("runAction")), + Effect.flatMap((current) => + current.headSha === input.expectedHeadSha + ? Effect.void + : Effect.fail( + new PullRequestOperationError({ + operation: "runAction", + detail: `The head is now ${current.headSha ?? "unknown"}, not ${input.expectedHeadSha}. Review the new commits first.`, + }), + ), + ), + ); + return headPinned.pipe( + Effect.andThen(mergeSettings), Effect.flatMap((removeAgentCreditsOnMerge) => project.api .runAction({ @@ -2269,6 +2303,9 @@ export const make = Effect.gen(function* () { ...(input.expectedStackHeads === undefined ? {} : { expectedStackHeads: input.expectedStackHeads }), + ...(input.expectedHeadSha === undefined + ? {} + : { expectedHeadSha: input.expectedHeadSha }), ...(input.mergeMethod === undefined ? {} : { mergeMethod: input.mergeMethod }), ...(input.updateMethod === undefined ? {} @@ -3977,6 +4014,7 @@ export const make = Effect.gen(function* () { ), activity: credentialCached(activity), changes, + servesProject, preview: credentialCached(preview), threadComments, diff: credentialCached(diff), diff --git a/apps/server/src/pullRequest/pullRequestReviewGuideNormalize.ts b/apps/server/src/pullRequest/pullRequestReviewGuideNormalize.ts index 82edfc5fb8159..f130dc5ab49d6 100644 --- a/apps/server/src/pullRequest/pullRequestReviewGuideNormalize.ts +++ b/apps/server/src/pullRequest/pullRequestReviewGuideNormalize.ts @@ -19,7 +19,7 @@ export interface ReviewGuideChange { readonly hunks: ReadonlyMap; } -const HUNK_HEADER = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/; +export const HUNK_HEADER = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/; const hunkRange = (start: string, count: string | undefined): LineRange | null => { const lines = count === undefined ? 1 : Number(count); @@ -30,7 +30,7 @@ const hunkRange = (start: string, count: string | undefined): LineRange | null = * Git quotes a name holding a tab, quote or backslash, and ends an unquoted name holding a space * with a tab, so the first literal tab is never part of what the file is called. */ -function headerPath(line: string, prefix: string): string | null { +export function headerPath(line: string, prefix: string): string | null { const rest = line.slice(4); const tab = rest.indexOf("\t"); const token = tab === -1 ? rest : rest.slice(0, tab); diff --git a/apps/server/src/pullRequest/pullRequestReviewPosition.test.ts b/apps/server/src/pullRequest/pullRequestReviewPosition.test.ts new file mode 100644 index 0000000000000..f7dbec7e160b5 --- /dev/null +++ b/apps/server/src/pullRequest/pullRequestReviewPosition.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { reviewPositionInPatch } from "./pullRequestReviewPosition.ts"; + +const patch = [ + "diff --git a/src/a.ts b/src/a.ts", + "--- a/src/a.ts", + "+++ b/src/a.ts", + "@@ -10,3 +10,3 @@ function a() {", + " kept", + "-removed", + "+added", + " also kept", + "diff --git a/gone.ts b/gone.ts", + "--- a/gone.ts", + "+++ /dev/null", + "@@ -1 +0,0 @@", + "-gone", + "diff --git a/other.ts b/other.ts", + "--- a/other.ts", + "+++ b/other.ts", + "@@ -1 +1,2 @@", + " first", + // An added line reading `++ b/src/a.ts`, not a header for src/a.ts. + "+++ b/src/a.ts", + "@@ -20 +21 @@", + " later", +].join("\n"); + +describe("reviewPositionInPatch", () => { + it.each([ + ["an added line", "src/a.ts", 11, "new", { kind: "added", newLine: 11 }], + ["a removed line", "src/a.ts", 11, "old", { kind: "deleted", oldLine: 11 }], + [ + "a kept line by its head number", + "src/a.ts", + 12, + "new", + { kind: "context", oldLine: 12, newLine: 12, side: "right" }, + ], + [ + "a kept line by its base number", + "src/a.ts", + 10, + "old", + { kind: "context", oldLine: 10, newLine: 10, side: "left" }, + ], + ["a deleted file's line", "gone.ts", 1, "old", { kind: "deleted", oldLine: 1 }], + ["a line outside every hunk", "src/a.ts", 30, "new", null], + ["no line from a later file's header-like source", "src/a.ts", 21, "new", null], + ["a line of a file the patch lacks", "src/b.ts", 11, "new", null], + ] as const)("places %s", (_name, path, line, side, expected) => { + expect(reviewPositionInPatch(patch, path, line, side)).toEqual(expected); + }); +}); diff --git a/apps/server/src/pullRequest/pullRequestReviewPosition.ts b/apps/server/src/pullRequest/pullRequestReviewPosition.ts new file mode 100644 index 0000000000000..e55d375e94856 --- /dev/null +++ b/apps/server/src/pullRequest/pullRequestReviewPosition.ts @@ -0,0 +1,53 @@ +import type { PullRequestReviewPosition } from "@t3tools/contracts"; + +import { HUNK_HEADER, headerPath } from "./pullRequestReviewGuideNormalize.ts"; + +/** `new` numbers a line in the PR's head, `old` in its base. */ +export type ReviewLineSide = "new" | "old"; + +/** Where a line of `path` sits in a unified patch, or null when the patch does not show it. */ +export function reviewPositionInPatch( + patch: string, + path: string, + line: number, + side: ReviewLineSide, +): PullRequestReviewPosition | null { + let oldPath: string | null = null; + let inFile = false; + let inHunks = false; + let oldLine = 0; + let newLine = 0; + for (const text of patch.split("\n")) { + if (text.startsWith("diff --git ")) { + oldPath = null; + inFile = false; + inHunks = false; + } else if (!inHunks && text.startsWith("--- ")) { + oldPath = headerPath(text, "a/"); + } else if (!inHunks && text.startsWith("+++ ")) { + inFile = (headerPath(text, "b/") ?? oldPath) === path; + } else if (text.startsWith("@@")) { + // Every file's hunks count, so another file's `+++ ` source line is never a header. + const header = HUNK_HEADER.exec(text); + if (header === null) continue; + inHunks = true; + oldLine = Number(header[1]); + newLine = Number(header[3]); + } else if (inFile && inHunks) { + if (text.startsWith("+")) { + if (side === "new" && newLine === line) return { kind: "added", newLine }; + newLine += 1; + } else if (text.startsWith("-")) { + if (side === "old" && oldLine === line) return { kind: "deleted", oldLine }; + oldLine += 1; + } else if (text.startsWith(" ")) { + if ((side === "new" ? newLine : oldLine) === line) { + return { kind: "context", oldLine, newLine, side: side === "new" ? "right" : "left" }; + } + oldLine += 1; + newLine += 1; + } + } + } + return null; +} diff --git a/apps/server/src/server.ts b/apps/server/src/server.ts index 2d2cdcf226602..ab3bbeb1d186a 100644 --- a/apps/server/src/server.ts +++ b/apps/server/src/server.ts @@ -455,6 +455,7 @@ const layerThreadIssueService = ThreadIssueService.layer; const layerGitManager = GitManager.layer.pipe( Layer.provide(Layer.merge(ProjectionStoreV2.layer, ProjectStore.layer)), + Layer.provide(layerPullRequestService.pipe(Layer.provide(RuntimeLayer.layerProjectService))), Layer.provideMerge(RuntimeLayer.layerProjectSetupScriptRunner), Layer.provideMerge(WorktreeSetupTracker.layer), Layer.provideMerge(GitVcsDriver.layer), @@ -864,6 +865,7 @@ const layerMakeRoutes = Layer.mergeAll( McpHttpServer.layer.pipe( Layer.provide(ProviderAdapterRegistry.layerFromProviderInstanceRegistry), Layer.provide(McpOAuth.layerMcpClientAuthenticator), + Layer.provide(ProjectionStoreV2.layer), ), // Follows delegated tasks running in linked environments, including after a restart. Layer.effectDiscard( diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 1c890e574a679..146ab714ca3d0 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Thread", "0001ae5846061bb6": "Thread auf {machine}", "eef7f4dacbc3c3f2": "Rechner", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten, {failed} fehlgeschlagen} other {Versucht, {started} Review-Leitfäden zu starten, {failed} fehlgeschlagen}}", "672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}", "5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}", + "a60e5be5b4865ce9": "{count, plural, one {{count} Pull Request gelesen} other {{count} Pull Requests gelesen}}", + "c74296822829ad9d": "{count, plural, one {Versucht, {count} Pull Request zu lesen} other {Versucht, {count} Pull Requests zu lesen}}", + "833fc9b60bf40749": "{count, plural, one {Pull Requests {count}-mal aufgelistet} other {Pull Requests {count}-mal aufgelistet}}", + "ccae2617d4c92f7d": "{count, plural, one {Versucht, Pull Requests {count}-mal aufzulisten} other {Versucht, Pull Requests {count}-mal aufzulisten}}", + "630a8e9a6597b5de": "{count, plural, one {Versucht, {count} Pull Request zu öffnen} other {Versucht, {count} Pull Requests zu öffnen}}", + "af6bb8e1d69c255f": "{count, plural, one {{count} offenen Pull Request gefunden} other {{count} offene Pull Requests gefunden}}", + "c1751c0d62ccacb0": "{count, plural, one {{count} Pull Request geöffnet} other {{count} Pull Requests geöffnet}}", + "6963f76ce8860984": "{opened, plural, one {{opened} Pull Request geöffnet, {existing} offen gefunden} other {{opened} Pull Requests geöffnet, {existing} offen gefunden}}", + "b64d48025a0904a5": "{count, plural, one {{count} Pull Request aktualisiert} other {{count} Pull Requests aktualisiert}}", + "f62092fc584c5dcc": "{count, plural, one {Versucht, {count} Pull Request zu aktualisieren} other {Versucht, {count} Pull Requests zu aktualisieren}}", + "23cc59ef4ccb7a85": "{count, plural, one {{count}-mal auf Pull Requests geantwortet} other {{count}-mal auf Pull Requests geantwortet}}", + "2b682a59792b6c07": "{count, plural, one {{count}-mal versucht, auf Pull Requests zu antworten} other {{count}-mal versucht, auf Pull Requests zu antworten}}", + "998ef072ea79ff62": "{count, plural, one {Versucht, {count} Pull Request zu mergen} other {Versucht, {count} Pull Requests zu mergen}}", + "80e8102a93dc5a75": "{count, plural, one {{count} Pull Request zum Mergen eingereiht} other {{count} Pull Requests zum Mergen eingereiht}}", + "a742473f42c9a609": "{count, plural, one {{count} Pull Request gemergt} other {{count} Pull Requests gemergt}}", + "40e3528651297351": "{merged, plural, one {{merged} Pull Request gemergt, {queued} eingereiht} other {{merged} Pull Requests gemergt, {queued} eingereiht}}", + "8146ee71f7426683": "{count, plural, one {{count} Pull Request reviewt} other {{count} Pull Requests reviewt}}", + "638678077ba2e050": "{count, plural, one {Versucht, {count} Pull Request zu reviewen} other {Versucht, {count} Pull Requests zu reviewen}}", "420bea546d5f8802": "Thread kopiert", "2efb2dd3bf170f67": "Thread konnte nicht kopiert werden", "6c03545936b55e0b": "PR-Link kopiert", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Beobachtung eines Pull Requests beenden", "52b8917fbd7ea9d5": "Review-Leitfäden schreiben", "722d3fd5ecc61ff3": "Review-Leitfaden lesen", + "96d54fd56d8b65ce": "Pull Request lesen", + "1af212db47b37813": "Pull Requests auflisten", + "a01b71c7c36d05f5": "Pull Request öffnen", + "5ddfea667ccceecf": "Pull Request aktualisieren", + "c87d85c418b791a5": "Auf Pull Request antworten", + "4bcd613be5a48aa2": "Pull Request reviewen", + "81b284c3afb54ec6": "Pull Request mergen", "3227c712130a4187": "Issues auflisten", "3f461f26681450d6": "Ein Issue lesen", "fff9316cf5e449b4": "Ein Issue erstellen", @@ -4608,13 +4632,14 @@ "6d00220bfee72afd": "Nicht verbunden: Nachricht nicht gesendet", "f62c43120e8c60e7": "Verbindung zur Umgebung wird wiederhergestellt. Versuche es erneut, sobald sie verbunden ist.", "74e7e5c0536cda02": "Nebenchat nicht gestartet", + "87d59d5dbb3eaf83": "Angehängter Thread liegt auf einem anderen Rechner", + "4236b99f3807de4b": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu seinem Rechner.", + "811b25d99525bcf7": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu {owner}.", "faf9ee0a28119e10": "Entferne die Anhänge und den Kontext und sende dann erneut.", + "d6783ef5e11f3e89": "Nebenchat konnte nicht gestartet werden.", "1778ba2f32077b39": "Aktualisiere diesen Server, bevor du mehrere Modelle startest.", "736caccf2954a7f5": "Modelle und einen Basis-Branch wählen", "d08959c85dad0ed0": "Mehrere Modelle brauchen einen neuen Thread in einem Git-Projekt. Jedes erhält einen eigenen Worktree.", - "87d59d5dbb3eaf83": "Angehängter Thread liegt auf einem anderen Rechner", - "4236b99f3807de4b": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu seinem Rechner.", - "811b25d99525bcf7": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu {owner}.", "55f9621a69825e20": "Nachricht in der Warteschlange nicht aktualisiert", "1072fb0e2846f2a4": "Eine eingereihte Nachricht kann nicht in einen Nebenchat verschoben werden. Entferne /side oder /btw, um sie zu speichern.", "170ab9bcffd26887": "Starte zuerst einen Codex-Thread", @@ -4710,7 +4735,6 @@ "f2f589819f1d5aaf": "Eine Nachricht kann höchstens {max} Anhänge haben.", "83611d16e98f2bbb": "Die frühere Änderung wurde gespeichert. Prüfe deine neueren Änderungen und speichere erneut.", "e7c78c337f470f5a": "Browser kann nicht geöffnet werden", - "d6783ef5e11f3e89": "Nebenchat konnte nicht gestartet werden.", "093c70146c496264": "Der Nebenchat wurde erstellt, hat diesen Client aber nicht erreicht.", "0efeaa8d0ca3a757": "Der Nebenchat ist nicht mehr verfügbar.", "61fc2531d076d396": "Der Berechtigungsmodus des Nebenchats konnte nicht festgelegt werden.", @@ -5707,6 +5731,7 @@ "b6a29fff7c7c0808": "Niemand", "54420465784bb1bd": "Ältere Kommentare laden", "9d82ebf35bfb4043": "Hier ist noch nichts passiert.", + "1cf216566c1ee064": "Projekt nicht verfügbar", "b5ddadeb0810688c": "Status", "93c1fc19d9bf1db0": "Beteiligung", "2160067266a61dd8": "Beliebig", @@ -6228,6 +6253,7 @@ "fefd41dda4eb7cf7": "In Dateien anzeigen", "398ff9f721cbf2ad": "DNS-Adresse konnte nicht gefunden werden", "56d5c9e464dc0d96": "Verbindung abgelehnt", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "Verbindung wurde zurückgesetzt", "b32a80332be0120c": "Verbindung wurde geschlossen", "ed6643fea556af65": "Zeitüberschreitung der Verbindung", @@ -9862,7 +9888,6 @@ "573ea5fdf293a9d6": "Alle Checkouts", "470ad8c54049d1e1": "Checkouts durchsuchen", "7e2dfdd9f97fc027": "Projektbereich", - "1cf216566c1ee064": "Projekt nicht verfügbar", "c1b8c351aa90f319": [ { "t": "span", @@ -12011,11 +12036,11 @@ "628799e25f2ae9fd": "Tabellenblätter", "60aa1b1bd2558b88": "{count}+ Seiten", "59dff62c096fda75": "Vorschau auf 1.000 Seiten begrenzt.", - "c55ca84447d16b92": "Frag den Agenten zu diesen Zeilen…", - "dd4d954561a97a95": "Agenten fragen", "16929a241a6bc9e3": "{total, plural, one {entfernter Code, {shown} von {total} Diff-Zeile angezeigt} other {entfernter Code, {shown} von {total} Diff-Zeilen angezeigt}}", "f21833072d416544": "{total, plural, one {{shown} von {total} Diff-Zeile angezeigt} other {{shown} von {total} Diff-Zeilen angezeigt}}", "26db306011e06483": "{path} in Code öffnen", + "c55ca84447d16b92": "Frag den Agenten zu diesen Zeilen…", + "dd4d954561a97a95": "Agenten fragen", "150a57dcd79b7ff4": [ { "i": 1, diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 2e625d71847db..35a59088f3e73 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Thread", "0001ae5846061bb6": "Thread on {machine}", "eef7f4dacbc3c3f2": "Machine", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tried to start {started} review guide, {failed} failed} other {Tried to start {started} review guides, {failed} failed}}", "672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}", "5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}", + "a60e5be5b4865ce9": "{count, plural, one {Read {count} pull request} other {Read {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Tried to read {count} pull request} other {Tried to read {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listed pull requests {count} time} other {Listed pull requests {count} times}}", + "ccae2617d4c92f7d": "{count, plural, one {Tried to list pull requests {count} time} other {Tried to list pull requests {count} times}}", + "630a8e9a6597b5de": "{count, plural, one {Tried to open {count} pull request} other {Tried to open {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Found {count} open pull request} other {Found {count} open pull requests}}", + "c1751c0d62ccacb0": "{count, plural, one {Opened {count} pull request} other {Opened {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Opened {opened} pull request, found {existing} open} other {Opened {opened} pull requests, found {existing} open}}", + "b64d48025a0904a5": "{count, plural, one {Updated {count} pull request} other {Updated {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Tried to update {count} pull request} other {Tried to update {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Responded on pull requests {count} time} other {Responded on pull requests {count} times}}", + "2b682a59792b6c07": "{count, plural, one {Tried to respond on pull requests {count} time} other {Tried to respond on pull requests {count} times}}", + "998ef072ea79ff62": "{count, plural, one {Tried to merge {count} pull request} other {Tried to merge {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Queued {count} pull request to merge} other {Queued {count} pull requests to merge}}", + "a742473f42c9a609": "{count, plural, one {Merged {count} pull request} other {Merged {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Merged {merged} pull request, queued {queued}} other {Merged {merged} pull requests, queued {queued}}}", + "8146ee71f7426683": "{count, plural, one {Reviewed {count} pull request} other {Reviewed {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Tried to review {count} pull request} other {Tried to review {count} pull requests}}", "420bea546d5f8802": "Thread copied", "2efb2dd3bf170f67": "Failed to copy thread", "6c03545936b55e0b": "PR link copied", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Stop watching a pull request", "52b8917fbd7ea9d5": "Write review guides", "722d3fd5ecc61ff3": "Read a review guide", + "96d54fd56d8b65ce": "Read a pull request", + "1af212db47b37813": "List pull requests", + "a01b71c7c36d05f5": "Open a pull request", + "5ddfea667ccceecf": "Update a pull request", + "c87d85c418b791a5": "Respond on a pull request", + "4bcd613be5a48aa2": "Review a pull request", + "81b284c3afb54ec6": "Merge a pull request", "3227c712130a4187": "List issues", "3f461f26681450d6": "Read an issue", "fff9316cf5e449b4": "File an issue", @@ -4607,13 +4631,14 @@ "6d00220bfee72afd": "Not connected: message not sent", "f62c43120e8c60e7": "Reconnecting to the environment. Try again once it is connected.", "74e7e5c0536cda02": "Side chat not started", + "87d59d5dbb3eaf83": "Attached thread is on another machine", + "4236b99f3807de4b": "This machine's agent can't read \"{title}\". Remove it, or switch back to its machine to send.", + "811b25d99525bcf7": "This machine's agent can't read \"{title}\". Remove it, or switch back to {owner} to send.", "faf9ee0a28119e10": "Remove the attachments and context, then send it again.", + "d6783ef5e11f3e89": "Could not start a side chat.", "1778ba2f32077b39": "Update this server before starting multiple models.", "736caccf2954a7f5": "Choose models and a base branch", "d08959c85dad0ed0": "Multiple models need a new thread in a Git project. Each gets its own worktree.", - "87d59d5dbb3eaf83": "Attached thread is on another machine", - "4236b99f3807de4b": "This machine's agent can't read \"{title}\". Remove it, or switch back to its machine to send.", - "811b25d99525bcf7": "This machine's agent can't read \"{title}\". Remove it, or switch back to {owner} to send.", "55f9621a69825e20": "Queued message not updated", "1072fb0e2846f2a4": "A queued message can't move to a side chat. Remove /side or /btw to save it.", "170ab9bcffd26887": "Start a Codex thread first", @@ -4709,7 +4734,6 @@ "f2f589819f1d5aaf": "A message can have at most {max} attachments.", "83611d16e98f2bbb": "The earlier edit was saved. Review your newer changes and save again.", "e7c78c337f470f5a": "Unable to open browser", - "d6783ef5e11f3e89": "Could not start a side chat.", "093c70146c496264": "The side chat was created, but it did not reach this client.", "0efeaa8d0ca3a757": "The side chat is no longer available.", "61fc2531d076d396": "Could not set the side chat's permission mode.", @@ -5708,6 +5732,7 @@ "b6a29fff7c7c0808": "None", "54420465784bb1bd": "Load older comments", "9d82ebf35bfb4043": "Nothing has happened here yet.", + "1cf216566c1ee064": "Unavailable project", "b5ddadeb0810688c": "State", "93c1fc19d9bf1db0": "Involvement", "2160067266a61dd8": "Any", @@ -6232,6 +6257,7 @@ "fefd41dda4eb7cf7": "Reveal in Files", "398ff9f721cbf2ad": "DNS address could not be found", "56d5c9e464dc0d96": "Connection refused", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "Connection was reset", "b32a80332be0120c": "Connection was closed", "ed6643fea556af65": "Connection timed out", @@ -9871,7 +9897,6 @@ "573ea5fdf293a9d6": "All checkouts", "470ad8c54049d1e1": "Search checkouts", "7e2dfdd9f97fc027": "Project scope", - "1cf216566c1ee064": "Unavailable project", "c1b8c351aa90f319": [ { "t": "span", @@ -12019,11 +12044,11 @@ "628799e25f2ae9fd": "Sheets", "60aa1b1bd2558b88": "{count}+ pages", "59dff62c096fda75": "Preview limited to 1,000 pages.", - "c55ca84447d16b92": "Ask the agent about these lines…", - "dd4d954561a97a95": "Ask agent", "16929a241a6bc9e3": "{total, plural, one {removed code, showing {shown} of {total} diff lines} other {removed code, showing {shown} of {total} diff lines}}", "f21833072d416544": "{total, plural, one {showing {shown} of {total} diff lines} other {showing {shown} of {total} diff lines}}", "26db306011e06483": "Open {path} in Code", + "c55ca84447d16b92": "Ask the agent about these lines…", + "dd4d954561a97a95": "Ask agent", "150a57dcd79b7ff4": [ "Loading ", { diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 9b66ebfd3d698..4390b9bfb1e3d 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Hilo", "0001ae5846061bb6": "Hilo en {machine}", "eef7f4dacbc3c3f2": "Máquina", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Intentó iniciar {started} guía de revisión, {failed} con errores} other {Intentó iniciar {started} guías de revisión, {failed} con errores}}", "672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}", "5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}", + "a60e5be5b4865ce9": "{count, plural, one {Leyó {count} pull request} other {Leyó {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Intentó leer {count} pull request} other {Intentó leer {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listó pull requests {count} vez} other {Listó pull requests {count} veces}}", + "ccae2617d4c92f7d": "{count, plural, one {Intentó listar pull requests {count} vez} other {Intentó listar pull requests {count} veces}}", + "630a8e9a6597b5de": "{count, plural, one {Intentó abrir {count} pull request} other {Intentó abrir {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Encontró {count} pull request abierta} other {Encontró {count} pull requests abiertas}}", + "c1751c0d62ccacb0": "{count, plural, one {Abrió {count} pull request} other {Abrió {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Abrió {opened} pull request, encontró {existing} abiertas} other {Abrió {opened} pull requests, encontró {existing} abiertas}}", + "b64d48025a0904a5": "{count, plural, one {Actualizó {count} pull request} other {Actualizó {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Intentó actualizar {count} pull request} other {Intentó actualizar {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Respondió en pull requests {count} vez} other {Respondió en pull requests {count} veces}}", + "2b682a59792b6c07": "{count, plural, one {Intentó responder en pull requests {count} vez} other {Intentó responder en pull requests {count} veces}}", + "998ef072ea79ff62": "{count, plural, one {Intentó fusionar {count} pull request} other {Intentó fusionar {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Puso {count} pull request en cola para fusionar} other {Puso {count} pull requests en cola para fusionar}}", + "a742473f42c9a609": "{count, plural, one {Fusionó {count} pull request} other {Fusionó {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Fusionó {merged} pull request, {queued} en cola} other {Fusionó {merged} pull requests, {queued} en cola}}", + "8146ee71f7426683": "{count, plural, one {Revisó {count} pull request} other {Revisó {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Intentó revisar {count} pull request} other {Intentó revisar {count} pull requests}}", "420bea546d5f8802": "Hilo copiado", "2efb2dd3bf170f67": "No se pudo copiar el hilo", "6c03545936b55e0b": "Enlace de la PR copiado", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Dejar de seguir una pull request", "52b8917fbd7ea9d5": "Escribir guías de revisión", "722d3fd5ecc61ff3": "Leer una guía de revisión", + "96d54fd56d8b65ce": "Leer una pull request", + "1af212db47b37813": "Listar pull requests", + "a01b71c7c36d05f5": "Abrir una pull request", + "5ddfea667ccceecf": "Actualizar una pull request", + "c87d85c418b791a5": "Responder en una pull request", + "4bcd613be5a48aa2": "Revisar una pull request", + "81b284c3afb54ec6": "Fusionar una pull request", "3227c712130a4187": "Listar issues", "3f461f26681450d6": "Leer una issue", "fff9316cf5e449b4": "Abrir una issue", @@ -4605,13 +4629,14 @@ "6d00220bfee72afd": "Sin conexión: mensaje no enviado", "f62c43120e8c60e7": "Reconectando con el entorno. Vuelve a intentarlo cuando esté conectado.", "74e7e5c0536cda02": "Chat lateral no iniciado", + "87d59d5dbb3eaf83": "El hilo adjunto está en otra máquina", + "4236b99f3807de4b": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a su máquina para enviarlo.", + "811b25d99525bcf7": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a {owner} para enviar.", "faf9ee0a28119e10": "Quita los adjuntos y el contexto, y vuelve a enviarlo.", + "d6783ef5e11f3e89": "No se pudo iniciar un chat lateral.", "1778ba2f32077b39": "Actualiza este servidor antes de iniciar varios modelos.", "736caccf2954a7f5": "Elige los modelos y una rama base", "d08959c85dad0ed0": "Varios modelos necesitan un hilo nuevo en un proyecto Git. Cada uno tiene su propio worktree.", - "87d59d5dbb3eaf83": "El hilo adjunto está en otra máquina", - "4236b99f3807de4b": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a su máquina para enviarlo.", - "811b25d99525bcf7": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a {owner} para enviar.", "55f9621a69825e20": "Mensaje en cola no actualizado", "1072fb0e2846f2a4": "Un mensaje en cola no puede pasar a un chat lateral. Quita /side o /btw para guardarlo.", "170ab9bcffd26887": "Inicia primero un hilo de Codex", @@ -4707,7 +4732,6 @@ "f2f589819f1d5aaf": "Un mensaje puede tener como máximo {max} adjuntos.", "83611d16e98f2bbb": "Se guardó la edición anterior. Revisa tus cambios más recientes y vuelve a guardar.", "e7c78c337f470f5a": "No se puede abrir el navegador", - "d6783ef5e11f3e89": "No se pudo iniciar un chat lateral.", "093c70146c496264": "El chat lateral se creó, pero no llegó a este cliente.", "0efeaa8d0ca3a757": "El chat lateral ya no está disponible.", "61fc2531d076d396": "No se pudo definir el modo de permisos del chat lateral.", @@ -5706,6 +5730,7 @@ "b6a29fff7c7c0808": "Nadie", "54420465784bb1bd": "Cargar comentarios anteriores", "9d82ebf35bfb4043": "Aquí no ha pasado nada todavía.", + "1cf216566c1ee064": "Proyecto no disponible", "b5ddadeb0810688c": "Estado", "93c1fc19d9bf1db0": "Participación", "2160067266a61dd8": "Cualquiera", @@ -6229,6 +6254,7 @@ "fefd41dda4eb7cf7": "Mostrar en Archivos", "398ff9f721cbf2ad": "No se encontró la dirección DNS", "56d5c9e464dc0d96": "Conexión rechazada", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "Se restableció la conexión", "b32a80332be0120c": "Se cerró la conexión", "ed6643fea556af65": "Se agotó el tiempo de conexión", @@ -9859,7 +9885,6 @@ "573ea5fdf293a9d6": "Todos los checkouts", "470ad8c54049d1e1": "Buscar checkouts", "7e2dfdd9f97fc027": "Ámbito de proyectos", - "1cf216566c1ee064": "Proyecto no disponible", "c1b8c351aa90f319": [ { "t": "span", @@ -12004,11 +12029,11 @@ "628799e25f2ae9fd": "Hojas", "60aa1b1bd2558b88": "Más de {count} páginas", "59dff62c096fda75": "La vista previa se limita a 1000 páginas.", - "c55ca84447d16b92": "Pregunta al agente sobre estas líneas…", - "dd4d954561a97a95": "Preguntar al agente", "16929a241a6bc9e3": "{total, plural, one {código eliminado, se muestra {shown} de {total} línea del diff} other {código eliminado, se muestran {shown} de {total} líneas del diff}}", "f21833072d416544": "{total, plural, one {se muestra {shown} de {total} línea del diff} other {se muestran {shown} de {total} líneas del diff}}", "26db306011e06483": "Abrir {path} en Código", + "c55ca84447d16b92": "Pregunta al agente sobre estas líneas…", + "dd4d954561a97a95": "Preguntar al agente", "150a57dcd79b7ff4": [ "Cargando ", { diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 7d711f2aee72c..d68f007e0554e 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Fil", "0001ae5846061bb6": "Fil sur {machine}", "eef7f4dacbc3c3f2": "Machine", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tentative de lancer {started} guide de revue, {failed} en échec} other {Tentative de lancer {started} guides de revue, {failed} en échec}}", "672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}", "5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}", + "a60e5be5b4865ce9": "{count, plural, one {{count} pull request lue} other {{count} pull requests lues}}", + "c74296822829ad9d": "{count, plural, one {Tentative de lecture de {count} pull request} other {Tentative de lecture de {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Pull requests listées {count} fois} other {Pull requests listées {count} fois}}", + "ccae2617d4c92f7d": "{count, plural, one {Tentative de liste des pull requests {count} fois} other {Tentative de liste des pull requests {count} fois}}", + "630a8e9a6597b5de": "{count, plural, one {Tentative d'ouverture de {count} pull request} other {Tentative d'ouverture de {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {{count} pull request ouverte trouvée} other {{count} pull requests ouvertes trouvées}}", + "c1751c0d62ccacb0": "{count, plural, one {{count} pull request ouverte} other {{count} pull requests ouvertes}}", + "6963f76ce8860984": "{opened, plural, one {{opened} pull request ouverte, {existing} déjà ouvertes trouvées} other {{opened} pull requests ouvertes, {existing} déjà ouvertes trouvées}}", + "b64d48025a0904a5": "{count, plural, one {{count} pull request mise à jour} other {{count} pull requests mises à jour}}", + "f62092fc584c5dcc": "{count, plural, one {Tentative de mise à jour de {count} pull request} other {Tentative de mise à jour de {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Réponse sur des pull requests {count} fois} other {Réponses sur des pull requests {count} fois}}", + "2b682a59792b6c07": "{count, plural, one {Tentative de réponse sur des pull requests {count} fois} other {Tentatives de réponse sur des pull requests {count} fois}}", + "998ef072ea79ff62": "{count, plural, one {Tentative de fusion de {count} pull request} other {Tentative de fusion de {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {{count} pull request mise en file pour fusion} other {{count} pull requests mises en file pour fusion}}", + "a742473f42c9a609": "{count, plural, one {{count} pull request fusionnée} other {{count} pull requests fusionnées}}", + "40e3528651297351": "{merged, plural, one {{merged} pull request fusionnée, {queued} en file} other {{merged} pull requests fusionnées, {queued} en file}}", + "8146ee71f7426683": "{count, plural, one {{count} pull request relue} other {{count} pull requests relues}}", + "638678077ba2e050": "{count, plural, one {Tentative de revue de {count} pull request} other {Tentative de revue de {count} pull requests}}", "420bea546d5f8802": "Fil copié", "2efb2dd3bf170f67": "Échec de la copie du fil", "6c03545936b55e0b": "Lien de la PR copié", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Arrêter de suivre une pull request", "52b8917fbd7ea9d5": "Rédiger des guides de revue", "722d3fd5ecc61ff3": "Lire un guide de revue", + "96d54fd56d8b65ce": "Lire une pull request", + "1af212db47b37813": "Lister les pull requests", + "a01b71c7c36d05f5": "Ouvrir une pull request", + "5ddfea667ccceecf": "Mettre à jour une pull request", + "c87d85c418b791a5": "Répondre sur une pull request", + "4bcd613be5a48aa2": "Relire une pull request", + "81b284c3afb54ec6": "Fusionner une pull request", "3227c712130a4187": "Lister les tickets", "3f461f26681450d6": "Lire un ticket", "fff9316cf5e449b4": "Ouvrir un ticket", @@ -4606,13 +4630,14 @@ "6d00220bfee72afd": "Non connecté : message non envoyé", "f62c43120e8c60e7": "Reconnexion à l’environnement. Réessayez une fois la connexion établie.", "74e7e5c0536cda02": "Discussion annexe non démarrée", + "87d59d5dbb3eaf83": "Le fil joint se trouve sur une autre machine", + "4236b99f3807de4b": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez sur sa machine pour l’envoyer.", + "811b25d99525bcf7": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez à {owner} pour envoyer.", "faf9ee0a28119e10": "Retirez les pièces jointes et le contexte, puis renvoyez.", + "d6783ef5e11f3e89": "Impossible de démarrer une discussion annexe.", "1778ba2f32077b39": "Mettez à jour ce serveur avant de lancer plusieurs modèles.", "736caccf2954a7f5": "Choisissez des modèles et une branche de base", "d08959c85dad0ed0": "Plusieurs modèles nécessitent un nouveau fil dans un projet Git. Chacun a son propre worktree.", - "87d59d5dbb3eaf83": "Le fil joint se trouve sur une autre machine", - "4236b99f3807de4b": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez sur sa machine pour l’envoyer.", - "811b25d99525bcf7": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez à {owner} pour envoyer.", "55f9621a69825e20": "Message en file d’attente non mis à jour", "1072fb0e2846f2a4": "Un message en file d’attente ne peut pas passer dans une discussion annexe. Retirez /side ou /btw pour l’enregistrer.", "170ab9bcffd26887": "Démarrez d’abord un fil Codex", @@ -4708,7 +4733,6 @@ "f2f589819f1d5aaf": "Un message peut contenir au plus {max} pièces jointes.", "83611d16e98f2bbb": "La modification précédente a été enregistrée. Relisez vos changements plus récents et enregistrez à nouveau.", "e7c78c337f470f5a": "Impossible d’ouvrir le navigateur", - "d6783ef5e11f3e89": "Impossible de démarrer une discussion annexe.", "093c70146c496264": "La discussion annexe a été créée, mais elle n’est pas parvenue à ce client.", "0efeaa8d0ca3a757": "La discussion annexe n’est plus disponible.", "61fc2531d076d396": "Impossible de définir le mode d’autorisation de la discussion annexe.", @@ -5707,6 +5731,7 @@ "b6a29fff7c7c0808": "Personne", "54420465784bb1bd": "Charger les commentaires plus anciens", "9d82ebf35bfb4043": "Rien ne s’est encore passé ici.", + "1cf216566c1ee064": "Projet indisponible", "b5ddadeb0810688c": "État", "93c1fc19d9bf1db0": "Participation", "2160067266a61dd8": "Tous", @@ -6230,6 +6255,7 @@ "fefd41dda4eb7cf7": "Afficher dans Fichiers", "398ff9f721cbf2ad": "Adresse DNS introuvable", "56d5c9e464dc0d96": "Connexion refusée", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "La connexion a été réinitialisée", "b32a80332be0120c": "La connexion a été fermée", "ed6643fea556af65": "Délai de connexion dépassé", @@ -9861,7 +9887,6 @@ "573ea5fdf293a9d6": "Tous les checkouts", "470ad8c54049d1e1": "Rechercher des checkouts", "7e2dfdd9f97fc027": "Portée des projets", - "1cf216566c1ee064": "Projet indisponible", "c1b8c351aa90f319": [ { "t": "span", @@ -12009,11 +12034,11 @@ "628799e25f2ae9fd": "Feuilles", "60aa1b1bd2558b88": "{count}+ pages", "59dff62c096fda75": "Aperçu limité à 1 000 pages.", - "c55ca84447d16b92": "Interrogez l’agent sur ces lignes…", - "dd4d954561a97a95": "Demander à l’agent", "16929a241a6bc9e3": "{total, plural, one {code supprimé, {shown} ligne de diff affichée sur {total}} other {code supprimé, {shown} lignes de diff affichées sur {total}}}", "f21833072d416544": "{total, plural, one {{shown} ligne de diff affichée sur {total}} other {{shown} lignes de diff affichées sur {total}}}", "26db306011e06483": "Ouvrir {path} dans Code", + "c55ca84447d16b92": "Interrogez l’agent sur ces lignes…", + "dd4d954561a97a95": "Demander à l’agent", "150a57dcd79b7ff4": [ "Chargement de ", { diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 51dbe52eff841..b64334566e35d 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "スレッド", "0001ae5846061bb6": "{machine} 上のスレッド", "eef7f4dacbc3c3f2": "マシン", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました。{failed} 件失敗しました}}", "672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}", "5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}", + "a60e5be5b4865ce9": "{count, plural, other {{count} 件のプルリクエストを読み取りました}}", + "c74296822829ad9d": "{count, plural, other {{count} 件のプルリクエストの読み取りを試みました}}", + "833fc9b60bf40749": "{count, plural, other {プルリクエストを {count} 回一覧表示しました}}", + "ccae2617d4c92f7d": "{count, plural, other {プルリクエストの一覧表示を {count} 回試みました}}", + "630a8e9a6597b5de": "{count, plural, other {{count} 件のプルリクエストの作成を試みました}}", + "af6bb8e1d69c255f": "{count, plural, other {オープンなプルリクエストが {count} 件見つかりました}}", + "c1751c0d62ccacb0": "{count, plural, other {{count} 件のプルリクエストを作成しました}}", + "6963f76ce8860984": "{opened, plural, other {{opened} 件のプルリクエストを作成し、オープンなものを {existing} 件見つけました}}", + "b64d48025a0904a5": "{count, plural, other {{count} 件のプルリクエストを更新しました}}", + "f62092fc584c5dcc": "{count, plural, other {{count} 件のプルリクエストの更新を試みました}}", + "23cc59ef4ccb7a85": "{count, plural, other {プルリクエストに {count} 回返信しました}}", + "2b682a59792b6c07": "{count, plural, other {プルリクエストへの返信を {count} 回試みました}}", + "998ef072ea79ff62": "{count, plural, other {{count} 件のプルリクエストのマージを試みました}}", + "80e8102a93dc5a75": "{count, plural, other {{count} 件のプルリクエストをマージ待ちにしました}}", + "a742473f42c9a609": "{count, plural, other {{count} 件のプルリクエストをマージしました}}", + "40e3528651297351": "{merged, plural, other {{merged} 件のプルリクエストをマージし、{queued} 件をマージ待ちにしました}}", + "8146ee71f7426683": "{count, plural, other {{count} 件のプルリクエストをレビューしました}}", + "638678077ba2e050": "{count, plural, other {{count} 件のプルリクエストのレビューを試みました}}", "420bea546d5f8802": "スレッドをコピーしました", "2efb2dd3bf170f67": "スレッドをコピーできませんでした", "6c03545936b55e0b": "PR のリンクをコピーしました", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "プルリクエストのウォッチを解除", "52b8917fbd7ea9d5": "レビューガイドを作成", "722d3fd5ecc61ff3": "レビューガイドを読み取る", + "96d54fd56d8b65ce": "プルリクエストを読む", + "1af212db47b37813": "プルリクエストを一覧表示", + "a01b71c7c36d05f5": "プルリクエストを作成", + "5ddfea667ccceecf": "プルリクエストを更新", + "c87d85c418b791a5": "プルリクエストに返信", + "4bcd613be5a48aa2": "プルリクエストをレビュー", + "81b284c3afb54ec6": "プルリクエストをマージ", "3227c712130a4187": "Issue を一覧表示", "3f461f26681450d6": "Issue を読み取る", "fff9316cf5e449b4": "Issue を作成", @@ -4595,13 +4619,14 @@ "6d00220bfee72afd": "未接続: メッセージは送信されませんでした", "f62c43120e8c60e7": "環境に再接続しています。接続されたらもう一度お試しください。", "74e7e5c0536cda02": "サイドチャットが開始されていません", + "87d59d5dbb3eaf83": "添付されたスレッドは別のマシン上にあります", + "4236b99f3807de4b": "このマシンのエージェントは「{title}」を読み取れません。削除するか、元のマシンに切り替えてから送信してください。", + "811b25d99525bcf7": "このマシンのエージェントは \"{title}\" を読み取れません。削除するか、{owner} に戻してから送信してください。", "faf9ee0a28119e10": "添付ファイルとコンテキストを削除してから、もう一度送信してください。", + "d6783ef5e11f3e89": "サイドチャットを開始できませんでした。", "1778ba2f32077b39": "複数のモデルを開始する前に、このサーバーを更新してください。", "736caccf2954a7f5": "モデルとベースブランチを選択", "d08959c85dad0ed0": "複数のモデルを使うには、Git プロジェクトの新しいスレッドが必要です。各モデルに専用のワークツリーが作られます。", - "87d59d5dbb3eaf83": "添付されたスレッドは別のマシン上にあります", - "4236b99f3807de4b": "このマシンのエージェントは「{title}」を読み取れません。削除するか、元のマシンに切り替えてから送信してください。", - "811b25d99525bcf7": "このマシンのエージェントは \"{title}\" を読み取れません。削除するか、{owner} に戻してから送信してください。", "55f9621a69825e20": "キュー内のメッセージは更新されませんでした", "1072fb0e2846f2a4": "キュー内のメッセージはサイドチャットに移動できません。保存するには /side または /btw を削除してください。", "170ab9bcffd26887": "まず Codex のスレッドを開始してください", @@ -4697,7 +4722,6 @@ "f2f589819f1d5aaf": "1 つのメッセージに付けられる添付ファイルは最大 {max} 個です。", "83611d16e98f2bbb": "前の編集は保存されました。新しい変更を確認して、もう一度保存してください。", "e7c78c337f470f5a": "ブラウザーを開けません", - "d6783ef5e11f3e89": "サイドチャットを開始できませんでした。", "093c70146c496264": "サイドチャットは作成されましたが、このクライアントに届きませんでした。", "0efeaa8d0ca3a757": "サイドチャットは利用できなくなりました。", "61fc2531d076d396": "サイドチャットの権限モードを設定できませんでした。", @@ -5689,6 +5713,7 @@ "b6a29fff7c7c0808": "なし", "54420465784bb1bd": "以前のコメントを読み込む", "9d82ebf35bfb4043": "まだアクティビティはありません。", + "1cf216566c1ee064": "利用できないプロジェクト", "b5ddadeb0810688c": "状態", "93c1fc19d9bf1db0": "関与", "2160067266a61dd8": "すべて", @@ -6202,6 +6227,7 @@ "fefd41dda4eb7cf7": "ファイルで表示", "398ff9f721cbf2ad": "DNS アドレスが見つかりませんでした", "56d5c9e464dc0d96": "接続が拒否されました", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "接続がリセットされました", "b32a80332be0120c": "接続が閉じられました", "ed6643fea556af65": "接続がタイムアウトしました", @@ -9813,7 +9839,6 @@ "573ea5fdf293a9d6": "すべてのチェックアウト", "470ad8c54049d1e1": "チェックアウトを検索", "7e2dfdd9f97fc027": "プロジェクトの範囲", - "1cf216566c1ee064": "利用できないプロジェクト", "c1b8c351aa90f319": [ { "t": "span", @@ -11959,11 +11984,11 @@ "628799e25f2ae9fd": "シート", "60aa1b1bd2558b88": "{count} ページ以上", "59dff62c096fda75": "プレビューは 1,000 ページまでに限られます。", - "c55ca84447d16b92": "これらの行についてエージェントに質問…", - "dd4d954561a97a95": "エージェントに質問", "16929a241a6bc9e3": "{total, plural, other {削除されたコード、差分 {total} 行中 {shown} 行を表示}}", "f21833072d416544": "{total, plural, other {差分 {total} 行中 {shown} 行を表示}}", "26db306011e06483": "{path} をコードで開く", + "c55ca84447d16b92": "これらの行についてエージェントに質問…", + "dd4d954561a97a95": "エージェントに質問", "150a57dcd79b7ff4": [ { "i": 1, diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index a8e4420475211..6350910021cf6 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "스레드", "0001ae5846061bb6": "{machine}의 스레드", "eef7f4dacbc3c3f2": "머신", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {검토 가이드 {started}개 시작 시도함, {failed}개 실패}}", "672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}", "5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}", + "a60e5be5b4865ce9": "{count, plural, other {풀 리퀘스트 {count}개를 읽음}}", + "c74296822829ad9d": "{count, plural, other {풀 리퀘스트 {count}개 읽기를 시도함}}", + "833fc9b60bf40749": "{count, plural, other {풀 리퀘스트 목록을 {count}번 조회함}}", + "ccae2617d4c92f7d": "{count, plural, other {풀 리퀘스트 목록 조회를 {count}번 시도함}}", + "630a8e9a6597b5de": "{count, plural, other {풀 리퀘스트 {count}개 열기를 시도함}}", + "af6bb8e1d69c255f": "{count, plural, other {열린 풀 리퀘스트 {count}개를 찾음}}", + "c1751c0d62ccacb0": "{count, plural, other {풀 리퀘스트 {count}개를 엶}}", + "6963f76ce8860984": "{opened, plural, other {풀 리퀘스트 {opened}개를 열고, 열린 풀 리퀘스트 {existing}개를 찾음}}", + "b64d48025a0904a5": "{count, plural, other {풀 리퀘스트 {count}개를 업데이트함}}", + "f62092fc584c5dcc": "{count, plural, other {풀 리퀘스트 {count}개 업데이트를 시도함}}", + "23cc59ef4ccb7a85": "{count, plural, other {풀 리퀘스트에 {count}번 응답함}}", + "2b682a59792b6c07": "{count, plural, other {풀 리퀘스트 응답을 {count}번 시도함}}", + "998ef072ea79ff62": "{count, plural, other {풀 리퀘스트 {count}개 병합을 시도함}}", + "80e8102a93dc5a75": "{count, plural, other {풀 리퀘스트 {count}개를 병합 대기열에 넣음}}", + "a742473f42c9a609": "{count, plural, other {풀 리퀘스트 {count}개를 병합함}}", + "40e3528651297351": "{merged, plural, other {풀 리퀘스트 {merged}개를 병합하고 {queued}개를 대기열에 넣음}}", + "8146ee71f7426683": "{count, plural, other {풀 리퀘스트 {count}개를 검토함}}", + "638678077ba2e050": "{count, plural, other {풀 리퀘스트 {count}개 검토를 시도함}}", "420bea546d5f8802": "스레드 복사됨", "2efb2dd3bf170f67": "스레드를 복사하지 못했습니다", "6c03545936b55e0b": "PR 링크 복사됨", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "풀 리퀘스트 지켜보기 중지", "52b8917fbd7ea9d5": "검토 가이드 작성", "722d3fd5ecc61ff3": "검토 가이드 읽기", + "96d54fd56d8b65ce": "풀 리퀘스트 읽기", + "1af212db47b37813": "풀 리퀘스트 목록 보기", + "a01b71c7c36d05f5": "풀 리퀘스트 열기", + "5ddfea667ccceecf": "풀 리퀘스트 업데이트", + "c87d85c418b791a5": "풀 리퀘스트에 응답", + "4bcd613be5a48aa2": "풀 리퀘스트 검토", + "81b284c3afb54ec6": "풀 리퀘스트 병합", "3227c712130a4187": "이슈 목록 조회", "3f461f26681450d6": "이슈 읽기", "fff9316cf5e449b4": "이슈 작성", @@ -4592,13 +4616,14 @@ "6d00220bfee72afd": "연결되지 않음: 메시지를 보내지 않았습니다", "f62c43120e8c60e7": "환경에 다시 연결하는 중입니다. 연결되면 다시 시도하세요.", "74e7e5c0536cda02": "사이드 채팅이 시작되지 않음", + "87d59d5dbb3eaf83": "첨부된 스레드가 다른 머신에 있습니다", + "4236b99f3807de4b": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나, 보내려면 해당 머신으로 다시 전환하세요.", + "811b25d99525bcf7": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나 {owner}(으)로 다시 전환한 후 보내세요.", "faf9ee0a28119e10": "첨부 파일과 컨텍스트를 제거한 다음 다시 보내세요.", + "d6783ef5e11f3e89": "사이드 채팅을 시작할 수 없습니다.", "1778ba2f32077b39": "여러 모델을 시작하기 전에 이 서버를 업데이트하세요.", "736caccf2954a7f5": "모델과 기본 브랜치를 선택하세요", "d08959c85dad0ed0": "여러 모델을 사용하려면 Git 프로젝트에 새 스레드가 필요합니다. 각 모델은 자체 워크트리를 받습니다.", - "87d59d5dbb3eaf83": "첨부된 스레드가 다른 머신에 있습니다", - "4236b99f3807de4b": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나, 보내려면 해당 머신으로 다시 전환하세요.", - "811b25d99525bcf7": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나 {owner}(으)로 다시 전환한 후 보내세요.", "55f9621a69825e20": "대기열 메시지가 업데이트되지 않음", "1072fb0e2846f2a4": "대기열 메시지는 사이드 채팅으로 옮길 수 없습니다. 저장하려면 /side 또는 /btw를 제거하세요.", "170ab9bcffd26887": "먼저 Codex 스레드를 시작하세요", @@ -4694,7 +4719,6 @@ "f2f589819f1d5aaf": "메시지에는 첨부 파일을 최대 {max}개까지 넣을 수 있습니다.", "83611d16e98f2bbb": "이전 편집 내용이 저장되었습니다. 최근 변경 사항을 검토한 후 다시 저장하세요.", "e7c78c337f470f5a": "브라우저를 열 수 없습니다", - "d6783ef5e11f3e89": "사이드 채팅을 시작할 수 없습니다.", "093c70146c496264": "사이드 채팅이 생성되었지만 이 클라이언트에 도달하지 않았습니다.", "0efeaa8d0ca3a757": "사이드 채팅을 더 이상 사용할 수 없습니다.", "61fc2531d076d396": "사이드 채팅의 권한 모드를 설정할 수 없습니다.", @@ -5687,6 +5711,7 @@ "b6a29fff7c7c0808": "없음", "54420465784bb1bd": "이전 댓글 불러오기", "9d82ebf35bfb4043": "아직 활동이 없습니다.", + "1cf216566c1ee064": "사용할 수 없는 프로젝트", "b5ddadeb0810688c": "상태", "93c1fc19d9bf1db0": "참여", "2160067266a61dd8": "전체", @@ -6201,6 +6226,7 @@ "fefd41dda4eb7cf7": "파일에서 보기", "398ff9f721cbf2ad": "DNS 주소를 찾을 수 없습니다", "56d5c9e464dc0d96": "연결이 거부되었습니다", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "연결이 재설정되었습니다", "b32a80332be0120c": "연결이 닫혔습니다", "ed6643fea556af65": "연결 시간이 초과되었습니다", @@ -9816,7 +9842,6 @@ "573ea5fdf293a9d6": "모든 체크아웃", "470ad8c54049d1e1": "체크아웃 검색", "7e2dfdd9f97fc027": "프로젝트 범위", - "1cf216566c1ee064": "사용할 수 없는 프로젝트", "c1b8c351aa90f319": [ { "t": "span", @@ -11956,11 +11981,11 @@ "628799e25f2ae9fd": "시트", "60aa1b1bd2558b88": "{count}+페이지", "59dff62c096fda75": "미리 보기는 1,000페이지로 제한됩니다.", - "c55ca84447d16b92": "이 줄에 대해 에이전트에게 질문…", - "dd4d954561a97a95": "에이전트에게 질문", "16929a241a6bc9e3": "{total, plural, other {삭제된 코드, 변경 줄 {total}개 중 {shown}개 표시}}", "f21833072d416544": "{total, plural, other {변경 줄 {total}개 중 {shown}개 표시}}", "26db306011e06483": "{path}을(를) 코드에서 열기", + "c55ca84447d16b92": "이 줄에 대해 에이전트에게 질문…", + "dd4d954561a97a95": "에이전트에게 질문", "150a57dcd79b7ff4": [ { "i": 1, diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 7774a31c9acc9..a8b4b1b19b73a 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Thread", "0001ae5846061bb6": "Thread em {machine}", "eef7f4dacbc3c3f2": "Máquina", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Tentou iniciar {started} guia de revisão, {failed} com falha} other {Tentou iniciar {started} guias de revisão, {failed} com falha}}", "672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}", "5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}", + "a60e5be5b4865ce9": "{count, plural, one {Leu {count} pull request} other {Leu {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Tentou ler {count} pull request} other {Tentou ler {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listou pull requests {count} vez} other {Listou pull requests {count} vezes}}", + "ccae2617d4c92f7d": "{count, plural, one {Tentou listar pull requests {count} vez} other {Tentou listar pull requests {count} vezes}}", + "630a8e9a6597b5de": "{count, plural, one {Tentou abrir {count} pull request} other {Tentou abrir {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Encontrou {count} pull request aberto} other {Encontrou {count} pull requests abertos}}", + "c1751c0d62ccacb0": "{count, plural, one {Abriu {count} pull request} other {Abriu {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Abriu {opened} pull request, encontrou {existing} abertos} other {Abriu {opened} pull requests, encontrou {existing} abertos}}", + "b64d48025a0904a5": "{count, plural, one {Atualizou {count} pull request} other {Atualizou {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Tentou atualizar {count} pull request} other {Tentou atualizar {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Respondeu em pull requests {count} vez} other {Respondeu em pull requests {count} vezes}}", + "2b682a59792b6c07": "{count, plural, one {Tentou responder em pull requests {count} vez} other {Tentou responder em pull requests {count} vezes}}", + "998ef072ea79ff62": "{count, plural, one {Tentou mesclar {count} pull request} other {Tentou mesclar {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Enfileirou {count} pull request para mesclar} other {Enfileirou {count} pull requests para mesclar}}", + "a742473f42c9a609": "{count, plural, one {Mesclou {count} pull request} other {Mesclou {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Mesclou {merged} pull request, {queued} na fila} other {Mesclou {merged} pull requests, {queued} na fila}}", + "8146ee71f7426683": "{count, plural, one {Revisou {count} pull request} other {Revisou {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Tentou revisar {count} pull request} other {Tentou revisar {count} pull requests}}", "420bea546d5f8802": "Thread copiada", "2efb2dd3bf170f67": "Falha ao copiar a thread", "6c03545936b55e0b": "Link do PR copiado", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Parar de acompanhar um pull request", "52b8917fbd7ea9d5": "Escrever guias de revisão", "722d3fd5ecc61ff3": "Ler um guia de revisão", + "96d54fd56d8b65ce": "Ler um pull request", + "1af212db47b37813": "Listar pull requests", + "a01b71c7c36d05f5": "Abrir um pull request", + "5ddfea667ccceecf": "Atualizar um pull request", + "c87d85c418b791a5": "Responder em um pull request", + "4bcd613be5a48aa2": "Revisar um pull request", + "81b284c3afb54ec6": "Mesclar um pull request", "3227c712130a4187": "Listar issues", "3f461f26681450d6": "Ler uma issue", "fff9316cf5e449b4": "Abrir uma issue", @@ -4605,13 +4629,14 @@ "6d00220bfee72afd": "Não conectado: mensagem não enviada", "f62c43120e8c60e7": "Reconectando ao ambiente. Tente novamente quando estiver conectado.", "74e7e5c0536cda02": "Chat paralelo não iniciado", + "87d59d5dbb3eaf83": "A thread anexada está em outra máquina", + "4236b99f3807de4b": "O agente desta máquina não consegue ler \"{title}\". Remova-o ou volte para a máquina dele para enviar.", + "811b25d99525bcf7": "O agente desta máquina não consegue ler \"{title}\". Remova-a ou volte para {owner} para enviar.", "faf9ee0a28119e10": "Remova os anexos e o contexto e envie novamente.", + "d6783ef5e11f3e89": "Não foi possível iniciar um chat paralelo.", "1778ba2f32077b39": "Atualize este servidor antes de iniciar vários modelos.", "736caccf2954a7f5": "Escolha os modelos e um branch base", "d08959c85dad0ed0": "Vários modelos exigem uma nova thread em um projeto Git. Cada um ganha o próprio worktree.", - "87d59d5dbb3eaf83": "A thread anexada está em outra máquina", - "4236b99f3807de4b": "O agente desta máquina não consegue ler \"{title}\". Remova-o ou volte para a máquina dele para enviar.", - "811b25d99525bcf7": "O agente desta máquina não consegue ler \"{title}\". Remova-a ou volte para {owner} para enviar.", "55f9621a69825e20": "Mensagem na fila não atualizada", "1072fb0e2846f2a4": "Uma mensagem na fila não pode ir para um chat paralelo. Remova /side ou /btw para salvá-la.", "170ab9bcffd26887": "Inicie uma thread no Codex primeiro", @@ -4707,7 +4732,6 @@ "f2f589819f1d5aaf": "Uma mensagem pode ter no máximo {max} anexos.", "83611d16e98f2bbb": "A edição anterior foi salva. Revise suas alterações mais recentes e salve novamente.", "e7c78c337f470f5a": "Não foi possível abrir o navegador", - "d6783ef5e11f3e89": "Não foi possível iniciar um chat paralelo.", "093c70146c496264": "O chat paralelo foi criado, mas não chegou a este cliente.", "0efeaa8d0ca3a757": "O chat paralelo não está mais disponível.", "61fc2531d076d396": "Não foi possível definir o modo de permissão do chat paralelo.", @@ -5706,6 +5730,7 @@ "b6a29fff7c7c0808": "Ninguém", "54420465784bb1bd": "Carregar comentários mais antigos", "9d82ebf35bfb4043": "Nada aconteceu aqui ainda.", + "1cf216566c1ee064": "Projeto indisponível", "b5ddadeb0810688c": "Estado", "93c1fc19d9bf1db0": "Envolvimento", "2160067266a61dd8": "Qualquer", @@ -6229,6 +6254,7 @@ "fefd41dda4eb7cf7": "Mostrar em Arquivos", "398ff9f721cbf2ad": "Não foi possível encontrar o endereço DNS", "56d5c9e464dc0d96": "Conexão recusada", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "A conexão foi redefinida", "b32a80332be0120c": "A conexão foi fechada", "ed6643fea556af65": "A conexão atingiu o tempo limite", @@ -9860,7 +9886,6 @@ "573ea5fdf293a9d6": "Todos os checkouts", "470ad8c54049d1e1": "Pesquisar checkouts", "7e2dfdd9f97fc027": "Escopo de projeto", - "1cf216566c1ee064": "Projeto indisponível", "c1b8c351aa90f319": [ { "t": "span", @@ -12008,11 +12033,11 @@ "628799e25f2ae9fd": "Planilhas", "60aa1b1bd2558b88": "{count}+ páginas", "59dff62c096fda75": "Pré-visualização limitada a 1.000 páginas.", - "c55ca84447d16b92": "Pergunte ao agente sobre estas linhas…", - "dd4d954561a97a95": "Perguntar ao agente", "16929a241a6bc9e3": "{total, plural, one {código removido, mostrando {shown} de {total} linha do diff} other {código removido, mostrando {shown} de {total} linhas do diff}}", "f21833072d416544": "{total, plural, one {mostrando {shown} de {total} linha do diff} other {mostrando {shown} de {total} linhas do diff}}", "26db306011e06483": "Abrir {path} em Código", + "c55ca84447d16b92": "Pergunte ao agente sobre estas linhas…", + "dd4d954561a97a95": "Perguntar ao agente", "150a57dcd79b7ff4": [ "Carregando ", { diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 5badc3992e1c6..429ecccc49639 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Тред", "0001ae5846061bb6": "Тред на {machine}", "eef7f4dacbc3c3f2": "Машина", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Попытка начать {started} руководство по ревью, ошибок: {failed}} few {Попытка начать {started} руководства по ревью, ошибок: {failed}} many {Попытка начать {started} руководств по ревью, ошибок: {failed}} other {Попытка начать {started} руководства по ревью, ошибок: {failed}}}", "672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}", "5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}", + "a60e5be5b4865ce9": "{count, plural, one {Прочитано {count} пул-реквест} few {Прочитано {count} пул-реквеста} many {Прочитано {count} пул-реквестов} other {Прочитано {count} пул-реквеста}}", + "c74296822829ad9d": "{count, plural, one {Не удалось прочитать {count} пул-реквест} few {Не удалось прочитать {count} пул-реквеста} many {Не удалось прочитать {count} пул-реквестов} other {Не удалось прочитать {count} пул-реквеста}}", + "833fc9b60bf40749": "{count, plural, one {Список пул-реквестов получен {count} раз} few {Список пул-реквестов получен {count} раза} many {Список пул-реквестов получен {count} раз} other {Список пул-реквестов получен {count} раза}}", + "ccae2617d4c92f7d": "{count, plural, one {Попытка получить список пул-реквестов: {count} раз} few {Попытка получить список пул-реквестов: {count} раза} many {Попытка получить список пул-реквестов: {count} раз} other {Попытка получить список пул-реквестов: {count} раза}}", + "630a8e9a6597b5de": "{count, plural, one {Не удалось открыть {count} пул-реквест} few {Не удалось открыть {count} пул-реквеста} many {Не удалось открыть {count} пул-реквестов} other {Не удалось открыть {count} пул-реквеста}}", + "af6bb8e1d69c255f": "{count, plural, one {Найден {count} открытый пул-реквест} few {Найдено {count} открытых пул-реквеста} many {Найдено {count} открытых пул-реквестов} other {Найдено {count} открытого пул-реквеста}}", + "c1751c0d62ccacb0": "{count, plural, one {Открыто {count} пул-реквест} few {Открыто {count} пул-реквеста} many {Открыто {count} пул-реквестов} other {Открыто {count} пул-реквеста}}", + "6963f76ce8860984": "{opened, plural, one {Открыт {opened} пул-реквест, найдено открытых: {existing}} few {Открыто {opened} пул-реквеста, найдено открытых: {existing}} many {Открыто {opened} пул-реквестов, найдено открытых: {existing}} other {Открыто {opened} пул-реквеста, найдено открытых: {existing}}}", + "b64d48025a0904a5": "{count, plural, one {Обновлено {count} пул-реквест} few {Обновлено {count} пул-реквеста} many {Обновлено {count} пул-реквестов} other {Обновлено {count} пул-реквеста}}", + "f62092fc584c5dcc": "{count, plural, one {Не удалось обновить {count} пул-реквест} few {Не удалось обновить {count} пул-реквеста} many {Не удалось обновить {count} пул-реквестов} other {Не удалось обновить {count} пул-реквеста}}", + "23cc59ef4ccb7a85": "{count, plural, one {Ответ в пул-реквестах: {count} раз} few {Ответ в пул-реквестах: {count} раза} many {Ответ в пул-реквестах: {count} раз} other {Ответ в пул-реквестах: {count} раза}}", + "2b682a59792b6c07": "{count, plural, one {Попытка ответить в пул-реквестах: {count} раз} few {Попытка ответить в пул-реквестах: {count} раза} many {Попытка ответить в пул-реквестах: {count} раз} other {Попытка ответить в пул-реквестах: {count} раза}}", + "998ef072ea79ff62": "{count, plural, one {Не удалось слить {count} пул-реквест} few {Не удалось слить {count} пул-реквеста} many {Не удалось слить {count} пул-реквестов} other {Не удалось слить {count} пул-реквеста}}", + "80e8102a93dc5a75": "{count, plural, one {В очередь на слияние поставлен {count} пул-реквест} few {В очередь на слияние поставлено {count} пул-реквеста} many {В очередь на слияние поставлено {count} пул-реквестов} other {В очередь на слияние поставлено {count} пул-реквеста}}", + "a742473f42c9a609": "{count, plural, one {Слито {count} пул-реквест} few {Слито {count} пул-реквеста} many {Слито {count} пул-реквестов} other {Слито {count} пул-реквеста}}", + "40e3528651297351": "{merged, plural, one {Слит {merged} пул-реквест, в очереди: {queued}} few {Слито {merged} пул-реквеста, в очереди: {queued}} many {Слито {merged} пул-реквестов, в очереди: {queued}} other {Слито {merged} пул-реквеста, в очереди: {queued}}}", + "8146ee71f7426683": "{count, plural, one {Проверено {count} пул-реквест} few {Проверено {count} пул-реквеста} many {Проверено {count} пул-реквестов} other {Проверено {count} пул-реквеста}}", + "638678077ba2e050": "{count, plural, one {Не удалось проверить {count} пул-реквест} few {Не удалось проверить {count} пул-реквеста} many {Не удалось проверить {count} пул-реквестов} other {Не удалось проверить {count} пул-реквеста}}", "420bea546d5f8802": "Тред скопирован", "2efb2dd3bf170f67": "Не удалось скопировать тред", "6c03545936b55e0b": "Ссылка на PR скопирована", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Прекратить отслеживание пул-реквеста", "52b8917fbd7ea9d5": "Написать руководства по ревью", "722d3fd5ecc61ff3": "Прочитать руководство по ревью", + "96d54fd56d8b65ce": "Прочитать пул-реквест", + "1af212db47b37813": "Список пул-реквестов", + "a01b71c7c36d05f5": "Открыть пул-реквест", + "5ddfea667ccceecf": "Обновить пул-реквест", + "c87d85c418b791a5": "Ответить в пул-реквесте", + "4bcd613be5a48aa2": "Проверить пул-реквест", + "81b284c3afb54ec6": "Слить пул-реквест", "3227c712130a4187": "Получить список issue", "3f461f26681450d6": "Прочитать issue", "fff9316cf5e449b4": "Создать issue", @@ -4605,13 +4629,14 @@ "6d00220bfee72afd": "Нет подключения: сообщение не отправлено", "f62c43120e8c60e7": "Переподключение к окружению. Повторите, когда подключение восстановится.", "74e7e5c0536cda02": "Боковой чат не начат", + "87d59d5dbb3eaf83": "Прикреплённый тред находится на другой машине", + "4236b99f3807de4b": "Агент этого компьютера не может прочитать «{title}». Удалите его или вернитесь на его компьютер, чтобы отправить.", + "811b25d99525bcf7": "Агент этой машины не может прочитать «{title}». Удалите его или переключитесь обратно на {owner}, чтобы отправить.", "faf9ee0a28119e10": "Удалите вложения и контекст, затем отправьте снова.", + "d6783ef5e11f3e89": "Не удалось начать боковой чат.", "1778ba2f32077b39": "Обновите этот сервер, прежде чем запускать несколько моделей.", "736caccf2954a7f5": "Выберите модели и базовую ветку", "d08959c85dad0ed0": "Для нескольких моделей нужен новый тред в Git-проекте. Каждая получит своё рабочее дерево.", - "87d59d5dbb3eaf83": "Прикреплённый тред находится на другой машине", - "4236b99f3807de4b": "Агент этого компьютера не может прочитать «{title}». Удалите его или вернитесь на его компьютер, чтобы отправить.", - "811b25d99525bcf7": "Агент этой машины не может прочитать «{title}». Удалите его или переключитесь обратно на {owner}, чтобы отправить.", "55f9621a69825e20": "Сообщение в очереди не обновлено", "1072fb0e2846f2a4": "Сообщение в очереди нельзя перенести в боковой чат. Удалите /side или /btw, чтобы сохранить его.", "170ab9bcffd26887": "Сначала начните тред Codex", @@ -4707,7 +4732,6 @@ "f2f589819f1d5aaf": "В сообщении может быть не более {max} вложений.", "83611d16e98f2bbb": "Предыдущая правка сохранена. Проверьте новые изменения и сохраните снова.", "e7c78c337f470f5a": "Не удалось открыть браузер", - "d6783ef5e11f3e89": "Не удалось начать боковой чат.", "093c70146c496264": "Боковой чат создан, но не дошёл до этого клиента.", "0efeaa8d0ca3a757": "Боковой чат больше недоступен.", "61fc2531d076d396": "Не удалось задать режим разрешений бокового чата.", @@ -5706,6 +5730,7 @@ "b6a29fff7c7c0808": "Нет", "54420465784bb1bd": "Загрузить старые комментарии", "9d82ebf35bfb4043": "Здесь пока ничего не происходило.", + "1cf216566c1ee064": "Проект недоступен", "b5ddadeb0810688c": "Состояние", "93c1fc19d9bf1db0": "Участие", "2160067266a61dd8": "Любая", @@ -6229,6 +6254,7 @@ "fefd41dda4eb7cf7": "Показать в «Файлах»", "398ff9f721cbf2ad": "Не удалось найти DNS-адрес", "56d5c9e464dc0d96": "Подключение отклонено", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "Подключение сброшено", "b32a80332be0120c": "Подключение закрыто", "ed6643fea556af65": "Истекло время подключения", @@ -9863,7 +9889,6 @@ "573ea5fdf293a9d6": "Все копии", "470ad8c54049d1e1": "Поиск копий", "7e2dfdd9f97fc027": "Область проектов", - "1cf216566c1ee064": "Проект недоступен", "c1b8c351aa90f319": [ { "t": "span", @@ -12009,11 +12034,11 @@ "628799e25f2ae9fd": "Листы", "60aa1b1bd2558b88": "{count}+ страниц", "59dff62c096fda75": "Предпросмотр ограничен 1000 страницами.", - "c55ca84447d16b92": "Спросить агента об этих строках…", - "dd4d954561a97a95": "Спросить агента", "16929a241a6bc9e3": "{total, plural, one {удалённый код, показано {shown} из {total} строки диффа} few {удалённый код, показано {shown} из {total} строк диффа} many {удалённый код, показано {shown} из {total} строк диффа} other {удалённый код, показано {shown} из {total} строки диффа}}", "f21833072d416544": "{total, plural, one {показано {shown} из {total} строки диффа} few {показано {shown} из {total} строк диффа} many {показано {shown} из {total} строк диффа} other {показано {shown} из {total} строки диффа}}", "26db306011e06483": "Открыть {path} во вкладке «Код»", + "c55ca84447d16b92": "Спросить агента об этих строках…", + "dd4d954561a97a95": "Спросить агента", "150a57dcd79b7ff4": [ "Загрузка ", { diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index c989d45dccd1e..5c4703dd906ad 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "Tråd", "0001ae5846061bb6": "Tråd på {machine}", "eef7f4dacbc3c3f2": "Dator", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, one {Försökte starta {started} granskningsguide, {failed} misslyckades} other {Försökte starta {started} granskningsguider, {failed} misslyckades}}", "672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}", "5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}", + "a60e5be5b4865ce9": "{count, plural, one {Läste {count} pull request} other {Läste {count} pull requests}}", + "c74296822829ad9d": "{count, plural, one {Försökte läsa {count} pull request} other {Försökte läsa {count} pull requests}}", + "833fc9b60bf40749": "{count, plural, one {Listade pull requests {count} gång} other {Listade pull requests {count} gånger}}", + "ccae2617d4c92f7d": "{count, plural, one {Försökte lista pull requests {count} gång} other {Försökte lista pull requests {count} gånger}}", + "630a8e9a6597b5de": "{count, plural, one {Försökte öppna {count} pull request} other {Försökte öppna {count} pull requests}}", + "af6bb8e1d69c255f": "{count, plural, one {Hittade {count} öppen pull request} other {Hittade {count} öppna pull requests}}", + "c1751c0d62ccacb0": "{count, plural, one {Öppnade {count} pull request} other {Öppnade {count} pull requests}}", + "6963f76ce8860984": "{opened, plural, one {Öppnade {opened} pull request, hittade {existing} öppna} other {Öppnade {opened} pull requests, hittade {existing} öppna}}", + "b64d48025a0904a5": "{count, plural, one {Uppdaterade {count} pull request} other {Uppdaterade {count} pull requests}}", + "f62092fc584c5dcc": "{count, plural, one {Försökte uppdatera {count} pull request} other {Försökte uppdatera {count} pull requests}}", + "23cc59ef4ccb7a85": "{count, plural, one {Svarade på pull requests {count} gång} other {Svarade på pull requests {count} gånger}}", + "2b682a59792b6c07": "{count, plural, one {Försökte svara på pull requests {count} gång} other {Försökte svara på pull requests {count} gånger}}", + "998ef072ea79ff62": "{count, plural, one {Försökte merga {count} pull request} other {Försökte merga {count} pull requests}}", + "80e8102a93dc5a75": "{count, plural, one {Köade {count} pull request för merge} other {Köade {count} pull requests för merge}}", + "a742473f42c9a609": "{count, plural, one {Mergade {count} pull request} other {Mergade {count} pull requests}}", + "40e3528651297351": "{merged, plural, one {Mergade {merged} pull request, köade {queued}} other {Mergade {merged} pull requests, köade {queued}}}", + "8146ee71f7426683": "{count, plural, one {Granskade {count} pull request} other {Granskade {count} pull requests}}", + "638678077ba2e050": "{count, plural, one {Försökte granska {count} pull request} other {Försökte granska {count} pull requests}}", "420bea546d5f8802": "Tråden kopierades", "2efb2dd3bf170f67": "Det gick inte att kopiera tråden", "6c03545936b55e0b": "PR-länken kopierades", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "Sluta bevaka en pull request", "52b8917fbd7ea9d5": "Skriv granskningsguider", "722d3fd5ecc61ff3": "Läs en granskningsguide", + "96d54fd56d8b65ce": "Läs en pull request", + "1af212db47b37813": "Lista pull requests", + "a01b71c7c36d05f5": "Öppna en pull request", + "5ddfea667ccceecf": "Uppdatera en pull request", + "c87d85c418b791a5": "Svara på en pull request", + "4bcd613be5a48aa2": "Granska en pull request", + "81b284c3afb54ec6": "Merga en pull request", "3227c712130a4187": "Lista ärenden", "3f461f26681450d6": "Läs ett ärende", "fff9316cf5e449b4": "Skapa ett ärende", @@ -4606,13 +4630,14 @@ "6d00220bfee72afd": "Inte ansluten: meddelandet skickades inte", "f62c43120e8c60e7": "Återansluter till miljön. Försök igen när den är ansluten.", "74e7e5c0536cda02": "Sidochatten startades inte", + "87d59d5dbb3eaf83": "Den bifogade tråden finns på en annan dator", + "4236b99f3807de4b": "Agenten på den här datorn kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till dess dator för att skicka.", + "811b25d99525bcf7": "Den här datorns agent kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till {owner} för att skicka.", "faf9ee0a28119e10": "Ta bort bilagorna och kontexten och skicka sedan igen.", + "d6783ef5e11f3e89": "Kunde inte starta en sidochatt.", "1778ba2f32077b39": "Uppdatera den här servern innan du startar flera modeller.", "736caccf2954a7f5": "Välj modeller och en basgren", "d08959c85dad0ed0": "Flera modeller kräver en ny tråd i ett Git-projekt. Var och en får sin egen worktree.", - "87d59d5dbb3eaf83": "Den bifogade tråden finns på en annan dator", - "4236b99f3807de4b": "Agenten på den här datorn kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till dess dator för att skicka.", - "811b25d99525bcf7": "Den här datorns agent kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till {owner} för att skicka.", "55f9621a69825e20": "Det köade meddelandet uppdaterades inte", "1072fb0e2846f2a4": "Ett köat meddelande kan inte flyttas till en sidochatt. Ta bort /side eller /btw för att spara det.", "170ab9bcffd26887": "Starta en Codex-tråd först", @@ -4708,7 +4733,6 @@ "f2f589819f1d5aaf": "Ett meddelande kan ha högst {max} bilagor.", "83611d16e98f2bbb": "Den tidigare ändringen sparades. Granska dina nyare ändringar och spara igen.", "e7c78c337f470f5a": "Det gick inte att öppna webbläsaren", - "d6783ef5e11f3e89": "Kunde inte starta en sidochatt.", "093c70146c496264": "Sidochatten skapades, men den nådde inte den här klienten.", "0efeaa8d0ca3a757": "Sidochatten är inte längre tillgänglig.", "61fc2531d076d396": "Kunde inte ange sidochattens behörighetsläge.", @@ -5707,6 +5731,7 @@ "b6a29fff7c7c0808": "Ingen", "54420465784bb1bd": "Läs in äldre kommentarer", "9d82ebf35bfb4043": "Inget har hänt här än.", + "1cf216566c1ee064": "Projektet är inte tillgängligt", "b5ddadeb0810688c": "Status", "93c1fc19d9bf1db0": "Inblandning", "2160067266a61dd8": "Alla", @@ -6231,6 +6256,7 @@ "fefd41dda4eb7cf7": "Visa i Filer", "398ff9f721cbf2ad": "DNS-adressen kunde inte hittas", "56d5c9e464dc0d96": "Anslutningen nekades", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "Anslutningen återställdes", "b32a80332be0120c": "Anslutningen stängdes", "ed6643fea556af65": "Anslutningen fick timeout", @@ -9869,7 +9895,6 @@ "573ea5fdf293a9d6": "Alla utcheckningar", "470ad8c54049d1e1": "Sök utcheckningar", "7e2dfdd9f97fc027": "Projektomfång", - "1cf216566c1ee064": "Projektet är inte tillgängligt", "c1b8c351aa90f319": [ { "t": "span", @@ -12017,11 +12042,11 @@ "628799e25f2ae9fd": "Blad", "60aa1b1bd2558b88": "{count}+ sidor", "59dff62c096fda75": "Förhandsvisningen är begränsad till 1 000 sidor.", - "c55ca84447d16b92": "Fråga agenten om de här raderna…", - "dd4d954561a97a95": "Fråga agenten", "16929a241a6bc9e3": "{total, plural, one {borttagen kod, visar {shown} av {total} diff-rad} other {borttagen kod, visar {shown} av {total} diff-rader}}", "f21833072d416544": "{total, plural, one {visar {shown} av {total} diff-rad} other {visar {shown} av {total} diff-rader}}", "26db306011e06483": "Öppna {path} i Kod", + "c55ca84447d16b92": "Fråga agenten om de här raderna…", + "dd4d954561a97a95": "Fråga agenten", "150a57dcd79b7ff4": [ "Läser in ", { diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index b74a6631969c1..017e5db62451d 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -1,5 +1,4 @@ { - "4052bd9a2478988d": "Could not reach this port on the environment", "23be753133ae6950": "会话", "0001ae5846061bb6": "{machine} 上的会话", "eef7f4dacbc3c3f2": "机器", @@ -307,6 +306,24 @@ "1b659e38a50d9bc5": "{started, plural, other {尝试开始 {started} 份审查导览,{failed} 份失败}}", "672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}", "5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}", + "a60e5be5b4865ce9": "{count, plural, other {已读取 {count} 个 PR}}", + "c74296822829ad9d": "{count, plural, other {尝试读取 {count} 个 PR}}", + "833fc9b60bf40749": "{count, plural, other {列出 PR {count} 次}}", + "ccae2617d4c92f7d": "{count, plural, other {尝试列出 PR {count} 次}}", + "630a8e9a6597b5de": "{count, plural, other {尝试创建 {count} 个 PR}}", + "af6bb8e1d69c255f": "{count, plural, other {找到 {count} 个打开的 PR}}", + "c1751c0d62ccacb0": "{count, plural, other {已创建 {count} 个 PR}}", + "6963f76ce8860984": "{opened, plural, other {已创建 {opened} 个 PR,找到 {existing} 个打开的 PR}}", + "b64d48025a0904a5": "{count, plural, other {已更新 {count} 个 PR}}", + "f62092fc584c5dcc": "{count, plural, other {尝试更新 {count} 个 PR}}", + "23cc59ef4ccb7a85": "{count, plural, other {在 PR 上回复 {count} 次}}", + "2b682a59792b6c07": "{count, plural, other {尝试在 PR 上回复 {count} 次}}", + "998ef072ea79ff62": "{count, plural, other {尝试合并 {count} 个 PR}}", + "80e8102a93dc5a75": "{count, plural, other {已将 {count} 个 PR 加入合并队列}}", + "a742473f42c9a609": "{count, plural, other {已合并 {count} 个 PR}}", + "40e3528651297351": "{merged, plural, other {已合并 {merged} 个 PR,{queued} 个在队列中}}", + "8146ee71f7426683": "{count, plural, other {已审查 {count} 个 PR}}", + "638678077ba2e050": "{count, plural, other {尝试审查 {count} 个 PR}}", "420bea546d5f8802": "已复制会话", "2efb2dd3bf170f67": "无法复制会话", "6c03545936b55e0b": "已复制 PR 链接", @@ -1042,6 +1059,13 @@ "96ac3f7e2336b02b": "停止关注 PR", "52b8917fbd7ea9d5": "编写审查导览", "722d3fd5ecc61ff3": "读取审查导览", + "96d54fd56d8b65ce": "读取 PR", + "1af212db47b37813": "列出 PR", + "a01b71c7c36d05f5": "创建 PR", + "5ddfea667ccceecf": "更新 PR", + "c87d85c418b791a5": "在 PR 上回复", + "4bcd613be5a48aa2": "审查 PR", + "81b284c3afb54ec6": "合并 PR", "3227c712130a4187": "列出 issue", "3f461f26681450d6": "读取 issue", "fff9316cf5e449b4": "提交 issue", @@ -4612,13 +4636,14 @@ "6d00220bfee72afd": "未连接:消息没有发送", "f62c43120e8c60e7": "正在重新连接环境,连接后请重试。", "74e7e5c0536cda02": "侧聊未开始", + "87d59d5dbb3eaf83": "附加的会话在另一台机器上", + "4236b99f3807de4b": "此机器上的智能体无法读取“{title}”。请将其移除,或切换回其所在机器后发送。", + "811b25d99525bcf7": "此机器的智能体无法读取“{title}”。请将其移除,或切换回 {owner} 再发送。", "faf9ee0a28119e10": "请移除附件和上下文后再发送。", + "d6783ef5e11f3e89": "无法开始侧聊。", "1778ba2f32077b39": "请先更新此服务器,再同时启动多个模型。", "736caccf2954a7f5": "请选择模型和基准分支", "d08959c85dad0ed0": "多模型需要在 Git 项目中新建会话,每个模型各有自己的工作树。", - "87d59d5dbb3eaf83": "附加的会话在另一台机器上", - "4236b99f3807de4b": "此机器上的智能体无法读取“{title}”。请将其移除,或切换回其所在机器后发送。", - "811b25d99525bcf7": "此机器的智能体无法读取“{title}”。请将其移除,或切换回 {owner} 再发送。", "55f9621a69825e20": "排队消息未更新", "1072fb0e2846f2a4": "排队消息无法移到侧聊。请移除 /side 或 /btw 后保存。", "170ab9bcffd26887": "请先开始一个 Codex 会话", @@ -4714,7 +4739,6 @@ "f2f589819f1d5aaf": "一条消息最多可有 {max} 个附件。", "83611d16e98f2bbb": "之前的编辑已保存,请检查新改动后再次保存。", "e7c78c337f470f5a": "无法打开浏览器", - "d6783ef5e11f3e89": "无法开始侧聊。", "093c70146c496264": "侧聊已创建,但没有同步到此客户端。", "0efeaa8d0ca3a757": "这段侧聊已不可用。", "61fc2531d076d396": "无法设置侧聊的权限模式。", @@ -5713,6 +5737,7 @@ "b6a29fff7c7c0808": "无", "54420465784bb1bd": "加载较早的评论", "9d82ebf35bfb4043": "这里还没有任何动态。", + "1cf216566c1ee064": "项目不可用", "b5ddadeb0810688c": "状态", "93c1fc19d9bf1db0": "参与方式", "2160067266a61dd8": "任意", @@ -6237,6 +6262,7 @@ "fefd41dda4eb7cf7": "在“文件”中显示", "398ff9f721cbf2ad": "找不到 DNS 地址", "56d5c9e464dc0d96": "连接被拒绝", + "4052bd9a2478988d": "Could not reach this port on the environment", "844d9a45b55b8ddc": "连接已重置", "b32a80332be0120c": "连接已关闭", "ed6643fea556af65": "连接超时", @@ -9876,7 +9902,6 @@ "573ea5fdf293a9d6": "所有工作副本", "470ad8c54049d1e1": "搜索工作副本", "7e2dfdd9f97fc027": "项目范围", - "1cf216566c1ee064": "项目不可用", "c1b8c351aa90f319": [ { "t": "span", @@ -12034,11 +12059,11 @@ "628799e25f2ae9fd": "工作表", "60aa1b1bd2558b88": "{count}+ 页", "59dff62c096fda75": "预览仅限 1,000 页。", - "c55ca84447d16b92": "就这些代码行询问智能体…", - "dd4d954561a97a95": "询问智能体", "16929a241a6bc9e3": "{total, plural, other {已移除代码,显示 {total} 行差异中的 {shown} 行}}", "f21833072d416544": "{total, plural, other {显示 {total} 行差异中的 {shown} 行}}", "26db306011e06483": "在“代码”标签页中打开 {path}", + "c55ca84447d16b92": "就这些代码行询问智能体…", + "dd4d954561a97a95": "询问智能体", "150a57dcd79b7ff4": [ "正在加载 ", { diff --git a/docs/user/source-control.md b/docs/user/source-control.md index 73a2b95154d47..bc0d63e581f3c 100644 --- a/docs/user/source-control.md +++ b/docs/user/source-control.md @@ -317,6 +317,10 @@ pull request link in the conversation. Creating a pull request from Git actions and so does an agent creating one with `gh pr create` or `glab mr create`. Agents can link other pull requests with the `link_pull_request` tool. +Agents can also read, open, update, reply on, and merge pull requests in the thread's repository +through T3 Code's own tools, which use the same sign-in as the Pull requests page. An agent merges +only the commit it last read: if someone pushed since, the merge is refused. + Use **Link pull request to thread** in the command palette to keep a pull request with the thread. From a review on the Pull requests page, **Link to thread** lets you search for an active thread. The review header also lists the threads that link to it, including archived threads, so you can return to their context. diff --git a/evals/mcp-tool-use/cases/pull-requests.ndjson b/evals/mcp-tool-use/cases/pull-requests.ndjson index b07a121db42ad..1719435f6469d 100644 --- a/evals/mcp-tool-use/cases/pull-requests.ndjson +++ b/evals/mcp-tool-use/cases/pull-requests.ndjson @@ -37,5 +37,19 @@ {"id": "link-one-pr", "area": "pull-requests", "privacy": "commit-safe", "kind": "control", "pattern": "single link stays single", "experience": "Linking one named PR is ordinary work.", "setup": {"role": "top", "context": "No pull requests are linked to this thread.", "world": {"repo": "acme/app", "branch": "main"}}, "prompt": "link https://github.com/acme/app/pull/130 here", "expect": {"calls": [{"tool": "link_pull_request", "args": {"url": "~/pull/130"}}], "notCalls": ["link_pull_requests"]}, "maxSteps": 6, "source": {"thread": "Synthetic control for batch link"}} {"id": "schedule-one-time-date", "area": "pull-requests", "kind": "bad", "pattern": "one-off date scheduled as a daily task", "experience": "Theo asked whether a scheduled task can run at a specific date and time. schedule_task only had daily times, intervals, and webhooks, so a one-off request became a daily task.", "source": {"report": "maintainer request, 2026-10-31: scheduled tasks could not run at one date and time"}, "rule": "schedule: {type:'once',runAt} for one date and time", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"schedule_task": {"scheduledTaskId": "scheduled-task-4", "title": "Cut 2.0 release branch", "schedule": {"type": "once", "runAt": "2026-11-03T09:00:00.000Z"}, "enabled": true, "nextRunAt": "2026-11-03T09:00:00.000Z"}}}, "prompt": "On November 3rd at 9am UTC, start a new thread that cuts the 2.0 release branch from main in acme/app. Only that one time.", "expect": {"calls": [{"tool": "schedule_task", "args": {"schedule.type": "once", "schedule.runAt": "~11-03T09:00"}}], "notCalls": ["delegate_task", "run_scheduled_task_now"]}, "notes": "Mock result shape is an approximation."} {"id": "schedule-fresh-session-per-run", "area": "pull-requests", "kind": "guard", "pattern": "recurring task that should not accumulate context", "experience": "A recurring triage task kept one thread so the user could read its history, but each run carried every earlier run's context into the next.", "rule": "schedule_task `freshSession: true` keeps runs in one thread while each run starts a fresh session.", "privacy": "commit-safe", "setup": {"role": "top", "context": "Today is Monday 2026-11-02, 10:00 local time.", "mocks": {"schedule_task": {"scheduledTaskId": "scheduled-task-7", "title": "Triage new issues", "enabled": true, "projectId": "project-1", "boundThreadId": null, "freshSession": true, "schedule": {"type": "fixed_time", "timeOfDay": "09:00"}, "nextRunAt": "2026-11-03T09:00:00-08:00", "lastRunStatus": "never"}}}, "prompt": "Every morning at 9, triage new issues in acme/app. Keep all the runs in one thread so I can scroll back, but each run should start clean without remembering the previous days.", "expect": {"calls": [{"tool": "schedule_task", "args": {"schedule.type": "fixed_time", "freshSession": true}}], "notCalls": ["delegate_task", "run_scheduled_task_now"]}, "source": {"request": "juliusmarminge (maintainer) request, 2026-11-03: automations in one thread with separate provider sessions"}, "notes": "schedule-one-off-tomorrow is the control: an ordinary schedule must not set freshSession."} -{"id": "babysit-merge-after-approval-until-merged", "area": "pull-requests", "kind": "bad", "pattern": "babysit until a teammate approves, then merge, watching only until checks finish", "experience": "Asked to babysit a PR and merge it once a teammate approved, the agent watched it only until checks finished, so the thread left Working as soon as checks passed while the agent still owned the merge.", "rule": "until: merged when you will act on the PR yourself, such as merging it after someone else approves", "privacy": "commit-safe", "setup": {"role": "top", "priorTurns": [{"role": "user", "text": "The HTML preview frame has no accessible name. Fix it and open a PR."}, {"role": "assistant", "text": "Opened [PR #124](https://github.com/acme/app/pull/124). The preview frame now has the title \"HTML preview\".", "toolCalls": [{"tool": "Bash", "input": {"command": "git push -u origin fix/html-preview-title && gh pr create --fill"}, "result": "https://github.com/acme/app/pull/124"}, {"tool": "link_pull_request", "input": {"url": "https://github.com/acme/app/pull/124"}, "result": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "alreadyLinked": false}}]}], "mocks": {"watch_pull_request": "default", "link_pull_request": "default"}, "world": {"branch": "fix/html-preview-title", "commits": [{"sha": "abc1234", "subject": "fix(web): HTML preview frame gets an accessible title"}], "diff": "diff --git a/apps/web/src/HtmlPreview.tsx b/apps/web/src/HtmlPreview.tsx\n--- a/apps/web/src/HtmlPreview.tsx\n+++ b/apps/web/src/HtmlPreview.tsx\n@@ -1,3 +1,3 @@\n export function HtmlPreview({ html }: { html: string }) {\n- return