@rynx-ai/daemon 0.1.11-beta.32 → 0.1.11-beta.33

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynx-ai/plugin-channel-lark",
3
- "version": "0.1.11-beta.32",
3
+ "version": "0.1.11-beta.33",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/rynx-ai/rynx.git",
@@ -1,4 +1,4 @@
1
- export { formatControlUrl, isPm2DaemonOnline, statusDaemon, stopDaemon, streamLogs, } from "./pm2.js";
1
+ export { formatControlUrl, isDaemonStartRequired, isPm2DaemonOnline, statusDaemon, stopDaemon, streamLogs, } from "./pm2.js";
2
2
  export { resolveDaemonEntry } from "./entry-path.js";
3
3
  export interface StandaloneDaemonLaunchContext {
4
4
  builtinSkillsDir: string;
package/dist/lifecycle.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { startDaemon as startPm2Daemon, } from "./pm2.js";
2
- export { formatControlUrl, isPm2DaemonOnline, statusDaemon, stopDaemon, streamLogs, } from "./pm2.js";
2
+ export { formatControlUrl, isDaemonStartRequired, isPm2DaemonOnline, statusDaemon, stopDaemon, streamLogs, } from "./pm2.js";
3
3
  export { resolveDaemonEntry } from "./entry-path.js";
4
4
  export function startDaemon(options) {
5
5
  return startPm2Daemon({
package/dist/pm2.d.ts CHANGED
@@ -14,6 +14,8 @@ export declare function startDaemon({ force, quiet, launchEnvironment, }: {
14
14
  launchEnvironment?: NodeJS.ProcessEnv;
15
15
  }): number;
16
16
  export declare function isPm2DaemonOnline(): boolean;
17
+ /** Whether `start` must replace or recreate the resident daemon generation. */
18
+ export declare function isDaemonStartRequired(): boolean;
17
19
  /**
18
20
  * Stop the daemon and terminate its dedicated pm2 supervisor.
19
21
  *
package/dist/pm2.js CHANGED
@@ -234,6 +234,12 @@ export function startDaemon({ force, quiet = false, launchEnvironment, }) {
234
234
  export function isPm2DaemonOnline() {
235
235
  return describe()?.pm2_env?.status === "online";
236
236
  }
237
+ /** Whether `start` must replace or recreate the resident daemon generation. */
238
+ export function isDaemonStartRequired() {
239
+ const existing = describe();
240
+ return existing?.pm2_env?.status !== "online" ||
241
+ residentBuildRestartRequired(existing);
242
+ }
237
243
  /**
238
244
  * Stop the daemon and terminate its dedicated pm2 supervisor.
239
245
  *
@@ -3,6 +3,6 @@
3
3
  * broken pipe (a `pm2 logs` stream detaching, or a pm2 restart) would otherwise
4
4
  * surface as an unhandled `'error'` on the stream and crash a daemon that has
5
5
  * no uncaughtException trap. Swallow EPIPE on the std streams; re-throw anything
6
- * else. (Borrowed from botmux's daemon bootstrap.)
6
+ * else.
7
7
  */
8
8
  export declare function installStdioEpipeGuard(): void;
@@ -3,7 +3,7 @@
3
3
  * broken pipe (a `pm2 logs` stream detaching, or a pm2 restart) would otherwise
4
4
  * surface as an unhandled `'error'` on the stream and crash a daemon that has
5
5
  * no uncaughtException trap. Swallow EPIPE on the std streams; re-throw anything
6
- * else. (Borrowed from botmux's daemon bootstrap.)
6
+ * else.
7
7
  */
8
8
  export function installStdioEpipeGuard() {
9
9
  for (const stream of [process.stdout, process.stderr]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynx-ai/daemon",
3
- "version": "0.1.11-beta.32",
3
+ "version": "0.1.11-beta.33",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/rynx-ai/rynx.git",
@@ -51,17 +51,17 @@
51
51
  "tar": "^7.5.19",
52
52
  "undici": "^7.28.0",
53
53
  "ws": "^8.21.0",
54
- "@rynx-ai/core": "0.1.11-beta.32",
55
- "@rynx-ai/emulator": "0.1.11-beta.32",
56
- "@rynx-ai/plugin-runner": "0.1.11-beta.32",
57
- "@rynx-ai/plugin-sdk": "0.1.11-beta.32",
58
- "@rynx-ai/protocol": "0.1.11-beta.32",
59
- "@rynx-ai/remote-runtime-client": "0.1.11-beta.32",
60
- "@rynx-ai/server": "0.1.11-beta.32"
54
+ "@rynx-ai/plugin-runner": "0.1.11-beta.33",
55
+ "@rynx-ai/plugin-sdk": "0.1.11-beta.33",
56
+ "@rynx-ai/emulator": "0.1.11-beta.33",
57
+ "@rynx-ai/protocol": "0.1.11-beta.33",
58
+ "@rynx-ai/remote-runtime-client": "0.1.11-beta.33",
59
+ "@rynx-ai/core": "0.1.11-beta.33",
60
+ "@rynx-ai/server": "0.1.11-beta.33"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/ws": "^8.18.1",
64
- "@rynx-ai/plugin-channel-lark": "0.1.11-beta.32"
64
+ "@rynx-ai/plugin-channel-lark": "0.1.11-beta.33"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "rm -rf dist bundled-plugins && tsc -p tsconfig.json && chmod +x dist/index-daemon.js && node ../../scripts/stage-bundled-plugins.mjs",