@love-moon/ai-sdk 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @love-moon/ai-sdk
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - aada753: Add explicit ChatGPT and Gemini web backend aliases, expose project icon
8
+ configuration in generated CLI settings, and default browser-backed session
9
+ checks to headed mode for reliable authenticated detection.
10
+
3
11
  ## 0.4.0
4
12
 
5
13
  ### Minor Changes
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * Lifecycle:
15
15
  * - `boot()` lazily imports `@love-moon/chat-web`, registers its built-in
16
- * providers, and opens a long-lived `ChatSession` (headless by default).
16
+ * providers, and opens a long-lived `ChatSession` (headed by default).
17
17
  * - `runTurn(prompt)` calls `session.send(prompt)` and emits a single
18
18
  * `assistant_message` with the model's reply.
19
19
  * - `close()` tears the Chromium context down.
@@ -102,7 +102,7 @@ function isPlaywrightMissingError(error) {
102
102
  *
103
103
  * Lifecycle:
104
104
  * - `boot()` lazily imports `@love-moon/chat-web`, registers its built-in
105
- * providers, and opens a long-lived `ChatSession` (headless by default).
105
+ * providers, and opens a long-lived `ChatSession` (headed by default).
106
106
  * - `runTurn(prompt)` calls `session.send(prompt)` and emits a single
107
107
  * `assistant_message` with the model's reply.
108
108
  * - `close()` tears the Chromium context down.
@@ -119,7 +119,16 @@ export class ChatWebSession extends EventEmitter {
119
119
  this.options = options;
120
120
  this.logger = normalizeLogger(options.logger);
121
121
  this.chatWebProvider = resolveChatWebProvider(options);
122
- this.headless = options.headless !== false;
122
+ // Match chat-web SDK's own default (headed). Per chat-web/core/browser.ts
123
+ // resolveHeadless(), headed mode is the documented safe default for
124
+ // anti-bot heuristics — ChatGPT/AI Studio routinely serve unauthenticated
125
+ // or challenge pages to chrome-headless-shell even when profile cookies
126
+ // are valid, which masquerades as "not logged in" downstream. The old
127
+ // `options.headless !== false` defaulted to true and effectively neutered
128
+ // chat-web's anti-bot stance whenever the caller (daemon, serve-ai)
129
+ // didn't explicitly pass a value. Users who actually want headless must
130
+ // now opt in with an explicit `headless: true`.
131
+ this.headless = options.headless === true;
123
132
  // Optional: use a specific Chromium-family binary (system Chrome /
124
133
  // Edge / explicit path) instead of Playwright's bundled
125
134
  // `chrome-headless-shell`. Useful when the user's network treats
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@love-moon/ai-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lovemoon-ai/conductor.git"
@@ -32,12 +32,12 @@
32
32
  "zod": "^4.1.5"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@love-moon/chat-web": "^0.4.0"
35
+ "@love-moon/chat-web": "^0.4.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.10.2",
39
39
  "tsx": "^4.20.6",
40
40
  "typescript": "^5.6.3"
41
41
  },
42
- "gitCommitId": "2d1526c"
42
+ "gitCommitId": "ff00acf"
43
43
  }