Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// import cycle (cli.ts imports the daemon entry point).

import { DEFAULT_AGENT_NAME } from './genaiSpans.js';
import { createHash } from 'crypto';
import { sha256Hex } from './utils.js';
import type { Settings } from './setup.js';

/** Where a resolved value came from, for user-facing "source" reporting. */
Expand Down Expand Up @@ -131,8 +131,6 @@ const CONFIG_FINGERPRINT_LENGTH = 16;
/** Short, stable hash of a daemon config. The API key is hashed, not exposed,
* so the fingerprint is safe to send over the socket. */
export function daemonConfigFingerprint(c: DaemonConfig): string {
return createHash('sha256')
.update(JSON.stringify([c.weaveProject, c.apiKey, c.baseUrl, c.agentName, c.debug]))
.digest('hex')
return sha256Hex(JSON.stringify([c.weaveProject, c.apiKey, c.baseUrl, c.agentName, c.debug]))
.slice(0, CONFIG_FINGERPRINT_LENGTH);
}
Loading
Loading