@yeaft/webchat-agent 1.0.374 → 1.0.376

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.
Binary file
@@ -16,6 +16,6 @@
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script type="module" src="app.bundle.js?v=5060a66c"></script>
19
+ <script type="module" src="app.bundle.js?v=4659a59c"></script>
20
20
  </body>
21
21
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.374",
3
+ "version": "1.0.376",
4
4
  "description": "Remote worker agent for Yeaft Web Code Agent — connects the native Yeaft engine, CLI providers, and workbench tools",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4,6 +4,7 @@ import { delimiter, dirname, join, win32 } from 'node:path';
4
4
  import { setTimeout as delay } from 'node:timers/promises';
5
5
 
6
6
  export const DEFAULT_UPGRADE_REGISTRY = 'https://pkg.yeaft.com/';
7
+ export const SAFE_REMOTE_UPGRADE_CAPABILITY = 'remote_upgrade_safe';
7
8
 
8
9
  const WINDOWS_UPGRADE_LOCK_NAME = 'active.lock';
9
10
 
@@ -141,6 +142,9 @@ export function buildWindowsUpgradeInvocation({ nodePath, bootstrapPath, runnerP
141
142
  command: nodePath,
142
143
  args: [bootstrapPath, runnerPath, payloadPath],
143
144
  options: {
145
+ // PM2 starts the Agent inside the installed package. A child that inherits
146
+ // that cwd keeps the package directory locked against npm's rename step.
147
+ cwd: dirname(bootstrapPath),
144
148
  stdio: 'ignore',
145
149
  windowsHide: true,
146
150
  env: { ...process.env, YEAFT_UPGRADE_LOG: logPath },
@@ -1,7 +1,6 @@
1
- #!/usr/bin/env node
2
-
3
1
  import { appendFileSync } from 'node:fs';
4
2
  import { spawn } from 'node:child_process';
3
+ import { dirname } from 'node:path';
5
4
  import { pathToFileURL } from 'node:url';
6
5
 
7
6
  function appendLog(logPath, message) {
@@ -26,6 +25,9 @@ export function spawnWindowsUpgradeRunner({
26
25
  let child;
27
26
  try {
28
27
  child = spawnProcess(nodePath, [runnerPath, payloadPath], {
28
+ // Never inherit the Agent's package cwd. Windows will otherwise keep
29
+ // that directory locked while npm tries to replace it.
30
+ cwd: dirname(runnerPath),
29
31
  detached: true,
30
32
  stdio: 'ignore',
31
33
  windowsHide: true,
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env node
2
-
3
1
  import { appendFileSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
4
2
  import { spawn } from 'node:child_process';
5
3
  import { dirname } from 'node:path';