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.
@@ -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
- <script>setTimeout(()=>window.close(),1200)</script>`;
256
+ <p>You can close this tab and return to teapot.</p>`;
240
257
  }
241
258
  /**
242
259
  * Grants for every server, persisted together.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.35.0",
3
+ "version": "0.35.2",
4
4
  "description": "A lightweight, always-on multi-agent harness for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",