letagents 0.11.0 → 0.11.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/dist/mcp/codenames.js +1 -1
- package/dist/mcp/local-state.js +6 -0
- package/package.json +1 -1
package/dist/mcp/codenames.js
CHANGED
|
@@ -135,7 +135,7 @@ export function normalizeAgentBaseName(input) {
|
|
|
135
135
|
// ---------------------------------------------------------------------------
|
|
136
136
|
export function hashStringToIndex(value, modulo) {
|
|
137
137
|
const digest = createHash("sha256").update(value).digest();
|
|
138
|
-
return digest.
|
|
138
|
+
return digest.readUInt32BE(0) % modulo;
|
|
139
139
|
}
|
|
140
140
|
export function codenameFromIndex(index) {
|
|
141
141
|
const normalizedIndex = ((index % AGENT_CODENAME_SPACE) + AGENT_CODENAME_SPACE) % AGENT_CODENAME_SPACE;
|
package/dist/mcp/local-state.js
CHANGED
|
@@ -157,6 +157,12 @@ export function getStoredAgentIdentity(identityKey) {
|
|
|
157
157
|
if (scoped) {
|
|
158
158
|
return scoped;
|
|
159
159
|
}
|
|
160
|
+
// For UUID-based identity keys, do NOT fall back to the shared global
|
|
161
|
+
// agent_identity — that would cause different processes to inherit each
|
|
162
|
+
// other's identity. Only legacy (non-UUID) keys use the global fallback.
|
|
163
|
+
if (identityKey.startsWith("instance:")) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
160
166
|
}
|
|
161
167
|
return state.agent_identity ?? null;
|
|
162
168
|
}
|