@mjasnikovs/pi-task 0.40.34 → 0.40.35

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.
@@ -291,8 +291,12 @@ export function judgeDeepSession(f) {
291
291
  // `GET /*` → index.html fallback returns 200 for a route it does not have, so
292
292
  // the status is healthy and the body is the app shell. A document navigation
293
293
  // answered with HTML is normal; an XHR asking for data and getting HTML is a
294
- // call that reached nothing.
295
- const swallowed = (f.sessionRequests ?? []).find(r => r.initiator === 'xhr' && (r.mimeType ?? '').startsWith('text/html'));
294
+ // call that reached nothing. The sign-in request is exempt: it keeps the first
295
+ // hop but carries the LAST hop's mime, so a fetch login that 302s to a page
296
+ // reads as HTML here while being a sign-in that worked.
297
+ const swallowed = (f.sessionRequests ?? []).find(r => r.initiator === 'xhr'
298
+ && r.phase !== 'auth'
299
+ && (r.mimeType ?? '').startsWith('text/html'));
296
300
  if (swallowed) {
297
301
  return {
298
302
  outcome: 'fail',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjasnikovs/pi-task",
3
- "version": "0.40.34",
3
+ "version": "0.40.35",
4
4
  "description": "Deterministic task planning and spec-orchestration for local models — crash-safe /task pipelines with verify/enforce gates, a real-time remote web view, and web/docs/fetch/worker subagent tools.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",