@nowcrew/daemon 0.6.87-beta.1 → 0.6.87-beta.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.
package/README.md CHANGED
@@ -12,10 +12,12 @@ npx @nowcrew/daemon@latest --server-url https://nowwork.example --api-key sk_mac
12
12
  ```
13
13
 
14
14
  The package has two release channels. The `in` environment consumes stable `x.y.z` releases through
15
- the `latest` tag; the `dev` environment consumes `x.y.z-beta.n` prereleases through the `beta` tag.
15
+ the `latest` tag. The `dev` environment prefers `x.y.z-beta.n` prereleases through the `beta` tag,
16
+ and also accepts stable `x.y.z` releases for compatibility and cross-channel updates.
16
17
  The parser also accepts the historical `x.y.z-beta-n` spelling and normalizes it for ordering; new
17
18
  published versions should use the dotted SemVer form.
18
- Never use `latest` for a dev installation or `beta` for an in installation. See the
19
+ Use `beta` by default for dev installations; an explicit `latest` target is also supported there.
20
+ Never use `beta` for an in installation. See the
19
21
  [Daemon Release Runbook](../docs/releases/daemon-release-runbook.md) for release and rollback procedures.
20
22
 
21
23
  This compatibility form stays resident in the current terminal and reconnects with backoff. New
@@ -27,9 +27,9 @@ export function assertReleaseTagForServerUrl(serverUrl, requested) {
27
27
  const known = KNOWN_TARGETS[parsed.hostname.toLowerCase()];
28
28
  if (known === undefined)
29
29
  return;
30
- const expected = known.environment === "dev" ? "beta" : "latest";
31
- if (requested !== expected) {
32
- throw new Error(`Server hostname '${parsed.hostname}' requires release tag '${expected}'`);
30
+ // dev is a compatibility lane: beta remains the default, but stable is also valid.
31
+ if (known.environment !== "dev" && requested !== "latest") {
32
+ throw new Error(`Server hostname '${parsed.hostname}' requires release tag 'latest'`);
33
33
  }
34
34
  }
35
35
  function parseServerUrl(value) {
@@ -88,7 +88,7 @@ function knownTargetForProfile(environment, requestedProfile, input, parsed) {
88
88
  daemonHome: local.daemonHome,
89
89
  agentsRoot: paths.join(local.root, environment === "production" ? "agents" : "agents-dev"),
90
90
  npmPrefix: local.runtimePrefix,
91
- releaseTag: environment === "dev" ? "beta" : "latest",
91
+ releaseTag: input.requestedReleaseTag ?? (environment === "dev" ? "beta" : "latest"),
92
92
  });
93
93
  }
94
94
  if (requestedProfile === "in" || requestedProfile === "dev") {
@@ -125,7 +125,7 @@ function knownTargetForProfile(environment, requestedProfile, input, parsed) {
125
125
  daemonHome: local.daemonHome,
126
126
  agentsRoot: paths.join(local.root, "agents-" + layout.environment + "-" + layout.localInstanceName),
127
127
  npmPrefix: local.runtimePrefix,
128
- releaseTag: environment === "dev" ? "beta" : "latest",
128
+ releaseTag: input.requestedReleaseTag ?? (environment === "dev" ? "beta" : "latest"),
129
129
  });
130
130
  }
131
131
  export function resolveAutomaticInstallTarget(input) {
@@ -133,9 +133,8 @@ export function resolveAutomaticInstallTarget(input) {
133
133
  const hostname = parsed.hostname.toLowerCase();
134
134
  const paths = input.platform === "win32" ? win32 : posix;
135
135
  const known = KNOWN_TARGETS[hostname];
136
- const targetReleaseTag = known?.environment === "dev"
137
- ? "beta"
138
- : input.requestedReleaseTag ?? "latest";
136
+ const targetReleaseTag = input.requestedReleaseTag
137
+ ?? (known?.environment === "dev" ? "beta" : "latest");
139
138
  const registryUrl = input.requestedRegistryUrl === undefined
140
139
  ? undefined
141
140
  : normalizeDaemonNpmRegistry(input.requestedRegistryUrl, { allowLoopbackHttp: targetReleaseTag === "beta" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowcrew/daemon",
3
- "version": "0.6.87-beta.1",
3
+ "version": "0.6.87-beta.2",
4
4
  "type": "module",
5
5
  "description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
6
6
  "license": "Apache-2.0",