teapot-coding-agent 0.35.0 → 0.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/mcp-oauth-manager.js +19 -2
- package/package.json +1 -1
- package/public/assets/index-BsDZh_Eg.js +30 -0
- package/public/assets/index-BsDZh_Eg.js.map +1 -0
- package/public/assets/{index-CvhIT1Kw.css → index-D4kB8juI.css} +1 -1
- package/public/assets/{shiki-Bs-iCpLE.js → shiki-CGVa5YzG.js} +2 -2
- package/public/assets/{shiki-Bs-iCpLE.js.map → shiki-CGVa5YzG.js.map} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-DlzaVN2I.js +0 -30
- package/public/assets/index-DlzaVN2I.js.map +0 -1
|
@@ -231,12 +231,29 @@ export async function listenForCallback() {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
/** the page the operator sees in the callback tab */
|
|
234
|
+
/**
|
|
235
|
+
* The page the browser lands on after authorizing.
|
|
236
|
+
*
|
|
237
|
+
* ## Why it does not close itself any more
|
|
238
|
+
*
|
|
239
|
+
* It used to end with `setTimeout(() => window.close(), 1200)`. Reported as "Notionから認証終わって
|
|
240
|
+
* http://127.0.0.1:41621/callback?code=xxx に飛ぶはずなのに、dev toolsを見るとリダイレクトされてる
|
|
241
|
+
* んだけど、ブラウザ画面ではリダイレクトされてない(謎)" — the redirect DOES happen, the page renders,
|
|
242
|
+
* and then it vanishes on its own. Nothing in DevTools distinguishes "loaded and closed itself" from
|
|
243
|
+
* "never navigated", so the symptom reads as a broken callback.
|
|
244
|
+
*
|
|
245
|
+
* It also only works for a tab a script opened: `window.close()` silently fails on a
|
|
246
|
+
* user-navigated tab, so the behaviour differed by browser and by how the flow started.
|
|
247
|
+
*
|
|
248
|
+
* Saying what happened and leaving the tab alone is both honest and unambiguous. The operator
|
|
249
|
+
* closes it when they are done reading.
|
|
250
|
+
*/
|
|
234
251
|
function page(title, body) {
|
|
235
252
|
return `<!doctype html><meta charset="utf-8"><title>${title}</title>
|
|
236
253
|
<style>body{font:15px system-ui;margin:12vh auto;max-width:34rem;text-align:center;color:#222}
|
|
237
|
-
h1{font-size:1.1rem}</style>
|
|
254
|
+
h1{font-size:1.1rem}p{color:#555}</style>
|
|
238
255
|
<h1>${title}</h1><p>${body}</p>
|
|
239
|
-
<
|
|
256
|
+
<p>You can close this tab and return to teapot.</p>`;
|
|
240
257
|
}
|
|
241
258
|
/**
|
|
242
259
|
* Grants for every server, persisted together.
|