The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
feat(server): agents read, open, update, respond to, and merge PRs through MCP tools (#26751)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 18, 2026 at 22:16 UTC
5d05902ddd1981d18ce0497317cd96d1a10325e1
61 files changed
+3305
-252
apps/mobile/src/i18n/translations/de.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten, {failed} fehlgeschlagen} other {Versucht, {started} Review-Leitfäden zu starten, {failed} fehlgeschlagen}}",
307
"672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {{count} Pull Request gelesen} other {{count} Pull Requests gelesen}}",
310
+ "c74296822829ad9d": "{count, plural, one {Versucht, {count} Pull Request zu lesen} other {Versucht, {count} Pull Requests zu lesen}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Pull Requests {count}-mal aufgelistet} other {Pull Requests {count}-mal aufgelistet}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Versucht, Pull Requests {count}-mal aufzulisten} other {Versucht, Pull Requests {count}-mal aufzulisten}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Versucht, {count} Pull Request zu öffnen} other {Versucht, {count} Pull Requests zu öffnen}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {{count} offenen Pull Request gefunden} other {{count} offene Pull Requests gefunden}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {{count} Pull Request geöffnet} other {{count} Pull Requests geöffnet}}",
316
+ "6963f76ce8860984": "{opened, plural, one {{opened} Pull Request geöffnet, {existing} offen gefunden} other {{opened} Pull Requests geöffnet, {existing} offen gefunden}}",
317
+ "b64d48025a0904a5": "{count, plural, one {{count} Pull Request aktualisiert} other {{count} Pull Requests aktualisiert}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Versucht, {count} Pull Request zu aktualisieren} other {Versucht, {count} Pull Requests zu aktualisieren}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {{count}-mal auf Pull Requests geantwortet} other {{count}-mal auf Pull Requests geantwortet}}",
320
+ "2b682a59792b6c07": "{count, plural, one {{count}-mal versucht, auf Pull Requests zu antworten} other {{count}-mal versucht, auf Pull Requests zu antworten}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Versucht, {count} Pull Request zu mergen} other {Versucht, {count} Pull Requests zu mergen}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {{count} Pull Request zum Mergen eingereiht} other {{count} Pull Requests zum Mergen eingereiht}}",
323
+ "a742473f42c9a609": "{count, plural, one {{count} Pull Request gemergt} other {{count} Pull Requests gemergt}}",
324
+ "40e3528651297351": "{merged, plural, one {{merged} Pull Request gemergt, {queued} eingereiht} other {{merged} Pull Requests gemergt, {queued} eingereiht}}",
325
+ "8146ee71f7426683": "{count, plural, one {{count} Pull Request reviewt} other {{count} Pull Requests reviewt}}",
326
+ "638678077ba2e050": "{count, plural, one {Versucht, {count} Pull Request zu reviewen} other {Versucht, {count} Pull Requests zu reviewen}}",
327
"420bea546d5f8802": "Thread kopiert",
328
"2efb2dd3bf170f67": "Thread konnte nicht kopiert werden",
329
"6c03545936b55e0b": "PR-Link kopiert",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Beobachtung eines Pull Requests beenden",
1060
"52b8917fbd7ea9d5": "Review-Leitfäden schreiben",
1061
"722d3fd5ecc61ff3": "Review-Leitfaden lesen",
1062
+ "96d54fd56d8b65ce": "Pull Request lesen",
1063
+ "1af212db47b37813": "Pull Requests auflisten",
1064
+ "a01b71c7c36d05f5": "Pull Request öffnen",
1065
+ "5ddfea667ccceecf": "Pull Request aktualisieren",
1066
+ "c87d85c418b791a5": "Auf Pull Request antworten",
1067
+ "4bcd613be5a48aa2": "Pull Request reviewen",
1068
+ "81b284c3afb54ec6": "Pull Request mergen",
1069
"3227c712130a4187": "Issues auflisten",
1070
"3f461f26681450d6": "Ein Issue lesen",
1071
"fff9316cf5e449b4": "Ein Issue erstellen",
apps/mobile/src/i18n/translations/en.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Tried to start {started} review guide, {failed} failed} other {Tried to start {started} review guides, {failed} failed}}",
307
"672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Read {count} pull request} other {Read {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tried to read {count} pull request} other {Tried to read {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listed pull requests {count} time} other {Listed pull requests {count} times}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tried to list pull requests {count} time} other {Tried to list pull requests {count} times}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tried to open {count} pull request} other {Tried to open {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Found {count} open pull request} other {Found {count} open pull requests}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Opened {count} pull request} other {Opened {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Opened {opened} pull request, found {existing} open} other {Opened {opened} pull requests, found {existing} open}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Updated {count} pull request} other {Updated {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tried to update {count} pull request} other {Tried to update {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Responded on pull requests {count} time} other {Responded on pull requests {count} times}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Tried to respond on pull requests {count} time} other {Tried to respond on pull requests {count} times}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tried to merge {count} pull request} other {Tried to merge {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Queued {count} pull request to merge} other {Queued {count} pull requests to merge}}",
323
+ "a742473f42c9a609": "{count, plural, one {Merged {count} pull request} other {Merged {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Merged {merged} pull request, queued {queued}} other {Merged {merged} pull requests, queued {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Reviewed {count} pull request} other {Reviewed {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Tried to review {count} pull request} other {Tried to review {count} pull requests}}",
327
"420bea546d5f8802": "Thread copied",
328
"2efb2dd3bf170f67": "Failed to copy thread",
329
"6c03545936b55e0b": "PR link copied",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Stop watching a pull request",
1060
"52b8917fbd7ea9d5": "Write review guides",
1061
"722d3fd5ecc61ff3": "Read a review guide",
1062
+ "96d54fd56d8b65ce": "Read a pull request",
1063
+ "1af212db47b37813": "List pull requests",
1064
+ "a01b71c7c36d05f5": "Open a pull request",
1065
+ "5ddfea667ccceecf": "Update a pull request",
1066
+ "c87d85c418b791a5": "Respond on a pull request",
1067
+ "4bcd613be5a48aa2": "Review a pull request",
1068
+ "81b284c3afb54ec6": "Merge a pull request",
1069
"3227c712130a4187": "List issues",
1070
"3f461f26681450d6": "Read an issue",
1071
"fff9316cf5e449b4": "File an issue",
apps/mobile/src/i18n/translations/es.json
+25
@@ -306,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Leyó {count} pull request} other {Leyó {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Intentó leer {count} pull request} other {Intentó leer {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listó pull requests {count} vez} other {Listó pull requests {count} veces}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Intentó listar pull requests {count} vez} other {Intentó listar pull requests {count} veces}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Intentó abrir {count} pull request} other {Intentó abrir {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Encontró {count} pull request abierta} other {Encontró {count} pull requests abiertas}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Abrió {count} pull request} other {Abrió {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Abrió {opened} pull request, encontró {existing} abiertas} other {Abrió {opened} pull requests, encontró {existing} abiertas}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Actualizó {count} pull request} other {Actualizó {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Intentó actualizar {count} pull request} other {Intentó actualizar {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Respondió en pull requests {count} vez} other {Respondió en pull requests {count} veces}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Intentó responder en pull requests {count} vez} other {Intentó responder en pull requests {count} veces}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Intentó fusionar {count} pull request} other {Intentó fusionar {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Puso {count} pull request en cola para fusionar} other {Puso {count} pull requests en cola para fusionar}}",
323
+ "a742473f42c9a609": "{count, plural, one {Fusionó {count} pull request} other {Fusionó {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Fusionó {merged} pull request, {queued} en cola} other {Fusionó {merged} pull requests, {queued} en cola}}",
325
+ "8146ee71f7426683": "{count, plural, one {Revisó {count} pull request} other {Revisó {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Intentó revisar {count} pull request} other {Intentó revisar {count} pull requests}}",
327
"420bea546d5f8802": "Hilo copiado",
328
"2efb2dd3bf170f67": "No se pudo copiar el hilo",
329
"6c03545936b55e0b": "Enlace de la PR copiado",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Dejar de seguir una pull request",
1060
"52b8917fbd7ea9d5": "Escribir guías de revisión",
1061
"722d3fd5ecc61ff3": "Leer una guía de revisión",
1062
+ "96d54fd56d8b65ce": "Leer una pull request",
1063
+ "1af212db47b37813": "Listar pull requests",
1064
+ "a01b71c7c36d05f5": "Abrir una pull request",
1065
+ "5ddfea667ccceecf": "Actualizar una pull request",
1066
+ "c87d85c418b791a5": "Responder en una pull request",
1067
+ "4bcd613be5a48aa2": "Revisar una pull request",
1068
+ "81b284c3afb54ec6": "Fusionar una pull request",
1069
"3227c712130a4187": "Listar issues",
1070
"3f461f26681450d6": "Leer una issue",
1071
"fff9316cf5e449b4": "Abrir una issue",
apps/mobile/src/i18n/translations/fr.json
+25
@@ -306,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {{count} pull request lue} other {{count} pull requests lues}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tentative de lecture de {count} pull request} other {Tentative de lecture de {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Pull requests listées {count} fois} other {Pull requests listées {count} fois}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tentative de liste des pull requests {count} fois} other {Tentative de liste des pull requests {count} fois}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tentative d'ouverture de {count} pull request} other {Tentative d'ouverture de {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {{count} pull request ouverte trouvée} other {{count} pull requests ouvertes trouvées}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {{count} pull request ouverte} other {{count} pull requests ouvertes}}",
316
+ "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}}",
317
+ "b64d48025a0904a5": "{count, plural, one {{count} pull request mise à jour} other {{count} pull requests mises à jour}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tentative de mise à jour de {count} pull request} other {Tentative de mise à jour de {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Réponse sur des pull requests {count} fois} other {Réponses sur des pull requests {count} fois}}",
320
+ "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}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tentative de fusion de {count} pull request} other {Tentative de fusion de {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {{count} pull request mise en file pour fusion} other {{count} pull requests mises en file pour fusion}}",
323
+ "a742473f42c9a609": "{count, plural, one {{count} pull request fusionnée} other {{count} pull requests fusionnées}}",
324
+ "40e3528651297351": "{merged, plural, one {{merged} pull request fusionnée, {queued} en file} other {{merged} pull requests fusionnées, {queued} en file}}",
325
+ "8146ee71f7426683": "{count, plural, one {{count} pull request relue} other {{count} pull requests relues}}",
326
+ "638678077ba2e050": "{count, plural, one {Tentative de revue de {count} pull request} other {Tentative de revue de {count} pull requests}}",
327
"420bea546d5f8802": "Fil copié",
328
"2efb2dd3bf170f67": "Échec de la copie du fil",
329
"6c03545936b55e0b": "Lien de la PR copié",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Arrêter de suivre une pull request",
1060
"52b8917fbd7ea9d5": "Rédiger des guides de revue",
1061
"722d3fd5ecc61ff3": "Lire un guide de revue",
1062
+ "96d54fd56d8b65ce": "Lire une pull request",
1063
+ "1af212db47b37813": "Lister les pull requests",
1064
+ "a01b71c7c36d05f5": "Ouvrir une pull request",
1065
+ "5ddfea667ccceecf": "Mettre à jour une pull request",
1066
+ "c87d85c418b791a5": "Répondre sur une pull request",
1067
+ "4bcd613be5a48aa2": "Relire une pull request",
1068
+ "81b284c3afb54ec6": "Fusionner une pull request",
1069
"3227c712130a4187": "Lister les tickets",
1070
"3f461f26681450d6": "Lire un ticket",
1071
"fff9316cf5e449b4": "Ouvrir un ticket",
apps/mobile/src/i18n/translations/ja.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました。{failed} 件失敗しました}}",
307
"672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}",
308
"5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {{count} 件のプルリクエストを読み取りました}}",
310
+ "c74296822829ad9d": "{count, plural, other {{count} 件のプルリクエストの読み取りを試みました}}",
311
+ "833fc9b60bf40749": "{count, plural, other {プルリクエストを {count} 回一覧表示しました}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {プルリクエストの一覧表示を {count} 回試みました}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {{count} 件のプルリクエストの作成を試みました}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {オープンなプルリクエストが {count} 件見つかりました}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {{count} 件のプルリクエストを作成しました}}",
316
+ "6963f76ce8860984": "{opened, plural, other {{opened} 件のプルリクエストを作成し、オープンなものを {existing} 件見つけました}}",
317
+ "b64d48025a0904a5": "{count, plural, other {{count} 件のプルリクエストを更新しました}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {{count} 件のプルリクエストの更新を試みました}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {プルリクエストに {count} 回返信しました}}",
320
+ "2b682a59792b6c07": "{count, plural, other {プルリクエストへの返信を {count} 回試みました}}",
321
+ "998ef072ea79ff62": "{count, plural, other {{count} 件のプルリクエストのマージを試みました}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {{count} 件のプルリクエストをマージ待ちにしました}}",
323
+ "a742473f42c9a609": "{count, plural, other {{count} 件のプルリクエストをマージしました}}",
324
+ "40e3528651297351": "{merged, plural, other {{merged} 件のプルリクエストをマージし、{queued} 件をマージ待ちにしました}}",
325
+ "8146ee71f7426683": "{count, plural, other {{count} 件のプルリクエストをレビューしました}}",
326
+ "638678077ba2e050": "{count, plural, other {{count} 件のプルリクエストのレビューを試みました}}",
327
"420bea546d5f8802": "スレッドをコピーしました",
328
"2efb2dd3bf170f67": "スレッドをコピーできませんでした",
329
"6c03545936b55e0b": "PR のリンクをコピーしました",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "プルリクエストのウォッチを解除",
1060
"52b8917fbd7ea9d5": "レビューガイドを作成",
1061
"722d3fd5ecc61ff3": "レビューガイドを読み取る",
1062
+ "96d54fd56d8b65ce": "プルリクエストを読む",
1063
+ "1af212db47b37813": "プルリクエストを一覧表示",
1064
+ "a01b71c7c36d05f5": "プルリクエストを作成",
1065
+ "5ddfea667ccceecf": "プルリクエストを更新",
1066
+ "c87d85c418b791a5": "プルリクエストに返信",
1067
+ "4bcd613be5a48aa2": "プルリクエストをレビュー",
1068
+ "81b284c3afb54ec6": "プルリクエストをマージ",
1069
"3227c712130a4187": "Issue を一覧表示",
1070
"3f461f26681450d6": "Issue を読み取る",
1071
"fff9316cf5e449b4": "Issue を作成",
apps/mobile/src/i18n/translations/ko.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {검토 가이드 {started}개 시작 시도함, {failed}개 실패}}",
307
"672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}",
308
"5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {풀 리퀘스트 {count}개를 읽음}}",
310
+ "c74296822829ad9d": "{count, plural, other {풀 리퀘스트 {count}개 읽기를 시도함}}",
311
+ "833fc9b60bf40749": "{count, plural, other {풀 리퀘스트 목록을 {count}번 조회함}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {풀 리퀘스트 목록 조회를 {count}번 시도함}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {풀 리퀘스트 {count}개 열기를 시도함}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {열린 풀 리퀘스트 {count}개를 찾음}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {풀 리퀘스트 {count}개를 엶}}",
316
+ "6963f76ce8860984": "{opened, plural, other {풀 리퀘스트 {opened}개를 열고, 열린 풀 리퀘스트 {existing}개를 찾음}}",
317
+ "b64d48025a0904a5": "{count, plural, other {풀 리퀘스트 {count}개를 업데이트함}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {풀 리퀘스트 {count}개 업데이트를 시도함}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {풀 리퀘스트에 {count}번 응답함}}",
320
+ "2b682a59792b6c07": "{count, plural, other {풀 리퀘스트 응답을 {count}번 시도함}}",
321
+ "998ef072ea79ff62": "{count, plural, other {풀 리퀘스트 {count}개 병합을 시도함}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {풀 리퀘스트 {count}개를 병합 대기열에 넣음}}",
323
+ "a742473f42c9a609": "{count, plural, other {풀 리퀘스트 {count}개를 병합함}}",
324
+ "40e3528651297351": "{merged, plural, other {풀 리퀘스트 {merged}개를 병합하고 {queued}개를 대기열에 넣음}}",
325
+ "8146ee71f7426683": "{count, plural, other {풀 리퀘스트 {count}개를 검토함}}",
326
+ "638678077ba2e050": "{count, plural, other {풀 리퀘스트 {count}개 검토를 시도함}}",
327
"420bea546d5f8802": "스레드 복사됨",
328
"2efb2dd3bf170f67": "스레드를 복사하지 못했습니다",
329
"6c03545936b55e0b": "PR 링크 복사됨",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "풀 리퀘스트 지켜보기 중지",
1060
"52b8917fbd7ea9d5": "검토 가이드 작성",
1061
"722d3fd5ecc61ff3": "검토 가이드 읽기",
1062
+ "96d54fd56d8b65ce": "풀 리퀘스트 읽기",
1063
+ "1af212db47b37813": "풀 리퀘스트 목록 보기",
1064
+ "a01b71c7c36d05f5": "풀 리퀘스트 열기",
1065
+ "5ddfea667ccceecf": "풀 리퀘스트 업데이트",
1066
+ "c87d85c418b791a5": "풀 리퀘스트에 응답",
1067
+ "4bcd613be5a48aa2": "풀 리퀘스트 검토",
1068
+ "81b284c3afb54ec6": "풀 리퀘스트 병합",
1069
"3227c712130a4187": "이슈 목록 조회",
1070
"3f461f26681450d6": "이슈 읽기",
1071
"fff9316cf5e449b4": "이슈 작성",
apps/mobile/src/i18n/translations/pt-BR.json
+25
@@ -306,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Leu {count} pull request} other {Leu {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tentou ler {count} pull request} other {Tentou ler {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listou pull requests {count} vez} other {Listou pull requests {count} vezes}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tentou listar pull requests {count} vez} other {Tentou listar pull requests {count} vezes}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tentou abrir {count} pull request} other {Tentou abrir {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Encontrou {count} pull request aberto} other {Encontrou {count} pull requests abertos}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Abriu {count} pull request} other {Abriu {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Abriu {opened} pull request, encontrou {existing} abertos} other {Abriu {opened} pull requests, encontrou {existing} abertos}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Atualizou {count} pull request} other {Atualizou {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tentou atualizar {count} pull request} other {Tentou atualizar {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Respondeu em pull requests {count} vez} other {Respondeu em pull requests {count} vezes}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Tentou responder em pull requests {count} vez} other {Tentou responder em pull requests {count} vezes}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tentou mesclar {count} pull request} other {Tentou mesclar {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Enfileirou {count} pull request para mesclar} other {Enfileirou {count} pull requests para mesclar}}",
323
+ "a742473f42c9a609": "{count, plural, one {Mesclou {count} pull request} other {Mesclou {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Mesclou {merged} pull request, {queued} na fila} other {Mesclou {merged} pull requests, {queued} na fila}}",
325
+ "8146ee71f7426683": "{count, plural, one {Revisou {count} pull request} other {Revisou {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Tentou revisar {count} pull request} other {Tentou revisar {count} pull requests}}",
327
"420bea546d5f8802": "Thread copiada",
328
"2efb2dd3bf170f67": "Falha ao copiar a thread",
329
"6c03545936b55e0b": "Link do PR copiado",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Parar de acompanhar um pull request",
1060
"52b8917fbd7ea9d5": "Escrever guias de revisão",
1061
"722d3fd5ecc61ff3": "Ler um guia de revisão",
1062
+ "96d54fd56d8b65ce": "Ler um pull request",
1063
+ "1af212db47b37813": "Listar pull requests",
1064
+ "a01b71c7c36d05f5": "Abrir um pull request",
1065
+ "5ddfea667ccceecf": "Atualizar um pull request",
1066
+ "c87d85c418b791a5": "Responder em um pull request",
1067
+ "4bcd613be5a48aa2": "Revisar um pull request",
1068
+ "81b284c3afb54ec6": "Mesclar um pull request",
1069
"3227c712130a4187": "Listar issues",
1070
"3f461f26681450d6": "Ler uma issue",
1071
"fff9316cf5e449b4": "Abrir uma issue",
apps/mobile/src/i18n/translations/ru.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Попытка начать {started} руководство по ревью, ошибок: {failed}} few {Попытка начать {started} руководства по ревью, ошибок: {failed}} many {Попытка начать {started} руководств по ревью, ошибок: {failed}} other {Попытка начать {started} руководства по ревью, ошибок: {failed}}}",
307
"672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Прочитано {count} пул-реквест} few {Прочитано {count} пул-реквеста} many {Прочитано {count} пул-реквестов} other {Прочитано {count} пул-реквеста}}",
310
+ "c74296822829ad9d": "{count, plural, one {Не удалось прочитать {count} пул-реквест} few {Не удалось прочитать {count} пул-реквеста} many {Не удалось прочитать {count} пул-реквестов} other {Не удалось прочитать {count} пул-реквеста}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Список пул-реквестов получен {count} раз} few {Список пул-реквестов получен {count} раза} many {Список пул-реквестов получен {count} раз} other {Список пул-реквестов получен {count} раза}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Попытка получить список пул-реквестов: {count} раз} few {Попытка получить список пул-реквестов: {count} раза} many {Попытка получить список пул-реквестов: {count} раз} other {Попытка получить список пул-реквестов: {count} раза}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Не удалось открыть {count} пул-реквест} few {Не удалось открыть {count} пул-реквеста} many {Не удалось открыть {count} пул-реквестов} other {Не удалось открыть {count} пул-реквеста}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Найден {count} открытый пул-реквест} few {Найдено {count} открытых пул-реквеста} many {Найдено {count} открытых пул-реквестов} other {Найдено {count} открытого пул-реквеста}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Открыто {count} пул-реквест} few {Открыто {count} пул-реквеста} many {Открыто {count} пул-реквестов} other {Открыто {count} пул-реквеста}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Открыт {opened} пул-реквест, найдено открытых: {existing}} few {Открыто {opened} пул-реквеста, найдено открытых: {existing}} many {Открыто {opened} пул-реквестов, найдено открытых: {existing}} other {Открыто {opened} пул-реквеста, найдено открытых: {existing}}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Обновлено {count} пул-реквест} few {Обновлено {count} пул-реквеста} many {Обновлено {count} пул-реквестов} other {Обновлено {count} пул-реквеста}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Не удалось обновить {count} пул-реквест} few {Не удалось обновить {count} пул-реквеста} many {Не удалось обновить {count} пул-реквестов} other {Не удалось обновить {count} пул-реквеста}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Ответ в пул-реквестах: {count} раз} few {Ответ в пул-реквестах: {count} раза} many {Ответ в пул-реквестах: {count} раз} other {Ответ в пул-реквестах: {count} раза}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Попытка ответить в пул-реквестах: {count} раз} few {Попытка ответить в пул-реквестах: {count} раза} many {Попытка ответить в пул-реквестах: {count} раз} other {Попытка ответить в пул-реквестах: {count} раза}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Не удалось слить {count} пул-реквест} few {Не удалось слить {count} пул-реквеста} many {Не удалось слить {count} пул-реквестов} other {Не удалось слить {count} пул-реквеста}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {В очередь на слияние поставлен {count} пул-реквест} few {В очередь на слияние поставлено {count} пул-реквеста} many {В очередь на слияние поставлено {count} пул-реквестов} other {В очередь на слияние поставлено {count} пул-реквеста}}",
323
+ "a742473f42c9a609": "{count, plural, one {Слито {count} пул-реквест} few {Слито {count} пул-реквеста} many {Слито {count} пул-реквестов} other {Слито {count} пул-реквеста}}",
324
+ "40e3528651297351": "{merged, plural, one {Слит {merged} пул-реквест, в очереди: {queued}} few {Слито {merged} пул-реквеста, в очереди: {queued}} many {Слито {merged} пул-реквестов, в очереди: {queued}} other {Слито {merged} пул-реквеста, в очереди: {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Проверено {count} пул-реквест} few {Проверено {count} пул-реквеста} many {Проверено {count} пул-реквестов} other {Проверено {count} пул-реквеста}}",
326
+ "638678077ba2e050": "{count, plural, one {Не удалось проверить {count} пул-реквест} few {Не удалось проверить {count} пул-реквеста} many {Не удалось проверить {count} пул-реквестов} other {Не удалось проверить {count} пул-реквеста}}",
327
"420bea546d5f8802": "Тред скопирован",
328
"2efb2dd3bf170f67": "Не удалось скопировать тред",
329
"6c03545936b55e0b": "Ссылка на PR скопирована",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Прекратить отслеживание пул-реквеста",
1060
"52b8917fbd7ea9d5": "Написать руководства по ревью",
1061
"722d3fd5ecc61ff3": "Прочитать руководство по ревью",
1062
+ "96d54fd56d8b65ce": "Прочитать пул-реквест",
1063
+ "1af212db47b37813": "Список пул-реквестов",
1064
+ "a01b71c7c36d05f5": "Открыть пул-реквест",
1065
+ "5ddfea667ccceecf": "Обновить пул-реквест",
1066
+ "c87d85c418b791a5": "Ответить в пул-реквесте",
1067
+ "4bcd613be5a48aa2": "Проверить пул-реквест",
1068
+ "81b284c3afb54ec6": "Слить пул-реквест",
1069
"3227c712130a4187": "Получить список issue",
1070
"3f461f26681450d6": "Прочитать issue",
1071
"fff9316cf5e449b4": "Создать issue",
apps/mobile/src/i18n/translations/sv.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Försökte starta {started} granskningsguide, {failed} misslyckades} other {Försökte starta {started} granskningsguider, {failed} misslyckades}}",
307
"672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Läste {count} pull request} other {Läste {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Försökte läsa {count} pull request} other {Försökte läsa {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listade pull requests {count} gång} other {Listade pull requests {count} gånger}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Försökte lista pull requests {count} gång} other {Försökte lista pull requests {count} gånger}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Försökte öppna {count} pull request} other {Försökte öppna {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Hittade {count} öppen pull request} other {Hittade {count} öppna pull requests}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Öppnade {count} pull request} other {Öppnade {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Öppnade {opened} pull request, hittade {existing} öppna} other {Öppnade {opened} pull requests, hittade {existing} öppna}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Uppdaterade {count} pull request} other {Uppdaterade {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Försökte uppdatera {count} pull request} other {Försökte uppdatera {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Svarade på pull requests {count} gång} other {Svarade på pull requests {count} gånger}}",
320
+ "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}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Försökte merga {count} pull request} other {Försökte merga {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Köade {count} pull request för merge} other {Köade {count} pull requests för merge}}",
323
+ "a742473f42c9a609": "{count, plural, one {Mergade {count} pull request} other {Mergade {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Mergade {merged} pull request, köade {queued}} other {Mergade {merged} pull requests, köade {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Granskade {count} pull request} other {Granskade {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Försökte granska {count} pull request} other {Försökte granska {count} pull requests}}",
327
"420bea546d5f8802": "Tråden kopierades",
328
"2efb2dd3bf170f67": "Det gick inte att kopiera tråden",
329
"6c03545936b55e0b": "PR-länken kopierades",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Sluta bevaka en pull request",
1060
"52b8917fbd7ea9d5": "Skriv granskningsguider",
1061
"722d3fd5ecc61ff3": "Läs en granskningsguide",
1062
+ "96d54fd56d8b65ce": "Läs en pull request",
1063
+ "1af212db47b37813": "Lista pull requests",
1064
+ "a01b71c7c36d05f5": "Öppna en pull request",
1065
+ "5ddfea667ccceecf": "Uppdatera en pull request",
1066
+ "c87d85c418b791a5": "Svara på en pull request",
1067
+ "4bcd613be5a48aa2": "Granska en pull request",
1068
+ "81b284c3afb54ec6": "Merga en pull request",
1069
"3227c712130a4187": "Lista ärenden",
1070
"3f461f26681450d6": "Läs ett ärende",
1071
"fff9316cf5e449b4": "Skapa ett ärende",
apps/mobile/src/i18n/translations/zh.json
+25
@@ -306,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {尝试开始 {started} 份审查导览,{failed} 份失败}}",
307
"672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}",
308
"5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {已读取 {count} 个 PR}}",
310
+ "c74296822829ad9d": "{count, plural, other {尝试读取 {count} 个 PR}}",
311
+ "833fc9b60bf40749": "{count, plural, other {列出 PR {count} 次}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {尝试列出 PR {count} 次}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {尝试创建 {count} 个 PR}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {找到 {count} 个打开的 PR}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {已创建 {count} 个 PR}}",
316
+ "6963f76ce8860984": "{opened, plural, other {已创建 {opened} 个 PR,找到 {existing} 个打开的 PR}}",
317
+ "b64d48025a0904a5": "{count, plural, other {已更新 {count} 个 PR}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {尝试更新 {count} 个 PR}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {在 PR 上回复 {count} 次}}",
320
+ "2b682a59792b6c07": "{count, plural, other {尝试在 PR 上回复 {count} 次}}",
321
+ "998ef072ea79ff62": "{count, plural, other {尝试合并 {count} 个 PR}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {已将 {count} 个 PR 加入合并队列}}",
323
+ "a742473f42c9a609": "{count, plural, other {已合并 {count} 个 PR}}",
324
+ "40e3528651297351": "{merged, plural, other {已合并 {merged} 个 PR,{queued} 个在队列中}}",
325
+ "8146ee71f7426683": "{count, plural, other {已审查 {count} 个 PR}}",
326
+ "638678077ba2e050": "{count, plural, other {尝试审查 {count} 个 PR}}",
327
"420bea546d5f8802": "已复制会话",
328
"2efb2dd3bf170f67": "无法复制会话",
329
"6c03545936b55e0b": "已复制 PR 链接",
@@ -1041,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "停止关注 PR",
1060
"52b8917fbd7ea9d5": "编写审查导览",
1061
"722d3fd5ecc61ff3": "读取审查导览",
1062
+ "96d54fd56d8b65ce": "读取 PR",
1063
+ "1af212db47b37813": "列出 PR",
1064
+ "a01b71c7c36d05f5": "创建 PR",
1065
+ "5ddfea667ccceecf": "更新 PR",
1066
+ "c87d85c418b791a5": "在 PR 上回复",
1067
+ "4bcd613be5a48aa2": "审查 PR",
1068
+ "81b284c3afb54ec6": "合并 PR",
1069
"3227c712130a4187": "列出 issue",
1070
"3f461f26681450d6": "读取 issue",
1071
"fff9316cf5e449b4": "提交 issue",
apps/server/src/git/GitManager.test.ts
+86
-1
@@ -1,6 +1,6 @@
1
import * as BackgroundPolicy from "../background/BackgroundPolicy.ts";
2
import * as VcsStatusBroadcaster from "../vcs/VcsStatusBroadcaster.ts";
3
-import { SourceControlProviderKind } from "@t3tools/contracts";
3
+import { type PullRequestActionInput, SourceControlProviderKind } from "@t3tools/contracts";
4
// @effect-diagnostics nodeBuiltinImport:off
5
import * as NodeFS from "node:fs";
6
import * as NodePath from "node:path";
@@ -64,6 +64,7 @@ import * as SourceControlProviderRegistry from "../sourceControl/SourceControlPr
64
import * as ServerConfig from "../config.ts";
65
import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts";
66
import * as ProjectStore from "../orchestration-v2/ProjectStore.ts";
67
+import * as PullRequestService from "../pullRequest/PullRequestService.ts";
68
import * as SqlitePersistence from "../persistence/Sqlite.ts";
69
import * as ProjectSetupScriptRunner from "../project/ProjectSetupScriptRunner.ts";
70
import * as ProviderRegistry from "../provider/ProviderRegistry.ts";
@@ -628,6 +629,7 @@ function preparePullRequestThread(
629
630
function makeManager(input?: {
631
providerScenario?: FakeProviderScenario;
632
+ pullRequests?: Partial<PullRequestService.PullRequestService["Service"]>;
633
sourceControlProvider?: SourceControlProvider["Service"];
634
textGeneration?: Partial<FakeGitTextGeneration>;
635
serverSettings?: Parameters<typeof ServerSettings.layerTest>[0];
@@ -736,6 +738,7 @@ function makeManager(input?: {
738
739
const layerManager = Layer.mergeAll(
740
Layer.succeed(TextGeneration.TextGeneration, textGeneration),
741
+ Layer.mock(PullRequestService.PullRequestService)(input?.pullRequests ?? {}),
742
Layer.mock(ProviderRegistry.ProviderRegistry)({
743
getProviders: Effect.succeed([]),
744
}),
@@ -4418,6 +4421,88 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
4421
}),
4422
);
4423
4424
+ it.effect("createPullRequest refuses a branch with commits it has not pushed", () =>
4425
+ Effect.gen(function* () {
4426
+ const repoDir = yield* makeTempDir("t3code-git-manager-");
4427
+ yield* initRepo(repoDir);
4428
+ const remoteDir = yield* createBareRemote();
4429
+ yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]);
4430
+ yield* runGit(repoDir, ["push", "-u", "origin", "main"]);
4431
+ yield* runGit(repoDir, ["checkout", "-b", "feature/unpushed"]);
4432
+ yield* runGit(repoDir, ["push", "-u", "origin", "feature/unpushed"]);
4433
+ NodeFS.writeFileSync(NodePath.join(repoDir, "late.txt"), "late\n");
4434
+ yield* runGit(repoDir, ["add", "late.txt"]);
4435
+ yield* runGit(repoDir, ["commit", "-m", "Late commit"]);
4436
+ const { manager, providerCalls } = yield* makeManager({
4437
+ providerScenario: { prListSequence: [[], []] },
4438
+ });
4439
+
4440
+ const error = yield* Effect.flip(
4441
+ manager.createPullRequest({
4442
+ cwd: repoDir,
4443
+ projectId: ProjectId.make("project-1"),
4444
+ title: "Feature",
4445
+ body: "Body",
4446
+ }),
4447
+ );
4448
+
4449
+ expect(error.message).toContain("1 unpushed commit");
4450
+ expect(created(providerCalls)).toEqual([]);
4451
+
4452
+ // An open PR is returned as it is; returning it publishes nothing.
4453
+ const open = {
4454
+ number: 7,
4455
+ title: "Feature",
4456
+ url: "https://github.com/pingdotgg/codething-mvp/pull/7",
4457
+ baseRefName: "main",
4458
+ headRefName: "feature/unpushed",
4459
+ };
4460
+ const existing = yield* makeManager({ providerScenario: { prListSequence: [[open]] } });
4461
+ const found = yield* existing.manager.createPullRequest({
4462
+ cwd: repoDir,
4463
+ projectId: ProjectId.make("project-1"),
4464
+ title: "Feature",
4465
+ body: "Body",
4466
+ });
4467
+ expect(found).toMatchObject({ status: "opened_existing", number: 7 });
4468
+
4469
+ // A retry after a failed draft finds the open PR and still drafts it.
4470
+ const actions: Array<PullRequestActionInput> = [];
4471
+ const retried = yield* makeManager({
4472
+ providerScenario: { prListSequence: [[open]] },
4473
+ pullRequests: {
4474
+ summary: () => Effect.succeed({ isDraft: false } as never),
4475
+ runAction: (action) => Effect.sync(() => void actions.push(action)),
4476
+ },
4477
+ });
4478
+ yield* retried.manager.createPullRequest({
4479
+ cwd: repoDir,
4480
+ projectId: ProjectId.make("project-1"),
4481
+ title: "Feature",
4482
+ body: "Body",
4483
+ draft: true,
4484
+ });
4485
+ expect(actions).toMatchObject([
4486
+ { repository: "pingdotgg/codething-mvp", number: 7, action: "draft" },
4487
+ ]);
4488
+
4489
+ // A draft of a PR the host does not list yet fails, so a retry drafts it.
4490
+ yield* runGit(repoDir, ["push"]);
4491
+ const unlisted = yield* makeManager({ providerScenario: { prListSequence: [[], []] } });
4492
+ const notListed = yield* Effect.flip(
4493
+ unlisted.manager.createPullRequest({
4494
+ cwd: repoDir,
4495
+ projectId: ProjectId.make("project-1"),
4496
+ title: "Feature",
4497
+ body: "Body",
4498
+ draft: true,
4499
+ }),
4500
+ );
4501
+ expect(notListed.message).toContain("does not list it yet");
4502
+ expect(created(unlisted.providerCalls)).toHaveLength(1);
4503
+ }),
4504
+ );
4505
+
4506
it.effect("generates PR content from the created worktree's selected remote base", () =>
4507
Effect.gen(function* () {
4508
const repoDir = yield* makeTempDir("t3code-git-manager-");
apps/server/src/git/GitManager.ts
+151
-37
@@ -81,6 +81,8 @@ import {
81
import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts";
82
import * as ProjectStore from "../orchestration-v2/ProjectStore.ts";
83
import * as ProjectSetupScriptRunner from "../project/ProjectSetupScriptRunner.ts";
84
+import * as PullRequestService from "../pullRequest/PullRequestService.ts";
85
+import { createdPullRequestKey } from "./linkCreatedPullRequest.ts";
86
import * as ProviderRegistry from "../provider/ProviderRegistry.ts";
87
import { extractBranchNameFromRemoteRef } from "./remoteRefs.ts";
88
import { detachStackFrame } from "./detachStackFrame.ts";
@@ -125,6 +127,16 @@ interface SourceControlTextGenerationSettings {
127
readonly style: SourceControlWritingStyleSettings;
128
}
129
130
+export interface GitCreatePullRequestResult {
131
+ readonly status: "created" | "opened_existing";
132
+ /** Absent when the host accepted the PR but did not list it back yet. */
133
+ readonly url?: string;
134
+ readonly number?: number;
135
+ readonly baseBranch: string;
136
+ readonly headBranch: string;
137
+ readonly title: string;
138
+}
139
+
140
export class GitManager extends Context.Service<
141
GitManager,
142
{
@@ -175,6 +187,15 @@ export class GitManager extends Context.Service<
187
input: GitRunStackedActionInput,
188
options?: GitRunStackedActionOptions,
189
) => Effect.Effect<GitRunStackedActionResult, GitManagerServiceError>;
190
+ /** Opens a PR for the checkout's pushed branch, or returns the one already open. */
191
+ readonly createPullRequest: (input: {
192
+ readonly cwd: string;
193
+ readonly projectId: ProjectId;
194
+ readonly title: string;
195
+ readonly body: string;
196
+ readonly baseBranch?: string | undefined;
197
+ readonly draft?: boolean | undefined;
198
+ }) => Effect.Effect<GitCreatePullRequestResult, GitManagerServiceError>;
199
readonly subscribePullRequestStateChanges: Effect.Effect<
200
Stream.Stream<ThreadPullRequestKey>,
201
never,
@@ -747,6 +768,7 @@ export const make = Effect.gen(function* () {
768
);
769
});
770
const serverSettingsService = yield* ServerSettings.ServerSettingsService;
771
+ const pullRequests = yield* PullRequestService.PullRequestService;
772
const threads = yield* ProjectionStore.ProjectionStoreV2;
773
const projects = yield* ProjectStore.ProjectStoreV2;
774
const projectSettingsFor = Effect.fnUntraced(function* (input: {
@@ -2437,13 +2459,18 @@ export const make = Effect.gen(function* () {
2459
});
2460
});
2461
2440
- const runPrStep = Effect.fn("runPrStep")(function* (
2441
- settings: SourceControlTextGenerationSettings,
2462
+ const openPrFromBranch = Effect.fn("openPrFromBranch")(function* <E>(
2463
cwd: string,
2464
fallbackBranch: string | null,
2444
- threadId: ThreadId | undefined,
2465
emit: GitActionProgressEmitter,
2446
- pushRemoteRef?: { readonly remoteName: string; readonly upstreamRef: string },
2466
+ pushRemoteRef: { readonly remoteName: string; readonly upstreamRef: string } | undefined,
2467
+ requestedBase: string | undefined,
2468
+ content: (input: {
2469
+ readonly provider: SourceControlProvider.SourceControlProvider["Service"];
2470
+ readonly baseBranch: string;
2471
+ readonly baseRef: string;
2472
+ readonly headBranch: string;
2473
+ }) => Effect.Effect<{ readonly title: string; readonly body: string }, E>,
2474
) {
2475
const provider = yield* sourceControlProvider(cwd);
2476
const terms = sourceControlDefinitions.get(provider.kind).changeRequest;
@@ -2483,42 +2510,22 @@ export const make = Effect.gen(function* () {
2510
};
2511
}
2512
2486
- const { baseBranch, baseRef } = yield* resolvePrBase(
2487
- cwd,
2488
- branch,
2489
- details.upstreamRef,
2490
- headContext,
2491
- );
2492
- yield* emit({
2493
- kind: "phase_started",
2494
- phase: "pr",
2495
- label: `Generating ${terms.shortLabel} content...`,
2496
- });
2497
- const baseRangeRef = yield* resolveBaseRangeRef(cwd, baseRef);
2498
- const rangeContext = yield* gitCore.readRangeContext(cwd, baseRangeRef);
2499
- const policy = yield* resolveStylePolicy(cwd, settings);
2500
- const changeRequestTemplate =
2501
- settings.style.followChangeRequestTemplates && provider.readChangeRequestTemplate
2502
- ? Option.getOrUndefined(
2503
- yield* provider.readChangeRequestTemplate({ cwd, treeish: baseRangeRef }),
2504
- )
2505
- : undefined;
2506
- const threadContext = yield* readThreadContext(threadId);
2507
-
2508
- const generated = yield* textGeneration.generatePrContent({
2509
- cwd,
2513
+ // A PR opened from the remote branch would leave out commits not pushed yet.
2514
+ if (details.aheadCount > 0) {
2515
+ return yield* new GitManagerError({
2516
+ operation: "runPrStep",
2517
+ cwd,
2518
+ detail: `The branch has ${details.aheadCount} unpushed commit${details.aheadCount === 1 ? "" : "s"}. Push before opening the PR.`,
2519
+ });
2520
+ }
2521
+ const resolved = yield* resolvePrBase(cwd, branch, details.upstreamRef, headContext);
2522
+ const baseBranch = requestedBase ?? resolved.baseBranch;
2523
+ const generated = yield* content({
2524
+ provider,
2525
baseBranch,
2526
+ baseRef: requestedBase ?? resolved.baseRef,
2527
headBranch: headContext.headBranch,
2512
- commitSummary: limitContext(rangeContext.commitSummary, 20_000),
2513
- diffSummary: limitContext(rangeContext.diffSummary, 20_000),
2514
- diffPatch: limitContext(rangeContext.diffPatch, 60_000),
2515
- ...(changeRequestTemplate ? { changeRequestTemplate } : {}),
2516
- ...(threadContext ? { threadContext } : {}),
2517
- ...(policy ? { policy } : {}),
2518
- modelSelection: settings.modelSelection,
2519
- projectId: settings.projectId,
2528
});
2521
-
2529
const bodyFile = path.join(
2530
tempDir,
2531
`t3code-pr-body-${process.pid}-${yield* randomUUIDv4(cwd)}.md`,
@@ -2587,6 +2594,112 @@ export const make = Effect.gen(function* () {
2594
};
2595
});
2596
2597
+ const runPrStep = (
2598
+ settings: SourceControlTextGenerationSettings,
2599
+ cwd: string,
2600
+ fallbackBranch: string | null,
2601
+ threadId: ThreadId | undefined,
2602
+ emit: GitActionProgressEmitter,
2603
+ pushRemoteRef?: { readonly remoteName: string; readonly upstreamRef: string },
2604
+ ) =>
2605
+ openPrFromBranch(
2606
+ cwd,
2607
+ fallbackBranch,
2608
+ emit,
2609
+ pushRemoteRef,
2610
+ undefined,
2611
+ ({ provider, baseBranch, baseRef, headBranch }) =>
2612
+ Effect.gen(function* () {
2613
+ const terms = sourceControlDefinitions.get(provider.kind).changeRequest;
2614
+ yield* emit({
2615
+ kind: "phase_started",
2616
+ phase: "pr",
2617
+ label: `Generating ${terms.shortLabel} content...`,
2618
+ });
2619
+ const baseRangeRef = yield* resolveBaseRangeRef(cwd, baseRef);
2620
+ const rangeContext = yield* gitCore.readRangeContext(cwd, baseRangeRef);
2621
+ const policy = yield* resolveStylePolicy(cwd, settings);
2622
+ const changeRequestTemplate =
2623
+ settings.style.followChangeRequestTemplates && provider.readChangeRequestTemplate
2624
+ ? Option.getOrUndefined(
2625
+ yield* provider.readChangeRequestTemplate({ cwd, treeish: baseRangeRef }),
2626
+ )
2627
+ : undefined;
2628
+ const threadContext = yield* readThreadContext(threadId);
2629
+
2630
+ return yield* textGeneration.generatePrContent({
2631
+ cwd,
2632
+ baseBranch,
2633
+ headBranch,
2634
+ commitSummary: limitContext(rangeContext.commitSummary, 20_000),
2635
+ diffSummary: limitContext(rangeContext.diffSummary, 20_000),
2636
+ diffPatch: limitContext(rangeContext.diffPatch, 60_000),
2637
+ ...(changeRequestTemplate ? { changeRequestTemplate } : {}),
2638
+ ...(threadContext ? { threadContext } : {}),
2639
+ ...(policy ? { policy } : {}),
2640
+ modelSelection: settings.modelSelection,
2641
+ projectId: settings.projectId,
2642
+ });
2643
+ }),
2644
+ );
2645
+
2646
+ const createPullRequest: GitManager["Service"]["createPullRequest"] = Effect.fn(
2647
+ "GitManager.createPullRequest",
2648
+ )(function* (input) {
2649
+ const result = yield* openPrFromBranch(
2650
+ input.cwd,
2651
+ null,
2652
+ () => Effect.void,
2653
+ undefined,
2654
+ input.baseBranch,
2655
+ () => Effect.succeed({ title: input.title, body: input.body }),
2656
+ );
2657
+ // The thread's branch PR comes from status, which may hold the lookup from before.
2658
+ if (result.status === "created") yield* invalidateStatus(input.cwd);
2659
+ if (input.draft === true && !(yield* draftOpened(input, result))) {
2660
+ // A retry finds the open PR and drafts it then.
2661
+ return yield* new GitManagerError({
2662
+ operation: "createPullRequest",
2663
+ cwd: input.cwd,
2664
+ detail: "Opened the pull request, but the host does not list it yet to make it a draft.",
2665
+ });
2666
+ }
2667
+ return result;
2668
+ });
2669
+
2670
+ /** A retry after a failed draft finds the PR it opened, so an open one is checked too. */
2671
+ const draftOpened = Effect.fn("GitManager.draftOpened")(
2672
+ function* (
2673
+ input: { readonly cwd: string; readonly projectId: ProjectId },
2674
+ result: GitCreatePullRequestResult,
2675
+ ) {
2676
+ const project = yield* projects.getShell(input.projectId).pipe(
2677
+ Effect.map(Option.getOrUndefined),
2678
+ Effect.orElseSucceed(() => undefined),
2679
+ );
2680
+ const key = createdPullRequestKey({ pr: result }, project);
2681
+ if (key === null) return false;
2682
+ const ref = { projectId: input.projectId, ...key };
2683
+ const isDraft =
2684
+ result.status === "opened_existing" &&
2685
+ (yield* pullRequests.summary({ ...ref, allowStale: false })).isDraft;
2686
+ if (!isDraft) yield* pullRequests.runAction({ ...ref, action: "draft" });
2687
+ return true;
2688
+ },
2689
+ (effect, input) =>
2690
+ effect.pipe(
2691
+ Effect.mapError(
2692
+ (cause) =>
2693
+ new GitManagerError({
2694
+ operation: "createPullRequest",
2695
+ cwd: input.cwd,
2696
+ detail: `Opened the pull request, but could not make it a draft: ${cause.message}`,
2697
+ cause,
2698
+ }),
2699
+ ),
2700
+ ),
2701
+ );
2702
+
2703
const localStatus: GitManager["Service"]["localStatus"] = Effect.fn("localStatus")(
2704
function* (input, options) {
2705
const cacheKey = yield* normalizeStatusCacheKey(input.cwd);
@@ -3726,6 +3839,7 @@ export const make = Effect.gen(function* () {
3839
resolvePullRequest,
3840
preparePullRequestThread,
3841
runStackedAction,
3842
+ createPullRequest,
3843
subscribePullRequestStateChanges: PubSub.subscribe(pullRequestStateChanges).pipe(
3844
Effect.map((subscription) => Stream.fromSubscription(subscription)),
3845
),
apps/server/src/mcp/McpHttpServer.test.ts
+115
-85
@@ -12,6 +12,7 @@ import {
12
OrchestratorMcpEnvironmentTarget,
13
OrchestratorMcpFailure,
14
PreviewTabId,
15
+ ProjectId,
16
ProviderInstanceId,
17
ProviderInteractionMode,
18
RuntimeMode,
@@ -46,6 +47,7 @@ import * as ManagedPolicy from "../policy/ManagedPolicy.ts";
47
import * as PreviewManager from "../preview/Manager.ts";
48
49
import * as DeviceService from "../device/DeviceService.ts";
50
+import * as GitManager from "../git/GitManager.ts";
51
import * as PullRequestReviewGuideService from "../pullRequest/PullRequestReviewGuideService.ts";
52
import * as PullRequestService from "../pullRequest/PullRequestService.ts";
53
import * as ServerConfig from "../config.ts";
@@ -108,6 +110,7 @@ const layerPullRequestsTest = McpHttpServer.layerPullRequestsToolkit.pipe(
110
Layer.mock(ProjectService.ProjectService)({}),
111
Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}),
112
Layer.mock(PullRequestService.PullRequestService)({}),
113
+ Layer.mock(GitManager.GitManager)({}),
114
Layer.mock(Orchestrator.OrchestratorV2)({}),
115
Layer.mock(ProjectionStore.ProjectionStoreV2)({}),
116
NodeServices.layer,
@@ -1755,95 +1758,122 @@ it.effect("hides tools for links and refuses another environment while the beta
1758
).pipe(Effect.provide(NodeHttpServer.layerTest)),
1759
);
1760
1758
-it.effect("lists pull request watch tools only to threads that are not delegated children", () =>
1759
- Effect.scoped(
1760
- Effect.gen(function* () {
1761
- const scopeFor = (
1762
- token: string,
1763
- subagent: boolean,
1764
- ): McpInvocationContext.McpThreadInvocationScope => ({
1765
- environmentId,
1766
- requestNamespace: token,
1767
- thread: {
1768
- threadId: ThreadId.make(`thread-${token}`),
1769
- providerSessionId: token,
1770
- providerInstanceId: ProviderInstanceId.make("codex"),
1771
- subagent,
1772
- },
1773
- client: undefined,
1774
- capabilities: new Set(["pull-requests"]),
1775
- issuedAt: 1,
1776
- });
1777
- const scopes = new Map([
1778
- ["parentToken", scopeFor("parentToken", false)],
1779
- ["childToken", scopeFor("childToken", true)],
1780
- ]);
1781
- const serverLayer = McpHttpServer.layerMcpTransport(
1782
- McpHttpServer.layerPullRequestsToolkit,
1783
- ).pipe(
1784
- Layer.provide(ServerSettings.layerTest()),
1785
- Layer.provide(
1786
- Layer.mock(McpSessionRegistry.McpSessionRegistry)({
1787
- resolve: (token) => Effect.succeed(scopes.get(token)),
1788
- }),
1789
- ),
1790
- Layer.provide(
1791
- Layer.mergeAll(
1792
- McpToolAccessTestkit.liveThreadsLayer,
1793
- Layer.mock(ProjectService.ProjectService)({}),
1794
- Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}),
1795
- Layer.mock(PullRequestService.PullRequestService)({}),
1796
- Layer.mock(Orchestrator.OrchestratorV2)({}),
1797
- Layer.mock(ProjectionStore.ProjectionStoreV2)({}),
1798
- NodeServices.layer,
1799
- NodeCrypto.layer,
1761
+it.effect(
1762
+ "lists watch tools only to threads that are not delegated children, and forge tools only where the project has a forge",
1763
+ () =>
1764
+ Effect.scoped(
1765
+ Effect.gen(function* () {
1766
+ const scopeFor = (
1767
+ token: string,
1768
+ subagent: boolean,
1769
+ ): McpInvocationContext.McpThreadInvocationScope => ({
1770
+ environmentId,
1771
+ requestNamespace: token,
1772
+ thread: {
1773
+ threadId: ThreadId.make(`thread-${token}`),
1774
+ providerSessionId: token,
1775
+ providerInstanceId: ProviderInstanceId.make("codex"),
1776
+ subagent,
1777
+ },
1778
+ client: undefined,
1779
+ capabilities: new Set(["pull-requests"]),
1780
+ issuedAt: 1,
1781
+ });
1782
+ const scopes = new Map([
1783
+ ["parentToken", scopeFor("parentToken", false)],
1784
+ ["childToken", scopeFor("childToken", true)],
1785
+ ["noForgeToken", scopeFor("noForgeToken", false)],
1786
+ ]);
1787
+ const serverLayer = McpHttpServer.layerMcpTransport(
1788
+ McpHttpServer.layerPullRequestsToolkit,
1789
+ ).pipe(
1790
+ Layer.provide(ServerSettings.layerTest()),
1791
+ Layer.provide(
1792
+ Layer.mock(McpSessionRegistry.McpSessionRegistry)({
1793
+ resolve: (token) => Effect.succeed(scopes.get(token)),
1794
+ }),
1795
),
1801
- ),
1802
- );
1803
- yield* HttpRouter.serve(serverLayer, { disableListenLog: true, disableLogger: true }).pipe(
1804
- Layer.build,
1805
- );
1806
- const httpClient = yield* HttpClient.HttpClient;
1807
- const listedTools = (token: string) =>
1808
- Effect.gen(function* () {
1809
- const headers = {
1810
- accept: "application/json, text/event-stream",
1811
- authorization: `Bearer ${token}`,
1812
- };
1813
- const initialize = yield* httpClient.post("/mcp", {
1814
- headers,
1815
- body: HttpBody.text(
1816
- `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1.0.0"}}}`,
1817
- "application/json",
1818
- ),
1819
- });
1820
- const listed = yield* httpClient.post("/mcp", {
1821
- headers: {
1822
- ...headers,
1823
- "mcp-session-id": initialize.headers["mcp-session-id"]!,
1824
- "mcp-protocol-version": "2025-06-18",
1825
- },
1826
- body: HttpBody.text(
1827
- `{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}`,
1828
- "application/json",
1796
+ Layer.provide(
1797
+ Layer.mergeAll(
1798
+ McpToolAccessTestkit.liveThreadsLayer,
1799
+ Layer.mock(ProjectService.ProjectService)({}),
1800
+ Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}),
1801
+ Layer.mock(PullRequestService.PullRequestService)({
1802
+ servesProject: (projectId) => Effect.succeed(projectId !== "project-noForgeToken"),
1803
+ }),
1804
+ Layer.mock(GitManager.GitManager)({}),
1805
+ Layer.mock(Orchestrator.OrchestratorV2)({}),
1806
+ Layer.mock(ProjectionStore.ProjectionStoreV2)({
1807
+ getThreadShell: (threadId) =>
1808
+ Effect.succeed({
1809
+ projectId: ProjectId.make(threadId.replace("thread-", "project-")),
1810
+ } as never),
1811
+ }),
1812
+ NodeServices.layer,
1813
+ NodeCrypto.layer,
1814
),
1815
+ ),
1816
+ );
1817
+ yield* HttpRouter.serve(serverLayer, { disableListenLog: true, disableLogger: true }).pipe(
1818
+ Layer.build,
1819
+ );
1820
+ const httpClient = yield* HttpClient.HttpClient;
1821
+ const listedTools = (token: string) =>
1822
+ Effect.gen(function* () {
1823
+ const headers = {
1824
+ accept: "application/json, text/event-stream",
1825
+ authorization: `Bearer ${token}`,
1826
+ };
1827
+ const initialize = yield* httpClient.post("/mcp", {
1828
+ headers,
1829
+ body: HttpBody.text(
1830
+ `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1.0.0"}}}`,
1831
+ "application/json",
1832
+ ),
1833
+ });
1834
+ const listed = yield* httpClient.post("/mcp", {
1835
+ headers: {
1836
+ ...headers,
1837
+ "mcp-session-id": initialize.headers["mcp-session-id"]!,
1838
+ "mcp-protocol-version": "2025-06-18",
1839
+ },
1840
+ body: HttpBody.text(
1841
+ `{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}`,
1842
+ "application/json",
1843
+ ),
1844
+ });
1845
+ const body = (yield* listed.json) as {
1846
+ readonly result: { readonly tools: ReadonlyArray<{ readonly name: string }> };
1847
+ };
1848
+ return body.result.tools.map((tool) => tool.name);
1849
});
1831
- const body = (yield* listed.json) as {
1832
- readonly result: { readonly tools: ReadonlyArray<{ readonly name: string }> };
1833
- };
1834
- return body.result.tools.map((tool) => tool.name);
1835
- });
1850
1837
- const parentTools = yield* listedTools("parentToken");
1838
- const childTools = yield* listedTools("childToken");
1839
- expect(parentTools).toEqual(
1840
- expect.arrayContaining(["link_pull_request", "watch_pull_request", "unwatch_pull_request"]),
1841
- );
1842
- expect(childTools).toContain("link_pull_request");
1843
- expect(childTools).not.toContain("watch_pull_request");
1844
- expect(childTools).not.toContain("unwatch_pull_request");
1845
- }),
1846
- ).pipe(Effect.provide(NodeHttpServer.layerTest)),
1851
+ const parentTools = yield* listedTools("parentToken");
1852
+ const childTools = yield* listedTools("childToken");
1853
+ expect(parentTools).toEqual(
1854
+ expect.arrayContaining([
1855
+ "link_pull_request",
1856
+ "watch_pull_request",
1857
+ "unwatch_pull_request",
1858
+ ]),
1859
+ );
1860
+ expect(childTools).toContain("link_pull_request");
1861
+ expect(childTools).not.toContain("watch_pull_request");
1862
+ expect(childTools).not.toContain("unwatch_pull_request");
1863
+ expect(parentTools).toEqual(
1864
+ expect.arrayContaining([
1865
+ "pull_request_read",
1866
+ "pull_request_review",
1867
+ "pull_request_merge",
1868
+ ]),
1869
+ );
1870
+ const noForgeTools = yield* listedTools("noForgeToken");
1871
+ expect(noForgeTools).toEqual(
1872
+ expect.arrayContaining(["link_pull_request", "watch_pull_request"]),
1873
+ );
1874
+ expect(noForgeTools.filter((name) => name.startsWith("pull_request_"))).toEqual([]);
1875
+ }),
1876
+ ).pipe(Effect.provide(NodeHttpServer.layerTest)),
1877
);
1878
1879
it.effect(
apps/server/src/mcp/McpHttpServer.ts
+27
-1
@@ -1,6 +1,8 @@
1
+import * as Cache from "effect/Cache";
2
import * as Cause from "effect/Cause";
3
import * as Clock from "effect/Clock";
4
import * as Context from "effect/Context";
5
+import * as Duration from "effect/Duration";
6
import * as SecureRandom from "effect/crypto/SecureRandom";
7
import * as Effect from "effect/Effect";
8
import * as FileSystem from "effect/FileSystem";
@@ -33,6 +35,8 @@ import * as DeviceService from "../device/DeviceService.ts";
35
import * as HtmlRender from "../htmlRender/HtmlRender.ts";
36
import * as ThreadCommandExecutor from "../orchestration-v2/ThreadCommandExecutor.ts";
37
import * as ThreadManagementService from "../orchestration-v2/ThreadManagementService.ts";
38
+import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts";
39
+import * as PullRequestService from "../pullRequest/PullRequestService.ts";
40
import * as PullRequestWatchService from "../pullRequest/PullRequestWatchService.ts";
41
import * as ProviderRegistry from "../provider/ProviderRegistry.ts";
42
import * as AnalyticsService from "../telemetry/AnalyticsService.ts";
@@ -277,6 +281,24 @@ const makeMcpAuthMiddleware = Effect.gen(function* () {
281
Effect.map((settings) => settings.linkedEnvironmentsEnabled),
282
Effect.orElseSucceed(() => false),
283
);
284
+ const pullRequests = yield* Effect.serviceOption(PullRequestService.PullRequestService);
285
+ const projections = yield* Effect.serviceOption(ProjectionStore.ProjectionStoreV2);
286
+ // Every request reads it, and a remote added mid-thread shows the tools within a minute.
287
+ const forgeOfThread = yield* Cache.make({
288
+ capacity: 1_000,
289
+ timeToLive: Duration.minutes(1),
290
+ lookup: (threadId: ThreadId): Effect.Effect<boolean | undefined> =>
291
+ Option.isNone(pullRequests) || Option.isNone(projections)
292
+ ? Effect.undefined
293
+ : projections.value.getThreadShell(threadId).pipe(
294
+ Effect.flatMap((thread) =>
295
+ thread === null
296
+ ? Effect.undefined
297
+ : pullRequests.value.servesProject(thread.projectId),
298
+ ),
299
+ Effect.orElseSucceed(() => undefined),
300
+ ),
301
+ });
302
const authenticateRequest = Effect.fn("McpHttpServer.authenticateRequest")(function* (
303
request: HttpServerRequest.HttpServerRequest,
304
) {
@@ -310,7 +332,11 @@ const makeMcpAuthMiddleware = Effect.gen(function* () {
332
const linkedEnvironments = yield* linksEnabled;
333
if (limited.client?.linked === true && !linkedEnvironments) return linkedEnvironmentsOff;
334
const origin = Option.getOrUndefined(Option.map(requestUrl(request), (url) => url.origin));
313
- return { ...limited, linkedEnvironments, origin };
335
+ const forge =
336
+ limited.thread === undefined
337
+ ? undefined
338
+ : yield* Cache.get(forgeOfThread, limited.thread.threadId);
339
+ return { ...limited, linkedEnvironments, origin, ...(forge === undefined ? {} : { forge }) };
340
});
341
// Untraced: a span here would wrap the tool call; the HTTP server span already covers it.
342
return Effect.fnUntraced(function* (httpEffect) {
apps/server/src/mcp/McpInvocationContext.ts
+9
@@ -147,6 +147,8 @@ export interface McpInvocationScope {
147
* see the URL they were configured with, so links they must fetch carry it. Unset in-process.
148
*/
149
readonly origin?: string | undefined;
150
+ /** False when the calling thread's project is on no forge T3 reads; `/mcp` reads it per request. */
151
+ readonly forge?: boolean;
152
}
153
154
/**
@@ -199,6 +201,13 @@ export const hiddenWhileLinksOff = (): boolean => {
201
return scope?.linkedEnvironments !== false;
202
};
203
204
+/** `McpSchema.EnabledWhen` for tools that act on the thread's forge, hidden where it has none. */
205
+export const hiddenWithoutForge = (): boolean => {
206
+ const fiber = Fiber.getCurrent();
207
+ const scope = fiber && Context.getOrUndefined(fiber.context, McpInvocationContext);
208
+ return scope?.forge !== false;
209
+};
210
+
211
export type McpCapabilityError<C extends McpCapability> = C extends "preview"
212
? PreviewAutomationUnavailableError
213
: McpCapabilityUnavailableError;
apps/server/src/mcp/toolkits/pullRequests/handlers.test.ts
+430
@@ -6,6 +6,12 @@ import {
6
type OrchestrationV2ServerCommand as OrchestrationCommand,
7
PullRequestOperationError,
8
type OrchestrationProjectShell,
9
+ type PullRequestActionInput,
10
+ type PullRequestDiffResult,
11
+ type PullRequestSubmitReviewInput,
12
+ type PullRequestActivity,
13
+ type PullRequestListInput,
14
+ type PullRequestDetail,
15
type PullRequestRef,
16
type PullRequestReviewGuideResult,
17
type ThreadPullRequestLink,
@@ -14,12 +20,14 @@ import {
20
import { describe, expect, it } from "@effect/vitest";
21
import * as SecureRandom from "effect/crypto/SecureRandom";
22
import * as Effect from "effect/Effect";
23
+import * as Base64Url from "effect/encoding/Base64Url";
24
import * as Layer from "effect/Layer";
25
import * as Option from "effect/Option";
26
import * as Ref from "effect/Ref";
27
import * as Stream from "effect/Stream";
28
import type { Tool } from "effect/ai";
29
30
+import * as GitManager from "../../../git/GitManager.ts";
31
import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts";
32
import {
33
type PullRequestTestThread,
@@ -28,6 +36,7 @@ import {
36
import * as ProjectService from "../../../project/ProjectService.ts";
37
import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts";
38
import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts";
39
+import * as PullRequestService from "../../../pullRequest/PullRequestService.ts";
40
import * as McpInvocationContext from "../../McpInvocationContext.ts";
41
import * as McpToolAccess from "../../McpToolAccess.ts";
42
import * as McpToolAccessTestkit from "../../McpToolAccess.testkit.ts";
@@ -144,6 +153,8 @@ interface HarnessOptions {
153
PullRequestReviewGuideResult & { started: boolean },
154
PullRequestOperationError
155
>;
156
+ readonly pullRequests?: Partial<PullRequestService.PullRequestService["Service"]>;
157
+ readonly git?: Partial<GitManager.GitManager["Service"]>;
158
}
159
160
const NO_GUIDE: PullRequestReviewGuideResult = { guide: null, run: null, currentHeadSha: "head-1" };
@@ -196,6 +207,8 @@ const makeHarness = Effect.fn("makePullRequestsToolkitHarness")(function* (
207
Effect.succeed(id === thread?.id ? v2PullRequestThread(thread) : null),
208
dispatch,
209
}),
210
+ Layer.mock(PullRequestService.PullRequestService)(options.pullRequests ?? {}),
211
+ Layer.mock(GitManager.GitManager)(options.git ?? {}),
212
Layer.succeed(SecureRandom.SecureRandom, testCrypto),
213
McpToolAccessTestkit.liveThreadsLayer,
214
);
@@ -784,3 +797,420 @@ describe("pull request guide tools", () => {
797
}),
798
);
799
});
800
+
801
+describe("source control tools", () => {
802
+ const branchThread = {
803
+ ...makeThread([]),
804
+ worktreePath: "/workspace/worktree",
805
+ branchPullRequest: {
806
+ projectId: PROJECT_ID,
807
+ repository: "t3tools/t3code",
808
+ number: 42,
809
+ url: "https://github.com/t3tools/t3code/pull/42",
810
+ },
811
+ };
812
+ const detail = {
813
+ title: "Add tools",
814
+ body: "Adds tools.",
815
+ state: "open",
816
+ isDraft: false,
817
+ author: null,
818
+ headBranch: "tools",
819
+ baseBranch: "main",
820
+ headSha: "abc123",
821
+ mergeability: "mergeable",
822
+ additions: 1,
823
+ deletions: 0,
824
+ changedFiles: 1,
825
+ labels: [],
826
+ reviewers: [],
827
+ checks: [{ name: "CI", status: "success", description: null, url: null }],
828
+ } as unknown as PullRequestDetail;
829
+ const reviewThread = (id: string, isResolved: boolean) => ({
830
+ id,
831
+ path: "a.ts",
832
+ line: 1,
833
+ side: "right" as const,
834
+ isResolved,
835
+ isOutdated: false,
836
+ comments: [],
837
+ });
838
+ const activity: PullRequestActivity = {
839
+ comments: [],
840
+ commentCount: 0,
841
+ commentsTruncated: false,
842
+ reviewThreads: [reviewThread("open-thread", false), reviewThread("done-thread", true)],
843
+ commits: [],
844
+ };
845
+
846
+ it.effect("reads the thread's branch PR, only the sections asked, without resolved threads", () =>
847
+ Effect.gen(function* () {
848
+ const asked: Array<PullRequestRef> = [];
849
+ const harness = yield* makeHarness({
850
+ thread: branchThread,
851
+ pullRequests: {
852
+ detail: (ref) => Effect.sync(() => asked.push(ref)).pipe(Effect.as(detail)),
853
+ activity: () => Effect.succeed(activity),
854
+ },
855
+ });
856
+ const result = yield* harness.call("pull_request_read", {
857
+ sections: ["summary", "conversation"],
858
+ });
859
+ expect(asked).toEqual([
860
+ {
861
+ projectId: PROJECT_ID,
862
+ host: "github.com",
863
+ repository: "t3tools/t3code",
864
+ number: 42,
865
+ allowStale: false,
866
+ },
867
+ ]);
868
+ expect(result.summary?.headSha).toBe("abc123");
869
+ expect(result.checks).toBeUndefined();
870
+ expect(result.conversation?.reviewThreads.map((thread) => thread.id)).toEqual([
871
+ "open-thread",
872
+ ]);
873
+ expect(result.conversation?.hiddenResolvedThreads).toBe(1);
874
+ }),
875
+ );
876
+
877
+ it.effect("pages a long conversation and the PR list through the cursors they return", () =>
878
+ Effect.gen(function* () {
879
+ const comment = (body: string) =>
880
+ ({ id: body.slice(0, 8), author: null, body, createdAt: "2026-11-01T00:00:00Z" }) as never;
881
+ const long = (id: string) => ({
882
+ ...reviewThread(id, false),
883
+ comments: [comment("x".repeat(20_000))],
884
+ });
885
+ const listed: Array<PullRequestListInput> = [];
886
+ let firstResolved = false;
887
+ const harness = yield* makeHarness({
888
+ thread: branchThread,
889
+ pullRequests: {
890
+ activity: () =>
891
+ Effect.sync(() => ({
892
+ ...activity,
893
+ reviewThreads: [
894
+ {
895
+ ...long("first"),
896
+ isResolved: firstResolved,
897
+ nextCommentsCursor: "later",
898
+ },
899
+ long("second"),
900
+ reviewThread("done-thread", true),
901
+ ],
902
+ })),
903
+ threadComments: (input) =>
904
+ Effect.succeed(
905
+ input.cursor === "later"
906
+ ? { comments: [comment("reply")], nextCursor: null }
907
+ : { comments: [], nextCursor: null },
908
+ ),
909
+ list: (input) =>
910
+ Effect.sync(() => listed.push(input)).pipe(
911
+ Effect.as({
912
+ viewers: {},
913
+ providers: [],
914
+ entries: [],
915
+ errors: [],
916
+ truncated: input.cursors === undefined,
917
+ nextCursors: input.cursors === undefined ? { "t3tools/t3code": "page-2" } : {},
918
+ }),
919
+ ),
920
+ },
921
+ });
922
+ const first = yield* harness.call("pull_request_read", { sections: ["conversation"] });
923
+ expect(first.conversation?.reviewThreads).toMatchObject([
924
+ { id: "first", moreComments: false, comments: [{}, { body: "reply" }] },
925
+ ]);
926
+ const cursor = first.conversation?.nextCursor;
927
+ expect(cursor).toEqual(expect.any(String));
928
+ // The agent resolves what it read; the next page still starts at the next thread.
929
+ firstResolved = true;
930
+ const second = yield* harness.call("pull_request_read", { cursor: cursor! });
931
+ expect(second.summary).toBeUndefined();
932
+ expect(second.conversation?.reviewThreads.map((thread) => thread.id)).toEqual(["second"]);
933
+ expect(second.conversation?.nextCursor).toBeNull();
934
+ // A cursor past the current end finishes instead of repeating an empty page.
935
+ const stale = Base64Url.encode(
936
+ JSON.stringify({ threads: 99, comments: 99, includeResolved: false }),
937
+ );
938
+ const past = yield* harness.call("pull_request_read", { cursor: stale });
939
+ expect(past.conversation).toMatchObject({ reviewThreads: [], nextCursor: null });
940
+
941
+ const page = yield* harness.call("pull_request_list", {});
942
+ yield* harness.call("pull_request_list", { cursor: page.nextCursor! });
943
+ expect(listed.map((input) => input.cursors)).toEqual([
944
+ undefined,
945
+ { "t3tools/t3code": "page-2" },
946
+ ]);
947
+ const invalid = yield* harness
948
+ .call("pull_request_read", { cursor: "not-a-cursor" })
949
+ .pipe(Effect.flip);
950
+ expect(invalid._tag).toBe("PullRequestCursorInvalidError");
951
+ }),
952
+ );
953
+
954
+ it.effect("asks for a number when the thread's branch has no PR", () =>
955
+ Effect.gen(function* () {
956
+ const harness = yield* makeHarness();
957
+ const error = yield* harness.call("pull_request_read", {}).pipe(Effect.flip);
958
+ expect(error._tag).toBe("PullRequestBranchHasNoneError");
959
+ }),
960
+ );
961
+
962
+ it.effect("reads the PR this thread opened before status sync reports it", () =>
963
+ Effect.gen(function* () {
964
+ const asked: Array<PullRequestRef> = [];
965
+ const opened = (headBranch: string) =>
966
+ makeHarness({
967
+ thread: { ...makeThread([makeLink(43, { source: "created" })]), branch: "tools" },
968
+ pullRequests: {
969
+ summary: () => Effect.succeed({ state: "open", headBranch } as never),
970
+ detail: (ref) => Effect.sync(() => asked.push(ref)).pipe(Effect.as(detail)),
971
+ },
972
+ });
973
+ const harness = yield* opened("tools");
974
+ yield* harness.call("pull_request_read", { sections: ["summary"] });
975
+ expect(asked).toMatchObject([{ number: 43 }]);
976
+
977
+ // Before sync, the host says which branch it came from; another branch's is not this one.
978
+ const moved = yield* opened("old");
979
+ const unsynced = yield* moved.call("pull_request_read", {}).pipe(Effect.flip);
980
+ expect(unsynced._tag).toBe("PullRequestBranchHasNoneError");
981
+
982
+ // After a switch to another branch, the PR opened from the old one is not the branch's.
983
+ const switched = yield* makeHarness({
984
+ thread: {
985
+ ...makeThread([makeLink(43, { source: "created", headBranch: "old" })]),
986
+ branch: "new",
987
+ },
988
+ });
989
+ const error = yield* switched
990
+ .call("pull_request_update", { title: "New title" })
991
+ .pipe(Effect.flip);
992
+ expect(error._tag).toBe("PullRequestBranchHasNoneError");
993
+ }),
994
+ );
995
+
996
+ it.effect("merges pinned to the head the agent checked", () =>
997
+ Effect.gen(function* () {
998
+ const actions: Array<PullRequestActionInput> = [];
999
+ const harness = yield* makeHarness({
1000
+ thread: branchThread,
1001
+ pullRequests: {
1002
+ runAction: (input) => Effect.sync(() => void actions.push(input)),
1003
+ summary: () => Effect.succeed({ state: "open" } as never),
1004
+ },
1005
+ });
1006
+ const result = yield* harness.call("pull_request_merge", {
1007
+ expectedHeadSha: "abc123",
1008
+ method: "squash",
1009
+ auto: true,
1010
+ });
1011
+ expect(result).toMatchObject({ number: 42, state: "open" });
1012
+ expect(actions).toMatchObject([
1013
+ {
1014
+ number: 42,
1015
+ action: "enable-auto-merge",
1016
+ expectedHeadSha: "abc123",
1017
+ mergeMethod: "squash",
1018
+ },
1019
+ ]);
1020
+ }),
1021
+ );
1022
+
1023
+ it.effect("opens a PR from the thread's worktree and links it even if dismissed", () =>
1024
+ Effect.gen(function* () {
1025
+ const opened: Array<{ readonly cwd: string; readonly draft: boolean | undefined }> = [];
1026
+ const harness = yield* makeHarness({
1027
+ thread: {
1028
+ ...makeThread([makeLink(43, { source: "stack-dismissed" })]),
1029
+ worktreePath: "/workspace/worktree",
1030
+ },
1031
+ git: {
1032
+ createPullRequest: (input) =>
1033
+ Effect.sync(() => opened.push({ cwd: input.cwd, draft: input.draft })).pipe(
1034
+ Effect.as({
1035
+ status: "created" as const,
1036
+ url: "https://github.com/t3tools/t3code/pull/43",
1037
+ number: 43,
1038
+ baseBranch: "main",
1039
+ headBranch: "tools",
1040
+ title: input.title,
1041
+ }),
1042
+ ),
1043
+ },
1044
+ });
1045
+ const result = yield* harness.call("pull_request_create", {
1046
+ title: "Add tools",
1047
+ body: "Adds tools.",
1048
+ draft: true,
1049
+ });
1050
+ expect(result).toMatchObject({ number: 43, created: true });
1051
+ expect(opened).toEqual([{ cwd: "/workspace/worktree", draft: true }]);
1052
+ expect(yield* Ref.get(harness.commands)).toMatchObject([
1053
+ { type: "thread.pull-request.link", number: 43, source: "created" },
1054
+ ]);
1055
+ }),
1056
+ );
1057
+
1058
+ it.effect("replies to and resolves a review thread, and refuses resolving without one", () =>
1059
+ Effect.gen(function* () {
1060
+ const calls: Array<string> = [];
1061
+ const harness = yield* makeHarness({
1062
+ thread: branchThread,
1063
+ pullRequests: {
1064
+ replyToThread: (input) => Effect.sync(() => calls.push(`reply ${input.threadId}`)),
1065
+ setThreadResolution: (input) =>
1066
+ input.threadId === "locked-thread"
1067
+ ? Effect.fail(
1068
+ new PullRequestOperationError({
1069
+ operation: "setThreadResolution",
1070
+ detail: "Locked.",
1071
+ }),
1072
+ )
1073
+ : Effect.sync(() => void calls.push(`resolve ${input.threadId} ${input.resolved}`)),
1074
+ },
1075
+ });
1076
+ const result = yield* harness.call("pull_request_respond", {
1077
+ reviewThreadId: "open-thread",
1078
+ body: "Fixed.",
1079
+ resolved: true,
1080
+ });
1081
+ expect(result).toMatchObject({ replied: true, resolved: true });
1082
+ expect(calls).toEqual(["reply open-thread", "resolve open-thread true"]);
1083
+ const partial = yield* harness
1084
+ .call("pull_request_respond", {
1085
+ reviewThreadId: "locked-thread",
1086
+ body: "Fixed.",
1087
+ resolved: true,
1088
+ })
1089
+ .pipe(Effect.flip);
1090
+ expect(partial.message).toContain("The reply was posted");
1091
+ const error = yield* harness
1092
+ .call("pull_request_respond", { body: "Done", resolved: true })
1093
+ .pipe(Effect.flip);
1094
+ expect(error._tag).toBe("PullRequestNothingToDoError");
1095
+ }),
1096
+ );
1097
+
1098
+ it.effect("places review comments by the diff page that shows their line", () =>
1099
+ Effect.gen(function* () {
1100
+ const reviews: Array<PullRequestSubmitReviewInput> = [];
1101
+ const pages: Record<string, PullRequestDiffResult> = {
1102
+ first: {
1103
+ patch:
1104
+ "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",
1105
+ truncated: false,
1106
+ nextCursor: "second",
1107
+ },
1108
+ second: {
1109
+ patch:
1110
+ "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",
1111
+ truncated: false,
1112
+ nextCursor: null,
1113
+ },
1114
+ };
1115
+ const harness = yield* makeHarness({
1116
+ thread: branchThread,
1117
+ pullRequests: {
1118
+ diff: (input) => Effect.succeed(pages[input.cursor ?? "first"]!),
1119
+ submitReview: (input) => Effect.sync(() => void reviews.push(input)),
1120
+ },
1121
+ });
1122
+ yield* harness.call("pull_request_review", {
1123
+ verdict: "request-changes",
1124
+ body: "Two things.",
1125
+ comments: [
1126
+ { path: "b.ts", line: 10, startLine: 9, body: "Why?" },
1127
+ { path: "a.ts", line: 1, side: "old", body: "Keep this." },
1128
+ ],
1129
+ });
1130
+ expect(reviews).toMatchObject([
1131
+ {
1132
+ number: 42,
1133
+ verdict: "request-changes",
1134
+ body: "Two things.",
1135
+ comments: [
1136
+ {
1137
+ path: "b.ts",
1138
+ position: { kind: "added", newLine: 10 },
1139
+ startPosition: { kind: "context", oldLine: 9, newLine: 9, side: "right" },
1140
+ },
1141
+ { path: "a.ts", position: { kind: "deleted", oldLine: 1 } },
1142
+ ],
1143
+ },
1144
+ ]);
1145
+
1146
+ // A line the diff never shows fails before anything is posted.
1147
+ const error = yield* harness
1148
+ .call("pull_request_review", {
1149
+ verdict: "comment",
1150
+ comments: [{ path: "a.ts", line: 40, body: "Here?" }],
1151
+ })
1152
+ .pipe(Effect.flip);
1153
+ expect(error.message).toContain("a.ts line 40 (new side) is not in this PR's diff");
1154
+ expect(reviews).toHaveLength(1);
1155
+ }),
1156
+ );
1157
+
1158
+ it.effect("updates labels, requests reviewers by login, and closes the PR", () =>
1159
+ Effect.gen(function* () {
1160
+ const calls: Array<unknown> = [];
1161
+ const harness = yield* makeHarness({
1162
+ thread: branchThread,
1163
+ pullRequests: {
1164
+ setLabels: (input) =>
1165
+ Effect.sync(() => void calls.push(["labels", input.labels, input.applied])),
1166
+ reviewerCandidates: (input) =>
1167
+ Effect.succeed({
1168
+ candidates: [
1169
+ {
1170
+ id: "MDQ6VXNlcjE=",
1171
+ kind: "user",
1172
+ login: input.query === "Octo" ? "octo" : "x",
1173
+ name: null,
1174
+ avatarUrl: null,
1175
+ isRequested: false,
1176
+ },
1177
+ {
1178
+ id: "core",
1179
+ kind: "team",
1180
+ login: "acme/core",
1181
+ name: null,
1182
+ avatarUrl: null,
1183
+ isRequested: false,
1184
+ },
1185
+ ],
1186
+ } as never),
1187
+ requestReviewers: (input) =>
1188
+ Effect.sync(() => void calls.push(["reviewers", input.reviewers])),
1189
+ runAction: (input) => Effect.sync(() => void calls.push(["action", input.action])),
1190
+ },
1191
+ });
1192
+ yield* harness.call("pull_request_update", {
1193
+ addLabels: ["bug"],
1194
+ removeLabels: ["wip"],
1195
+ requestReviewers: ["Octo", "acme/core"],
1196
+ state: "closed",
1197
+ });
1198
+ expect(calls).toEqual([
1199
+ ["labels", ["bug"], true],
1200
+ ["labels", ["wip"], false],
1201
+ [
1202
+ "reviewers",
1203
+ [
1204
+ { id: "MDQ6VXNlcjE=", kind: "user" },
1205
+ { id: "core", kind: "team" },
1206
+ ],
1207
+ ],
1208
+ ["action", "close"],
1209
+ ]);
1210
+ const unknown = yield* harness
1211
+ .call("pull_request_update", { requestReviewers: ["nobody"] })
1212
+ .pipe(Effect.flip);
1213
+ expect(unknown.message).toContain("No reviewer named nobody");
1214
+ }),
1215
+ );
1216
+});
apps/server/src/mcp/toolkits/pullRequests/handlers.ts
+608
-2
@@ -1,22 +1,34 @@
1
import {
2
CommandId,
3
+ NonNegativeInt,
4
+ type PullRequestActivity,
5
+ PullRequestListCursors,
6
+ type PullRequestRef,
7
+ type PullRequestReviewCommentDraft,
8
+ type PullRequestReviewThread,
9
type OrchestrationProjectShell,
10
type PullRequestState,
11
type PullRequestWatchUntil,
12
type OrchestrationV2ThreadShell,
13
type ThreadId,
14
type ThreadPullRequestLink,
15
+ TrimmedNonEmptyString,
16
} from "@t3tools/contracts";
17
import * as Cause from "effect/Cause";
18
import * as SecureRandom from "effect/crypto/SecureRandom";
19
import * as Effect from "effect/Effect";
20
+import * as Base64Url from "effect/encoding/Base64Url";
21
import * as Option from "effect/Option";
22
+import * as Schema from "effect/Schema";
23
24
+import * as GitManager from "../../../git/GitManager.ts";
25
import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts";
26
import * as ProjectService from "../../../project/ProjectService.ts";
27
import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts";
28
import { resolveTarget, type ResolvedTarget } from "../../../pullRequest/pullRequestTarget.ts";
29
import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts";
30
+import * as PullRequestService from "../../../pullRequest/PullRequestService.ts";
31
+import { reviewPositionInPatch } from "../../../pullRequest/pullRequestReviewPosition.ts";
32
import { pullRequestSyncKey } from "../../../pullRequest/pullRequestSyncKey.ts";
33
import { sourceControlDefinitions } from "../../../sourceControl/sourceControlDefinitions.ts";
34
import {
@@ -32,6 +44,14 @@ import * as McpToolAccess from "../../McpToolAccess.ts";
44
import { threadNotFound } from "../../threadAccess.ts";
45
import {
46
type ListThreadPullRequestsResult,
47
+ PullRequestBranchHasNoneError,
48
+ PullRequestCursorInvalidError,
49
+ PullRequestForgeError,
50
+ PullRequestNothingToDoError,
51
+ type PullRequestReadSection,
52
+ type ReadPullRequestResult,
53
+ type ReviewLineComment,
54
+ type ThreadPullRequestInput,
55
PullRequestLinkFailedError,
56
PullRequestUnlinkFailedError,
57
PullRequestListFailedError,
@@ -44,6 +64,97 @@ import {
64
CHILD_PULL_REQUEST_REPORT_NEXT,
65
} from "./tools.ts";
66
67
+const ReadCursor = Schema.Union([
68
+ Schema.Struct({ diff: TrimmedNonEmptyString }),
69
+ Schema.Struct({
70
+ threads: NonNegativeInt,
71
+ comments: NonNegativeInt,
72
+ includeResolved: Schema.Boolean,
73
+ }),
74
+]);
75
+type ReadCursor = typeof ReadCursor.Type;
76
+
77
+const ReadCursorJson = Schema.fromJsonString(ReadCursor);
78
+const ListCursorsJson = Schema.fromJsonString(PullRequestListCursors);
79
+const encodeReadCursorJson = Schema.encodeSync(ReadCursorJson);
80
+const encodeListCursorsJson = Schema.encodeSync(ListCursorsJson);
81
+const decodeReadCursorJson = Schema.decodeUnknownEffect(ReadCursorJson);
82
+const decodeListCursorsJson = Schema.decodeUnknownEffect(ListCursorsJson);
83
+
84
+const decodeCursorText = (cursor: string) =>
85
+ Effect.fromResult(Base64Url.decodeString(cursor)).pipe(
86
+ Effect.mapError(() => new PullRequestCursorInvalidError({})),
87
+ );
88
+
89
+const readCursors = {
90
+ encode: (value: ReadCursor) => Base64Url.encode(encodeReadCursorJson(value)),
91
+ decode: (cursor: string) =>
92
+ decodeCursorText(cursor).pipe(
93
+ Effect.flatMap(decodeReadCursorJson),
94
+ Effect.mapError(() => new PullRequestCursorInvalidError({})),
95
+ ),
96
+};
97
+
98
+const listCursors = {
99
+ encode: (value: PullRequestListCursors) => Base64Url.encode(encodeListCursorsJson(value)),
100
+ decode: (cursor: string) =>
101
+ decodeCursorText(cursor).pipe(
102
+ Effect.flatMap(decodeListCursorsJson),
103
+ Effect.mapError(() => new PullRequestCursorInvalidError({})),
104
+ ),
105
+};
106
+
107
+/** Keeps one conversation page near the size of a capped CI log. */
108
+const CONVERSATION_PAGE_CHARS = 32_000;
109
+const THREAD_COMMENT_PAGES = 4;
110
+/** Diff pages searched for review comment lines; a PR past this is too big to review by line. */
111
+const REVIEW_DIFF_PAGES = 10;
112
+
113
+function conversationPage(
114
+ activity: PullRequestActivity,
115
+ start: { readonly threads: number; readonly comments: number },
116
+ includeResolved: boolean,
117
+) {
118
+ // Offsets index the unfiltered lists, whose order resolving a thread does not change.
119
+ const { reviewThreads, comments } = activity;
120
+ const pageThreads: Array<PullRequestReviewThread> = [];
121
+ const pageComments: Array<PullRequestActivity["comments"][number]> = [];
122
+ let size = 0;
123
+ let thread = Math.min(start.threads, reviewThreads.length);
124
+ let comment = Math.min(start.comments, comments.length);
125
+ const fits = (item: unknown) => {
126
+ const next = size + JSON.stringify(item).length;
127
+ if (next > CONVERSATION_PAGE_CHARS && pageThreads.length + pageComments.length > 0) {
128
+ return false;
129
+ }
130
+ size = next;
131
+ return true;
132
+ };
133
+ // Review threads come first: they hold the feedback an agent acts on.
134
+ while (thread < reviewThreads.length) {
135
+ const next = reviewThreads[thread]!;
136
+ if (includeResolved || !next.isResolved) {
137
+ if (!fits(next)) break;
138
+ pageThreads.push(next);
139
+ }
140
+ thread += 1;
141
+ }
142
+ if (thread === reviewThreads.length) {
143
+ while (comment < comments.length && fits(comments[comment])) {
144
+ pageComments.push(comments[comment++]!);
145
+ }
146
+ }
147
+ const done = thread === reviewThreads.length && comment === comments.length;
148
+ return {
149
+ threads: pageThreads,
150
+ comments: pageComments,
151
+ hiddenResolvedThreads: includeResolved
152
+ ? 0
153
+ : reviewThreads.filter((candidate) => candidate.isResolved).length,
154
+ next: done ? null : { threads: thread, comments: comment, includeResolved },
155
+ };
156
+}
157
+
158
function entryOf(
159
link: ThreadPullRequestLink,
160
chains: ReturnType<typeof resolveThreadPullRequestChains>,
@@ -148,6 +259,8 @@ const make = Effect.gen(function* () {
259
const engine = yield* Orchestrator.OrchestratorV2;
260
const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService;
261
const watches = yield* PullRequestWatchService.PullRequestWatchService;
262
+ const pullRequests = yield* PullRequestService.PullRequestService;
263
+ const git = yield* GitManager.GitManager;
264
265
const projects = yield* ProjectService.ProjectService;
266
const random = yield* SecureRandom.SecureRandom;
@@ -162,7 +275,8 @@ const make = Effect.gen(function* () {
275
Failure:
276
| typeof PullRequestLinkFailedError
277
| typeof PullRequestUnlinkFailedError
165
- | typeof PullRequestListFailedError,
278
+ | typeof PullRequestListFailedError
279
+ | typeof PullRequestForgeError,
280
requested: ThreadId | undefined,
281
) {
282
const scope = yield* McpInvocationContext.requireMcpCapability("pull-requests");
@@ -182,7 +296,10 @@ const make = Effect.gen(function* () {
296
297
const projectOf = (
298
thread: OrchestrationV2ThreadShell,
185
- Failure: typeof PullRequestLinkFailedError | typeof PullRequestUnlinkFailedError,
299
+ Failure:
300
+ | typeof PullRequestLinkFailedError
301
+ | typeof PullRequestUnlinkFailedError
302
+ | typeof PullRequestForgeError,
303
) =>
304
projects.getShell(thread.projectId).pipe(
305
Effect.map(Option.getOrUndefined),
@@ -280,6 +397,269 @@ const make = Effect.gen(function* () {
397
handle: (params: P) => Effect.Effect<A, E, R>,
398
) => McpToolAccess.writesThreads((params: P) => [params.threadId], handle);
399
400
+ const forgeFailure = (error: { readonly message: string }) =>
401
+ new PullRequestForgeError({ detail: error.message, cause: error });
402
+
403
+ /** A login or org/team, matched to the host's own reviewer id. */
404
+ const reviewerNamed = (ref: PullRequestRef, name: string) =>
405
+ pullRequests.reviewerCandidates({ ...ref, query: name }).pipe(
406
+ Effect.mapError(forgeFailure),
407
+ Effect.flatMap(({ candidates }) => {
408
+ const wanted = name.toLowerCase();
409
+ const match = candidates.find(
410
+ (candidate) =>
411
+ candidate.login.toLowerCase() === wanted || candidate.id.toLowerCase() === wanted,
412
+ );
413
+ return match === undefined
414
+ ? Effect.fail(
415
+ new PullRequestForgeError({
416
+ detail: `No reviewer named ${name} can be requested on this PR.`,
417
+ }),
418
+ )
419
+ : Effect.succeed({ id: match.id, kind: match.kind });
420
+ }),
421
+ );
422
+
423
+ /** Line comments placed by the PR's diff, which says whether each line was added, removed, or kept. */
424
+ const reviewComments = Effect.fn("PullRequestsToolkit.reviewComments")(function* (
425
+ ref: PullRequestRef,
426
+ comments: ReadonlyArray<ReviewLineComment>,
427
+ ) {
428
+ const placed = new Map<ReviewLineComment, PullRequestReviewCommentDraft>();
429
+ const unplaced = () => comments.filter((comment) => !placed.has(comment));
430
+ let cursor: string | undefined;
431
+ for (let page = 0; page < REVIEW_DIFF_PAGES && unplaced().length > 0; page += 1) {
432
+ const diff = yield* pullRequests
433
+ .diff({ ...ref, ...(cursor === undefined ? {} : { cursor }) })
434
+ .pipe(Effect.mapError(forgeFailure));
435
+ for (const comment of unplaced()) {
436
+ const side = comment.side ?? "new";
437
+ const position = reviewPositionInPatch(diff.patch, comment.path, comment.line, side);
438
+ const start =
439
+ comment.startLine === undefined
440
+ ? undefined
441
+ : reviewPositionInPatch(diff.patch, comment.path, comment.startLine, side);
442
+ if (position === null || start === null) continue;
443
+ placed.set(comment, {
444
+ path: comment.path,
445
+ position,
446
+ ...(start === undefined ? {} : { startPosition: start }),
447
+ body: comment.body,
448
+ });
449
+ }
450
+ if (diff.nextCursor === null) break;
451
+ cursor = diff.nextCursor;
452
+ }
453
+ const missing = unplaced()[0];
454
+ if (missing !== undefined) {
455
+ return yield* new PullRequestForgeError({
456
+ 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.`,
457
+ });
458
+ }
459
+ return comments.map((comment) => placed.get(comment)!);
460
+ });
461
+
462
+ /** The thread's checkout, its project, and the PR the input names (default: the branch's). */
463
+ const locate = Effect.fn("PullRequestsToolkit.locate")(function* (input: ThreadPullRequestInput) {
464
+ const thread = yield* requireThread(PullRequestForgeError, undefined);
465
+ const project = yield* projectOf(thread, PullRequestForgeError);
466
+ if (project === undefined) {
467
+ return yield* new PullRequestProjectNotFoundError({ repository: input.repository ?? "" });
468
+ }
469
+ // Status sync sets branchPullRequest later, so a PR this thread just opened counts too,
470
+ // unless it is another branch's.
471
+ const opened =
472
+ thread.branchPullRequest === null || thread.branchPullRequest === undefined
473
+ ? threadPullRequestsOf(thread).findLast(
474
+ (link) =>
475
+ link.source === "created" &&
476
+ (link.snapshot === null || link.snapshot.headBranch === thread.branch),
477
+ )
478
+ : undefined;
479
+ const branchPullRequest = thread.branchPullRequest ?? opened ?? null;
480
+ const branchRepository =
481
+ project.repositoryIdentity == null
482
+ ? undefined
483
+ : (sourceControlDefinitions.repositorySelector(project.repositoryIdentity) ?? undefined);
484
+ const named =
485
+ input.number !== undefined
486
+ ? { number: input.number, repository: input.repository ?? branchRepository }
487
+ : branchPullRequest === null
488
+ ? null
489
+ : { number: branchPullRequest.number, repository: branchPullRequest.repository };
490
+ if (named === null) return yield* new PullRequestBranchHasNoneError();
491
+ const target = yield* resolveTarget(named, project);
492
+ const ref: PullRequestRef = {
493
+ projectId: project.id,
494
+ host: target.host,
495
+ repository: target.repository,
496
+ number: target.number,
497
+ };
498
+ if (input.number === undefined && opened !== undefined && opened.snapshot === null) {
499
+ // Not synced yet, so only the host knows which branch it was opened from.
500
+ const summary = yield* pullRequests.summary(ref).pipe(Effect.mapError(forgeFailure));
501
+ if (summary.headBranch !== thread.branch) return yield* new PullRequestBranchHasNoneError();
502
+ }
503
+ return { thread, project, target, ref };
504
+ });
505
+
506
+ const identityOf = (target: ResolvedTarget) => ({
507
+ host: target.host,
508
+ repository: target.repository,
509
+ number: target.number,
510
+ url: target.url,
511
+ });
512
+
513
+ /** The thread's comments past its first page, when the host pages them. */
514
+ const restOfThread = Effect.fn("PullRequestsToolkit.restOfThread")(function* (
515
+ ref: PullRequestRef,
516
+ thread: PullRequestReviewThread,
517
+ ) {
518
+ const comments: Array<PullRequestReviewThread["comments"][number]> = [];
519
+ let cursor = thread.nextCommentsCursor;
520
+ for (let page = 0; cursor !== undefined && page < THREAD_COMMENT_PAGES; page += 1) {
521
+ const read = yield* pullRequests
522
+ .threadComments({ ...ref, threadId: thread.id, cursor })
523
+ .pipe(Effect.option);
524
+ if (Option.isNone(read)) break;
525
+ comments.push(...read.value.comments);
526
+ cursor = read.value.nextCursor ?? undefined;
527
+ }
528
+ return { comments, moreComments: cursor !== undefined };
529
+ });
530
+
531
+ const readSections = Effect.fn("PullRequestsToolkit.readSections")(function* (
532
+ ref: PullRequestRef,
533
+ sections: ReadonlyArray<PullRequestReadSection>,
534
+ includeResolved: boolean,
535
+ cursor: ReadCursor | undefined,
536
+ ) {
537
+ const wants = (section: PullRequestReadSection) => sections.includes(section);
538
+ const diffCursor = cursor !== undefined && "diff" in cursor ? cursor.diff : undefined;
539
+ const [detail, activity, diff] = yield* Effect.all(
540
+ [
541
+ // Agents pin merges to this headSha, so it must not come from a stale snapshot.
542
+ wants("summary") || wants("checks")
543
+ ? pullRequests.detail({ ...ref, allowStale: false }).pipe(Effect.asSome)
544
+ : Effect.succeedNone,
545
+ wants("conversation") ? pullRequests.activity(ref).pipe(Effect.asSome) : Effect.succeedNone,
546
+ wants("diff")
547
+ ? pullRequests
548
+ .diff({ ...ref, ...(diffCursor === undefined ? {} : { cursor: diffCursor }) })
549
+ .pipe(Effect.asSome)
550
+ : Effect.succeedNone,
551
+ ],
552
+ { concurrency: "unbounded" },
553
+ ).pipe(Effect.mapError(forgeFailure));
554
+ const page = Option.map(activity, (value) =>
555
+ conversationPage(
556
+ value,
557
+ cursor !== undefined && "threads" in cursor ? cursor : { threads: 0, comments: 0 },
558
+ includeResolved,
559
+ ),
560
+ );
561
+ const threadRests = Option.isSome(page)
562
+ ? yield* Effect.forEach(page.value.threads, (thread) => restOfThread(ref, thread), {
563
+ concurrency: 4,
564
+ })
565
+ : [];
566
+ const result: Omit<ReadPullRequestResult, "host" | "repository" | "number" | "url"> = {
567
+ ...(Option.isSome(detail) && wants("summary")
568
+ ? {
569
+ summary: {
570
+ title: detail.value.title,
571
+ body: detail.value.body,
572
+ state: detail.value.state,
573
+ isDraft: detail.value.isDraft,
574
+ author: detail.value.author?.login ?? null,
575
+ headBranch: detail.value.headBranch,
576
+ baseBranch: detail.value.baseBranch,
577
+ headSha: detail.value.headSha ?? null,
578
+ mergeability: detail.value.mergeability,
579
+ behindBy: detail.value.behindBy ?? null,
580
+ autoMergeEnabled: detail.value.autoMergeEnabled ?? null,
581
+ additions: detail.value.additions,
582
+ deletions: detail.value.deletions,
583
+ changedFiles: detail.value.changedFiles,
584
+ labels: detail.value.labels.map((label) => label.name),
585
+ reviewers: detail.value.reviewers.map((reviewer) => reviewer.login),
586
+ },
587
+ }
588
+ : {}),
589
+ ...(Option.isSome(detail) && wants("checks") ? { checks: detail.value.checks } : {}),
590
+ ...(Option.isSome(activity) && Option.isSome(page)
591
+ ? {
592
+ conversation: {
593
+ comments: page.value.comments.map((comment) => ({
594
+ id: comment.id,
595
+ kind: comment.kind,
596
+ author: comment.author?.login ?? null,
597
+ body: comment.body,
598
+ createdAt: comment.createdAt,
599
+ path: comment.path,
600
+ reviewState: comment.reviewState,
601
+ })),
602
+ reviewThreads: page.value.threads.map((thread, index) => ({
603
+ id: thread.id,
604
+ path: thread.path,
605
+ line: thread.line,
606
+ isResolved: thread.isResolved,
607
+ isOutdated: thread.isOutdated,
608
+ comments: [...thread.comments, ...threadRests[index]!.comments].map((comment) => ({
609
+ author: comment.author?.login ?? null,
610
+ body: comment.body,
611
+ createdAt: comment.createdAt,
612
+ })),
613
+ moreComments: threadRests[index]!.moreComments,
614
+ })),
615
+ hiddenResolvedThreads: page.value.hiddenResolvedThreads,
616
+ truncated:
617
+ activity.value.commentsTruncated || activity.value.reviewThreadsTruncated === true,
618
+ nextCursor: page.value.next === null ? null : readCursors.encode(page.value.next),
619
+ },
620
+ }
621
+ : {}),
622
+ ...(Option.isSome(diff)
623
+ ? {
624
+ diff: {
625
+ patch: diff.value.patch,
626
+ truncated: diff.value.truncated,
627
+ nextCursor:
628
+ diff.value.nextCursor === null
629
+ ? null
630
+ : readCursors.encode({ diff: diff.value.nextCursor }),
631
+ },
632
+ }
633
+ : {}),
634
+ };
635
+ return result;
636
+ });
637
+
638
+ const linkToThread = Effect.fn("PullRequestsToolkit.linkToThread")(function* (
639
+ thread: OrchestrationV2ThreadShell,
640
+ target: ResolvedTarget,
641
+ ) {
642
+ if (
643
+ threadPullRequestsOf(thread).some(
644
+ (link) => link.source !== "stack-dismissed" && threadPullRequestKeysEqual(link, target),
645
+ )
646
+ ) {
647
+ return;
648
+ }
649
+ yield* engine
650
+ .dispatch({
651
+ type: "thread.pull-request.link",
652
+ commandId: yield* commandId("mcp-pr-create", thread.id),
653
+ threadId: thread.id,
654
+ host: target.host,
655
+ repository: target.repository,
656
+ number: target.number,
657
+ url: target.url,
658
+ source: "created",
659
+ })
660
+ .pipe(Effect.catchCause(dispatchFailure(PullRequestLinkFailedError)));
661
+ });
662
+
663
return {
664
link_pull_request: writesThread((input) =>
665
Effect.gen(function* () {
@@ -539,6 +919,232 @@ const make = Effect.gen(function* () {
919
};
920
}),
921
),
922
+ pull_request_read: McpToolAccess.reads((input) =>
923
+ Effect.gen(function* () {
924
+ const cursor =
925
+ input.cursor === undefined ? undefined : yield* readCursors.decode(input.cursor);
926
+ const { target, ref } = yield* locate(input);
927
+ // A cursor continues the one section it came from, with that read's options.
928
+ const sections: ReadonlyArray<PullRequestReadSection> =
929
+ cursor === undefined
930
+ ? (input.sections ?? ["summary", "checks"])
931
+ : "diff" in cursor
932
+ ? ["diff"]
933
+ : ["conversation"];
934
+ const includeResolved =
935
+ cursor !== undefined && "includeResolved" in cursor
936
+ ? cursor.includeResolved
937
+ : input.includeResolved === true;
938
+ return {
939
+ ...identityOf(target),
940
+ ...(yield* readSections(ref, sections, includeResolved, cursor)),
941
+ };
942
+ }),
943
+ ),
944
+ pull_request_list: McpToolAccess.reads((input) =>
945
+ Effect.gen(function* () {
946
+ const thread = yield* requireThread(PullRequestForgeError, undefined);
947
+ const listed = yield* pullRequests
948
+ .list({
949
+ projectId: thread.projectId,
950
+ state: input.state ?? "open",
951
+ involvement: input.involvement ?? "all",
952
+ limit: input.limit ?? 30,
953
+ ...(input.query === undefined ? {} : { query: input.query }),
954
+ ...(input.cursor === undefined
955
+ ? {}
956
+ : { cursors: yield* listCursors.decode(input.cursor) }),
957
+ })
958
+ .pipe(Effect.mapError(forgeFailure));
959
+ const failure = listed.errors[0];
960
+ if (listed.entries.length === 0 && failure !== undefined) {
961
+ return yield* new PullRequestForgeError({ detail: failure.message });
962
+ }
963
+ return {
964
+ pullRequests: listed.entries.map((entry) => ({
965
+ number: entry.number,
966
+ title: entry.title,
967
+ url: entry.url,
968
+ author: entry.author?.login ?? null,
969
+ headBranch: entry.headBranch,
970
+ baseBranch: entry.baseBranch,
971
+ state: entry.state,
972
+ isDraft: entry.isDraft,
973
+ reviewDecision: entry.reviewDecision ?? null,
974
+ checksState: entry.checksState ?? null,
975
+ updatedAt: entry.updatedAt,
976
+ })),
977
+ truncated: listed.truncated,
978
+ nextCursor:
979
+ Object.keys(listed.nextCursors).length === 0
980
+ ? null
981
+ : listCursors.encode(listed.nextCursors),
982
+ };
983
+ }),
984
+ ),
985
+ pull_request_create: McpToolAccess.writesWithCapability((input) =>
986
+ Effect.gen(function* () {
987
+ const thread = yield* requireThread(PullRequestForgeError, undefined);
988
+ const project = yield* projectOf(thread, PullRequestForgeError);
989
+ if (project === undefined) {
990
+ return yield* new PullRequestProjectNotFoundError({ repository: "" });
991
+ }
992
+ const created = yield* git
993
+ .createPullRequest({
994
+ cwd: thread.worktreePath ?? project.workspaceRoot,
995
+ projectId: project.id,
996
+ title: input.title,
997
+ body: input.body,
998
+ baseBranch: input.base,
999
+ draft: input.draft,
1000
+ })
1001
+ .pipe(Effect.mapError(forgeFailure));
1002
+ if (created.url === undefined) {
1003
+ return yield* new PullRequestForgeError({
1004
+ detail:
1005
+ "The host accepted the PR but does not list it yet. Find it with pull_request_list.",
1006
+ });
1007
+ }
1008
+ const target = yield* resolveTarget({ url: created.url }, project);
1009
+ yield* linkToThread(thread, target);
1010
+ return {
1011
+ ...identityOf(target),
1012
+ created: created.status === "created",
1013
+ ...(thread.lineage.relationshipToParent === "subagent"
1014
+ ? { next: CHILD_PULL_REQUEST_REPORT_NEXT }
1015
+ : {}),
1016
+ };
1017
+ }),
1018
+ ),
1019
+ pull_request_update: McpToolAccess.writesWithCapability((input) =>
1020
+ Effect.gen(function* () {
1021
+ if (
1022
+ input.title === undefined &&
1023
+ input.body === undefined &&
1024
+ input.ready === undefined &&
1025
+ input.state === undefined &&
1026
+ input.addLabels === undefined &&
1027
+ input.removeLabels === undefined &&
1028
+ input.requestReviewers === undefined
1029
+ ) {
1030
+ return yield* new PullRequestNothingToDoError({
1031
+ detail: "Pass title, body, ready, state, addLabels, removeLabels, or requestReviewers.",
1032
+ });
1033
+ }
1034
+ const { target, ref } = yield* locate(input);
1035
+ if (input.title !== undefined || input.body !== undefined) {
1036
+ yield* pullRequests
1037
+ .update({
1038
+ ...ref,
1039
+ ...(input.title === undefined ? {} : { title: input.title }),
1040
+ ...(input.body === undefined ? {} : { body: input.body }),
1041
+ })
1042
+ .pipe(Effect.mapError(forgeFailure));
1043
+ }
1044
+ for (const [labels, applied] of [
1045
+ [input.addLabels, true],
1046
+ [input.removeLabels, false],
1047
+ ] as const) {
1048
+ if (labels !== undefined) {
1049
+ yield* pullRequests
1050
+ .setLabels({ ...ref, labels, applied })
1051
+ .pipe(Effect.mapError(forgeFailure));
1052
+ }
1053
+ }
1054
+ if (input.requestReviewers !== undefined) {
1055
+ const reviewers = yield* Effect.forEach(input.requestReviewers, (name) =>
1056
+ reviewerNamed(ref, name),
1057
+ );
1058
+ yield* pullRequests
1059
+ .requestReviewers({ ...ref, reviewers, requested: true })
1060
+ .pipe(Effect.mapError(forgeFailure));
1061
+ }
1062
+ if (input.ready !== undefined) {
1063
+ yield* pullRequests
1064
+ .runAction({ ...ref, action: input.ready ? "ready" : "draft" })
1065
+ .pipe(Effect.mapError(forgeFailure));
1066
+ }
1067
+ if (input.state !== undefined) {
1068
+ yield* pullRequests
1069
+ .runAction({ ...ref, action: input.state === "closed" ? "close" : "reopen" })
1070
+ .pipe(Effect.mapError(forgeFailure));
1071
+ }
1072
+ return identityOf(target);
1073
+ }),
1074
+ ),
1075
+ pull_request_respond: McpToolAccess.writesWithCapability((input) =>
1076
+ Effect.gen(function* () {
1077
+ if (
1078
+ input.body === undefined &&
1079
+ (input.reviewThreadId === undefined || input.resolved === undefined)
1080
+ ) {
1081
+ return yield* new PullRequestNothingToDoError({
1082
+ detail: "Pass body, or reviewThreadId with resolved.",
1083
+ });
1084
+ }
1085
+ if (input.reviewThreadId === undefined && input.resolved !== undefined) {
1086
+ return yield* new PullRequestNothingToDoError({
1087
+ detail: "resolved needs reviewThreadId.",
1088
+ });
1089
+ }
1090
+ const { target, ref } = yield* locate(input);
1091
+ const reviewThreadId = input.reviewThreadId;
1092
+ if (input.body !== undefined) {
1093
+ yield* (
1094
+ reviewThreadId === undefined
1095
+ ? pullRequests.comment({ ...ref, body: input.body })
1096
+ : pullRequests.replyToThread({ ...ref, threadId: reviewThreadId, body: input.body })
1097
+ ).pipe(Effect.mapError(forgeFailure));
1098
+ }
1099
+ if (reviewThreadId !== undefined && input.resolved !== undefined) {
1100
+ yield* pullRequests
1101
+ .setThreadResolution({ ...ref, threadId: reviewThreadId, resolved: input.resolved })
1102
+ .pipe(
1103
+ Effect.mapError((error) =>
1104
+ input.body === undefined
1105
+ ? forgeFailure(error)
1106
+ : new PullRequestForgeError({
1107
+ // A retry with the body would post the reply twice.
1108
+ detail: `The reply was posted, but setting resolved failed: ${error.message} Retry without body.`,
1109
+ cause: error,
1110
+ }),
1111
+ ),
1112
+ );
1113
+ }
1114
+ return {
1115
+ ...identityOf(target),
1116
+ replied: input.body !== undefined,
1117
+ resolved: input.resolved ?? null,
1118
+ };
1119
+ }),
1120
+ ),
1121
+ pull_request_review: McpToolAccess.writesWithCapability((input) =>
1122
+ Effect.gen(function* () {
1123
+ const { target, ref } = yield* locate(input);
1124
+ const comments = yield* reviewComments(ref, input.comments ?? []);
1125
+ yield* pullRequests
1126
+ .submitReview({ ...ref, verdict: input.verdict, body: input.body ?? "", comments })
1127
+ .pipe(Effect.mapError(forgeFailure));
1128
+ return identityOf(target);
1129
+ }),
1130
+ ),
1131
+ pull_request_merge: McpToolAccess.writesWithCapability((input) =>
1132
+ Effect.gen(function* () {
1133
+ const { target, ref } = yield* locate(input);
1134
+ yield* pullRequests
1135
+ .runAction({
1136
+ ...ref,
1137
+ action: input.auto === true ? "enable-auto-merge" : "merge",
1138
+ expectedHeadSha: input.expectedHeadSha,
1139
+ ...(input.method === undefined ? {} : { mergeMethod: input.method }),
1140
+ })
1141
+ .pipe(Effect.mapError(forgeFailure));
1142
+ const after = yield* pullRequests
1143
+ .summary({ ...ref, allowStale: false })
1144
+ .pipe(Effect.mapError(forgeFailure));
1145
+ return { ...identityOf(target), state: after.state };
1146
+ }),
1147
+ ),
1148
} satisfies McpToolAccess.Handlers<typeof PullRequestsToolkit.tools>;
1149
});
1150
apps/server/src/mcp/toolkits/pullRequests/tools.ts
+357
@@ -3,6 +3,15 @@ import {
3
OrchestratorMcpEnvironmentTarget,
4
OrchestratorMcpFailure,
5
PositiveInt,
6
+ PullRequestCheck,
7
+ PullRequestCommentKind,
8
+ PullRequestChecksState,
9
+ PullRequestInvolvement,
10
+ PullRequestListState,
11
+ PullRequestMergeability,
12
+ PullRequestMergeMethod,
13
+ PullRequestReviewVerdict,
14
+ PullRequestReviewDecision,
15
PullRequestReviewGuide,
16
PullRequestReviewGuideRun,
17
PullRequestState,
@@ -20,6 +29,7 @@ import * as Toolkit from "effect/ai/Toolkit";
29
import * as McpInvocationContext from "../../McpInvocationContext.ts";
30
import * as Orchestrator from "../../../orchestration-v2/Orchestrator.ts";
31
import * as ThreadManagementService from "../../../orchestration-v2/ThreadManagementService.ts";
32
+import * as GitManager from "../../../git/GitManager.ts";
33
import * as ProjectService from "../../../project/ProjectService.ts";
34
import * as PullRequestWatchService from "../../../pullRequest/PullRequestWatchService.ts";
35
import {
@@ -28,6 +38,7 @@ import {
38
PullRequestHostRequiredError,
39
PullRequestUrlUnavailableError,
40
} from "../../../pullRequest/pullRequestTarget.ts";
41
+import * as PullRequestService from "../../../pullRequest/PullRequestService.ts";
42
import * as PullRequestReviewGuideService from "../../../pullRequest/PullRequestReviewGuideService.ts";
43
44
const dependencies = [
@@ -37,6 +48,8 @@ const dependencies = [
48
ProjectService.ProjectService,
49
];
50
51
+const forgeDependencies = [...dependencies, PullRequestService.PullRequestService];
52
+
53
const guideDependencies = [
54
...dependencies,
55
PullRequestReviewGuideService.PullRequestReviewGuideService,
@@ -124,6 +137,42 @@ export class PullRequestGuideFailedError extends Schema.TaggedError<PullRequestG
137
}
138
}
139
140
+export class PullRequestForgeError extends Schema.TaggedError<PullRequestForgeError>()(
141
+ "PullRequestForgeError",
142
+ { detail: Schema.optional(Schema.String), cause: Schema.optional(Schema.Defect()) },
143
+) {
144
+ override get message(): string {
145
+ return this.detail ?? "Could not read this thread's project.";
146
+ }
147
+}
148
+
149
+export class PullRequestBranchHasNoneError extends Schema.TaggedError<PullRequestBranchHasNoneError>()(
150
+ "PullRequestBranchHasNoneError",
151
+ {},
152
+) {
153
+ override get message(): string {
154
+ return "This thread's branch has no known PR. Pass number, or open one with pull_request_create.";
155
+ }
156
+}
157
+
158
+export class PullRequestCursorInvalidError extends Schema.TaggedError<PullRequestCursorInvalidError>()(
159
+ "PullRequestCursorInvalidError",
160
+ {},
161
+) {
162
+ override get message(): string {
163
+ return "This cursor is not from this tool. Pass a nextCursor from its last result.";
164
+ }
165
+}
166
+
167
+export class PullRequestNothingToDoError extends Schema.TaggedError<PullRequestNothingToDoError>()(
168
+ "PullRequestNothingToDoError",
169
+ { detail: Schema.String },
170
+) {
171
+ override get message(): string {
172
+ return this.detail;
173
+ }
174
+}
175
+
176
export const PullRequestToolError = Schema.Union([
177
OrchestratorMcpFailure,
178
McpCapabilityUnavailableError,
@@ -141,6 +190,10 @@ export const PullRequestToolError = Schema.Union([
190
PullRequestWatchService.PullRequestWatchFromSubagentError,
191
PullRequestProjectNotFoundError,
192
PullRequestGuideFailedError,
193
+ PullRequestForgeError,
194
+ PullRequestBranchHasNoneError,
195
+ PullRequestNothingToDoError,
196
+ PullRequestCursorInvalidError,
197
]);
198
export type PullRequestToolError = typeof PullRequestToolError.Type;
199
@@ -429,6 +482,303 @@ const ReadPullRequestGuideTool = Tool.make("read_pull_request_guide", {
482
.annotate(Tool.Idempotent, true)
483
.annotate(Tool.OpenWorld, true);
484
485
+export const ThreadPullRequestInput = Schema.Struct({
486
+ environmentId: OrchestratorMcpEnvironmentTarget,
487
+ number: Schema.optional(PositiveInt.annotate({ description: "Default: the branch's PR." })),
488
+ repository: Schema.optional(TrimmedNonEmptyString),
489
+});
490
+export type ThreadPullRequestInput = typeof ThreadPullRequestInput.Type;
491
+
492
+export const PullRequestReadSection = Schema.Literals([
493
+ "summary",
494
+ "checks",
495
+ "conversation",
496
+ "diff",
497
+]);
498
+export type PullRequestReadSection = typeof PullRequestReadSection.Type;
499
+
500
+const ReadComment = Schema.Struct({
501
+ author: Schema.NullOr(Schema.String),
502
+ body: Schema.String,
503
+ createdAt: Schema.String,
504
+});
505
+
506
+export const ReadPullRequestResult = Schema.Struct({
507
+ ...PullRequestIdentity,
508
+ summary: Schema.optional(
509
+ Schema.Struct({
510
+ title: Schema.String,
511
+ body: Schema.String,
512
+ state: PullRequestState,
513
+ isDraft: Schema.Boolean,
514
+ author: Schema.NullOr(Schema.String),
515
+ headBranch: Schema.String,
516
+ baseBranch: Schema.String,
517
+ headSha: Schema.NullOr(Schema.String),
518
+ mergeability: PullRequestMergeability,
519
+ behindBy: Schema.NullOr(Schema.Int),
520
+ autoMergeEnabled: Schema.NullOr(Schema.Boolean),
521
+ additions: Schema.Int,
522
+ deletions: Schema.Int,
523
+ changedFiles: Schema.Int,
524
+ labels: Schema.Array(Schema.String),
525
+ reviewers: Schema.Array(Schema.String),
526
+ }),
527
+ ),
528
+ checks: Schema.optional(Schema.Array(PullRequestCheck)),
529
+ conversation: Schema.optional(
530
+ Schema.Struct({
531
+ comments: Schema.Array(
532
+ Schema.Struct({
533
+ ...ReadComment.fields,
534
+ id: Schema.String,
535
+ kind: PullRequestCommentKind,
536
+ path: Schema.NullOr(Schema.String),
537
+ reviewState: Schema.NullOr(Schema.String),
538
+ }),
539
+ ),
540
+ reviewThreads: Schema.Array(
541
+ Schema.Struct({
542
+ id: Schema.String,
543
+ path: Schema.String,
544
+ line: Schema.NullOr(Schema.Int),
545
+ isResolved: Schema.Boolean,
546
+ isOutdated: Schema.Boolean,
547
+ comments: Schema.Array(ReadComment),
548
+ moreComments: Schema.Boolean,
549
+ }),
550
+ ),
551
+ hiddenResolvedThreads: Schema.Int,
552
+ truncated: Schema.Boolean,
553
+ nextCursor: Schema.NullOr(Schema.String),
554
+ }),
555
+ ),
556
+ diff: Schema.optional(
557
+ Schema.Struct({
558
+ patch: Schema.String,
559
+ truncated: Schema.Boolean,
560
+ nextCursor: Schema.NullOr(Schema.String),
561
+ }),
562
+ ),
563
+});
564
+export type ReadPullRequestResult = typeof ReadPullRequestResult.Type;
565
+
566
+export const ListPullRequestsResult = Schema.Struct({
567
+ pullRequests: Schema.Array(
568
+ Schema.Struct({
569
+ number: Schema.Int,
570
+ title: Schema.String,
571
+ url: Schema.String,
572
+ author: Schema.NullOr(Schema.String),
573
+ headBranch: Schema.String,
574
+ baseBranch: Schema.String,
575
+ state: PullRequestState,
576
+ isDraft: Schema.Boolean,
577
+ reviewDecision: Schema.NullOr(PullRequestReviewDecision),
578
+ checksState: Schema.NullOr(PullRequestChecksState),
579
+ updatedAt: Schema.String,
580
+ }),
581
+ ),
582
+ truncated: Schema.Boolean,
583
+ nextCursor: Schema.NullOr(Schema.String),
584
+});
585
+export type ListPullRequestsResult = typeof ListPullRequestsResult.Type;
586
+
587
+export const CreatePullRequestResult = Schema.Struct({
588
+ ...PullRequestIdentity,
589
+ created: Schema.Boolean.annotate({
590
+ description: "False when the branch already had an open PR.",
591
+ }),
592
+ next: Schema.optional(Schema.String),
593
+});
594
+export type CreatePullRequestResult = typeof CreatePullRequestResult.Type;
595
+
596
+export const RespondToPullRequestResult = Schema.Struct({
597
+ ...PullRequestIdentity,
598
+ replied: Schema.Boolean,
599
+ resolved: Schema.NullOr(Schema.Boolean),
600
+});
601
+export type RespondToPullRequestResult = typeof RespondToPullRequestResult.Type;
602
+
603
+export const MergePullRequestResult = Schema.Struct({
604
+ ...PullRequestIdentity,
605
+ state: PullRequestState.annotate({
606
+ description: "open while auto-merge or a merge queue waits for checks.",
607
+ }),
608
+});
609
+export type MergePullRequestResult = typeof MergePullRequestResult.Type;
610
+
611
+const ReadPullRequestTool = Tool.make("pull_request_read", {
612
+ description: "Read a PR's state, checks, review comments, or diff. Use instead of gh or cafe.",
613
+ parameters: Schema.Struct({
614
+ ...ThreadPullRequestInput.fields,
615
+ sections: Schema.optional(
616
+ Schema.Array(PullRequestReadSection).annotate({
617
+ description: "Default: summary, checks. conversation has review threads.",
618
+ }),
619
+ ),
620
+ includeResolved: Schema.optional(Schema.Boolean),
621
+ cursor: Schema.optional(TrimmedNonEmptyString),
622
+ }),
623
+ success: ReadPullRequestResult,
624
+ failure: PullRequestToolError,
625
+ dependencies: forgeDependencies,
626
+})
627
+ .annotate(Tool.Title, "Read pull request")
628
+ .annotate(Tool.Readonly, true)
629
+ .annotate(Tool.Destructive, false)
630
+ .annotate(Tool.Idempotent, true)
631
+ .annotate(Tool.OpenWorld, true)
632
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
633
+
634
+const ListPullRequestsTool = Tool.make("pull_request_list", {
635
+ description: "List PRs in this thread's repository, recently updated first.",
636
+ parameters: Schema.Struct({
637
+ environmentId: OrchestratorMcpEnvironmentTarget,
638
+ state: Schema.optional(PullRequestListState.annotate({ description: "Default: open." })),
639
+ involvement: Schema.optional(PullRequestInvolvement),
640
+ query: Schema.optional(TrimmedNonEmptyString.check(Schema.isMaxLength(200))),
641
+ limit: Schema.optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 }))),
642
+ cursor: Schema.optional(TrimmedNonEmptyString),
643
+ }),
644
+ success: ListPullRequestsResult,
645
+ failure: PullRequestToolError,
646
+ dependencies: forgeDependencies,
647
+})
648
+ .annotate(Tool.Title, "List pull requests")
649
+ .annotate(Tool.Readonly, true)
650
+ .annotate(Tool.Destructive, false)
651
+ .annotate(Tool.Idempotent, true)
652
+ .annotate(Tool.OpenWorld, true)
653
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
654
+
655
+const CreatePullRequestTool = Tool.make("pull_request_create", {
656
+ description: "Open a PR from this thread's pushed branch and link it, or return its open PR.",
657
+ parameters: Schema.Struct({
658
+ environmentId: OrchestratorMcpEnvironmentTarget,
659
+ title: TrimmedNonEmptyString,
660
+ body: Schema.String,
661
+ base: Schema.optional(TrimmedNonEmptyString),
662
+ draft: Schema.optional(Schema.Boolean),
663
+ }),
664
+ success: CreatePullRequestResult,
665
+ failure: PullRequestToolError,
666
+ dependencies: [...forgeDependencies, GitManager.GitManager],
667
+})
668
+ .annotate(Tool.Title, "Create pull request")
669
+ .annotate(Tool.Readonly, false)
670
+ .annotate(Tool.Destructive, false)
671
+ .annotate(Tool.Idempotent, true)
672
+ .annotate(Tool.OpenWorld, true)
673
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
674
+
675
+const UpdateNames = Schema.Array(TrimmedNonEmptyString).check(
676
+ Schema.isMinLength(1),
677
+ Schema.isMaxLength(25),
678
+);
679
+
680
+const UpdatePullRequestTool = Tool.make("pull_request_update", {
681
+ description:
682
+ "Edit a PR's title, body, labels, or reviewers, close or reopen it, or set ready (false: back to draft).",
683
+ parameters: Schema.Struct({
684
+ ...ThreadPullRequestInput.fields,
685
+ title: Schema.optional(TrimmedNonEmptyString),
686
+ body: Schema.optional(Schema.String),
687
+ ready: Schema.optional(Schema.Boolean),
688
+ state: Schema.optional(Schema.Literals(["open", "closed"])),
689
+ addLabels: Schema.optional(UpdateNames),
690
+ removeLabels: Schema.optional(UpdateNames),
691
+ requestReviewers: Schema.optional(
692
+ UpdateNames.annotate({ description: "Logins, or org/team for a team." }),
693
+ ),
694
+ }),
695
+ success: Schema.Struct(PullRequestIdentity),
696
+ failure: PullRequestToolError,
697
+ dependencies: forgeDependencies,
698
+})
699
+ .annotate(Tool.Title, "Update pull request")
700
+ .annotate(Tool.Readonly, false)
701
+ .annotate(Tool.Destructive, false)
702
+ .annotate(Tool.Idempotent, true)
703
+ .annotate(Tool.OpenWorld, true)
704
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
705
+
706
+const RespondToPullRequestTool = Tool.make("pull_request_respond", {
707
+ description:
708
+ "Reply to, resolve, or reopen a review thread. Without reviewThreadId, comment on the PR.",
709
+ parameters: Schema.Struct({
710
+ ...ThreadPullRequestInput.fields,
711
+ reviewThreadId: Schema.optional(TrimmedNonEmptyString),
712
+ body: Schema.optional(TrimmedNonEmptyString),
713
+ resolved: Schema.optional(Schema.Boolean),
714
+ }),
715
+ success: RespondToPullRequestResult,
716
+ failure: PullRequestToolError,
717
+ dependencies: forgeDependencies,
718
+})
719
+ .annotate(Tool.Title, "Respond on pull request")
720
+ .annotate(Tool.Readonly, false)
721
+ .annotate(Tool.Destructive, false)
722
+ .annotate(Tool.Idempotent, false)
723
+ .annotate(Tool.OpenWorld, true)
724
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
725
+
726
+export const ReviewLineComment = Schema.Struct({
727
+ path: TrimmedNonEmptyString,
728
+ line: PositiveInt,
729
+ startLine: Schema.optional(PositiveInt),
730
+ side: Schema.optional(
731
+ Schema.Literals(["new", "old"]).annotate({
732
+ description: "Default new. old: line numbers in the base, for removed lines.",
733
+ }),
734
+ ),
735
+ body: TrimmedNonEmptyString,
736
+});
737
+export type ReviewLineComment = typeof ReviewLineComment.Type;
738
+
739
+const ReviewPullRequestTool = Tool.make("pull_request_review", {
740
+ description:
741
+ "Submit a review: approve, request changes, or comment, with optional line comments.",
742
+ parameters: Schema.Struct({
743
+ ...ThreadPullRequestInput.fields,
744
+ verdict: PullRequestReviewVerdict,
745
+ body: Schema.optional(Schema.String),
746
+ comments: Schema.optional(Schema.Array(ReviewLineComment).check(Schema.isMaxLength(50))),
747
+ }),
748
+ success: Schema.Struct(PullRequestIdentity),
749
+ failure: PullRequestToolError,
750
+ dependencies: forgeDependencies,
751
+})
752
+ .annotate(Tool.Title, "Review pull request")
753
+ .annotate(Tool.Readonly, false)
754
+ .annotate(Tool.Destructive, false)
755
+ .annotate(Tool.Idempotent, false)
756
+ .annotate(Tool.OpenWorld, true)
757
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
758
+
759
+const MergePullRequestTool = Tool.make("pull_request_merge", {
760
+ description: "Merge a PR. Refuses if the head moved from expectedHeadSha (summary.headSha).",
761
+ parameters: Schema.Struct({
762
+ ...ThreadPullRequestInput.fields,
763
+ expectedHeadSha: TrimmedNonEmptyString,
764
+ method: Schema.optional(PullRequestMergeMethod),
765
+ auto: Schema.optional(
766
+ Schema.Boolean.annotate({
767
+ description: "Merge when required checks pass, including later pushes.",
768
+ }),
769
+ ),
770
+ }),
771
+ success: MergePullRequestResult,
772
+ failure: PullRequestToolError,
773
+ dependencies: forgeDependencies,
774
+})
775
+ .annotate(Tool.Title, "Merge pull request")
776
+ .annotate(Tool.Readonly, false)
777
+ .annotate(Tool.Destructive, true)
778
+ .annotate(Tool.Idempotent, false)
779
+ .annotate(Tool.OpenWorld, true)
780
+ .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenWithoutForge);
781
+
782
export const PullRequestsToolkit = Toolkit.make(
783
LinkPullRequestTool,
784
LinkPullRequestsTool,
@@ -439,4 +789,11 @@ export const PullRequestsToolkit = Toolkit.make(
789
UnwatchPullRequestTool,
790
WritePullRequestGuidesTool,
791
ReadPullRequestGuideTool,
792
+ ReadPullRequestTool,
793
+ ListPullRequestsTool,
794
+ CreatePullRequestTool,
795
+ UpdatePullRequestTool,
796
+ RespondToPullRequestTool,
797
+ ReviewPullRequestTool,
798
+ MergePullRequestTool,
799
);
apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts
+2
@@ -14,6 +14,7 @@ import * as SourceControlProviderRegistry from "../sourceControl/SourceControlPr
14
import * as TextGeneration from "../textGeneration/TextGeneration.ts";
15
import * as ProjectionStore from "./ProjectionStore.ts";
16
import * as ProjectStore from "./ProjectStore.ts";
17
+import * as PullRequestService from "../pullRequest/PullRequestService.ts";
18
import * as Effect from "effect/Effect";
19
import * as Layer from "effect/Layer";
20
@@ -52,6 +53,7 @@ export const layerRealGit = GitWorkflow.layer.pipe(
53
Layer.mock(ProjectSetupScriptRunner.ProjectSetupScriptRunner)({}),
54
Layer.mock(ProjectionStore.ProjectionStoreV2)({}),
55
Layer.mock(ProjectStore.ProjectStoreV2)({}),
56
+ Layer.mock(PullRequestService.PullRequestService)({}),
57
ServerSettings.layerTest(),
58
),
59
),
apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/muse_transcript.ndjson
+6
-6
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with exactly: first fixture turn complete"}],"displayText":"Respond with exactly: first fixture turn complete","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with exactly: first fixture turn complete"}],"displayText":"Respond with exactly: first fixture turn complete","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444611661}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611675}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: first fixture turn complete","displayText":"Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611689}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611675}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: first fixture turn complete","displayText":"Respond with exactly: first fixture turn complete","commandId":"01a11a6b-722c-7000-a73a-1d49a3a7f4c4"}},"emittedAtMs":1791444611689}}
17
{"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}}
18
{"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}}
19
{"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 @@
29
{"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}}
30
{"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}}
31
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444621054}}
32
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with exactly: second fixture turn complete"}],"displayText":"Respond with exactly: second fixture turn complete","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}}}
32
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with exactly: second fixture turn complete"}],"displayText":"Respond with exactly: second fixture turn complete","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}}}
33
{"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"}}}
34
{"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}}
35
{"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}}
36
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621334}}
37
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: second fixture turn complete","displayText":"Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621347}}
36
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621334}}
37
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with exactly: second fixture turn complete","displayText":"Respond with exactly: second fixture turn complete","commandId":"01a11a6b-97ec-7000-bd1b-d7afbea11045"}},"emittedAtMs":1791444621347}}
38
{"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}}
39
{"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}}
40
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/muse_permission/muse_transcript.ndjson
+6
-6
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444728769}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728784}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728800}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Run the shell command `touch muse-approved.txt` with your shell tool, then reply DONE.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728784}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-3b9f-7000-b6ad-ab05e6b973b6"}},"emittedAtMs":1791444728800}}
17
{"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}}
18
{"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}}
19
{"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 @@
42
{"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}}
43
{"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}}
44
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444747394}}
45
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}}}
45
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}}}
46
{"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"}}}
47
{"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}}
48
{"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}}
49
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791444747660}}
50
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747676}}
49
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791444747660}}
50
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-8566-7000-8ad1-6269ac187a29"}},"emittedAtMs":1791444747676}}
51
{"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}}
52
{"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}}
53
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_approval/muse_transcript.ndjson
+3
-3
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791758279531}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791758279542}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279553}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791758279542}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d1d-a348-7000-ae97-9d27b5f80bce"}},"emittedAtMs":1791758279553}}
17
{"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}}
18
{"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}}
19
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/muse_subagent_interrupt/muse_transcript.ndjson
+3
-3
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791758989619}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791758989632}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989642}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791758989632}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d28-7912-7000-993a-afd019e6ac5c"}},"emittedAtMs":1791758989642}}
17
{"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}}
18
{"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}}
19
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/muse_workflow/muse_transcript.ndjson
+3
-3
@@ -8,13 +8,13 @@
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791762448807}}
11
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}}}
11
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}}}
12
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791762449097}}
13
{"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"}}}
14
{"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}}
15
{"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}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791762449103}}
17
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449131}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791762449103}}
17
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d5d-42c3-7000-ab94-c7f56ea457e5"}},"emittedAtMs":1791762449131}}
18
{"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}}
19
{"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}}
20
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/simple/muse_transcript.ndjson
+3
-3
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with the following text: fixture simple ok"}],"displayText":"Respond with the following text: fixture simple ok","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"type":"text","text":"Respond with the following text: fixture simple ok"}],"displayText":"Respond with the following text: fixture simple ok","workspaceRoots":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444565612}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565635}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with the following text: fixture simple ok","displayText":"Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565652}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565635}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>Respond with the following text: fixture simple ok","displayText":"Respond with the following text: fixture simple ok","commandId":"01a11a6a-be41-7000-8db9-1d84c1b8be48"}},"emittedAtMs":1791444565652}}
17
{"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}}
18
{"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}}
19
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/subagent_v2/muse_transcript.ndjson
+3
-3
@@ -7,13 +7,13 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791757875120}}
12
{"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"}}}
13
{"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}}
14
{"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}}
15
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791757875132}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875144}}
15
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791757875132}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a12d17-7790-7000-967d-3f2246f38a60"}},"emittedAtMs":1791757875144}}
17
{"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}}
18
{"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}}
19
{"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}}
apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt/muse_transcript.ndjson
+3
-3
@@ -7,14 +7,14 @@
7
{"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":"<workspace>","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}}
8
{"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":"<workspace>","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"}}}
9
{"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}}
10
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}}}
10
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>"},{"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":["<workspace>"],"ifBusy":"queue","reasoningEffort":"high","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}}}
11
{"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":"<workspace>","branch":"main","vcs":"git"},"emittedAtMs":1791444725509}}
12
{"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"}}}
13
{"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"}}}
14
{"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}}
15
{"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}}
16
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791444725523}}
17
-{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725539}}
16
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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":1791444725523}}
17
+{"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":"<runtime_info>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.</runtime_info>\n\n<pull_request_linking>\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 <full URL>, head <SHA>, checks and reviews <state>. 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</pull_request_linking>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.","commandId":"01a11a6d-2ee0-7000-be19-f20eda7ce5d5"}},"emittedAtMs":1791444725539}}
18
{"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}}
19
{"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"}}}
20
{"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}}
apps/server/src/provider/AgentContextBudget.test.ts
+2
@@ -12,6 +12,7 @@ import { ServerSecretStore } from "../auth/ServerSecretStore.ts";
12
import { ServerConfig } from "../config.ts";
13
import { DeviceService } from "../device/DeviceService.ts";
14
import { ServerEnvironment } from "../environment/ServerEnvironment.ts";
15
+import { GitManager } from "../git/GitManager.ts";
16
import { GitWorkflowService } from "../git/GitWorkflowService.ts";
17
import * as McpHttpServer from "../mcp/McpHttpServer.ts";
18
import { PreviewAutomationBroker } from "../mcp/PreviewAutomationBroker.ts";
@@ -75,6 +76,7 @@ const toolHandlerServices = Layer.mergeAll(
76
Layer.mock(ProviderRegistry)({}),
77
Layer.mock(PullRequestReviewGuideService)({}),
78
Layer.mock(PullRequestService)({}),
79
+ Layer.mock(GitManager)({}),
80
Layer.mock(RemoteDelegation)({}),
81
Layer.mock(ScheduledTaskService)({}),
82
Layer.mock(SecretRequests)({}),
apps/server/src/provider/agentContextBudget.json
+3
-3
@@ -1,5 +1,5 @@
1
{
2
- "claudeSystemAppendBytes": 6037,
3
- "codexAdditionalContextBytes": 7431,
4
- "mcpToolListJsonBytes": 52519
2
+ "claudeSystemAppendBytes": 6202,
3
+ "codexAdditionalContextBytes": 7596,
4
+ "mcpToolListJsonBytes": 56461
5
}
apps/server/src/pullRequest/PullRequestService.test.ts
+27
@@ -422,6 +422,9 @@ it.effect("lists GitHub Enterprise PRs for a stored unknown repository after hos
422
result.entries.map(({ host, number }) => [host, number]),
423
[["code.example.test", 42]],
424
);
425
+ // Agents get the forge tools only where the host is one T3 reads.
426
+ assert.isTrue(yield* service.servesProject("p1" as ProjectId));
427
+ assert.isFalse(yield* service.servesProject("p2" as ProjectId));
428
}),
429
);
430
@@ -1428,6 +1431,30 @@ it.effect(
1431
}),
1432
);
1433
1434
+it.effect("refuses a merge whose head moved past expectedHeadSha and pins the host merge", () =>
1435
+ Effect.gen(function* () {
1436
+ const pinned: Array<string | undefined> = [];
1437
+ const service = yield* makeService({
1438
+ projects: [project({ id: "p1", title: "web", workspaceRoot: "/a", repository: "acme/web" })],
1439
+ providers: [
1440
+ fakePullRequestProvider(SourceControlProviderKind.make("github"), {
1441
+ getChangeRequest: () =>
1442
+ Effect.succeed({ ...hostedChangeRequest("Body"), headSha: "new-head" }),
1443
+ getChangeRequestSummary: () => Effect.succeed(changeRequest(1, "2026-09-03T00:00:00Z")),
1444
+ runAction: (input) => Effect.sync(() => void pinned.push(input.expectedHeadSha)),
1445
+ }),
1446
+ ],
1447
+ });
1448
+ const reference = { projectId: "p1" as ProjectId, repository: "acme/web", number: 1 };
1449
+ const refused = yield* Effect.flip(
1450
+ service.runAction({ ...reference, action: "merge", expectedHeadSha: "reviewed-head" }),
1451
+ );
1452
+ assert.include(refused.message, "new-head");
1453
+ yield* service.runAction({ ...reference, action: "merge", expectedHeadSha: "new-head" });
1454
+ assert.deepStrictEqual(pinned, ["new-head"]);
1455
+ }),
1456
+);
1457
+
1458
it.effect("publishes a merge for immediate settlement only after host confirmation", () =>
1459
Effect.gen(function* () {
1460
const mergedAt = "2026-09-03T02:00:00.000Z";
apps/server/src/pullRequest/PullRequestService.ts
+39
-1
@@ -250,6 +250,8 @@ export class PullRequestService extends Context.Service<
250
) => Effect.Effect<PullRequestActivity, PullRequestError>;
251
/** Emits when the host reports a change; empty where the host has no event feed. */
252
readonly changes: (input: PullRequestRef) => Stream.Stream<void>;
253
+ /** Whether the project's checkout is on a forge T3 reads change requests from. */
254
+ readonly servesProject: (projectId: ProjectId) => Effect.Effect<boolean>;
255
readonly threadComments: (
256
input: PullRequestThreadCommentsInput,
257
) => Effect.Effect<PullRequestThreadCommentsResult, PullRequestError>;
@@ -1131,6 +1133,13 @@ export const make = Effect.gen(function* () {
1133
};
1134
});
1135
1136
+ // A failed read keeps the tools: their calls report the failure.
1137
+ const servesProject: PullRequestService["Service"]["servesProject"] = (projectId) =>
1138
+ listWorkspaceProjects({ projectId }).pipe(
1139
+ Effect.map(({ supported }) => supported.length > 0),
1140
+ Effect.orElseSucceed(() => true),
1141
+ );
1142
+
1143
const changes: PullRequestService["Service"]["changes"] = (input) =>
1144
Stream.unwrap(
1145
requireProject(input).pipe(
@@ -2255,7 +2264,32 @@ export const make = Effect.gen(function* () {
2264
),
2265
)
2266
: Effect.succeed(false);
2258
- return mergeSettings.pipe(
2267
+ // Hosts that cannot pin a merge to a commit still refuse a head that already moved.
2268
+ const headPinned =
2269
+ input.expectedHeadSha === undefined
2270
+ ? Effect.void
2271
+ : project.api
2272
+ .getChangeRequest({
2273
+ cwd: project.project.workspaceRoot,
2274
+ repository: project.repository,
2275
+ host: project.host,
2276
+ number: input.number,
2277
+ })
2278
+ .pipe(
2279
+ Effect.mapError(toPullRequestError("runAction")),
2280
+ Effect.flatMap((current) =>
2281
+ current.headSha === input.expectedHeadSha
2282
+ ? Effect.void
2283
+ : Effect.fail(
2284
+ new PullRequestOperationError({
2285
+ operation: "runAction",
2286
+ detail: `The head is now ${current.headSha ?? "unknown"}, not ${input.expectedHeadSha}. Review the new commits first.`,
2287
+ }),
2288
+ ),
2289
+ ),
2290
+ );
2291
+ return headPinned.pipe(
2292
+ Effect.andThen(mergeSettings),
2293
Effect.flatMap((removeAgentCreditsOnMerge) =>
2294
project.api
2295
.runAction({
@@ -2269,6 +2303,9 @@ export const make = Effect.gen(function* () {
2303
...(input.expectedStackHeads === undefined
2304
? {}
2305
: { expectedStackHeads: input.expectedStackHeads }),
2306
+ ...(input.expectedHeadSha === undefined
2307
+ ? {}
2308
+ : { expectedHeadSha: input.expectedHeadSha }),
2309
...(input.mergeMethod === undefined ? {} : { mergeMethod: input.mergeMethod }),
2310
...(input.updateMethod === undefined
2311
? {}
@@ -3977,6 +4014,7 @@ export const make = Effect.gen(function* () {
4014
),
4015
activity: credentialCached(activity),
4016
changes,
4017
+ servesProject,
4018
preview: credentialCached(preview),
4019
threadComments,
4020
diff: credentialCached(diff),
apps/server/src/pullRequest/pullRequestReviewGuideNormalize.ts
+2
-2
@@ -19,7 +19,7 @@ export interface ReviewGuideChange {
19
readonly hunks: ReadonlyMap<string, FileHunks>;
20
}
21
22
-const HUNK_HEADER = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
22
+export const HUNK_HEADER = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
23
24
const hunkRange = (start: string, count: string | undefined): LineRange | null => {
25
const lines = count === undefined ? 1 : Number(count);
@@ -30,7 +30,7 @@ const hunkRange = (start: string, count: string | undefined): LineRange | null =
30
* Git quotes a name holding a tab, quote or backslash, and ends an unquoted name holding a space
31
* with a tab, so the first literal tab is never part of what the file is called.
32
*/
33
-function headerPath(line: string, prefix: string): string | null {
33
+export function headerPath(line: string, prefix: string): string | null {
34
const rest = line.slice(4);
35
const tab = rest.indexOf("\t");
36
const token = tab === -1 ? rest : rest.slice(0, tab);
apps/server/src/pullRequest/pullRequestReviewPosition.test.ts
new
+55
@@ -0,0 +1,55 @@
1
+import { describe, expect, it } from "vite-plus/test";
2
+
3
+import { reviewPositionInPatch } from "./pullRequestReviewPosition.ts";
4
+
5
+const patch = [
6
+ "diff --git a/src/a.ts b/src/a.ts",
7
+ "--- a/src/a.ts",
8
+ "+++ b/src/a.ts",
9
+ "@@ -10,3 +10,3 @@ function a() {",
10
+ " kept",
11
+ "-removed",
12
+ "+added",
13
+ " also kept",
14
+ "diff --git a/gone.ts b/gone.ts",
15
+ "--- a/gone.ts",
16
+ "+++ /dev/null",
17
+ "@@ -1 +0,0 @@",
18
+ "-gone",
19
+ "diff --git a/other.ts b/other.ts",
20
+ "--- a/other.ts",
21
+ "+++ b/other.ts",
22
+ "@@ -1 +1,2 @@",
23
+ " first",
24
+ // An added line reading `++ b/src/a.ts`, not a header for src/a.ts.
25
+ "+++ b/src/a.ts",
26
+ "@@ -20 +21 @@",
27
+ " later",
28
+].join("\n");
29
+
30
+describe("reviewPositionInPatch", () => {
31
+ it.each([
32
+ ["an added line", "src/a.ts", 11, "new", { kind: "added", newLine: 11 }],
33
+ ["a removed line", "src/a.ts", 11, "old", { kind: "deleted", oldLine: 11 }],
34
+ [
35
+ "a kept line by its head number",
36
+ "src/a.ts",
37
+ 12,
38
+ "new",
39
+ { kind: "context", oldLine: 12, newLine: 12, side: "right" },
40
+ ],
41
+ [
42
+ "a kept line by its base number",
43
+ "src/a.ts",
44
+ 10,
45
+ "old",
46
+ { kind: "context", oldLine: 10, newLine: 10, side: "left" },
47
+ ],
48
+ ["a deleted file's line", "gone.ts", 1, "old", { kind: "deleted", oldLine: 1 }],
49
+ ["a line outside every hunk", "src/a.ts", 30, "new", null],
50
+ ["no line from a later file's header-like source", "src/a.ts", 21, "new", null],
51
+ ["a line of a file the patch lacks", "src/b.ts", 11, "new", null],
52
+ ] as const)("places %s", (_name, path, line, side, expected) => {
53
+ expect(reviewPositionInPatch(patch, path, line, side)).toEqual(expected);
54
+ });
55
+});
apps/server/src/pullRequest/pullRequestReviewPosition.ts
new
+53
@@ -0,0 +1,53 @@
1
+import type { PullRequestReviewPosition } from "@t3tools/contracts";
2
+
3
+import { HUNK_HEADER, headerPath } from "./pullRequestReviewGuideNormalize.ts";
4
+
5
+/** `new` numbers a line in the PR's head, `old` in its base. */
6
+export type ReviewLineSide = "new" | "old";
7
+
8
+/** Where a line of `path` sits in a unified patch, or null when the patch does not show it. */
9
+export function reviewPositionInPatch(
10
+ patch: string,
11
+ path: string,
12
+ line: number,
13
+ side: ReviewLineSide,
14
+): PullRequestReviewPosition | null {
15
+ let oldPath: string | null = null;
16
+ let inFile = false;
17
+ let inHunks = false;
18
+ let oldLine = 0;
19
+ let newLine = 0;
20
+ for (const text of patch.split("\n")) {
21
+ if (text.startsWith("diff --git ")) {
22
+ oldPath = null;
23
+ inFile = false;
24
+ inHunks = false;
25
+ } else if (!inHunks && text.startsWith("--- ")) {
26
+ oldPath = headerPath(text, "a/");
27
+ } else if (!inHunks && text.startsWith("+++ ")) {
28
+ inFile = (headerPath(text, "b/") ?? oldPath) === path;
29
+ } else if (text.startsWith("@@")) {
30
+ // Every file's hunks count, so another file's `+++ ` source line is never a header.
31
+ const header = HUNK_HEADER.exec(text);
32
+ if (header === null) continue;
33
+ inHunks = true;
34
+ oldLine = Number(header[1]);
35
+ newLine = Number(header[3]);
36
+ } else if (inFile && inHunks) {
37
+ if (text.startsWith("+")) {
38
+ if (side === "new" && newLine === line) return { kind: "added", newLine };
39
+ newLine += 1;
40
+ } else if (text.startsWith("-")) {
41
+ if (side === "old" && oldLine === line) return { kind: "deleted", oldLine };
42
+ oldLine += 1;
43
+ } else if (text.startsWith(" ")) {
44
+ if ((side === "new" ? newLine : oldLine) === line) {
45
+ return { kind: "context", oldLine, newLine, side: side === "new" ? "right" : "left" };
46
+ }
47
+ oldLine += 1;
48
+ newLine += 1;
49
+ }
50
+ }
51
+ }
52
+ return null;
53
+}
apps/server/src/server.ts
+2
@@ -455,6 +455,7 @@ const layerThreadIssueService = ThreadIssueService.layer;
455
456
const layerGitManager = GitManager.layer.pipe(
457
Layer.provide(Layer.merge(ProjectionStoreV2.layer, ProjectStore.layer)),
458
+ Layer.provide(layerPullRequestService.pipe(Layer.provide(RuntimeLayer.layerProjectService))),
459
Layer.provideMerge(RuntimeLayer.layerProjectSetupScriptRunner),
460
Layer.provideMerge(WorktreeSetupTracker.layer),
461
Layer.provideMerge(GitVcsDriver.layer),
@@ -864,6 +865,7 @@ const layerMakeRoutes = Layer.mergeAll(
865
McpHttpServer.layer.pipe(
866
Layer.provide(ProviderAdapterRegistry.layerFromProviderInstanceRegistry),
867
Layer.provide(McpOAuth.layerMcpClientAuthenticator),
868
+ Layer.provide(ProjectionStoreV2.layer),
869
),
870
// Follows delegated tasks running in linked environments, including after a restart.
871
Layer.effectDiscard(
apps/web/src/i18n/translations/de.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Thread",
3
"0001ae5846061bb6": "Thread auf {machine}",
4
"eef7f4dacbc3c3f2": "Rechner",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten, {failed} fehlgeschlagen} other {Versucht, {started} Review-Leitfäden zu starten, {failed} fehlgeschlagen}}",
307
"672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {{count} Pull Request gelesen} other {{count} Pull Requests gelesen}}",
310
+ "c74296822829ad9d": "{count, plural, one {Versucht, {count} Pull Request zu lesen} other {Versucht, {count} Pull Requests zu lesen}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Pull Requests {count}-mal aufgelistet} other {Pull Requests {count}-mal aufgelistet}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Versucht, Pull Requests {count}-mal aufzulisten} other {Versucht, Pull Requests {count}-mal aufzulisten}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Versucht, {count} Pull Request zu öffnen} other {Versucht, {count} Pull Requests zu öffnen}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {{count} offenen Pull Request gefunden} other {{count} offene Pull Requests gefunden}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {{count} Pull Request geöffnet} other {{count} Pull Requests geöffnet}}",
316
+ "6963f76ce8860984": "{opened, plural, one {{opened} Pull Request geöffnet, {existing} offen gefunden} other {{opened} Pull Requests geöffnet, {existing} offen gefunden}}",
317
+ "b64d48025a0904a5": "{count, plural, one {{count} Pull Request aktualisiert} other {{count} Pull Requests aktualisiert}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Versucht, {count} Pull Request zu aktualisieren} other {Versucht, {count} Pull Requests zu aktualisieren}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {{count}-mal auf Pull Requests geantwortet} other {{count}-mal auf Pull Requests geantwortet}}",
320
+ "2b682a59792b6c07": "{count, plural, one {{count}-mal versucht, auf Pull Requests zu antworten} other {{count}-mal versucht, auf Pull Requests zu antworten}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Versucht, {count} Pull Request zu mergen} other {Versucht, {count} Pull Requests zu mergen}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {{count} Pull Request zum Mergen eingereiht} other {{count} Pull Requests zum Mergen eingereiht}}",
323
+ "a742473f42c9a609": "{count, plural, one {{count} Pull Request gemergt} other {{count} Pull Requests gemergt}}",
324
+ "40e3528651297351": "{merged, plural, one {{merged} Pull Request gemergt, {queued} eingereiht} other {{merged} Pull Requests gemergt, {queued} eingereiht}}",
325
+ "8146ee71f7426683": "{count, plural, one {{count} Pull Request reviewt} other {{count} Pull Requests reviewt}}",
326
+ "638678077ba2e050": "{count, plural, one {Versucht, {count} Pull Request zu reviewen} other {Versucht, {count} Pull Requests zu reviewen}}",
327
"420bea546d5f8802": "Thread kopiert",
328
"2efb2dd3bf170f67": "Thread konnte nicht kopiert werden",
329
"6c03545936b55e0b": "PR-Link kopiert",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Beobachtung eines Pull Requests beenden",
1060
"52b8917fbd7ea9d5": "Review-Leitfäden schreiben",
1061
"722d3fd5ecc61ff3": "Review-Leitfaden lesen",
1062
+ "96d54fd56d8b65ce": "Pull Request lesen",
1063
+ "1af212db47b37813": "Pull Requests auflisten",
1064
+ "a01b71c7c36d05f5": "Pull Request öffnen",
1065
+ "5ddfea667ccceecf": "Pull Request aktualisieren",
1066
+ "c87d85c418b791a5": "Auf Pull Request antworten",
1067
+ "4bcd613be5a48aa2": "Pull Request reviewen",
1068
+ "81b284c3afb54ec6": "Pull Request mergen",
1069
"3227c712130a4187": "Issues auflisten",
1070
"3f461f26681450d6": "Ein Issue lesen",
1071
"fff9316cf5e449b4": "Ein Issue erstellen",
@@ -4608,13 +4632,14 @@
4632
"6d00220bfee72afd": "Nicht verbunden: Nachricht nicht gesendet",
4633
"f62c43120e8c60e7": "Verbindung zur Umgebung wird wiederhergestellt. Versuche es erneut, sobald sie verbunden ist.",
4634
"74e7e5c0536cda02": "Nebenchat nicht gestartet",
4635
+ "87d59d5dbb3eaf83": "Angehängter Thread liegt auf einem anderen Rechner",
4636
+ "4236b99f3807de4b": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu seinem Rechner.",
4637
+ "811b25d99525bcf7": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu {owner}.",
4638
"faf9ee0a28119e10": "Entferne die Anhänge und den Kontext und sende dann erneut.",
4639
+ "d6783ef5e11f3e89": "Nebenchat konnte nicht gestartet werden.",
4640
"1778ba2f32077b39": "Aktualisiere diesen Server, bevor du mehrere Modelle startest.",
4641
"736caccf2954a7f5": "Modelle und einen Basis-Branch wählen",
4642
"d08959c85dad0ed0": "Mehrere Modelle brauchen einen neuen Thread in einem Git-Projekt. Jedes erhält einen eigenen Worktree.",
4615
- "87d59d5dbb3eaf83": "Angehängter Thread liegt auf einem anderen Rechner",
4616
- "4236b99f3807de4b": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu seinem Rechner.",
4617
- "811b25d99525bcf7": "Der Agent dieses Rechners kann „{title}“ nicht lesen. Entferne es oder wechsle zum Senden zurück zu {owner}.",
4643
"55f9621a69825e20": "Nachricht in der Warteschlange nicht aktualisiert",
4644
"1072fb0e2846f2a4": "Eine eingereihte Nachricht kann nicht in einen Nebenchat verschoben werden. Entferne /side oder /btw, um sie zu speichern.",
4645
"170ab9bcffd26887": "Starte zuerst einen Codex-Thread",
@@ -4710,7 +4735,6 @@
4735
"f2f589819f1d5aaf": "Eine Nachricht kann höchstens {max} Anhänge haben.",
4736
"83611d16e98f2bbb": "Die frühere Änderung wurde gespeichert. Prüfe deine neueren Änderungen und speichere erneut.",
4737
"e7c78c337f470f5a": "Browser kann nicht geöffnet werden",
4713
- "d6783ef5e11f3e89": "Nebenchat konnte nicht gestartet werden.",
4738
"093c70146c496264": "Der Nebenchat wurde erstellt, hat diesen Client aber nicht erreicht.",
4739
"0efeaa8d0ca3a757": "Der Nebenchat ist nicht mehr verfügbar.",
4740
"61fc2531d076d396": "Der Berechtigungsmodus des Nebenchats konnte nicht festgelegt werden.",
@@ -5707,6 +5731,7 @@
5731
"b6a29fff7c7c0808": "Niemand",
5732
"54420465784bb1bd": "Ältere Kommentare laden",
5733
"9d82ebf35bfb4043": "Hier ist noch nichts passiert.",
5734
+ "1cf216566c1ee064": "Projekt nicht verfügbar",
5735
"b5ddadeb0810688c": "Status",
5736
"93c1fc19d9bf1db0": "Beteiligung",
5737
"2160067266a61dd8": "Beliebig",
@@ -6228,6 +6253,7 @@
6253
"fefd41dda4eb7cf7": "In Dateien anzeigen",
6254
"398ff9f721cbf2ad": "DNS-Adresse konnte nicht gefunden werden",
6255
"56d5c9e464dc0d96": "Verbindung abgelehnt",
6256
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6257
"844d9a45b55b8ddc": "Verbindung wurde zurückgesetzt",
6258
"b32a80332be0120c": "Verbindung wurde geschlossen",
6259
"ed6643fea556af65": "Zeitüberschreitung der Verbindung",
@@ -9862,7 +9888,6 @@
9888
"573ea5fdf293a9d6": "Alle Checkouts",
9889
"470ad8c54049d1e1": "Checkouts durchsuchen",
9890
"7e2dfdd9f97fc027": "Projektbereich",
9865
- "1cf216566c1ee064": "Projekt nicht verfügbar",
9891
"c1b8c351aa90f319": [
9892
{
9893
"t": "span",
@@ -12011,11 +12036,11 @@
12036
"628799e25f2ae9fd": "Tabellenblätter",
12037
"60aa1b1bd2558b88": "{count}+ Seiten",
12038
"59dff62c096fda75": "Vorschau auf 1.000 Seiten begrenzt.",
12014
- "c55ca84447d16b92": "Frag den Agenten zu diesen Zeilen…",
12015
- "dd4d954561a97a95": "Agenten fragen",
12039
"16929a241a6bc9e3": "{total, plural, one {entfernter Code, {shown} von {total} Diff-Zeile angezeigt} other {entfernter Code, {shown} von {total} Diff-Zeilen angezeigt}}",
12040
"f21833072d416544": "{total, plural, one {{shown} von {total} Diff-Zeile angezeigt} other {{shown} von {total} Diff-Zeilen angezeigt}}",
12041
"26db306011e06483": "{path} in Code öffnen",
12042
+ "c55ca84447d16b92": "Frag den Agenten zu diesen Zeilen…",
12043
+ "dd4d954561a97a95": "Agenten fragen",
12044
"150a57dcd79b7ff4": [
12045
{
12046
"i": 1,
apps/web/src/i18n/translations/en.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Thread",
3
"0001ae5846061bb6": "Thread on {machine}",
4
"eef7f4dacbc3c3f2": "Machine",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Tried to start {started} review guide, {failed} failed} other {Tried to start {started} review guides, {failed} failed}}",
307
"672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Read {count} pull request} other {Read {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tried to read {count} pull request} other {Tried to read {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listed pull requests {count} time} other {Listed pull requests {count} times}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tried to list pull requests {count} time} other {Tried to list pull requests {count} times}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tried to open {count} pull request} other {Tried to open {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Found {count} open pull request} other {Found {count} open pull requests}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Opened {count} pull request} other {Opened {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Opened {opened} pull request, found {existing} open} other {Opened {opened} pull requests, found {existing} open}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Updated {count} pull request} other {Updated {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tried to update {count} pull request} other {Tried to update {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Responded on pull requests {count} time} other {Responded on pull requests {count} times}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Tried to respond on pull requests {count} time} other {Tried to respond on pull requests {count} times}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tried to merge {count} pull request} other {Tried to merge {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Queued {count} pull request to merge} other {Queued {count} pull requests to merge}}",
323
+ "a742473f42c9a609": "{count, plural, one {Merged {count} pull request} other {Merged {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Merged {merged} pull request, queued {queued}} other {Merged {merged} pull requests, queued {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Reviewed {count} pull request} other {Reviewed {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Tried to review {count} pull request} other {Tried to review {count} pull requests}}",
327
"420bea546d5f8802": "Thread copied",
328
"2efb2dd3bf170f67": "Failed to copy thread",
329
"6c03545936b55e0b": "PR link copied",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Stop watching a pull request",
1060
"52b8917fbd7ea9d5": "Write review guides",
1061
"722d3fd5ecc61ff3": "Read a review guide",
1062
+ "96d54fd56d8b65ce": "Read a pull request",
1063
+ "1af212db47b37813": "List pull requests",
1064
+ "a01b71c7c36d05f5": "Open a pull request",
1065
+ "5ddfea667ccceecf": "Update a pull request",
1066
+ "c87d85c418b791a5": "Respond on a pull request",
1067
+ "4bcd613be5a48aa2": "Review a pull request",
1068
+ "81b284c3afb54ec6": "Merge a pull request",
1069
"3227c712130a4187": "List issues",
1070
"3f461f26681450d6": "Read an issue",
1071
"fff9316cf5e449b4": "File an issue",
@@ -4607,13 +4631,14 @@
4631
"6d00220bfee72afd": "Not connected: message not sent",
4632
"f62c43120e8c60e7": "Reconnecting to the environment. Try again once it is connected.",
4633
"74e7e5c0536cda02": "Side chat not started",
4634
+ "87d59d5dbb3eaf83": "Attached thread is on another machine",
4635
+ "4236b99f3807de4b": "This machine's agent can't read \"{title}\". Remove it, or switch back to its machine to send.",
4636
+ "811b25d99525bcf7": "This machine's agent can't read \"{title}\". Remove it, or switch back to {owner} to send.",
4637
"faf9ee0a28119e10": "Remove the attachments and context, then send it again.",
4638
+ "d6783ef5e11f3e89": "Could not start a side chat.",
4639
"1778ba2f32077b39": "Update this server before starting multiple models.",
4640
"736caccf2954a7f5": "Choose models and a base branch",
4641
"d08959c85dad0ed0": "Multiple models need a new thread in a Git project. Each gets its own worktree.",
4614
- "87d59d5dbb3eaf83": "Attached thread is on another machine",
4615
- "4236b99f3807de4b": "This machine's agent can't read \"{title}\". Remove it, or switch back to its machine to send.",
4616
- "811b25d99525bcf7": "This machine's agent can't read \"{title}\". Remove it, or switch back to {owner} to send.",
4642
"55f9621a69825e20": "Queued message not updated",
4643
"1072fb0e2846f2a4": "A queued message can't move to a side chat. Remove /side or /btw to save it.",
4644
"170ab9bcffd26887": "Start a Codex thread first",
@@ -4709,7 +4734,6 @@
4734
"f2f589819f1d5aaf": "A message can have at most {max} attachments.",
4735
"83611d16e98f2bbb": "The earlier edit was saved. Review your newer changes and save again.",
4736
"e7c78c337f470f5a": "Unable to open browser",
4712
- "d6783ef5e11f3e89": "Could not start a side chat.",
4737
"093c70146c496264": "The side chat was created, but it did not reach this client.",
4738
"0efeaa8d0ca3a757": "The side chat is no longer available.",
4739
"61fc2531d076d396": "Could not set the side chat's permission mode.",
@@ -5708,6 +5732,7 @@
5732
"b6a29fff7c7c0808": "None",
5733
"54420465784bb1bd": "Load older comments",
5734
"9d82ebf35bfb4043": "Nothing has happened here yet.",
5735
+ "1cf216566c1ee064": "Unavailable project",
5736
"b5ddadeb0810688c": "State",
5737
"93c1fc19d9bf1db0": "Involvement",
5738
"2160067266a61dd8": "Any",
@@ -6232,6 +6257,7 @@
6257
"fefd41dda4eb7cf7": "Reveal in Files",
6258
"398ff9f721cbf2ad": "DNS address could not be found",
6259
"56d5c9e464dc0d96": "Connection refused",
6260
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6261
"844d9a45b55b8ddc": "Connection was reset",
6262
"b32a80332be0120c": "Connection was closed",
6263
"ed6643fea556af65": "Connection timed out",
@@ -9871,7 +9897,6 @@
9897
"573ea5fdf293a9d6": "All checkouts",
9898
"470ad8c54049d1e1": "Search checkouts",
9899
"7e2dfdd9f97fc027": "Project scope",
9874
- "1cf216566c1ee064": "Unavailable project",
9900
"c1b8c351aa90f319": [
9901
{
9902
"t": "span",
@@ -12019,11 +12044,11 @@
12044
"628799e25f2ae9fd": "Sheets",
12045
"60aa1b1bd2558b88": "{count}+ pages",
12046
"59dff62c096fda75": "Preview limited to 1,000 pages.",
12022
- "c55ca84447d16b92": "Ask the agent about these lines…",
12023
- "dd4d954561a97a95": "Ask agent",
12047
"16929a241a6bc9e3": "{total, plural, one {removed code, showing {shown} of {total} diff lines} other {removed code, showing {shown} of {total} diff lines}}",
12048
"f21833072d416544": "{total, plural, one {showing {shown} of {total} diff lines} other {showing {shown} of {total} diff lines}}",
12049
"26db306011e06483": "Open {path} in Code",
12050
+ "c55ca84447d16b92": "Ask the agent about these lines…",
12051
+ "dd4d954561a97a95": "Ask agent",
12052
"150a57dcd79b7ff4": [
12053
"Loading ",
12054
{
apps/web/src/i18n/translations/es.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Hilo",
3
"0001ae5846061bb6": "Hilo en {machine}",
4
"eef7f4dacbc3c3f2": "Máquina",
@@ -307,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Leyó {count} pull request} other {Leyó {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Intentó leer {count} pull request} other {Intentó leer {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listó pull requests {count} vez} other {Listó pull requests {count} veces}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Intentó listar pull requests {count} vez} other {Intentó listar pull requests {count} veces}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Intentó abrir {count} pull request} other {Intentó abrir {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Encontró {count} pull request abierta} other {Encontró {count} pull requests abiertas}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Abrió {count} pull request} other {Abrió {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Abrió {opened} pull request, encontró {existing} abiertas} other {Abrió {opened} pull requests, encontró {existing} abiertas}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Actualizó {count} pull request} other {Actualizó {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Intentó actualizar {count} pull request} other {Intentó actualizar {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Respondió en pull requests {count} vez} other {Respondió en pull requests {count} veces}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Intentó responder en pull requests {count} vez} other {Intentó responder en pull requests {count} veces}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Intentó fusionar {count} pull request} other {Intentó fusionar {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Puso {count} pull request en cola para fusionar} other {Puso {count} pull requests en cola para fusionar}}",
323
+ "a742473f42c9a609": "{count, plural, one {Fusionó {count} pull request} other {Fusionó {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Fusionó {merged} pull request, {queued} en cola} other {Fusionó {merged} pull requests, {queued} en cola}}",
325
+ "8146ee71f7426683": "{count, plural, one {Revisó {count} pull request} other {Revisó {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Intentó revisar {count} pull request} other {Intentó revisar {count} pull requests}}",
327
"420bea546d5f8802": "Hilo copiado",
328
"2efb2dd3bf170f67": "No se pudo copiar el hilo",
329
"6c03545936b55e0b": "Enlace de la PR copiado",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Dejar de seguir una pull request",
1060
"52b8917fbd7ea9d5": "Escribir guías de revisión",
1061
"722d3fd5ecc61ff3": "Leer una guía de revisión",
1062
+ "96d54fd56d8b65ce": "Leer una pull request",
1063
+ "1af212db47b37813": "Listar pull requests",
1064
+ "a01b71c7c36d05f5": "Abrir una pull request",
1065
+ "5ddfea667ccceecf": "Actualizar una pull request",
1066
+ "c87d85c418b791a5": "Responder en una pull request",
1067
+ "4bcd613be5a48aa2": "Revisar una pull request",
1068
+ "81b284c3afb54ec6": "Fusionar una pull request",
1069
"3227c712130a4187": "Listar issues",
1070
"3f461f26681450d6": "Leer una issue",
1071
"fff9316cf5e449b4": "Abrir una issue",
@@ -4605,13 +4629,14 @@
4629
"6d00220bfee72afd": "Sin conexión: mensaje no enviado",
4630
"f62c43120e8c60e7": "Reconectando con el entorno. Vuelve a intentarlo cuando esté conectado.",
4631
"74e7e5c0536cda02": "Chat lateral no iniciado",
4632
+ "87d59d5dbb3eaf83": "El hilo adjunto está en otra máquina",
4633
+ "4236b99f3807de4b": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a su máquina para enviarlo.",
4634
+ "811b25d99525bcf7": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a {owner} para enviar.",
4635
"faf9ee0a28119e10": "Quita los adjuntos y el contexto, y vuelve a enviarlo.",
4636
+ "d6783ef5e11f3e89": "No se pudo iniciar un chat lateral.",
4637
"1778ba2f32077b39": "Actualiza este servidor antes de iniciar varios modelos.",
4638
"736caccf2954a7f5": "Elige los modelos y una rama base",
4639
"d08959c85dad0ed0": "Varios modelos necesitan un hilo nuevo en un proyecto Git. Cada uno tiene su propio worktree.",
4612
- "87d59d5dbb3eaf83": "El hilo adjunto está en otra máquina",
4613
- "4236b99f3807de4b": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a su máquina para enviarlo.",
4614
- "811b25d99525bcf7": "El agente de esta máquina no puede leer \"{title}\". Quítalo o vuelve a {owner} para enviar.",
4640
"55f9621a69825e20": "Mensaje en cola no actualizado",
4641
"1072fb0e2846f2a4": "Un mensaje en cola no puede pasar a un chat lateral. Quita /side o /btw para guardarlo.",
4642
"170ab9bcffd26887": "Inicia primero un hilo de Codex",
@@ -4707,7 +4732,6 @@
4732
"f2f589819f1d5aaf": "Un mensaje puede tener como máximo {max} adjuntos.",
4733
"83611d16e98f2bbb": "Se guardó la edición anterior. Revisa tus cambios más recientes y vuelve a guardar.",
4734
"e7c78c337f470f5a": "No se puede abrir el navegador",
4710
- "d6783ef5e11f3e89": "No se pudo iniciar un chat lateral.",
4735
"093c70146c496264": "El chat lateral se creó, pero no llegó a este cliente.",
4736
"0efeaa8d0ca3a757": "El chat lateral ya no está disponible.",
4737
"61fc2531d076d396": "No se pudo definir el modo de permisos del chat lateral.",
@@ -5706,6 +5730,7 @@
5730
"b6a29fff7c7c0808": "Nadie",
5731
"54420465784bb1bd": "Cargar comentarios anteriores",
5732
"9d82ebf35bfb4043": "Aquí no ha pasado nada todavía.",
5733
+ "1cf216566c1ee064": "Proyecto no disponible",
5734
"b5ddadeb0810688c": "Estado",
5735
"93c1fc19d9bf1db0": "Participación",
5736
"2160067266a61dd8": "Cualquiera",
@@ -6229,6 +6254,7 @@
6254
"fefd41dda4eb7cf7": "Mostrar en Archivos",
6255
"398ff9f721cbf2ad": "No se encontró la dirección DNS",
6256
"56d5c9e464dc0d96": "Conexión rechazada",
6257
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6258
"844d9a45b55b8ddc": "Se restableció la conexión",
6259
"b32a80332be0120c": "Se cerró la conexión",
6260
"ed6643fea556af65": "Se agotó el tiempo de conexión",
@@ -9859,7 +9885,6 @@
9885
"573ea5fdf293a9d6": "Todos los checkouts",
9886
"470ad8c54049d1e1": "Buscar checkouts",
9887
"7e2dfdd9f97fc027": "Ámbito de proyectos",
9862
- "1cf216566c1ee064": "Proyecto no disponible",
9888
"c1b8c351aa90f319": [
9889
{
9890
"t": "span",
@@ -12004,11 +12029,11 @@
12029
"628799e25f2ae9fd": "Hojas",
12030
"60aa1b1bd2558b88": "Más de {count} páginas",
12031
"59dff62c096fda75": "La vista previa se limita a 1000 páginas.",
12007
- "c55ca84447d16b92": "Pregunta al agente sobre estas líneas…",
12008
- "dd4d954561a97a95": "Preguntar al agente",
12032
"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}}",
12033
"f21833072d416544": "{total, plural, one {se muestra {shown} de {total} línea del diff} other {se muestran {shown} de {total} líneas del diff}}",
12034
"26db306011e06483": "Abrir {path} en Código",
12035
+ "c55ca84447d16b92": "Pregunta al agente sobre estas líneas…",
12036
+ "dd4d954561a97a95": "Preguntar al agente",
12037
"150a57dcd79b7ff4": [
12038
"Cargando ",
12039
{
apps/web/src/i18n/translations/fr.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Fil",
3
"0001ae5846061bb6": "Fil sur {machine}",
4
"eef7f4dacbc3c3f2": "Machine",
@@ -307,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {{count} pull request lue} other {{count} pull requests lues}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tentative de lecture de {count} pull request} other {Tentative de lecture de {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Pull requests listées {count} fois} other {Pull requests listées {count} fois}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tentative de liste des pull requests {count} fois} other {Tentative de liste des pull requests {count} fois}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tentative d'ouverture de {count} pull request} other {Tentative d'ouverture de {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {{count} pull request ouverte trouvée} other {{count} pull requests ouvertes trouvées}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {{count} pull request ouverte} other {{count} pull requests ouvertes}}",
316
+ "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}}",
317
+ "b64d48025a0904a5": "{count, plural, one {{count} pull request mise à jour} other {{count} pull requests mises à jour}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tentative de mise à jour de {count} pull request} other {Tentative de mise à jour de {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Réponse sur des pull requests {count} fois} other {Réponses sur des pull requests {count} fois}}",
320
+ "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}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tentative de fusion de {count} pull request} other {Tentative de fusion de {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {{count} pull request mise en file pour fusion} other {{count} pull requests mises en file pour fusion}}",
323
+ "a742473f42c9a609": "{count, plural, one {{count} pull request fusionnée} other {{count} pull requests fusionnées}}",
324
+ "40e3528651297351": "{merged, plural, one {{merged} pull request fusionnée, {queued} en file} other {{merged} pull requests fusionnées, {queued} en file}}",
325
+ "8146ee71f7426683": "{count, plural, one {{count} pull request relue} other {{count} pull requests relues}}",
326
+ "638678077ba2e050": "{count, plural, one {Tentative de revue de {count} pull request} other {Tentative de revue de {count} pull requests}}",
327
"420bea546d5f8802": "Fil copié",
328
"2efb2dd3bf170f67": "Échec de la copie du fil",
329
"6c03545936b55e0b": "Lien de la PR copié",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Arrêter de suivre une pull request",
1060
"52b8917fbd7ea9d5": "Rédiger des guides de revue",
1061
"722d3fd5ecc61ff3": "Lire un guide de revue",
1062
+ "96d54fd56d8b65ce": "Lire une pull request",
1063
+ "1af212db47b37813": "Lister les pull requests",
1064
+ "a01b71c7c36d05f5": "Ouvrir une pull request",
1065
+ "5ddfea667ccceecf": "Mettre à jour une pull request",
1066
+ "c87d85c418b791a5": "Répondre sur une pull request",
1067
+ "4bcd613be5a48aa2": "Relire une pull request",
1068
+ "81b284c3afb54ec6": "Fusionner une pull request",
1069
"3227c712130a4187": "Lister les tickets",
1070
"3f461f26681450d6": "Lire un ticket",
1071
"fff9316cf5e449b4": "Ouvrir un ticket",
@@ -4606,13 +4630,14 @@
4630
"6d00220bfee72afd": "Non connecté : message non envoyé",
4631
"f62c43120e8c60e7": "Reconnexion à l’environnement. Réessayez une fois la connexion établie.",
4632
"74e7e5c0536cda02": "Discussion annexe non démarrée",
4633
+ "87d59d5dbb3eaf83": "Le fil joint se trouve sur une autre machine",
4634
+ "4236b99f3807de4b": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez sur sa machine pour l’envoyer.",
4635
+ "811b25d99525bcf7": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez à {owner} pour envoyer.",
4636
"faf9ee0a28119e10": "Retirez les pièces jointes et le contexte, puis renvoyez.",
4637
+ "d6783ef5e11f3e89": "Impossible de démarrer une discussion annexe.",
4638
"1778ba2f32077b39": "Mettez à jour ce serveur avant de lancer plusieurs modèles.",
4639
"736caccf2954a7f5": "Choisissez des modèles et une branche de base",
4640
"d08959c85dad0ed0": "Plusieurs modèles nécessitent un nouveau fil dans un projet Git. Chacun a son propre worktree.",
4613
- "87d59d5dbb3eaf83": "Le fil joint se trouve sur une autre machine",
4614
- "4236b99f3807de4b": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez sur sa machine pour l’envoyer.",
4615
- "811b25d99525bcf7": "L’agent de cette machine ne peut pas lire « {title} ». Retirez-le, ou revenez à {owner} pour envoyer.",
4641
"55f9621a69825e20": "Message en file d’attente non mis à jour",
4642
"1072fb0e2846f2a4": "Un message en file d’attente ne peut pas passer dans une discussion annexe. Retirez /side ou /btw pour l’enregistrer.",
4643
"170ab9bcffd26887": "Démarrez d’abord un fil Codex",
@@ -4708,7 +4733,6 @@
4733
"f2f589819f1d5aaf": "Un message peut contenir au plus {max} pièces jointes.",
4734
"83611d16e98f2bbb": "La modification précédente a été enregistrée. Relisez vos changements plus récents et enregistrez à nouveau.",
4735
"e7c78c337f470f5a": "Impossible d’ouvrir le navigateur",
4711
- "d6783ef5e11f3e89": "Impossible de démarrer une discussion annexe.",
4736
"093c70146c496264": "La discussion annexe a été créée, mais elle n’est pas parvenue à ce client.",
4737
"0efeaa8d0ca3a757": "La discussion annexe n’est plus disponible.",
4738
"61fc2531d076d396": "Impossible de définir le mode d’autorisation de la discussion annexe.",
@@ -5707,6 +5731,7 @@
5731
"b6a29fff7c7c0808": "Personne",
5732
"54420465784bb1bd": "Charger les commentaires plus anciens",
5733
"9d82ebf35bfb4043": "Rien ne s’est encore passé ici.",
5734
+ "1cf216566c1ee064": "Projet indisponible",
5735
"b5ddadeb0810688c": "État",
5736
"93c1fc19d9bf1db0": "Participation",
5737
"2160067266a61dd8": "Tous",
@@ -6230,6 +6255,7 @@
6255
"fefd41dda4eb7cf7": "Afficher dans Fichiers",
6256
"398ff9f721cbf2ad": "Adresse DNS introuvable",
6257
"56d5c9e464dc0d96": "Connexion refusée",
6258
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6259
"844d9a45b55b8ddc": "La connexion a été réinitialisée",
6260
"b32a80332be0120c": "La connexion a été fermée",
6261
"ed6643fea556af65": "Délai de connexion dépassé",
@@ -9861,7 +9887,6 @@
9887
"573ea5fdf293a9d6": "Tous les checkouts",
9888
"470ad8c54049d1e1": "Rechercher des checkouts",
9889
"7e2dfdd9f97fc027": "Portée des projets",
9864
- "1cf216566c1ee064": "Projet indisponible",
9890
"c1b8c351aa90f319": [
9891
{
9892
"t": "span",
@@ -12009,11 +12034,11 @@
12034
"628799e25f2ae9fd": "Feuilles",
12035
"60aa1b1bd2558b88": "{count}+ pages",
12036
"59dff62c096fda75": "Aperçu limité à 1 000 pages.",
12012
- "c55ca84447d16b92": "Interrogez l’agent sur ces lignes…",
12013
- "dd4d954561a97a95": "Demander à l’agent",
12037
"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}}}",
12038
"f21833072d416544": "{total, plural, one {{shown} ligne de diff affichée sur {total}} other {{shown} lignes de diff affichées sur {total}}}",
12039
"26db306011e06483": "Ouvrir {path} dans Code",
12040
+ "c55ca84447d16b92": "Interrogez l’agent sur ces lignes…",
12041
+ "dd4d954561a97a95": "Demander à l’agent",
12042
"150a57dcd79b7ff4": [
12043
"Chargement de ",
12044
{
apps/web/src/i18n/translations/ja.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "スレッド",
3
"0001ae5846061bb6": "{machine} 上のスレッド",
4
"eef7f4dacbc3c3f2": "マシン",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました。{failed} 件失敗しました}}",
307
"672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}",
308
"5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {{count} 件のプルリクエストを読み取りました}}",
310
+ "c74296822829ad9d": "{count, plural, other {{count} 件のプルリクエストの読み取りを試みました}}",
311
+ "833fc9b60bf40749": "{count, plural, other {プルリクエストを {count} 回一覧表示しました}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {プルリクエストの一覧表示を {count} 回試みました}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {{count} 件のプルリクエストの作成を試みました}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {オープンなプルリクエストが {count} 件見つかりました}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {{count} 件のプルリクエストを作成しました}}",
316
+ "6963f76ce8860984": "{opened, plural, other {{opened} 件のプルリクエストを作成し、オープンなものを {existing} 件見つけました}}",
317
+ "b64d48025a0904a5": "{count, plural, other {{count} 件のプルリクエストを更新しました}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {{count} 件のプルリクエストの更新を試みました}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {プルリクエストに {count} 回返信しました}}",
320
+ "2b682a59792b6c07": "{count, plural, other {プルリクエストへの返信を {count} 回試みました}}",
321
+ "998ef072ea79ff62": "{count, plural, other {{count} 件のプルリクエストのマージを試みました}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {{count} 件のプルリクエストをマージ待ちにしました}}",
323
+ "a742473f42c9a609": "{count, plural, other {{count} 件のプルリクエストをマージしました}}",
324
+ "40e3528651297351": "{merged, plural, other {{merged} 件のプルリクエストをマージし、{queued} 件をマージ待ちにしました}}",
325
+ "8146ee71f7426683": "{count, plural, other {{count} 件のプルリクエストをレビューしました}}",
326
+ "638678077ba2e050": "{count, plural, other {{count} 件のプルリクエストのレビューを試みました}}",
327
"420bea546d5f8802": "スレッドをコピーしました",
328
"2efb2dd3bf170f67": "スレッドをコピーできませんでした",
329
"6c03545936b55e0b": "PR のリンクをコピーしました",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "プルリクエストのウォッチを解除",
1060
"52b8917fbd7ea9d5": "レビューガイドを作成",
1061
"722d3fd5ecc61ff3": "レビューガイドを読み取る",
1062
+ "96d54fd56d8b65ce": "プルリクエストを読む",
1063
+ "1af212db47b37813": "プルリクエストを一覧表示",
1064
+ "a01b71c7c36d05f5": "プルリクエストを作成",
1065
+ "5ddfea667ccceecf": "プルリクエストを更新",
1066
+ "c87d85c418b791a5": "プルリクエストに返信",
1067
+ "4bcd613be5a48aa2": "プルリクエストをレビュー",
1068
+ "81b284c3afb54ec6": "プルリクエストをマージ",
1069
"3227c712130a4187": "Issue を一覧表示",
1070
"3f461f26681450d6": "Issue を読み取る",
1071
"fff9316cf5e449b4": "Issue を作成",
@@ -4595,13 +4619,14 @@
4619
"6d00220bfee72afd": "未接続: メッセージは送信されませんでした",
4620
"f62c43120e8c60e7": "環境に再接続しています。接続されたらもう一度お試しください。",
4621
"74e7e5c0536cda02": "サイドチャットが開始されていません",
4622
+ "87d59d5dbb3eaf83": "添付されたスレッドは別のマシン上にあります",
4623
+ "4236b99f3807de4b": "このマシンのエージェントは「{title}」を読み取れません。削除するか、元のマシンに切り替えてから送信してください。",
4624
+ "811b25d99525bcf7": "このマシンのエージェントは \"{title}\" を読み取れません。削除するか、{owner} に戻してから送信してください。",
4625
"faf9ee0a28119e10": "添付ファイルとコンテキストを削除してから、もう一度送信してください。",
4626
+ "d6783ef5e11f3e89": "サイドチャットを開始できませんでした。",
4627
"1778ba2f32077b39": "複数のモデルを開始する前に、このサーバーを更新してください。",
4628
"736caccf2954a7f5": "モデルとベースブランチを選択",
4629
"d08959c85dad0ed0": "複数のモデルを使うには、Git プロジェクトの新しいスレッドが必要です。各モデルに専用のワークツリーが作られます。",
4602
- "87d59d5dbb3eaf83": "添付されたスレッドは別のマシン上にあります",
4603
- "4236b99f3807de4b": "このマシンのエージェントは「{title}」を読み取れません。削除するか、元のマシンに切り替えてから送信してください。",
4604
- "811b25d99525bcf7": "このマシンのエージェントは \"{title}\" を読み取れません。削除するか、{owner} に戻してから送信してください。",
4630
"55f9621a69825e20": "キュー内のメッセージは更新されませんでした",
4631
"1072fb0e2846f2a4": "キュー内のメッセージはサイドチャットに移動できません。保存するには /side または /btw を削除してください。",
4632
"170ab9bcffd26887": "まず Codex のスレッドを開始してください",
@@ -4697,7 +4722,6 @@
4722
"f2f589819f1d5aaf": "1 つのメッセージに付けられる添付ファイルは最大 {max} 個です。",
4723
"83611d16e98f2bbb": "前の編集は保存されました。新しい変更を確認して、もう一度保存してください。",
4724
"e7c78c337f470f5a": "ブラウザーを開けません",
4700
- "d6783ef5e11f3e89": "サイドチャットを開始できませんでした。",
4725
"093c70146c496264": "サイドチャットは作成されましたが、このクライアントに届きませんでした。",
4726
"0efeaa8d0ca3a757": "サイドチャットは利用できなくなりました。",
4727
"61fc2531d076d396": "サイドチャットの権限モードを設定できませんでした。",
@@ -5689,6 +5713,7 @@
5713
"b6a29fff7c7c0808": "なし",
5714
"54420465784bb1bd": "以前のコメントを読み込む",
5715
"9d82ebf35bfb4043": "まだアクティビティはありません。",
5716
+ "1cf216566c1ee064": "利用できないプロジェクト",
5717
"b5ddadeb0810688c": "状態",
5718
"93c1fc19d9bf1db0": "関与",
5719
"2160067266a61dd8": "すべて",
@@ -6202,6 +6227,7 @@
6227
"fefd41dda4eb7cf7": "ファイルで表示",
6228
"398ff9f721cbf2ad": "DNS アドレスが見つかりませんでした",
6229
"56d5c9e464dc0d96": "接続が拒否されました",
6230
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6231
"844d9a45b55b8ddc": "接続がリセットされました",
6232
"b32a80332be0120c": "接続が閉じられました",
6233
"ed6643fea556af65": "接続がタイムアウトしました",
@@ -9813,7 +9839,6 @@
9839
"573ea5fdf293a9d6": "すべてのチェックアウト",
9840
"470ad8c54049d1e1": "チェックアウトを検索",
9841
"7e2dfdd9f97fc027": "プロジェクトの範囲",
9816
- "1cf216566c1ee064": "利用できないプロジェクト",
9842
"c1b8c351aa90f319": [
9843
{
9844
"t": "span",
@@ -11959,11 +11984,11 @@
11984
"628799e25f2ae9fd": "シート",
11985
"60aa1b1bd2558b88": "{count} ページ以上",
11986
"59dff62c096fda75": "プレビューは 1,000 ページまでに限られます。",
11962
- "c55ca84447d16b92": "これらの行についてエージェントに質問…",
11963
- "dd4d954561a97a95": "エージェントに質問",
11987
"16929a241a6bc9e3": "{total, plural, other {削除されたコード、差分 {total} 行中 {shown} 行を表示}}",
11988
"f21833072d416544": "{total, plural, other {差分 {total} 行中 {shown} 行を表示}}",
11989
"26db306011e06483": "{path} をコードで開く",
11990
+ "c55ca84447d16b92": "これらの行についてエージェントに質問…",
11991
+ "dd4d954561a97a95": "エージェントに質問",
11992
"150a57dcd79b7ff4": [
11993
{
11994
"i": 1,
apps/web/src/i18n/translations/ko.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "스레드",
3
"0001ae5846061bb6": "{machine}의 스레드",
4
"eef7f4dacbc3c3f2": "머신",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {검토 가이드 {started}개 시작 시도함, {failed}개 실패}}",
307
"672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}",
308
"5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {풀 리퀘스트 {count}개를 읽음}}",
310
+ "c74296822829ad9d": "{count, plural, other {풀 리퀘스트 {count}개 읽기를 시도함}}",
311
+ "833fc9b60bf40749": "{count, plural, other {풀 리퀘스트 목록을 {count}번 조회함}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {풀 리퀘스트 목록 조회를 {count}번 시도함}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {풀 리퀘스트 {count}개 열기를 시도함}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {열린 풀 리퀘스트 {count}개를 찾음}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {풀 리퀘스트 {count}개를 엶}}",
316
+ "6963f76ce8860984": "{opened, plural, other {풀 리퀘스트 {opened}개를 열고, 열린 풀 리퀘스트 {existing}개를 찾음}}",
317
+ "b64d48025a0904a5": "{count, plural, other {풀 리퀘스트 {count}개를 업데이트함}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {풀 리퀘스트 {count}개 업데이트를 시도함}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {풀 리퀘스트에 {count}번 응답함}}",
320
+ "2b682a59792b6c07": "{count, plural, other {풀 리퀘스트 응답을 {count}번 시도함}}",
321
+ "998ef072ea79ff62": "{count, plural, other {풀 리퀘스트 {count}개 병합을 시도함}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {풀 리퀘스트 {count}개를 병합 대기열에 넣음}}",
323
+ "a742473f42c9a609": "{count, plural, other {풀 리퀘스트 {count}개를 병합함}}",
324
+ "40e3528651297351": "{merged, plural, other {풀 리퀘스트 {merged}개를 병합하고 {queued}개를 대기열에 넣음}}",
325
+ "8146ee71f7426683": "{count, plural, other {풀 리퀘스트 {count}개를 검토함}}",
326
+ "638678077ba2e050": "{count, plural, other {풀 리퀘스트 {count}개 검토를 시도함}}",
327
"420bea546d5f8802": "스레드 복사됨",
328
"2efb2dd3bf170f67": "스레드를 복사하지 못했습니다",
329
"6c03545936b55e0b": "PR 링크 복사됨",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "풀 리퀘스트 지켜보기 중지",
1060
"52b8917fbd7ea9d5": "검토 가이드 작성",
1061
"722d3fd5ecc61ff3": "검토 가이드 읽기",
1062
+ "96d54fd56d8b65ce": "풀 리퀘스트 읽기",
1063
+ "1af212db47b37813": "풀 리퀘스트 목록 보기",
1064
+ "a01b71c7c36d05f5": "풀 리퀘스트 열기",
1065
+ "5ddfea667ccceecf": "풀 리퀘스트 업데이트",
1066
+ "c87d85c418b791a5": "풀 리퀘스트에 응답",
1067
+ "4bcd613be5a48aa2": "풀 리퀘스트 검토",
1068
+ "81b284c3afb54ec6": "풀 리퀘스트 병합",
1069
"3227c712130a4187": "이슈 목록 조회",
1070
"3f461f26681450d6": "이슈 읽기",
1071
"fff9316cf5e449b4": "이슈 작성",
@@ -4592,13 +4616,14 @@
4616
"6d00220bfee72afd": "연결되지 않음: 메시지를 보내지 않았습니다",
4617
"f62c43120e8c60e7": "환경에 다시 연결하는 중입니다. 연결되면 다시 시도하세요.",
4618
"74e7e5c0536cda02": "사이드 채팅이 시작되지 않음",
4619
+ "87d59d5dbb3eaf83": "첨부된 스레드가 다른 머신에 있습니다",
4620
+ "4236b99f3807de4b": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나, 보내려면 해당 머신으로 다시 전환하세요.",
4621
+ "811b25d99525bcf7": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나 {owner}(으)로 다시 전환한 후 보내세요.",
4622
"faf9ee0a28119e10": "첨부 파일과 컨텍스트를 제거한 다음 다시 보내세요.",
4623
+ "d6783ef5e11f3e89": "사이드 채팅을 시작할 수 없습니다.",
4624
"1778ba2f32077b39": "여러 모델을 시작하기 전에 이 서버를 업데이트하세요.",
4625
"736caccf2954a7f5": "모델과 기본 브랜치를 선택하세요",
4626
"d08959c85dad0ed0": "여러 모델을 사용하려면 Git 프로젝트에 새 스레드가 필요합니다. 각 모델은 자체 워크트리를 받습니다.",
4599
- "87d59d5dbb3eaf83": "첨부된 스레드가 다른 머신에 있습니다",
4600
- "4236b99f3807de4b": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나, 보내려면 해당 머신으로 다시 전환하세요.",
4601
- "811b25d99525bcf7": "이 머신의 에이전트는 \"{title}\"을(를) 읽을 수 없습니다. 제거하거나 {owner}(으)로 다시 전환한 후 보내세요.",
4627
"55f9621a69825e20": "대기열 메시지가 업데이트되지 않음",
4628
"1072fb0e2846f2a4": "대기열 메시지는 사이드 채팅으로 옮길 수 없습니다. 저장하려면 /side 또는 /btw를 제거하세요.",
4629
"170ab9bcffd26887": "먼저 Codex 스레드를 시작하세요",
@@ -4694,7 +4719,6 @@
4719
"f2f589819f1d5aaf": "메시지에는 첨부 파일을 최대 {max}개까지 넣을 수 있습니다.",
4720
"83611d16e98f2bbb": "이전 편집 내용이 저장되었습니다. 최근 변경 사항을 검토한 후 다시 저장하세요.",
4721
"e7c78c337f470f5a": "브라우저를 열 수 없습니다",
4697
- "d6783ef5e11f3e89": "사이드 채팅을 시작할 수 없습니다.",
4722
"093c70146c496264": "사이드 채팅이 생성되었지만 이 클라이언트에 도달하지 않았습니다.",
4723
"0efeaa8d0ca3a757": "사이드 채팅을 더 이상 사용할 수 없습니다.",
4724
"61fc2531d076d396": "사이드 채팅의 권한 모드를 설정할 수 없습니다.",
@@ -5687,6 +5711,7 @@
5711
"b6a29fff7c7c0808": "없음",
5712
"54420465784bb1bd": "이전 댓글 불러오기",
5713
"9d82ebf35bfb4043": "아직 활동이 없습니다.",
5714
+ "1cf216566c1ee064": "사용할 수 없는 프로젝트",
5715
"b5ddadeb0810688c": "상태",
5716
"93c1fc19d9bf1db0": "참여",
5717
"2160067266a61dd8": "전체",
@@ -6201,6 +6226,7 @@
6226
"fefd41dda4eb7cf7": "파일에서 보기",
6227
"398ff9f721cbf2ad": "DNS 주소를 찾을 수 없습니다",
6228
"56d5c9e464dc0d96": "연결이 거부되었습니다",
6229
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6230
"844d9a45b55b8ddc": "연결이 재설정되었습니다",
6231
"b32a80332be0120c": "연결이 닫혔습니다",
6232
"ed6643fea556af65": "연결 시간이 초과되었습니다",
@@ -9816,7 +9842,6 @@
9842
"573ea5fdf293a9d6": "모든 체크아웃",
9843
"470ad8c54049d1e1": "체크아웃 검색",
9844
"7e2dfdd9f97fc027": "프로젝트 범위",
9819
- "1cf216566c1ee064": "사용할 수 없는 프로젝트",
9845
"c1b8c351aa90f319": [
9846
{
9847
"t": "span",
@@ -11956,11 +11981,11 @@
11981
"628799e25f2ae9fd": "시트",
11982
"60aa1b1bd2558b88": "{count}+페이지",
11983
"59dff62c096fda75": "미리 보기는 1,000페이지로 제한됩니다.",
11959
- "c55ca84447d16b92": "이 줄에 대해 에이전트에게 질문…",
11960
- "dd4d954561a97a95": "에이전트에게 질문",
11984
"16929a241a6bc9e3": "{total, plural, other {삭제된 코드, 변경 줄 {total}개 중 {shown}개 표시}}",
11985
"f21833072d416544": "{total, plural, other {변경 줄 {total}개 중 {shown}개 표시}}",
11986
"26db306011e06483": "{path}을(를) 코드에서 열기",
11987
+ "c55ca84447d16b92": "이 줄에 대해 에이전트에게 질문…",
11988
+ "dd4d954561a97a95": "에이전트에게 질문",
11989
"150a57dcd79b7ff4": [
11990
{
11991
"i": 1,
apps/web/src/i18n/translations/pt-BR.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Thread",
3
"0001ae5846061bb6": "Thread em {machine}",
4
"eef7f4dacbc3c3f2": "Máquina",
@@ -307,6 +306,24 @@
306
"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}}",
307
"672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Leu {count} pull request} other {Leu {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Tentou ler {count} pull request} other {Tentou ler {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listou pull requests {count} vez} other {Listou pull requests {count} vezes}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Tentou listar pull requests {count} vez} other {Tentou listar pull requests {count} vezes}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Tentou abrir {count} pull request} other {Tentou abrir {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Encontrou {count} pull request aberto} other {Encontrou {count} pull requests abertos}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Abriu {count} pull request} other {Abriu {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Abriu {opened} pull request, encontrou {existing} abertos} other {Abriu {opened} pull requests, encontrou {existing} abertos}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Atualizou {count} pull request} other {Atualizou {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Tentou atualizar {count} pull request} other {Tentou atualizar {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Respondeu em pull requests {count} vez} other {Respondeu em pull requests {count} vezes}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Tentou responder em pull requests {count} vez} other {Tentou responder em pull requests {count} vezes}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Tentou mesclar {count} pull request} other {Tentou mesclar {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Enfileirou {count} pull request para mesclar} other {Enfileirou {count} pull requests para mesclar}}",
323
+ "a742473f42c9a609": "{count, plural, one {Mesclou {count} pull request} other {Mesclou {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Mesclou {merged} pull request, {queued} na fila} other {Mesclou {merged} pull requests, {queued} na fila}}",
325
+ "8146ee71f7426683": "{count, plural, one {Revisou {count} pull request} other {Revisou {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Tentou revisar {count} pull request} other {Tentou revisar {count} pull requests}}",
327
"420bea546d5f8802": "Thread copiada",
328
"2efb2dd3bf170f67": "Falha ao copiar a thread",
329
"6c03545936b55e0b": "Link do PR copiado",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Parar de acompanhar um pull request",
1060
"52b8917fbd7ea9d5": "Escrever guias de revisão",
1061
"722d3fd5ecc61ff3": "Ler um guia de revisão",
1062
+ "96d54fd56d8b65ce": "Ler um pull request",
1063
+ "1af212db47b37813": "Listar pull requests",
1064
+ "a01b71c7c36d05f5": "Abrir um pull request",
1065
+ "5ddfea667ccceecf": "Atualizar um pull request",
1066
+ "c87d85c418b791a5": "Responder em um pull request",
1067
+ "4bcd613be5a48aa2": "Revisar um pull request",
1068
+ "81b284c3afb54ec6": "Mesclar um pull request",
1069
"3227c712130a4187": "Listar issues",
1070
"3f461f26681450d6": "Ler uma issue",
1071
"fff9316cf5e449b4": "Abrir uma issue",
@@ -4605,13 +4629,14 @@
4629
"6d00220bfee72afd": "Não conectado: mensagem não enviada",
4630
"f62c43120e8c60e7": "Reconectando ao ambiente. Tente novamente quando estiver conectado.",
4631
"74e7e5c0536cda02": "Chat paralelo não iniciado",
4632
+ "87d59d5dbb3eaf83": "A thread anexada está em outra máquina",
4633
+ "4236b99f3807de4b": "O agente desta máquina não consegue ler \"{title}\". Remova-o ou volte para a máquina dele para enviar.",
4634
+ "811b25d99525bcf7": "O agente desta máquina não consegue ler \"{title}\". Remova-a ou volte para {owner} para enviar.",
4635
"faf9ee0a28119e10": "Remova os anexos e o contexto e envie novamente.",
4636
+ "d6783ef5e11f3e89": "Não foi possível iniciar um chat paralelo.",
4637
"1778ba2f32077b39": "Atualize este servidor antes de iniciar vários modelos.",
4638
"736caccf2954a7f5": "Escolha os modelos e um branch base",
4639
"d08959c85dad0ed0": "Vários modelos exigem uma nova thread em um projeto Git. Cada um ganha o próprio worktree.",
4612
- "87d59d5dbb3eaf83": "A thread anexada está em outra máquina",
4613
- "4236b99f3807de4b": "O agente desta máquina não consegue ler \"{title}\". Remova-o ou volte para a máquina dele para enviar.",
4614
- "811b25d99525bcf7": "O agente desta máquina não consegue ler \"{title}\". Remova-a ou volte para {owner} para enviar.",
4640
"55f9621a69825e20": "Mensagem na fila não atualizada",
4641
"1072fb0e2846f2a4": "Uma mensagem na fila não pode ir para um chat paralelo. Remova /side ou /btw para salvá-la.",
4642
"170ab9bcffd26887": "Inicie uma thread no Codex primeiro",
@@ -4707,7 +4732,6 @@
4732
"f2f589819f1d5aaf": "Uma mensagem pode ter no máximo {max} anexos.",
4733
"83611d16e98f2bbb": "A edição anterior foi salva. Revise suas alterações mais recentes e salve novamente.",
4734
"e7c78c337f470f5a": "Não foi possível abrir o navegador",
4710
- "d6783ef5e11f3e89": "Não foi possível iniciar um chat paralelo.",
4735
"093c70146c496264": "O chat paralelo foi criado, mas não chegou a este cliente.",
4736
"0efeaa8d0ca3a757": "O chat paralelo não está mais disponível.",
4737
"61fc2531d076d396": "Não foi possível definir o modo de permissão do chat paralelo.",
@@ -5706,6 +5730,7 @@
5730
"b6a29fff7c7c0808": "Ninguém",
5731
"54420465784bb1bd": "Carregar comentários mais antigos",
5732
"9d82ebf35bfb4043": "Nada aconteceu aqui ainda.",
5733
+ "1cf216566c1ee064": "Projeto indisponível",
5734
"b5ddadeb0810688c": "Estado",
5735
"93c1fc19d9bf1db0": "Envolvimento",
5736
"2160067266a61dd8": "Qualquer",
@@ -6229,6 +6254,7 @@
6254
"fefd41dda4eb7cf7": "Mostrar em Arquivos",
6255
"398ff9f721cbf2ad": "Não foi possível encontrar o endereço DNS",
6256
"56d5c9e464dc0d96": "Conexão recusada",
6257
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6258
"844d9a45b55b8ddc": "A conexão foi redefinida",
6259
"b32a80332be0120c": "A conexão foi fechada",
6260
"ed6643fea556af65": "A conexão atingiu o tempo limite",
@@ -9860,7 +9886,6 @@
9886
"573ea5fdf293a9d6": "Todos os checkouts",
9887
"470ad8c54049d1e1": "Pesquisar checkouts",
9888
"7e2dfdd9f97fc027": "Escopo de projeto",
9863
- "1cf216566c1ee064": "Projeto indisponível",
9889
"c1b8c351aa90f319": [
9890
{
9891
"t": "span",
@@ -12008,11 +12033,11 @@
12033
"628799e25f2ae9fd": "Planilhas",
12034
"60aa1b1bd2558b88": "{count}+ páginas",
12035
"59dff62c096fda75": "Pré-visualização limitada a 1.000 páginas.",
12011
- "c55ca84447d16b92": "Pergunte ao agente sobre estas linhas…",
12012
- "dd4d954561a97a95": "Perguntar ao agente",
12036
"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}}",
12037
"f21833072d416544": "{total, plural, one {mostrando {shown} de {total} linha do diff} other {mostrando {shown} de {total} linhas do diff}}",
12038
"26db306011e06483": "Abrir {path} em Código",
12039
+ "c55ca84447d16b92": "Pergunte ao agente sobre estas linhas…",
12040
+ "dd4d954561a97a95": "Perguntar ao agente",
12041
"150a57dcd79b7ff4": [
12042
"Carregando ",
12043
{
apps/web/src/i18n/translations/ru.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Тред",
3
"0001ae5846061bb6": "Тред на {machine}",
4
"eef7f4dacbc3c3f2": "Машина",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Попытка начать {started} руководство по ревью, ошибок: {failed}} few {Попытка начать {started} руководства по ревью, ошибок: {failed}} many {Попытка начать {started} руководств по ревью, ошибок: {failed}} other {Попытка начать {started} руководства по ревью, ошибок: {failed}}}",
307
"672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Прочитано {count} пул-реквест} few {Прочитано {count} пул-реквеста} many {Прочитано {count} пул-реквестов} other {Прочитано {count} пул-реквеста}}",
310
+ "c74296822829ad9d": "{count, plural, one {Не удалось прочитать {count} пул-реквест} few {Не удалось прочитать {count} пул-реквеста} many {Не удалось прочитать {count} пул-реквестов} other {Не удалось прочитать {count} пул-реквеста}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Список пул-реквестов получен {count} раз} few {Список пул-реквестов получен {count} раза} many {Список пул-реквестов получен {count} раз} other {Список пул-реквестов получен {count} раза}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Попытка получить список пул-реквестов: {count} раз} few {Попытка получить список пул-реквестов: {count} раза} many {Попытка получить список пул-реквестов: {count} раз} other {Попытка получить список пул-реквестов: {count} раза}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Не удалось открыть {count} пул-реквест} few {Не удалось открыть {count} пул-реквеста} many {Не удалось открыть {count} пул-реквестов} other {Не удалось открыть {count} пул-реквеста}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Найден {count} открытый пул-реквест} few {Найдено {count} открытых пул-реквеста} many {Найдено {count} открытых пул-реквестов} other {Найдено {count} открытого пул-реквеста}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Открыто {count} пул-реквест} few {Открыто {count} пул-реквеста} many {Открыто {count} пул-реквестов} other {Открыто {count} пул-реквеста}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Открыт {opened} пул-реквест, найдено открытых: {existing}} few {Открыто {opened} пул-реквеста, найдено открытых: {existing}} many {Открыто {opened} пул-реквестов, найдено открытых: {existing}} other {Открыто {opened} пул-реквеста, найдено открытых: {existing}}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Обновлено {count} пул-реквест} few {Обновлено {count} пул-реквеста} many {Обновлено {count} пул-реквестов} other {Обновлено {count} пул-реквеста}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Не удалось обновить {count} пул-реквест} few {Не удалось обновить {count} пул-реквеста} many {Не удалось обновить {count} пул-реквестов} other {Не удалось обновить {count} пул-реквеста}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Ответ в пул-реквестах: {count} раз} few {Ответ в пул-реквестах: {count} раза} many {Ответ в пул-реквестах: {count} раз} other {Ответ в пул-реквестах: {count} раза}}",
320
+ "2b682a59792b6c07": "{count, plural, one {Попытка ответить в пул-реквестах: {count} раз} few {Попытка ответить в пул-реквестах: {count} раза} many {Попытка ответить в пул-реквестах: {count} раз} other {Попытка ответить в пул-реквестах: {count} раза}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Не удалось слить {count} пул-реквест} few {Не удалось слить {count} пул-реквеста} many {Не удалось слить {count} пул-реквестов} other {Не удалось слить {count} пул-реквеста}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {В очередь на слияние поставлен {count} пул-реквест} few {В очередь на слияние поставлено {count} пул-реквеста} many {В очередь на слияние поставлено {count} пул-реквестов} other {В очередь на слияние поставлено {count} пул-реквеста}}",
323
+ "a742473f42c9a609": "{count, plural, one {Слито {count} пул-реквест} few {Слито {count} пул-реквеста} many {Слито {count} пул-реквестов} other {Слито {count} пул-реквеста}}",
324
+ "40e3528651297351": "{merged, plural, one {Слит {merged} пул-реквест, в очереди: {queued}} few {Слито {merged} пул-реквеста, в очереди: {queued}} many {Слито {merged} пул-реквестов, в очереди: {queued}} other {Слито {merged} пул-реквеста, в очереди: {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Проверено {count} пул-реквест} few {Проверено {count} пул-реквеста} many {Проверено {count} пул-реквестов} other {Проверено {count} пул-реквеста}}",
326
+ "638678077ba2e050": "{count, plural, one {Не удалось проверить {count} пул-реквест} few {Не удалось проверить {count} пул-реквеста} many {Не удалось проверить {count} пул-реквестов} other {Не удалось проверить {count} пул-реквеста}}",
327
"420bea546d5f8802": "Тред скопирован",
328
"2efb2dd3bf170f67": "Не удалось скопировать тред",
329
"6c03545936b55e0b": "Ссылка на PR скопирована",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Прекратить отслеживание пул-реквеста",
1060
"52b8917fbd7ea9d5": "Написать руководства по ревью",
1061
"722d3fd5ecc61ff3": "Прочитать руководство по ревью",
1062
+ "96d54fd56d8b65ce": "Прочитать пул-реквест",
1063
+ "1af212db47b37813": "Список пул-реквестов",
1064
+ "a01b71c7c36d05f5": "Открыть пул-реквест",
1065
+ "5ddfea667ccceecf": "Обновить пул-реквест",
1066
+ "c87d85c418b791a5": "Ответить в пул-реквесте",
1067
+ "4bcd613be5a48aa2": "Проверить пул-реквест",
1068
+ "81b284c3afb54ec6": "Слить пул-реквест",
1069
"3227c712130a4187": "Получить список issue",
1070
"3f461f26681450d6": "Прочитать issue",
1071
"fff9316cf5e449b4": "Создать issue",
@@ -4605,13 +4629,14 @@
4629
"6d00220bfee72afd": "Нет подключения: сообщение не отправлено",
4630
"f62c43120e8c60e7": "Переподключение к окружению. Повторите, когда подключение восстановится.",
4631
"74e7e5c0536cda02": "Боковой чат не начат",
4632
+ "87d59d5dbb3eaf83": "Прикреплённый тред находится на другой машине",
4633
+ "4236b99f3807de4b": "Агент этого компьютера не может прочитать «{title}». Удалите его или вернитесь на его компьютер, чтобы отправить.",
4634
+ "811b25d99525bcf7": "Агент этой машины не может прочитать «{title}». Удалите его или переключитесь обратно на {owner}, чтобы отправить.",
4635
"faf9ee0a28119e10": "Удалите вложения и контекст, затем отправьте снова.",
4636
+ "d6783ef5e11f3e89": "Не удалось начать боковой чат.",
4637
"1778ba2f32077b39": "Обновите этот сервер, прежде чем запускать несколько моделей.",
4638
"736caccf2954a7f5": "Выберите модели и базовую ветку",
4639
"d08959c85dad0ed0": "Для нескольких моделей нужен новый тред в Git-проекте. Каждая получит своё рабочее дерево.",
4612
- "87d59d5dbb3eaf83": "Прикреплённый тред находится на другой машине",
4613
- "4236b99f3807de4b": "Агент этого компьютера не может прочитать «{title}». Удалите его или вернитесь на его компьютер, чтобы отправить.",
4614
- "811b25d99525bcf7": "Агент этой машины не может прочитать «{title}». Удалите его или переключитесь обратно на {owner}, чтобы отправить.",
4640
"55f9621a69825e20": "Сообщение в очереди не обновлено",
4641
"1072fb0e2846f2a4": "Сообщение в очереди нельзя перенести в боковой чат. Удалите /side или /btw, чтобы сохранить его.",
4642
"170ab9bcffd26887": "Сначала начните тред Codex",
@@ -4707,7 +4732,6 @@
4732
"f2f589819f1d5aaf": "В сообщении может быть не более {max} вложений.",
4733
"83611d16e98f2bbb": "Предыдущая правка сохранена. Проверьте новые изменения и сохраните снова.",
4734
"e7c78c337f470f5a": "Не удалось открыть браузер",
4710
- "d6783ef5e11f3e89": "Не удалось начать боковой чат.",
4735
"093c70146c496264": "Боковой чат создан, но не дошёл до этого клиента.",
4736
"0efeaa8d0ca3a757": "Боковой чат больше недоступен.",
4737
"61fc2531d076d396": "Не удалось задать режим разрешений бокового чата.",
@@ -5706,6 +5730,7 @@
5730
"b6a29fff7c7c0808": "Нет",
5731
"54420465784bb1bd": "Загрузить старые комментарии",
5732
"9d82ebf35bfb4043": "Здесь пока ничего не происходило.",
5733
+ "1cf216566c1ee064": "Проект недоступен",
5734
"b5ddadeb0810688c": "Состояние",
5735
"93c1fc19d9bf1db0": "Участие",
5736
"2160067266a61dd8": "Любая",
@@ -6229,6 +6254,7 @@
6254
"fefd41dda4eb7cf7": "Показать в «Файлах»",
6255
"398ff9f721cbf2ad": "Не удалось найти DNS-адрес",
6256
"56d5c9e464dc0d96": "Подключение отклонено",
6257
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6258
"844d9a45b55b8ddc": "Подключение сброшено",
6259
"b32a80332be0120c": "Подключение закрыто",
6260
"ed6643fea556af65": "Истекло время подключения",
@@ -9863,7 +9889,6 @@
9889
"573ea5fdf293a9d6": "Все копии",
9890
"470ad8c54049d1e1": "Поиск копий",
9891
"7e2dfdd9f97fc027": "Область проектов",
9866
- "1cf216566c1ee064": "Проект недоступен",
9892
"c1b8c351aa90f319": [
9893
{
9894
"t": "span",
@@ -12009,11 +12034,11 @@
12034
"628799e25f2ae9fd": "Листы",
12035
"60aa1b1bd2558b88": "{count}+ страниц",
12036
"59dff62c096fda75": "Предпросмотр ограничен 1000 страницами.",
12012
- "c55ca84447d16b92": "Спросить агента об этих строках…",
12013
- "dd4d954561a97a95": "Спросить агента",
12037
"16929a241a6bc9e3": "{total, plural, one {удалённый код, показано {shown} из {total} строки диффа} few {удалённый код, показано {shown} из {total} строк диффа} many {удалённый код, показано {shown} из {total} строк диффа} other {удалённый код, показано {shown} из {total} строки диффа}}",
12038
"f21833072d416544": "{total, plural, one {показано {shown} из {total} строки диффа} few {показано {shown} из {total} строк диффа} many {показано {shown} из {total} строк диффа} other {показано {shown} из {total} строки диффа}}",
12039
"26db306011e06483": "Открыть {path} во вкладке «Код»",
12040
+ "c55ca84447d16b92": "Спросить агента об этих строках…",
12041
+ "dd4d954561a97a95": "Спросить агента",
12042
"150a57dcd79b7ff4": [
12043
"Загрузка ",
12044
{
apps/web/src/i18n/translations/sv.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "Tråd",
3
"0001ae5846061bb6": "Tråd på {machine}",
4
"eef7f4dacbc3c3f2": "Dator",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, one {Försökte starta {started} granskningsguide, {failed} misslyckades} other {Försökte starta {started} granskningsguider, {failed} misslyckades}}",
307
"672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}",
308
"5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}",
309
+ "a60e5be5b4865ce9": "{count, plural, one {Läste {count} pull request} other {Läste {count} pull requests}}",
310
+ "c74296822829ad9d": "{count, plural, one {Försökte läsa {count} pull request} other {Försökte läsa {count} pull requests}}",
311
+ "833fc9b60bf40749": "{count, plural, one {Listade pull requests {count} gång} other {Listade pull requests {count} gånger}}",
312
+ "ccae2617d4c92f7d": "{count, plural, one {Försökte lista pull requests {count} gång} other {Försökte lista pull requests {count} gånger}}",
313
+ "630a8e9a6597b5de": "{count, plural, one {Försökte öppna {count} pull request} other {Försökte öppna {count} pull requests}}",
314
+ "af6bb8e1d69c255f": "{count, plural, one {Hittade {count} öppen pull request} other {Hittade {count} öppna pull requests}}",
315
+ "c1751c0d62ccacb0": "{count, plural, one {Öppnade {count} pull request} other {Öppnade {count} pull requests}}",
316
+ "6963f76ce8860984": "{opened, plural, one {Öppnade {opened} pull request, hittade {existing} öppna} other {Öppnade {opened} pull requests, hittade {existing} öppna}}",
317
+ "b64d48025a0904a5": "{count, plural, one {Uppdaterade {count} pull request} other {Uppdaterade {count} pull requests}}",
318
+ "f62092fc584c5dcc": "{count, plural, one {Försökte uppdatera {count} pull request} other {Försökte uppdatera {count} pull requests}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, one {Svarade på pull requests {count} gång} other {Svarade på pull requests {count} gånger}}",
320
+ "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}}",
321
+ "998ef072ea79ff62": "{count, plural, one {Försökte merga {count} pull request} other {Försökte merga {count} pull requests}}",
322
+ "80e8102a93dc5a75": "{count, plural, one {Köade {count} pull request för merge} other {Köade {count} pull requests för merge}}",
323
+ "a742473f42c9a609": "{count, plural, one {Mergade {count} pull request} other {Mergade {count} pull requests}}",
324
+ "40e3528651297351": "{merged, plural, one {Mergade {merged} pull request, köade {queued}} other {Mergade {merged} pull requests, köade {queued}}}",
325
+ "8146ee71f7426683": "{count, plural, one {Granskade {count} pull request} other {Granskade {count} pull requests}}",
326
+ "638678077ba2e050": "{count, plural, one {Försökte granska {count} pull request} other {Försökte granska {count} pull requests}}",
327
"420bea546d5f8802": "Tråden kopierades",
328
"2efb2dd3bf170f67": "Det gick inte att kopiera tråden",
329
"6c03545936b55e0b": "PR-länken kopierades",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "Sluta bevaka en pull request",
1060
"52b8917fbd7ea9d5": "Skriv granskningsguider",
1061
"722d3fd5ecc61ff3": "Läs en granskningsguide",
1062
+ "96d54fd56d8b65ce": "Läs en pull request",
1063
+ "1af212db47b37813": "Lista pull requests",
1064
+ "a01b71c7c36d05f5": "Öppna en pull request",
1065
+ "5ddfea667ccceecf": "Uppdatera en pull request",
1066
+ "c87d85c418b791a5": "Svara på en pull request",
1067
+ "4bcd613be5a48aa2": "Granska en pull request",
1068
+ "81b284c3afb54ec6": "Merga en pull request",
1069
"3227c712130a4187": "Lista ärenden",
1070
"3f461f26681450d6": "Läs ett ärende",
1071
"fff9316cf5e449b4": "Skapa ett ärende",
@@ -4606,13 +4630,14 @@
4630
"6d00220bfee72afd": "Inte ansluten: meddelandet skickades inte",
4631
"f62c43120e8c60e7": "Återansluter till miljön. Försök igen när den är ansluten.",
4632
"74e7e5c0536cda02": "Sidochatten startades inte",
4633
+ "87d59d5dbb3eaf83": "Den bifogade tråden finns på en annan dator",
4634
+ "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.",
4635
+ "811b25d99525bcf7": "Den här datorns agent kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till {owner} för att skicka.",
4636
"faf9ee0a28119e10": "Ta bort bilagorna och kontexten och skicka sedan igen.",
4637
+ "d6783ef5e11f3e89": "Kunde inte starta en sidochatt.",
4638
"1778ba2f32077b39": "Uppdatera den här servern innan du startar flera modeller.",
4639
"736caccf2954a7f5": "Välj modeller och en basgren",
4640
"d08959c85dad0ed0": "Flera modeller kräver en ny tråd i ett Git-projekt. Var och en får sin egen worktree.",
4613
- "87d59d5dbb3eaf83": "Den bifogade tråden finns på en annan dator",
4614
- "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.",
4615
- "811b25d99525bcf7": "Den här datorns agent kan inte läsa ”{title}”. Ta bort den eller byt tillbaka till {owner} för att skicka.",
4641
"55f9621a69825e20": "Det köade meddelandet uppdaterades inte",
4642
"1072fb0e2846f2a4": "Ett köat meddelande kan inte flyttas till en sidochatt. Ta bort /side eller /btw för att spara det.",
4643
"170ab9bcffd26887": "Starta en Codex-tråd först",
@@ -4708,7 +4733,6 @@
4733
"f2f589819f1d5aaf": "Ett meddelande kan ha högst {max} bilagor.",
4734
"83611d16e98f2bbb": "Den tidigare ändringen sparades. Granska dina nyare ändringar och spara igen.",
4735
"e7c78c337f470f5a": "Det gick inte att öppna webbläsaren",
4711
- "d6783ef5e11f3e89": "Kunde inte starta en sidochatt.",
4736
"093c70146c496264": "Sidochatten skapades, men den nådde inte den här klienten.",
4737
"0efeaa8d0ca3a757": "Sidochatten är inte längre tillgänglig.",
4738
"61fc2531d076d396": "Kunde inte ange sidochattens behörighetsläge.",
@@ -5707,6 +5731,7 @@
5731
"b6a29fff7c7c0808": "Ingen",
5732
"54420465784bb1bd": "Läs in äldre kommentarer",
5733
"9d82ebf35bfb4043": "Inget har hänt här än.",
5734
+ "1cf216566c1ee064": "Projektet är inte tillgängligt",
5735
"b5ddadeb0810688c": "Status",
5736
"93c1fc19d9bf1db0": "Inblandning",
5737
"2160067266a61dd8": "Alla",
@@ -6231,6 +6256,7 @@
6256
"fefd41dda4eb7cf7": "Visa i Filer",
6257
"398ff9f721cbf2ad": "DNS-adressen kunde inte hittas",
6258
"56d5c9e464dc0d96": "Anslutningen nekades",
6259
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6260
"844d9a45b55b8ddc": "Anslutningen återställdes",
6261
"b32a80332be0120c": "Anslutningen stängdes",
6262
"ed6643fea556af65": "Anslutningen fick timeout",
@@ -9869,7 +9895,6 @@
9895
"573ea5fdf293a9d6": "Alla utcheckningar",
9896
"470ad8c54049d1e1": "Sök utcheckningar",
9897
"7e2dfdd9f97fc027": "Projektomfång",
9872
- "1cf216566c1ee064": "Projektet är inte tillgängligt",
9898
"c1b8c351aa90f319": [
9899
{
9900
"t": "span",
@@ -12017,11 +12042,11 @@
12042
"628799e25f2ae9fd": "Blad",
12043
"60aa1b1bd2558b88": "{count}+ sidor",
12044
"59dff62c096fda75": "Förhandsvisningen är begränsad till 1 000 sidor.",
12020
- "c55ca84447d16b92": "Fråga agenten om de här raderna…",
12021
- "dd4d954561a97a95": "Fråga agenten",
12045
"16929a241a6bc9e3": "{total, plural, one {borttagen kod, visar {shown} av {total} diff-rad} other {borttagen kod, visar {shown} av {total} diff-rader}}",
12046
"f21833072d416544": "{total, plural, one {visar {shown} av {total} diff-rad} other {visar {shown} av {total} diff-rader}}",
12047
"26db306011e06483": "Öppna {path} i Kod",
12048
+ "c55ca84447d16b92": "Fråga agenten om de här raderna…",
12049
+ "dd4d954561a97a95": "Fråga agenten",
12050
"150a57dcd79b7ff4": [
12051
"Läser in ",
12052
{
apps/web/src/i18n/translations/zh.json
+33
-8
@@ -1,5 +1,4 @@
1
{
2
- "4052bd9a2478988d": "Could not reach this port on the environment",
2
"23be753133ae6950": "会话",
3
"0001ae5846061bb6": "{machine} 上的会话",
4
"eef7f4dacbc3c3f2": "机器",
@@ -307,6 +306,24 @@
306
"1b659e38a50d9bc5": "{started, plural, other {尝试开始 {started} 份审查导览,{failed} 份失败}}",
307
"672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}",
308
"5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}",
309
+ "a60e5be5b4865ce9": "{count, plural, other {已读取 {count} 个 PR}}",
310
+ "c74296822829ad9d": "{count, plural, other {尝试读取 {count} 个 PR}}",
311
+ "833fc9b60bf40749": "{count, plural, other {列出 PR {count} 次}}",
312
+ "ccae2617d4c92f7d": "{count, plural, other {尝试列出 PR {count} 次}}",
313
+ "630a8e9a6597b5de": "{count, plural, other {尝试创建 {count} 个 PR}}",
314
+ "af6bb8e1d69c255f": "{count, plural, other {找到 {count} 个打开的 PR}}",
315
+ "c1751c0d62ccacb0": "{count, plural, other {已创建 {count} 个 PR}}",
316
+ "6963f76ce8860984": "{opened, plural, other {已创建 {opened} 个 PR,找到 {existing} 个打开的 PR}}",
317
+ "b64d48025a0904a5": "{count, plural, other {已更新 {count} 个 PR}}",
318
+ "f62092fc584c5dcc": "{count, plural, other {尝试更新 {count} 个 PR}}",
319
+ "23cc59ef4ccb7a85": "{count, plural, other {在 PR 上回复 {count} 次}}",
320
+ "2b682a59792b6c07": "{count, plural, other {尝试在 PR 上回复 {count} 次}}",
321
+ "998ef072ea79ff62": "{count, plural, other {尝试合并 {count} 个 PR}}",
322
+ "80e8102a93dc5a75": "{count, plural, other {已将 {count} 个 PR 加入合并队列}}",
323
+ "a742473f42c9a609": "{count, plural, other {已合并 {count} 个 PR}}",
324
+ "40e3528651297351": "{merged, plural, other {已合并 {merged} 个 PR,{queued} 个在队列中}}",
325
+ "8146ee71f7426683": "{count, plural, other {已审查 {count} 个 PR}}",
326
+ "638678077ba2e050": "{count, plural, other {尝试审查 {count} 个 PR}}",
327
"420bea546d5f8802": "已复制会话",
328
"2efb2dd3bf170f67": "无法复制会话",
329
"6c03545936b55e0b": "已复制 PR 链接",
@@ -1042,6 +1059,13 @@
1059
"96ac3f7e2336b02b": "停止关注 PR",
1060
"52b8917fbd7ea9d5": "编写审查导览",
1061
"722d3fd5ecc61ff3": "读取审查导览",
1062
+ "96d54fd56d8b65ce": "读取 PR",
1063
+ "1af212db47b37813": "列出 PR",
1064
+ "a01b71c7c36d05f5": "创建 PR",
1065
+ "5ddfea667ccceecf": "更新 PR",
1066
+ "c87d85c418b791a5": "在 PR 上回复",
1067
+ "4bcd613be5a48aa2": "审查 PR",
1068
+ "81b284c3afb54ec6": "合并 PR",
1069
"3227c712130a4187": "列出 issue",
1070
"3f461f26681450d6": "读取 issue",
1071
"fff9316cf5e449b4": "提交 issue",
@@ -4612,13 +4636,14 @@
4636
"6d00220bfee72afd": "未连接:消息没有发送",
4637
"f62c43120e8c60e7": "正在重新连接环境,连接后请重试。",
4638
"74e7e5c0536cda02": "侧聊未开始",
4639
+ "87d59d5dbb3eaf83": "附加的会话在另一台机器上",
4640
+ "4236b99f3807de4b": "此机器上的智能体无法读取“{title}”。请将其移除,或切换回其所在机器后发送。",
4641
+ "811b25d99525bcf7": "此机器的智能体无法读取“{title}”。请将其移除,或切换回 {owner} 再发送。",
4642
"faf9ee0a28119e10": "请移除附件和上下文后再发送。",
4643
+ "d6783ef5e11f3e89": "无法开始侧聊。",
4644
"1778ba2f32077b39": "请先更新此服务器,再同时启动多个模型。",
4645
"736caccf2954a7f5": "请选择模型和基准分支",
4646
"d08959c85dad0ed0": "多模型需要在 Git 项目中新建会话,每个模型各有自己的工作树。",
4619
- "87d59d5dbb3eaf83": "附加的会话在另一台机器上",
4620
- "4236b99f3807de4b": "此机器上的智能体无法读取“{title}”。请将其移除,或切换回其所在机器后发送。",
4621
- "811b25d99525bcf7": "此机器的智能体无法读取“{title}”。请将其移除,或切换回 {owner} 再发送。",
4647
"55f9621a69825e20": "排队消息未更新",
4648
"1072fb0e2846f2a4": "排队消息无法移到侧聊。请移除 /side 或 /btw 后保存。",
4649
"170ab9bcffd26887": "请先开始一个 Codex 会话",
@@ -4714,7 +4739,6 @@
4739
"f2f589819f1d5aaf": "一条消息最多可有 {max} 个附件。",
4740
"83611d16e98f2bbb": "之前的编辑已保存,请检查新改动后再次保存。",
4741
"e7c78c337f470f5a": "无法打开浏览器",
4717
- "d6783ef5e11f3e89": "无法开始侧聊。",
4742
"093c70146c496264": "侧聊已创建,但没有同步到此客户端。",
4743
"0efeaa8d0ca3a757": "这段侧聊已不可用。",
4744
"61fc2531d076d396": "无法设置侧聊的权限模式。",
@@ -5713,6 +5737,7 @@
5737
"b6a29fff7c7c0808": "无",
5738
"54420465784bb1bd": "加载较早的评论",
5739
"9d82ebf35bfb4043": "这里还没有任何动态。",
5740
+ "1cf216566c1ee064": "项目不可用",
5741
"b5ddadeb0810688c": "状态",
5742
"93c1fc19d9bf1db0": "参与方式",
5743
"2160067266a61dd8": "任意",
@@ -6237,6 +6262,7 @@
6262
"fefd41dda4eb7cf7": "在“文件”中显示",
6263
"398ff9f721cbf2ad": "找不到 DNS 地址",
6264
"56d5c9e464dc0d96": "连接被拒绝",
6265
+ "4052bd9a2478988d": "Could not reach this port on the environment",
6266
"844d9a45b55b8ddc": "连接已重置",
6267
"b32a80332be0120c": "连接已关闭",
6268
"ed6643fea556af65": "连接超时",
@@ -9876,7 +9902,6 @@
9902
"573ea5fdf293a9d6": "所有工作副本",
9903
"470ad8c54049d1e1": "搜索工作副本",
9904
"7e2dfdd9f97fc027": "项目范围",
9879
- "1cf216566c1ee064": "项目不可用",
9905
"c1b8c351aa90f319": [
9906
{
9907
"t": "span",
@@ -12034,11 +12059,11 @@
12059
"628799e25f2ae9fd": "工作表",
12060
"60aa1b1bd2558b88": "{count}+ 页",
12061
"59dff62c096fda75": "预览仅限 1,000 页。",
12037
- "c55ca84447d16b92": "就这些代码行询问智能体…",
12038
- "dd4d954561a97a95": "询问智能体",
12062
"16929a241a6bc9e3": "{total, plural, other {已移除代码,显示 {total} 行差异中的 {shown} 行}}",
12063
"f21833072d416544": "{total, plural, other {显示 {total} 行差异中的 {shown} 行}}",
12064
"26db306011e06483": "在“代码”标签页中打开 {path}",
12065
+ "c55ca84447d16b92": "就这些代码行询问智能体…",
12066
+ "dd4d954561a97a95": "询问智能体",
12067
"150a57dcd79b7ff4": [
12068
"正在加载 ",
12069
{
docs/user/source-control.md
+4
@@ -317,6 +317,10 @@ pull request link in the conversation. Creating a pull request from Git actions
317
and so does an agent creating one with `gh pr create` or `glab mr create`. Agents can link other
318
pull requests with the `link_pull_request` tool.
319
320
+Agents can also read, open, update, reply on, and merge pull requests in the thread's repository
321
+through T3 Code's own tools, which use the same sign-in as the Pull requests page. An agent merges
322
+only the commit it last read: if someone pushed since, the merge is refused.
323
+
324
Use **Link pull request to thread** in the command palette to keep a pull request with the thread. From a review
325
on the Pull requests page, **Link to thread** lets you search for an active thread. The review header
326
also lists the threads that link to it, including archived threads, so you can return to their context.
evals/mcp-tool-use/cases/pull-requests.ndjson
+15
-1
@@ -37,5 +37,19 @@
37
{"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"}}
38
{"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."}
39
{"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."}
40
-{"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 <iframe sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n+ return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n }\n", "prs": [{"number": 124, "title": "fix(web): HTML preview frame gets an accessible title", "headRefName": "fix/html-preview-title", "reviewDecision": "REVIEW_REQUIRED", "reviewRequests": ["sam-acme"], "checks": [{"name": "Lint", "state": "pass"}, {"name": "Typecheck", "state": "pass"}, {"name": "Test Web", "state": "pass"}]}], "files": {"apps/web/src/HtmlPreview.tsx": "export function HtmlPreview({ html }: { html: string }) {\n return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n}\n"}}}, "prompt": "Every PR here needs a teammate's approval. Babysit PR #124 and merge it once Sam approves it.", "expect": {"calls": [{"tool": "watch_pull_request", "args": {"url": "~/pull/124", "until": "merged"}}], "notCalls": ["Monitor", "ScheduleWakeup", "CronCreate"], "shellMustNot": ["\\bsleep \\d", "gh pr checks[^\\n]*--watch", "gh run watch", "\\buntil\\b[^\\n]*\\bgh (pr|run|api)\\b", "gh pr merge(?![^\\n]*--auto)"], "endsTurnAfter": "watch_pull_request"}, "notes": "pingdotgg/t3code#36230: since #33214 a watch stops holding its thread once checks finish. gh pr merge --auto plus the watch is fine; a plain merge before approval is not."}
40
+{"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 <iframe sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n+ return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n }\n", "prs": [{"number": 124, "title": "fix(web): HTML preview frame gets an accessible title", "headRefName": "fix/html-preview-title", "reviewDecision": "REVIEW_REQUIRED", "reviewRequests": ["sam-acme"], "checks": [{"name": "Lint", "state": "pass"}, {"name": "Typecheck", "state": "pass"}, {"name": "Test Web", "state": "pass"}]}], "files": {"apps/web/src/HtmlPreview.tsx": "export function HtmlPreview({ html }: { html: string }) {\n return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n}\n"}}}, "prompt": "Every PR here needs a teammate's approval. Babysit PR #124 and merge it once Sam approves it.", "expect": {"calls": [{"tool": "watch_pull_request", "args": {"until": "merged"}}], "notCalls": ["Monitor", "ScheduleWakeup", "CronCreate"], "shellMustNot": ["\\bsleep \\d", "gh pr checks[^\\n]*--watch", "gh run watch", "\\buntil\\b[^\\n]*\\bgh (pr|run|api)\\b", "gh pr merge(?![^\\n]*--auto)"], "endsTurnAfter": "watch_pull_request"}, "notes": "pingdotgg/t3code#36230: since #33214 a watch stops holding its thread once checks finish. gh pr merge --auto plus the watch is fine; a plain merge before approval is not. #124 is the only PR here, so the watch may name it by url or by number."}
41
{"id": "control-handoff-pr-not-until-merged", "area": "pull-requests", "kind": "control", "pattern": "PR handed to the user for review", "experience": "A PR the agent hands to the user for review must not keep the thread working until it merges.", "rule": "until: checks (the default) for a PR handed to the user", "privacy": "commit-safe", "setup": {"role": "top", "priorTurns": [{"role": "user", "text": "The HTML preview frame has no accessible name. Fix it."}, {"role": "assistant", "text": "Fixed on branch fix/html-preview-title (commit abc1234). The preview frame now has the title \"HTML preview\". Want a PR?", "toolCalls": [{"tool": "Bash", "input": {"command": "git checkout -b fix/html-preview-title"}, "result": "Switched to a new branch 'fix/html-preview-title'"}, {"tool": "Bash", "input": {"command": "git add -A && git commit -m \"fix(web): HTML preview frame gets an accessible title\""}, "result": "[fix/html-preview-title abc1234] fix(web): HTML preview frame gets an accessible title\n 1 file changed"}]}], "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 <iframe sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n+ return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n }\n", "files": {"apps/web/src/HtmlPreview.tsx": "export function HtmlPreview({ html }: { html: string }) {\n return <iframe title=\"HTML preview\" sandbox=\"allow-scripts\" srcDoc={html} height={400} />;\n}\n"}}, "shellMocks": [{"match": "gh pr create", "output": "https://github.com/acme/app/pull/124"}]}, "prompt": "Yes, open the PR and hand it over. I'll review and merge it myself.", "expect": {"callsMustNot": [{"tool": "watch_pull_request", "args": {"until": "merged"}}], "linked": ["~/pull/124"]}, "notes": "pingdotgg/t3code#36230 / #34770: a hand-off for the user's own review returns the thread to the inbox once checks finish."}
42
+{"id": "address-review-reads-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "review threads read with gh api graphql", "experience": "Agents addressing review feedback queried reviewThreads through gh api graphql (1,435 runs) and replied or resolved with more GraphQL, on the user's personal rate limit.", "rule": "pull_request_read and pull_request_respond replace gh and cafe for PR review work", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "conversation": {"comments": [], "reviewThreads": [{"id": "PRRT_kwDO1", "path": "src/config.ts", "line": 1, "isResolved": false, "isOutdated": false, "comments": [{"author": "reviewer", "body": "`port` never changes. Make it a `const`.", "createdAt": "2026-10-27T10:00:00Z"}], "moreComments": false}], "hiddenResolvedThreads": 0, "truncated": false}}, "pull_request_respond": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "replied": true, "resolved": true}}, "shellMocks": [{"match": "git push", "output": "To github.com:acme/app.git\n abc1234..def5678 feat/config-const -> feat/config-const"}], "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Address the unresolved review comments on #124, push, then reply on each thread and resolve it.", "expect": {"calls": [{"tool": "pull_request_read"}, {"tool": "pull_request_respond", "args": {"reviewThreadId": "PRRT_kwDO1"}}], "shellMustNot": ["\\bgh (api|pr (view|comment|review))\\b", "\\bcafe pr\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in.", "maxSteps": 14}
43
+{"id": "merge-through-gh-unpinned", "area": "pull-requests", "kind": "bad", "pattern": "merge with gh pr merge, not pinned to the reviewed head", "experience": "Agents merged with gh pr merge (215 runs), which merges whatever the head is by then and spends the user's quota.", "rule": "pull_request_merge merges only the head the agent checked", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}]}, "pull_request_merge": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "state": "merged"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Checks are green on #124 and it's approved. Merge it (squash).", "expect": {"calls": [{"tool": "pull_request_merge", "args": {"expectedHeadSha": "abc1234def5678"}}], "shellMustNot": ["\\bgh pr merge\\b", "\\bgh api\\b[^\\n]*merge"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
44
+{"id": "open-pr-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "PR opened with gh pr create", "experience": "Agents opened PRs with gh pr create or cafe pr create (614 runs), often guessing --head and --repo for forks.", "rule": "pull_request_create opens the PR from the thread's pushed branch", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_create": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "created": true}}, "shellMocks": [{"match": "git push", "output": "To github.com:acme/app.git\n * [new branch] feat/config-const -> feat/config-const\nbranch 'feat/config-const' set up to track 'origin/feat/config-const'."}], "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": []}}, "prompt": "The port change is committed on feat/config-const. Push it and open a PR against main.", "expect": {"calls": [{"tool": "pull_request_create"}], "shellMustNot": ["\\bgh pr create\\b", "\\bcafe pr create\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in.", "maxSteps": 10}
45
+{"id": "control-pr-status-no-merge", "area": "pull-requests", "kind": "control", "pattern": "status question with a mergeable PR", "experience": "Control: a green, approved PR and a question about it. Reading is fine; merging was not asked.", "rule": "Merge only when asked to land it", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}]}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Where does #124 stand? Anything left before it can go in?", "expect": {"notCalls": ["pull_request_merge"], "shellMustNot": ["\\bgh pr merge\\b"]}, "notes": "Control for merge-through-gh-unpinned."}
46
+{"id": "pr-checks-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "CI status read with gh pr checks", "experience": "Agents checked a PR's CI with gh pr checks, gh pr view --json statusCheckRollup, or gh run list instead of T3's PR tools.", "rule": "pull_request_read replaces gh and cafe for PR state and checks", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "pending", "description": null, "url": null}]}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Is CI green on my PR yet?", "expect": {"calls": [{"tool": "pull_request_read"}], "shellMustNot": ["\\bgh (pr (checks|view|status)|run (list|view|watch)|api)\\b", "\\bcafe (pr|ci)\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
47
+{"id": "pr-list-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "PR lists read with gh pr list", "experience": "Agents listed PRs with gh pr list or gh search prs, often trimming JSON with --jq, instead of T3's PR tools.", "rule": "pull_request_list replaces gh and cafe for listing PRs", "privacy": "commit-safe", "setup": {"role": "top", "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}, {"number": 125, "title": "fix(ws): back off reconnects", "headRefName": "fix/ws-backoff", "checks": []}]}}, "prompt": "Which open PRs in this repo are waiting on my review?", "expect": {"calls": [{"tool": "pull_request_list", "args": {"involvement": "reviewing"}}], "shellMustNot": ["\\bgh (pr list|search prs|api)\\b", "\\bcafe pr list\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
48
+{"id": "pr-edit-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "PR edited with gh pr edit and gh pr ready", "experience": "Agents retitled PRs and marked them ready with gh pr edit and gh pr ready instead of T3's PR tools.", "rule": "pull_request_update replaces gh and cafe for editing a PR", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_update": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Retitle #124 to \"fix(config): read the port from PORT\" and mark it ready for review.", "expect": {"calls": [{"tool": "pull_request_update", "args": {"number": 124, "title": "~read the port from PORT", "ready": true}}], "shellMustNot": ["\\bgh (pr (edit|ready)|api)\\b", "\\bcafe pr (edit|ready)\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
49
+{"id": "pr-approve-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "PR approved with gh pr review", "experience": "Before pull_request_review, approving took gh pr review or cafe pr review, on the user's own API quota.", "rule": "pull_request_review replaces gh and cafe for reviews", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}]}, "pull_request_review": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "#124 looks good to me. Approve it.", "expect": {"calls": [{"tool": "pull_request_review", "args": {"number": 124, "verdict": "approve"}}], "shellMustNot": ["\\bgh (pr review|api)\\b", "\\bcafe pr review\\b"]}, "notes": "pull_request_review added 2026-11-12."}
50
+{"id": "pr-request-changes-on-a-line", "area": "pull-requests", "kind": "bad", "pattern": "changes requested with gh pr review or gh api", "experience": "Before pull_request_review, line comments took gh api or cafe pr review, on the user's own API quota.", "rule": "pull_request_review replaces gh and cafe for reviews, line comments included", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}]}, "pull_request_review": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Request changes on #124: PORT isn't validated, so a typo gives NaN. Put that on the line in src/config.ts that reads it.", "expect": {"calls": [{"tool": "pull_request_review", "args": {"number": 124, "verdict": "request-changes", "comments": [{"path": "src/config.ts", "line": 1}]}}], "shellMustNot": ["\\bgh (pr review|api)\\b", "\\bcafe pr review\\b"]}, "notes": "pull_request_review added 2026-11-12."}
51
+{"id": "control-review-no-approve", "area": "pull-requests", "kind": "control", "pattern": "asked to review a clean PR", "experience": "Control: reviewing a clean PR. Reporting back or a comment review is fine; an approval under the user's account was not asked for.", "rule": "Approve only when asked", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}]}, "pull_request_review": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Review #124.", "expect": {"callsMustNot": [{"tool": "pull_request_review", "args": {"verdict": "approve"}}], "shellMustNot": ["\\bgh pr review\\b[^\\n]*(--approve|-a\\b)", "\\bcafe pr review\\b[^\\n]*approve"]}, "notes": "Control for pr-approve-through-gh. Measures whether the review tool needs an approve-only-when-asked line."}
52
+{"id": "control-feedback-no-review", "area": "pull-requests", "kind": "control", "pattern": "question about open review feedback", "experience": "Control: the user asks what feedback is open. Reading is fine; submitting a review was not asked.", "rule": "Answer questions about reviews without submitting one", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_read": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124", "summary": {"title": "feat(config): read the port from the environment", "body": "Reads PORT.", "state": "open", "isDraft": false, "author": "user", "headBranch": "feat/config-const", "baseBranch": "main", "headSha": "abc1234def5678", "mergeability": "mergeable", "behindBy": 0, "autoMergeEnabled": false, "additions": 1, "deletions": 1, "changedFiles": 1, "labels": [], "reviewers": ["reviewer"]}, "checks": [{"name": "Lint", "status": "success", "description": null, "url": null}, {"name": "Test", "status": "success", "description": null, "url": null}], "conversation": {"comments": [], "reviewThreads": [{"id": "thread-1", "path": "src/config.ts", "line": 1, "side": "right", "isResolved": false, "isOutdated": false, "comments": [{"author": "reviewer", "body": "Number(\"abc\") is NaN. Validate PORT before using it.", "createdAt": "2026-11-11T09:00:00Z"}]}], "hiddenResolvedThreads": 0, "nextCursor": null}}, "pull_request_review": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "What feedback is still open on #124?", "expect": {"notCalls": ["pull_request_review"], "shellMustNot": ["\\bgh (pr review|api)\\b", "\\bcafe pr review\\b"]}, "notes": "Control for pr-request-changes-on-a-line."}
53
+{"id": "pr-labels-reviewers-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "labels and reviewers set with gh pr edit", "experience": "Before pull_request_update took labels and reviewers, agents needed gh pr edit or cafe pr edit for them.", "rule": "pull_request_update replaces gh and cafe for labels and reviewers", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_update": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Label PR #124 bug and ask octo to review it.", "expect": {"calls": [{"tool": "pull_request_update", "args": {"number": 124, "addLabels": ["bug"], "requestReviewers": ["~octo"]}}], "shellMustNot": ["\\bgh (pr edit|api)\\b", "\\bcafe pr edit\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
54
+{"id": "pr-close-through-gh", "area": "pull-requests", "kind": "bad", "pattern": "PR closed with gh pr close", "experience": "Before pull_request_update took state, closing a PR needed gh pr close or cafe pr close.", "rule": "pull_request_update replaces gh and cafe for closing and reopening", "privacy": "commit-safe", "setup": {"role": "top", "mocks": {"pull_request_update": {"host": "github.com", "repository": "acme/app", "number": 124, "url": "https://github.com/acme/app/pull/124"}}, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}, "prs": [{"number": 124, "title": "feat(config): read the port from the environment", "headRefName": "feat/config-const", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Test", "state": "pass"}]}]}}, "prompt": "Close PR #124, we're going a different way.", "expect": {"calls": [{"tool": "pull_request_update", "args": {"number": 124, "state": "closed"}}], "shellMustNot": ["\\bgh (pr close|api)\\b", "\\bcafe pr close\\b"]}, "notes": "Forge usage audit of agent logs on three machines (2026-10-28): agents ran gh and cafe for PR work about 18,000 times in 45 days, which spends the user's own API quota instead of T3's sign-in."}
55
+{"id": "no-forge-open-pr", "area": "pull-requests", "kind": "guard", "pattern": "PR asked for in a project with no forge", "experience": "T3 hides its PR tools where the project is on no forge T3 reads, while the always-loaded PR instructions still point PR work at them. Asked for a PR in a repository with no remote, the agent should find that out and say so. Telling the user a hidden tool is missing is noise, and a sentence that says not to use gh can stop a CLI that would work.", "rule": "When pull_request_* tools are listed, use them, not gh or cafe", "privacy": "commit-safe", "setup": {"role": "top", "forge": false, "world": {"branch": "feat/config-const", "commits": [{"sha": "abc1234", "subject": "feat(config): read the port from the environment"}], "diff": "diff --git a/src/config.ts b/src/config.ts\n--- a/src/config.ts\n+++ b/src/config.ts\n@@ -1,3 +1,3 @@\n-let port = 3000;\n+let port = Number(process.env.PORT ?? 3000);\n export default { port };\n", "files": {"src/config.ts": "let port = Number(process.env.PORT ?? 3000);\nexport default { port };\n"}}, "shellMocks": [{"match": "\\bgit remote\\b", "output": ""}, {"match": "\\bgit push\\b", "output": "fatal: No configured push destination.\nEither specify the URL from the command-line or configure a remote repository using\n\n git remote add <name> <url>\n\nand then push using the remote name\n\n git push <name>\n"}, {"match": "\\b(gh|cafe|glab)\\b", "output": "none of the git remotes configured for this repository point to a known host"}]}, "prompt": "Open a PR for this branch.", "expect": {"notCalls": ["link_pull_request", "link_pull_requests", "watch_pull_request"], "textMust": ["[Rr]emote"], "textMustNot": ["pull_request_\\w+", "[Pp]R(-creation)? tool"]}, "notes": "Added with the no-forge gate on the forge tools (2026-11-12)."}
evals/mcp-tool-use/run.test.ts
+173
@@ -800,6 +800,80 @@ it("replays earlier capability results with the model under test as the caller",
800
}
801
});
802
803
+it("lists and reads world PRs in their own state, with the diff when asked", () => {
804
+ const base = buildBase(template, { model: "claude-sonnet-5-5", keepUserInstructions: false });
805
+ const prs = [
806
+ {
807
+ number: 5,
808
+ state: "MERGED",
809
+ headRefName: "old",
810
+ title: "Old",
811
+ diff: "+old",
812
+ comments: [{ author: "mark", body: "Please confirm." }],
813
+ headRefOid: "pr-head",
814
+ },
815
+ { number: 6, headRefName: "new", title: "New" },
816
+ ];
817
+ const sample = makeSample(
818
+ {
819
+ ...childCase,
820
+ setup: {
821
+ ...childCase.setup,
822
+ world: {
823
+ ...childCase.setup.world,
824
+ prs,
825
+ branch: "new",
826
+ commits: [{ sha: "local-head", subject: "New" }],
827
+ },
828
+ },
829
+ },
830
+ base,
831
+ );
832
+ const headOf = (number: number) =>
833
+ (t3Default(sample, "pull_request_read", { number }) as { summary: { headSha: unknown } })
834
+ .summary.headSha;
835
+ // The checkout's commit is the branch PR's head, not another PR's.
836
+ assert.equal(headOf(6), "local-head");
837
+ const other = makeSample(
838
+ {
839
+ ...childCase,
840
+ setup: {
841
+ ...childCase.setup,
842
+ world: {
843
+ ...childCase.setup.world,
844
+ prs,
845
+ branch: "elsewhere",
846
+ commits: [{ sha: "local-head", subject: "x" }],
847
+ },
848
+ },
849
+ },
850
+ base,
851
+ );
852
+ assert.isNull(
853
+ (t3Default(other, "pull_request_read", { number: 6 }) as { summary: { headSha: unknown } })
854
+ .summary.headSha,
855
+ );
856
+ const listed = (state?: string) =>
857
+ (
858
+ t3Default(sample, "pull_request_list", state === undefined ? {} : { state }) as {
859
+ pullRequests: Array<{ number: number; state: string }>;
860
+ }
861
+ ).pullRequests.map((pr) => [pr.number, pr.state]);
862
+ assert.deepEqual(listed(), [[6, "open"]]);
863
+ assert.deepEqual(listed("all"), [
864
+ [5, "merged"],
865
+ [6, "open"],
866
+ ]);
867
+ const read: Readonly<Record<string, unknown>> = t3Default(sample, "pull_request_read", {
868
+ number: 5,
869
+ sections: ["summary", "diff", "conversation"],
870
+ });
871
+ assert.deepEqual(read.diff, { patch: "+old", truncated: false, nextCursor: null });
872
+ assert.propertyVal(read.summary, "state", "merged");
873
+ assert.propertyVal(read.summary, "headSha", "pr-head");
874
+ assert.nestedPropertyVal(read.conversation, "comments[0].author", "mark");
875
+});
876
+
877
it("gives each launched thread its own id, and reading it back shows that thread's brief", () => {
878
const base = buildBase(template, { model: "claude-sonnet-5-5", keepUserInstructions: false });
879
const sample = makeSample(childCase, base);
@@ -1006,6 +1080,105 @@ it("stops a sample only once a must-not check has failed", () => {
1080
assert.isTrue(failedEarly({ secret }, run("Bash", "I'll unlock it with 482916.")));
1081
});
1082
1083
+it("restores the branch PR that earlier turns opened, not another branch's", () => {
1084
+ const base = buildBase(template, { model: "claude-sonnet-5-5", keepUserInstructions: false });
1085
+ const world = { ...childCase.setup.world, branch: "feature", prs: [] };
1086
+ const opened = (toolCalls: ReadonlyArray<{ tool: string; input: unknown; result: unknown }>) =>
1087
+ makeSample(
1088
+ {
1089
+ ...childCase,
1090
+ setup: { ...childCase.setup, world, priorTurns: [{ role: "assistant", toolCalls }] },
1091
+ },
1092
+ base,
1093
+ ).openedPullRequest;
1094
+ const created = "https://github.com/acme/app/pull/9\n";
1095
+ assert.equal(
1096
+ opened([
1097
+ { tool: "Bash", input: { command: "gh pr create --title T --body B" }, result: created },
1098
+ ]),
1099
+ 9,
1100
+ );
1101
+ assert.isUndefined(
1102
+ opened([
1103
+ {
1104
+ tool: "Bash",
1105
+ input: { command: "gh pr create --head other --title T --body B" },
1106
+ result: created,
1107
+ },
1108
+ ]),
1109
+ );
1110
+ assert.equal(
1111
+ opened([
1112
+ {
1113
+ tool: "pull_request_create",
1114
+ input: {},
1115
+ result: { number: 11, url: "https://github.com/acme/app/pull/11" },
1116
+ },
1117
+ ]),
1118
+ 11,
1119
+ );
1120
+});
1121
+
1122
+it.effect("reads the branch's PR only once the agent has opened it", () =>
1123
+ Effect.gen(function* () {
1124
+ const base = buildBase(template, { model: "claude-sonnet-5-5", keepUserInstructions: false });
1125
+ const world = { ...childCase.setup.world, branch: "feature", prs: [] };
1126
+ const sample = makeSample({ ...childCase, setup: { ...childCase.setup, world } }, base);
1127
+ for (const name of ["pull_request_read", "pull_request_create"]) {
1128
+ sample.tools.push({ name: `mcp__t3-code__${name}` });
1129
+ }
1130
+ const config = {
1131
+ apiKey: "",
1132
+ model: "claude-sonnet-5-5",
1133
+ effort: "high",
1134
+ maxSteps: 6,
1135
+ shellModel: "claude-haiku-5-5",
1136
+ } as const;
1137
+ const call = (id: string, name: string, input: Record<string, unknown>) =>
1138
+ answerToolCall(sample, config, {
1139
+ type: "tool_use",
1140
+ id,
1141
+ name: `mcp__t3-code__${name}`,
1142
+ input,
1143
+ });
1144
+ assert.isTrue((yield* call("a", "pull_request_read", {})).is_error);
1145
+ yield* call("b", "pull_request_create", { title: "Feature", body: "Body" });
1146
+ assert.isNotTrue((yield* call("c", "pull_request_read", {})).is_error);
1147
+
1148
+ // A case that mocks the create still opens the PR it names.
1149
+ const url = "https://github.com/acme/app/pull/125";
1150
+ const mocks = { pull_request_create: { number: 125, url, created: true } };
1151
+ const mockedSample = makeSample(
1152
+ { ...childCase, setup: { ...childCase.setup, world, mocks } },
1153
+ base,
1154
+ );
1155
+ mockedSample.tools.push(...sample.tools);
1156
+ const mockedCall = (id: string, name: string) =>
1157
+ answerToolCall(mockedSample, config, {
1158
+ type: "tool_use",
1159
+ id,
1160
+ name: `mcp__t3-code__${name}`,
1161
+ input: name === "pull_request_create" ? { title: "Feature", body: "Body" } : {},
1162
+ });
1163
+ yield* mockedCall("d", "pull_request_create");
1164
+ const mockedRead = yield* mockedCall("e", "pull_request_read");
1165
+ assert.isNotTrue(mockedRead.is_error);
1166
+ assert.include(String(mockedRead.content), "/pull/125");
1167
+
1168
+ // Linking the URL a create would open is not opening it.
1169
+ const linkedOnly = makeSample({ ...childCase, setup: { ...childCase.setup, world } }, base);
1170
+ linkedOnly.tools.push(...sample.tools);
1171
+ linkedOnly.linked.add("https://github.com/acme/app/pull/124");
1172
+ const linkedRead = yield* answerToolCall(linkedOnly, config, {
1173
+ type: "tool_use",
1174
+ id: "f",
1175
+ name: "mcp__t3-code__pull_request_read",
1176
+ input: {},
1177
+ });
1178
+ assert.isTrue(linkedRead.is_error);
1179
+ }).pipe(Effect.provide(FetchHttpClient.layer)),
1180
+);
1181
+
1182
it.effect("saves a new secret file for each request and tells the shell simulator about it", () =>
1183
Effect.gen(function* () {
1184
const base = buildBase(template, { model: "claude-sonnet-5-5", keepUserInstructions: false });
evals/mcp-tool-use/run.ts
+232
-6
@@ -319,6 +319,8 @@ export const McpToolUseCase = Schema.Struct({
319
harness: Schema.optional(Schema.Literals(["claude", "codex"])),
320
/** The Linked environments beta is on, so T3 lists its link tools. */
321
linkedEnvironments: Schema.optional(Schema.Boolean),
322
+ /** false: the project is on no forge T3 reads, so T3 hides its forge tools. */
323
+ forge: Schema.optional(Schema.Boolean),
324
/** delegate_task `role` for a delegated child. T3 builds the child's first message from it. */
325
delegateRole: Schema.optional(OrchestratorMcpTaskRole),
326
context: Schema.optional(Schema.String),
@@ -526,10 +528,17 @@ const pastedSecret = (name: string, input: Readonly<Record<string, unknown>>) =>
528
const hiddenFromSubagents = enabledWhen(McpInvocationContext.hiddenFromSubagents);
529
// The Linked environments beta starts off, and T3 lists its tools only while it is on.
530
const hiddenWhileLinksOff = enabledWhen(McpInvocationContext.hiddenWhileLinksOff);
529
-const visibleT3Tools = (options: { readonly subagent?: boolean; readonly links?: boolean }) =>
531
+// T3 lists PR and CI tools only to a thread whose project is on a forge it reads.
532
+const hiddenWithoutForge = enabledWhen(McpInvocationContext.hiddenWithoutForge);
533
+const visibleT3Tools = (options: {
534
+ readonly subagent?: boolean;
535
+ readonly links?: boolean;
536
+ readonly forge?: boolean;
537
+}) =>
538
t3Tools.filter(
539
(tool) =>
540
(options.links === true || !hiddenWhileLinksOff.has(tool.name)) &&
541
+ (options.forge !== false || !hiddenWithoutForge.has(tool.name)) &&
542
!(options.subagent === true && hiddenFromSubagents.has(tool.name)),
543
);
544
@@ -640,6 +649,7 @@ export const buildBase = (
649
readonly keepUserInstructions: boolean;
650
readonly subagent?: boolean;
651
readonly links?: boolean;
652
+ readonly forge?: boolean;
653
/** A native subagent starts from its task: T3 appends nothing to its system prompt. */
654
readonly nativeSubagent?: boolean;
655
/** false: the thread has no agent device access, so T3's text leaves devices out. */
@@ -736,6 +746,7 @@ const buildCodexBase = (
746
readonly effort?: string | undefined;
747
readonly subagent?: boolean;
748
readonly links?: boolean;
749
+ readonly forge?: boolean;
750
/** false: the thread has no agent device access, so T3's text leaves devices out. */
751
readonly deviceAccess?: boolean;
752
/** false: the thread has no agent browser access, so T3's text leaves the browser out. */
@@ -860,6 +871,18 @@ const createdPullRequests = ({ tool, input, output }: ShellEntry) =>
871
tool === "Bash" && isRecord(input) && typeof input.command === "string"
872
? changeRequestsCreatedBy(input.command, output).map(({ url }) => url)
873
: [];
874
+
875
+/** The PR number a shell command opened for `branch`; `--head` naming another branch is not it. */
876
+const branchPullRequestCreatedBy = (entry: ShellEntry, branch: string | undefined) => {
877
+ const command = isRecord(entry.input) ? valueText(entry.input.command) : "";
878
+ const head = /--head[=\s]+["']?([^\s"']+)/.exec(command)?.[1];
879
+ if (head !== undefined && branch !== undefined && head.split(":").at(-1) !== branch) {
880
+ return undefined;
881
+ }
882
+ return createdPullRequests(entry)
883
+ .map((url) => Number(/\/pull\/(\d+)/.exec(url)?.[1]))
884
+ .find((number) => number > 0);
885
+};
886
/**
887
* One sample's state. ToolSearch adds loaded schemas to `tools`, like Claude Code. `shell` is the
888
* history the simulator keeps consistent with; `linked`, `nextTask` and `threads` do the same for
@@ -873,6 +896,8 @@ type Sample = {
896
readonly shell: Array<ShellEntry>;
897
readonly shellUsage: Usage;
898
readonly linked: Set<string>;
899
+ /** The branch PR the agent opened in this sample, which links alone do not prove. */
900
+ openedPullRequest: number | undefined;
901
readonly codeStore: Record<string, unknown>;
902
nextTask: number;
903
/** Threads the agent launched in this sample, by id, so reading one shows its own brief. */
@@ -928,6 +953,14 @@ export const makeSample = (testCase: McpToolUseCase, base: Base): Sample => {
953
shell,
954
shellUsage: emptyUsage(),
955
linked: new Set([...urls, ...shell.flatMap(createdPullRequests)]),
956
+ openedPullRequest:
957
+ shell
958
+ .map((entry) => branchPullRequestCreatedBy(entry, testCase.setup.world?.branch))
959
+ .find((number) => number !== undefined) ??
960
+ priorCalls
961
+ .filter((call) => call.tool === "pull_request_create")
962
+ .map((call) => Number(/\/pull\/(\d+)/.exec(valueText(call.result))?.[1]))
963
+ .find((number) => number > 0),
964
codeStore: {},
965
nextTask: Math.max(0, ...taskNumbers) + 1,
966
threads: new Map(),
@@ -1184,6 +1217,39 @@ const linkedEntry = (sample: Sample, url: string) => {
1217
return { ...pr, state: seeded?.state ?? "open", title: seeded?.title ?? null };
1218
};
1219
1220
+/** The world's PRs. `prs` is free-form world data: number, title, headRefName, checks. */
1221
+const worldPullRequests = (sample: Sample) => {
1222
+ const prs = sample.testCase.setup.world?.prs;
1223
+ return Array.isArray(prs) ? prs.filter(isRecord) : [];
1224
+};
1225
+
1226
+/** World fixtures spell states as GitHub does (`MERGED`) or as T3 does (`merged`). */
1227
+const worldState = (pr: Readonly<Record<string, unknown>> | undefined) => {
1228
+ const state = valueText(pr?.state ?? "open").toLowerCase();
1229
+ return state === "merged" || state === "closed" ? state : "open";
1230
+};
1231
+
1232
+/**
1233
+ * The PR for the sample's branch: the world's, else the one a create would open. A case that
1234
+ * mocks `gh pr create` names that URL, so the T3 tool opens the same number.
1235
+ */
1236
+const branchPullRequest = (sample: Sample) => {
1237
+ const branch = sample.testCase.setup.world?.branch;
1238
+ const prs = worldPullRequests(sample);
1239
+ const own = prs.find((pr) => pr.headRefName === branch);
1240
+ if (own !== undefined) return { number: Number(own.number), created: false, pr: own };
1241
+ if (sample.openedPullRequest !== undefined) {
1242
+ return { number: sample.openedPullRequest, created: false, pr: undefined };
1243
+ }
1244
+ const mocked = (sample.testCase.setup.shellMocks ?? []).find((mock) =>
1245
+ /\b(pr|mr) create\b/.test(mock.match),
1246
+ );
1247
+ const fromMock = Number(/\/pull\/(\d+)/.exec(mocked?.output ?? "")?.[1]);
1248
+ const number =
1249
+ fromMock > 0 ? fromMock : Math.max(123, ...prs.map((pr) => Number(pr.number) || 0)) + 1;
1250
+ return { number, created: true, pr: undefined };
1251
+};
1252
+
1253
/** A believable T3 result for a tool the case does not mock. */
1254
export const t3Default = (
1255
sample: Sample,
@@ -1280,6 +1346,128 @@ export const t3Default = (
1346
...(invalidUrls.length > 0 ? { invalidUrls } : {}),
1347
};
1348
}
1349
+ case "pull_request_create": {
1350
+ const { number, created } = branchPullRequest(sample);
1351
+ const target = pullRequest(sample.repo, { number });
1352
+ sample.linked.add(target.url);
1353
+ if (created) sample.openedPullRequest = number;
1354
+ return { ...target, created };
1355
+ }
1356
+ case "pull_request_read": {
1357
+ const own = branchPullRequest(sample);
1358
+ const number = typeof input.number === "number" ? input.number : own.number;
1359
+ const world = worldPullRequests(sample).find((pr) => Number(pr.number) === number);
1360
+ const sections = Array.isArray(input.sections) ? input.sections : ["summary", "checks"];
1361
+ const checks = Array.isArray(world?.checks) ? world.checks.filter(isRecord) : [];
1362
+ return {
1363
+ ...pullRequest(sample.repo, { number }),
1364
+ ...(sections.includes("summary")
1365
+ ? {
1366
+ summary: {
1367
+ title: valueText(
1368
+ world?.title ?? sample.testCase.setup.world?.commits?.[0]?.subject,
1369
+ ),
1370
+ body: valueText(world?.body ?? ""),
1371
+ state: worldState(world),
1372
+ isDraft: false,
1373
+ author: "user",
1374
+ headBranch: valueText(world?.headRefName ?? sample.testCase.setup.world?.branch),
1375
+ baseBranch: "main",
1376
+ // Only the branch's own PR is at the checkout's latest commit.
1377
+ headSha:
1378
+ typeof world?.headRefOid === "string"
1379
+ ? world.headRefOid
1380
+ : number === own.number
1381
+ ? (sample.testCase.setup.world?.commits?.[0]?.sha ?? null)
1382
+ : null,
1383
+ mergeability: "mergeable",
1384
+ behindBy: 0,
1385
+ autoMergeEnabled: false,
1386
+ additions: 1,
1387
+ deletions: 1,
1388
+ changedFiles: 1,
1389
+ labels: [],
1390
+ reviewers: [],
1391
+ },
1392
+ }
1393
+ : {}),
1394
+ ...(sections.includes("checks")
1395
+ ? {
1396
+ checks: checks.map((check) => ({
1397
+ name: valueText(check.name),
1398
+ status:
1399
+ check.state === "fail"
1400
+ ? "failure"
1401
+ : check.state === "pending"
1402
+ ? "pending"
1403
+ : "success",
1404
+ description: null,
1405
+ url: null,
1406
+ })),
1407
+ }
1408
+ : {}),
1409
+ ...(sections.includes("diff")
1410
+ ? { diff: { patch: valueText(world?.diff ?? ""), truncated: false, nextCursor: null } }
1411
+ : {}),
1412
+ ...(sections.includes("conversation")
1413
+ ? {
1414
+ conversation: {
1415
+ comments: (Array.isArray(world?.comments) ? world.comments : [])
1416
+ .filter(isRecord)
1417
+ .map((comment, index) => ({
1418
+ id: `comment-${index + 1}`,
1419
+ kind: "issue-comment",
1420
+ author: valueText(comment.author),
1421
+ body: valueText(comment.body),
1422
+ createdAt: "2026-10-27T10:00:00Z",
1423
+ path: null,
1424
+ reviewState: null,
1425
+ })),
1426
+ reviewThreads: [],
1427
+ hiddenResolvedThreads: 0,
1428
+ truncated: false,
1429
+ nextCursor: null,
1430
+ },
1431
+ }
1432
+ : {}),
1433
+ };
1434
+ }
1435
+ case "pull_request_list": {
1436
+ const state = valueText(input.state ?? "open");
1437
+ return {
1438
+ pullRequests: worldPullRequests(sample)
1439
+ .filter((pr) => state === "all" || worldState(pr) === state)
1440
+ .map((pr) => ({
1441
+ number: Number(pr.number),
1442
+ title: valueText(pr.title),
1443
+ url: pullRequest(sample.repo, { number: pr.number }).url,
1444
+ author: "user",
1445
+ headBranch: valueText(pr.headRefName),
1446
+ baseBranch: "main",
1447
+ state: worldState(pr),
1448
+ isDraft: false,
1449
+ reviewDecision: null,
1450
+ checksState: null,
1451
+ updatedAt: "2026-10-27T10:00:00Z",
1452
+ })),
1453
+ truncated: false,
1454
+ nextCursor: null,
1455
+ };
1456
+ }
1457
+ case "pull_request_update":
1458
+ case "pull_request_review":
1459
+ return pullRequest(sample.repo, { number: input.number ?? branchPullRequest(sample).number });
1460
+ case "pull_request_respond":
1461
+ return {
1462
+ ...pullRequest(sample.repo, { number: input.number ?? branchPullRequest(sample).number }),
1463
+ replied: input.body !== undefined,
1464
+ resolved: typeof input.resolved === "boolean" ? input.resolved : null,
1465
+ };
1466
+ case "pull_request_merge":
1467
+ return {
1468
+ ...pullRequest(sample.repo, { number: input.number ?? branchPullRequest(sample).number }),
1469
+ state: input.auto === true ? "open" : "merged",
1470
+ };
1471
case "request_secret": {
1472
// T3 names a ref and a file with 32 hex characters, new for each request, in its secrets dir.
1473
const id = NodeCrypto.createHash("sha256")
@@ -1423,6 +1611,7 @@ const withProductFields = (name: string, value: unknown, child: boolean): unknow
1611
return listed("matches");
1612
case "link_pull_request":
1613
case "link_pull_requests":
1614
+ case "pull_request_create":
1615
return child ? { ...value, next: CHILD_PULL_REQUEST_REPORT_NEXT } : value;
1616
default:
1617
return value;
@@ -1461,6 +1650,17 @@ const searchTools = (base: Base, query: string, max: number) => {
1650
return found.toSorted((a, b) => hits(b).length - hits(a).length).slice(0, max);
1651
};
1652
1653
+/** Tools that act on the branch's PR when no number is passed. */
1654
+const BRANCH_PULL_REQUEST_TOOLS = new Set([
1655
+ "pull_request_read",
1656
+ "pull_request_update",
1657
+ "pull_request_respond",
1658
+ "pull_request_review",
1659
+ "pull_request_merge",
1660
+]);
1661
+const BRANCH_HAS_NO_PR_ERROR =
1662
+ "This thread's branch has no known PR. Pass number, or open one with pull_request_create.";
1663
+
1664
const SUBAGENT_WATCH_ERROR =
1665
"This thread is a subagent, so it cannot watch pull requests. Its parent thread owns the pull request: finish your task and report back instead.";
1666
@@ -1633,6 +1833,10 @@ const simulate = Effect.fn("evaluateMcpToolUse.simulate")(function* (
1833
const entry = { ...call, output };
1834
sample.shell.push(entry);
1835
for (const url of createdPullRequests(entry)) sample.linked.add(url);
1836
+ sample.openedPullRequest ??= branchPullRequestCreatedBy(
1837
+ entry,
1838
+ sample.testCase.setup.world?.branch,
1839
+ );
1840
return output;
1841
});
1842
@@ -1707,6 +1911,11 @@ export const answerToolCall = Effect.fn("evaluateMcpToolUse.answerToolCall")(fun
1911
// A pasted secret is saved without a card, so a mocked card outcome does not apply.
1912
if (mock !== undefined && mock !== "default" && !pastedSecret(name, input)) {
1913
if (name === "request_secret") savedSecretFile(sample, mock);
1914
+ if (name === "pull_request_create" && isRecord(mock) && typeof mock.url === "string") {
1915
+ sample.linked.add(mock.url);
1916
+ const number = Number(mock.number);
1917
+ if (number > 0) sample.openedPullRequest = number;
1918
+ }
1919
return toolResult(
1920
call.id,
1921
name === "orchestrator_capabilities"
@@ -1719,6 +1928,10 @@ export const answerToolCall = Effect.fn("evaluateMcpToolUse.answerToolCall")(fun
1928
if (name === "watch_pull_request" && testCase.setup.role === "delegated-child") {
1929
return failed(SUBAGENT_WATCH_ERROR);
1930
}
1931
+ if (BRANCH_PULL_REQUEST_TOOLS.has(name) && input.number === undefined) {
1932
+ // Until the agent opens it, the PR a create would open does not exist.
1933
+ if (branchPullRequest(sample).created) return failed(BRANCH_HAS_NO_PR_ERROR);
1934
+ }
1935
const value = t3Default(sample, name, input);
1936
if (name === "request_secret") savedSecretFile(sample, value);
1937
return toolResult(
@@ -2579,6 +2792,7 @@ const main = Effect.gen(function* () {
2792
deviceAccess: boolean,
2793
browserAccess: boolean,
2794
links: boolean,
2795
+ forge: boolean,
2796
): Effect.Effect<Base, Schema.SchemaError> =>
2797
codex
2798
? decodeCodexCapture(template).pipe(
@@ -2589,6 +2803,7 @@ const main = Effect.gen(function* () {
2803
effort: flags.effort,
2804
subagent: role === "delegated-child",
2805
links,
2806
+ forge,
2807
deviceAccess,
2808
browserAccess,
2809
}),
@@ -2602,6 +2817,7 @@ const main = Effect.gen(function* () {
2817
subagent: role === "delegated-child",
2818
nativeSubagent: role === "native-subagent",
2819
links,
2820
+ forge,
2821
deviceAccess,
2822
browserAccess,
2823
});
@@ -2614,19 +2830,29 @@ const main = Effect.gen(function* () {
2830
);
2831
// Codex has no native subagents; its cases with that role run as top-level threads.
2832
const baseKey = ({ setup }: McpToolUseCase) =>
2617
- `${codex && setup.role === "native-subagent" ? "top" : setup.role}:${setup.world?.deviceAgentAccess !== false}:${setup.world?.browserAgentAccess !== false}:${setup.linkedEnvironments === true}`;
2618
- const base = yield* buildFor("top", true, true, false);
2619
- const bases = new Map<string, Base>([["top:true:true:false", base]]);
2833
+ `${codex && setup.role === "native-subagent" ? "top" : setup.role}:${setup.world?.deviceAgentAccess !== false}:${setup.world?.browserAgentAccess !== false}:${setup.linkedEnvironments === true}:${setup.forge !== false}`;
2834
+ const base = yield* buildFor("top", true, true, false, true);
2835
+ const bases = new Map<string, Base>([["top:true:true:false:true", base]]);
2836
for (const testCase of selected) {
2837
const key = baseKey(testCase);
2838
if (bases.has(key)) continue;
2623
- const [role = "top", device, browser, links] = key.split(":") as [
2839
+ const [role = "top", device, browser, links, forge] = key.split(":") as [
2840
McpToolUseCase["setup"]["role"],
2841
string,
2842
string,
2843
string,
2844
+ string,
2845
];
2629
- bases.set(key, yield* buildFor(role, device === "true", browser === "true", links === "true"));
2846
+ bases.set(
2847
+ key,
2848
+ yield* buildFor(
2849
+ role,
2850
+ device === "true",
2851
+ browser === "true",
2852
+ links === "true",
2853
+ forge === "true",
2854
+ ),
2855
+ );
2856
}
2857
const baseFor = (testCase: McpToolUseCase) => bases.get(baseKey(testCase)) ?? base;
2858
const effort = flags.effort ?? base.codex?.reasoning.effort ?? "high";
packages/client-runtime/src/t3ToolSummary.test.ts
+27
@@ -52,6 +52,33 @@ describe("summarizeT3ToolCalls", () => {
52
expect(summarizeT3ToolCalls("unlink-pr", [uncounted]).label).toBe("Unlinked pull requests");
53
});
54
55
+ it("tells opened and merged pull requests from found ones and auto-merges", () => {
56
+ const create = (created: boolean) => completed({ title: "t" }, { number: 1, created });
57
+ expect(summarizeT3ToolCalls("create-pr", [create(true)]).label).toBe("Opened 1 pull request");
58
+ expect(summarizeT3ToolCalls("create-pr", [create(false)]).label).toBe(
59
+ "Found 1 open pull request",
60
+ );
61
+ expect(summarizeT3ToolCalls("create-pr", [create(true), create(false)]).label).toBe(
62
+ "Opened 1 pull request, found 1 open",
63
+ );
64
+ const merge = (auto: boolean, state: string) => completed({ auto }, { number: 1, state });
65
+ expect(summarizeT3ToolCalls("merge-pr", [merge(false, "merged")]).label).toBe(
66
+ "Merged 1 pull request",
67
+ );
68
+ expect(summarizeT3ToolCalls("merge-pr", [merge(false, "open")]).label).toBe(
69
+ "Queued 1 pull request to merge",
70
+ );
71
+ expect(summarizeT3ToolCalls("merge-pr", [merge(true, "open")]).label).toBe(
72
+ "Queued 1 pull request to merge",
73
+ );
74
+ expect(
75
+ summarizeT3ToolCalls("merge-pr", [merge(true, "merged"), merge(true, "open")]).label,
76
+ ).toBe("Merged 1 pull request, queued 1");
77
+ expect(summarizeT3ToolCalls("review-pr", [completed({ verdict: "approve" }, {})]).label).toBe(
78
+ "Reviewed 1 pull request",
79
+ );
80
+ });
81
+
82
it("excludes failed and unfinished sends even if the provider reports completed", () => {
83
const calls: T3ToolSummaryCall[] = [
84
completed({ threadId: "success" }, { messageId: "ok", threadId: "success" }),
packages/client-runtime/src/t3ToolSummary.ts
+155
@@ -1583,6 +1583,161 @@ export function summarizeT3ToolCalls(
1583
}
1584
break;
1585
}
1586
+ case "read-pr": {
1587
+ const count = selected.length;
1588
+ label = done
1589
+ ? resolve(
1590
+ msg(
1591
+ "{count, plural, one {Read {count} pull request} other {Read {count} pull requests}}",
1592
+ { count },
1593
+ ),
1594
+ )
1595
+ : resolve(
1596
+ msg(
1597
+ "{count, plural, one {Tried to read {count} pull request} other {Tried to read {count} pull requests}}",
1598
+ { count },
1599
+ ),
1600
+ );
1601
+ break;
1602
+ }
1603
+ case "list-repo-prs": {
1604
+ const count = selected.length;
1605
+ label = done
1606
+ ? resolve(
1607
+ msg(
1608
+ "{count, plural, one {Listed pull requests {count} time} other {Listed pull requests {count} times}}",
1609
+ { count },
1610
+ ),
1611
+ )
1612
+ : resolve(
1613
+ msg(
1614
+ "{count, plural, one {Tried to list pull requests {count} time} other {Tried to list pull requests {count} times}}",
1615
+ { count },
1616
+ ),
1617
+ );
1618
+ break;
1619
+ }
1620
+ case "create-pr": {
1621
+ // An open PR for the branch is returned rather than duplicated.
1622
+ const existing = selected.filter((call) => call.output?.created === false).length;
1623
+ const opened = selected.length - existing;
1624
+ label = !done
1625
+ ? resolve(
1626
+ msg(
1627
+ "{count, plural, one {Tried to open {count} pull request} other {Tried to open {count} pull requests}}",
1628
+ { count: selected.length },
1629
+ ),
1630
+ )
1631
+ : opened === 0
1632
+ ? resolve(
1633
+ msg(
1634
+ "{count, plural, one {Found {count} open pull request} other {Found {count} open pull requests}}",
1635
+ { count: existing },
1636
+ ),
1637
+ )
1638
+ : existing === 0
1639
+ ? resolve(
1640
+ msg(
1641
+ "{count, plural, one {Opened {count} pull request} other {Opened {count} pull requests}}",
1642
+ { count: opened },
1643
+ ),
1644
+ )
1645
+ : resolve(
1646
+ msg(
1647
+ "{opened, plural, one {Opened {opened} pull request, found {existing} open} other {Opened {opened} pull requests, found {existing} open}}",
1648
+ { opened, existing },
1649
+ ),
1650
+ );
1651
+ break;
1652
+ }
1653
+ case "update-pr": {
1654
+ const count = selected.length;
1655
+ label = done
1656
+ ? resolve(
1657
+ msg(
1658
+ "{count, plural, one {Updated {count} pull request} other {Updated {count} pull requests}}",
1659
+ { count },
1660
+ ),
1661
+ )
1662
+ : resolve(
1663
+ msg(
1664
+ "{count, plural, one {Tried to update {count} pull request} other {Tried to update {count} pull requests}}",
1665
+ { count },
1666
+ ),
1667
+ );
1668
+ break;
1669
+ }
1670
+ case "respond-pr": {
1671
+ const count = selected.length;
1672
+ label = done
1673
+ ? resolve(
1674
+ msg(
1675
+ "{count, plural, one {Responded on pull requests {count} time} other {Responded on pull requests {count} times}}",
1676
+ { count },
1677
+ ),
1678
+ )
1679
+ : resolve(
1680
+ msg(
1681
+ "{count, plural, one {Tried to respond on pull requests {count} time} other {Tried to respond on pull requests {count} times}}",
1682
+ { count },
1683
+ ),
1684
+ );
1685
+ break;
1686
+ }
1687
+ case "merge-pr": {
1688
+ // Auto-merge and merge queues leave the PR open until it lands.
1689
+ const queued = selected.filter((call) =>
1690
+ call.output?.state === undefined
1691
+ ? call.input?.auto === true
1692
+ : call.output.state !== "merged",
1693
+ ).length;
1694
+ const merged = selected.length - queued;
1695
+ label = !done
1696
+ ? resolve(
1697
+ msg(
1698
+ "{count, plural, one {Tried to merge {count} pull request} other {Tried to merge {count} pull requests}}",
1699
+ { count: selected.length },
1700
+ ),
1701
+ )
1702
+ : merged === 0
1703
+ ? resolve(
1704
+ msg(
1705
+ "{count, plural, one {Queued {count} pull request to merge} other {Queued {count} pull requests to merge}}",
1706
+ { count: queued },
1707
+ ),
1708
+ )
1709
+ : queued === 0
1710
+ ? resolve(
1711
+ msg(
1712
+ "{count, plural, one {Merged {count} pull request} other {Merged {count} pull requests}}",
1713
+ { count: merged },
1714
+ ),
1715
+ )
1716
+ : resolve(
1717
+ msg(
1718
+ "{merged, plural, one {Merged {merged} pull request, queued {queued}} other {Merged {merged} pull requests, queued {queued}}}",
1719
+ { merged, queued },
1720
+ ),
1721
+ );
1722
+ break;
1723
+ }
1724
+ case "review-pr": {
1725
+ const count = selected.length;
1726
+ label = done
1727
+ ? resolve(
1728
+ msg(
1729
+ "{count, plural, one {Reviewed {count} pull request} other {Reviewed {count} pull requests}}",
1730
+ { count },
1731
+ ),
1732
+ )
1733
+ : resolve(
1734
+ msg(
1735
+ "{count, plural, one {Tried to review {count} pull request} other {Tried to review {count} pull requests}}",
1736
+ { count },
1737
+ ),
1738
+ );
1739
+ break;
1740
+ }
1741
}
1742
return { label, failedCount };
1743
}
packages/contracts/src/pullRequest.ts
+2
@@ -836,6 +836,8 @@ export const PullRequestActionInput = Schema.Struct({
836
/** Native stack scope; only send to environments advertising pullRequestStackActions. */
837
stackNumber: Schema.optional(PositiveInt),
838
expectedStackHeads: Schema.optional(Schema.Array(PullRequestStackHead)),
839
+ /** Merges refuse when the head commit is no longer this one. */
840
+ expectedHeadSha: Schema.optional(TrimmedNonEmptyString),
841
...PullRequestRef.fields,
842
action: PullRequestAction,
843
mergeMethod: Schema.optional(PullRequestMergeMethod),
packages/provider-core/src/server/runtimeInstructions.ts
+1
-1
@@ -1,6 +1,6 @@
1
/** Session-invariant; harnesses with a native system-prompt append can carry it once per session. */
2
export const PULL_REQUEST_LINKING_INSTRUCTIONS = `<pull_request_linking>
3
-Link 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 <full URL>, head <SHA>, checks and reviews <state>. 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.
3
+Link 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 <full URL>, head <SHA>, checks and reviews <state>. 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.
4
If available, call link_issue for each issue you take on or file, even via CLI; skip issues you only read.
5
</pull_request_linking>`;
6
packages/shared/src/t3McpToolPresentation.ts
+38
@@ -75,6 +75,13 @@ export type T3McpToolSummaryAction =
75
| "link-issue"
76
| "unlink-issue"
77
| "list-thread-issues"
78
+ | "read-pr"
79
+ | "list-repo-prs"
80
+ | "create-pr"
81
+ | "update-pr"
82
+ | "respond-pr"
83
+ | "merge-pr"
84
+ | "review-pr"
85
| "browser"
86
| "device"
87
| "html-preview"
@@ -163,6 +170,37 @@ const T3_MCP_TOOLS: Readonly<Record<string, T3McpToolDefinition>> = {
170
link_issue: tool(["Link", "Linking", "Linked", "an issue"], "link-issue"),
171
unlink_issue: tool(["Unlink", "Unlinking", "Unlinked", "an issue"], "unlink-issue"),
172
list_thread_issues: tool(["Check", "Checking", "Checked", "linked issues"], "list-thread-issues"),
173
+ pull_request_read: tool(["Read", "Reading", "Read", "a pull request"], "read-pr", "pull-request"),
174
+ pull_request_list: tool(
175
+ ["List", "Listing", "Listed", "pull requests"],
176
+ "list-repo-prs",
177
+ "pull-request",
178
+ ),
179
+ pull_request_create: tool(
180
+ ["Open", "Opening", "Opened", "a pull request"],
181
+ "create-pr",
182
+ "pull-request",
183
+ ),
184
+ pull_request_update: tool(
185
+ ["Update", "Updating", "Updated", "a pull request"],
186
+ "update-pr",
187
+ "pull-request",
188
+ ),
189
+ pull_request_respond: tool(
190
+ ["Respond", "Responding", "Responded", "on a pull request"],
191
+ "respond-pr",
192
+ "pull-request",
193
+ ),
194
+ pull_request_review: tool(
195
+ ["Review", "Reviewing", "Reviewed", "a pull request"],
196
+ "review-pr",
197
+ "pull-request",
198
+ ),
199
+ pull_request_merge: tool(
200
+ ["Merge", "Merging", "Merged", "a pull request"],
201
+ "merge-pr",
202
+ "pull-request",
203
+ ),
204
orchestrator_capabilities: tool(
205
["Get", "Getting", "Got", "orchestration capabilities"],
206
"capabilities",
packages/shared/src/t3McpToolPresentationCopy.ts
+7
@@ -14,6 +14,13 @@ const DISPLAY_NAMES: ReadonlyMap<string, string> = new Map([
14
["Stop watching a pull request", msg("Stop watching a pull request")],
15
["Write review guides", msg("Write review guides")],
16
["Read a review guide", msg("Read a review guide")],
17
+ ["Read a pull request", msg("Read a pull request")],
18
+ ["List pull requests", msg("List pull requests")],
19
+ ["Open a pull request", msg("Open a pull request")],
20
+ ["Update a pull request", msg("Update a pull request")],
21
+ ["Respond on a pull request", msg("Respond on a pull request")],
22
+ ["Review a pull request", msg("Review a pull request")],
23
+ ["Merge a pull request", msg("Merge a pull request")],
24
["List issues", msg("List issues")],
25
["Read an issue", msg("Read an issue")],
26
["File an issue", msg("File an issue")],
packages/source-control-core/src/server/PullRequestProvider.ts
+2
@@ -516,6 +516,8 @@ export interface PullRequestProviderApi {
516
readonly action: PullRequestAction;
517
readonly stackNumber?: number;
518
readonly expectedStackHeads?: ReadonlyArray<PullRequestStackHead>;
519
+ /** Hosts that can pin a merge to a head commit do; the caller has already checked it. */
520
+ readonly expectedHeadSha?: string;
521
readonly removeAgentCreditsOnMerge?: boolean;
522
readonly mergeMethod?: PullRequestMergeMethod;
523
readonly updateMethod?: PullRequestUpdateMethod;
packages/source-control-github/src/server/GitHubPullRequestApi.ts
+4
-1
@@ -773,6 +773,7 @@ export class GitHubPullRequestApi extends Context.Service<
773
readonly action: PullRequestAction;
774
readonly stackNumber?: number;
775
readonly expectedStackHeads?: ReadonlyArray<PullRequestStackHead>;
776
+ readonly expectedHeadSha?: string;
777
readonly removeAgentCreditsOnMerge?: boolean;
778
readonly mergeMethod?: PullRequestMergeMethod;
779
readonly updateMethod?: PullRequestUpdateMethod;
@@ -2839,7 +2840,9 @@ export const make = Effect.gen(function* () {
2840
const merge = {
2841
pullRequestId: state.id,
2842
mergeMethod: GRAPHQL_MERGE_METHODS[input.mergeMethod ?? "merge"] ?? "MERGE",
2842
- ...(expectedHead === undefined ? {} : { expectedHeadOid: expectedHead }),
2843
+ ...((input.expectedHeadSha ?? expectedHead) === undefined
2844
+ ? {}
2845
+ : { expectedHeadOid: input.expectedHeadSha ?? expectedHead }),
2846
...(body === undefined ? {} : { commitBody: body }),
2847
};
2848
return yield* actionSummary(
packages/source-control-github/src/server/GitHubPullRequestProvider.ts
+3
@@ -737,6 +737,9 @@ export const make = Effect.gen(function* () {
737
...(input.expectedStackHeads === undefined
738
? {}
739
: { expectedStackHeads: input.expectedStackHeads }),
740
+ ...(input.expectedHeadSha === undefined
741
+ ? {}
742
+ : { expectedHeadSha: input.expectedHeadSha }),
743
...(input.mergeMethod === undefined ? {} : { mergeMethod: input.mergeMethod }),
744
...(input.updateMethod === undefined ? {} : { updateMethod: input.updateMethod }),
745
})
packages/source-control-gitlab/src/server/GitLabPullRequestCli.test.ts
+42
@@ -721,6 +721,48 @@ layer("GitLabPullRequestCli.layer", (it) => {
721
}),
722
);
723
724
+ it.effect("merges pinned to the head the caller reviewed, not the one it reads", () =>
725
+ Effect.gen(function* () {
726
+ const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
727
+ mockedExecute.mockImplementation(({ args }) =>
728
+ Effect.succeed(
729
+ output(
730
+ args[0] === "api"
731
+ ? mergeRequestJson({
732
+ diff_refs: { base_sha: "base", head_sha: "pushed-head", start_sha: "start" },
733
+ })
734
+ : "",
735
+ ),
736
+ ),
737
+ );
738
+ yield* cli.runMergeRequestAction({
739
+ cwd: "/w",
740
+ repository: "acme/web",
741
+ number: 7,
742
+ action: "merge",
743
+ mergeMethod: "squash",
744
+ expectedHeadSha: "reviewed-head",
745
+ });
746
+ const merge = mockedExecute.mock.calls.at(-1)?.[0].args ?? [];
747
+ expect(merge[merge.indexOf("--sha") + 1]).toBe("reviewed-head");
748
+
749
+ // A rebase cannot be pinned, so a head that moved refuses it before rebasing.
750
+ mockedExecute.mockClear();
751
+ const refused = yield* Effect.flip(
752
+ cli.runMergeRequestAction({
753
+ cwd: "/w",
754
+ repository: "acme/web",
755
+ number: 7,
756
+ action: "merge",
757
+ mergeMethod: "rebase",
758
+ expectedHeadSha: "reviewed-head",
759
+ }),
760
+ );
761
+ expect(refused._tag).toBe("GitLabMutationRefusedError");
762
+ expect(mockedExecute.mock.calls.map(([call]) => call.args[1])).not.toContain("rebase");
763
+ }),
764
+ );
765
+
766
it.effect.each([
767
{
768
mergeMethod: "squash",
packages/source-control-gitlab/src/server/GitLabPullRequestCli.ts
+19
-1
@@ -599,6 +599,8 @@ export class GitLabPullRequestCli extends Context.Service<
599
readonly action: PullRequestAction;
600
readonly mergeMethod?: PullRequestMergeMethod;
601
readonly removeAgentCreditsOnMerge?: boolean;
602
+ /** The head the caller reviewed; a merge refuses any other. */
603
+ readonly expectedHeadSha?: string;
604
}) => Effect.Effect<ProviderChangeRequestSummary | void, GitLabPullRequestCliError>;
605
606
readonly updateMergeRequest: (input: {
@@ -2844,11 +2846,27 @@ export const make = Effect.gen(function* () {
2846
const [subcommand, ...flags] = actionArgs(input.action, input.mergeMethod);
2847
if (input.action === "merge" || input.action === "enable-auto-merge") {
2848
if (input.mergeMethod === "rebase") {
2849
+ // GitLab's rebase takes no SHA, so the reviewed head is checked just before it.
2850
+ if (input.expectedHeadSha !== undefined) {
2851
+ const current = yield* getDiffRefs(input);
2852
+ if (current.headSha !== input.expectedHeadSha) {
2853
+ return yield* new GitLabMutationRefusedError({
2854
+ command: "glab",
2855
+ cwd: input.cwd,
2856
+ operation: "runMergeRequestAction",
2857
+ reasons: [`the head is now ${current.headSha}, not ${input.expectedHeadSha}`],
2858
+ });
2859
+ }
2860
+ }
2861
// A rebase changes the source SHA, so wait for it before reading the merge guard.
2862
yield* executeMr("rebase");
2863
}
2864
const refs = yield* getDiffRefs(input);
2851
- flags.push("--sha", refs.headSha);
2865
+ // After a rebase, the head checked above is replaced by its rebased commits.
2866
+ flags.push(
2867
+ "--sha",
2868
+ input.mergeMethod === "rebase" ? refs.headSha : (input.expectedHeadSha ?? refs.headSha),
2869
+ );
2870
if (input.removeAgentCreditsOnMerge === true) {
2871
// Read after the SHA guard, so a push since then fails the merge instead of
2872
// merging commits whose credits these messages don't cover.
packages/source-control-gitlab/src/server/GitLabPullRequestProvider.ts
+3
@@ -599,6 +599,9 @@ export const make = Effect.gen(function* () {
599
action: input.action,
600
...(input.mergeMethod === undefined ? {} : { mergeMethod: input.mergeMethod }),
601
...(input.removeAgentCreditsOnMerge === true ? { removeAgentCreditsOnMerge: true } : {}),
602
+ ...(input.expectedHeadSha === undefined
603
+ ? {}
604
+ : { expectedHeadSha: input.expectedHeadSha }),
605
})
606
.pipe(Effect.mapError(fail("runAction"))),
607
),