@nowcrew/daemon 0.6.100-beta.1 → 0.6.101-beta.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.
@@ -8,6 +8,7 @@ import { detectLocalMemoryStorageVersion, parseFullMemoryIndex } from "./local-m
8
8
  import { resolveLocalMemoryV2Rollout } from "./local-memory/rollout.js";
9
9
  import { readMemoryInventorySource, inventoryLimits } from "./local-memory/inventory-source.js";
10
10
  import { isLocalMemoryInitializationIdentity, localMemoryInitializationIdentity } from "./local-memory/initialization-identity.js";
11
+ import { MemoryMigrationStartSchema } from "./memory-migration-protocol.js";
11
12
  export async function inspectMemoryForMigration(agentsRoot, input, journal) {
12
13
  const parent = await realpath(agentsRoot);
13
14
  const path = join(parent, input.handle);
@@ -52,7 +53,14 @@ export async function inspectMemoryForMigration(agentsRoot, input, journal) {
52
53
  && isLocalMemoryInitializationIdentity(state.identity, expectedLegacyInitialization));
53
54
  const serverBoundIdentity = state.identity.workspaceId === input.workspaceId
54
55
  && state.identity.machineId === input.machineId;
55
- const operationIdentityValid = state.origin === "initialized" ? localInitialization : serverBoundIdentity;
56
+ // initialized describes the source store, not who created the operation. Server-driven
57
+ // initialization uses protocol UUIDs and an intent receipt already validated above.
58
+ // Keep deterministic local IDs on the exact-match path, including legacy sentinels.
59
+ const serverInitialization = state.origin === "initialized" && serverBoundIdentity && state.intentReceipt !== undefined
60
+ && MemoryMigrationStartSchema.shape.migrationId.safeParse(state.identity.migrationId).success
61
+ && MemoryMigrationStartSchema.shape.executionId.safeParse(state.identity.executionId).success;
62
+ const operationIdentityValid = state.origin === "initialized"
63
+ ? localInitialization || serverInitialization : serverBoundIdentity;
56
64
  if (state.identity.rootFingerprint !== base.storageRootFingerprint
57
65
  || state.identity.ownerIdentity !== base.ownerIdentity
58
66
  || state.identity.agentId !== input.agentId || !operationIdentityValid) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowcrew/daemon",
3
- "version": "0.6.100-beta.1",
3
+ "version": "0.6.101-beta.1",
4
4
  "type": "module",
5
5
  "description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
6
6
  "license": "Apache-2.0",