MCPcopy Create free account
hub / github.com/EvoMap/evolver / captureNodeIdentity

Function captureNodeIdentity

src/gep/localStateAwareness.js:60–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60function captureNodeIdentity() {
61 const lines = [];
62
63 const nodeId = process.env.A2A_NODE_ID || _readFileSafe(_nodeIdFile());
64 if (nodeId) {
65 lines.push('- Node ID: ' + nodeId + ' (REGISTERED -- do NOT re-register)');
66 } else {
67 lines.push('- Node ID: NOT SET (registration may be needed)');
68 }
69
70 const localNodeIdFile = path.join(getRepoRoot(), '.evomap_node_id');
71 if (!nodeId && _fileExists(localNodeIdFile)) {
72 const localId = _readFileSafe(localNodeIdFile);
73 if (localId) {
74 lines.push('- Local node_id fallback: ' + localId + ' (found at ' + localNodeIdFile + ')');
75 }
76 }
77
78 const hasSecret = !!process.env.A2A_NODE_SECRET || _fileExists(_nodeSecretFile());
79 if (hasSecret) {
80 lines.push('- Node Secret: PRESENT (authenticated -- do NOT request new secret)');
81 } else {
82 lines.push('- Node Secret: MISSING (hello handshake may be needed)');
83 }
84
85 return lines;
86}
87
88function captureEnvConfig() {
89 const lines = [];

Callers 2

captureLocalStateFunction · 0.85

Calls 5

_readFileSafeFunction · 0.85
_nodeIdFileFunction · 0.85
getRepoRootFunction · 0.85
_fileExistsFunction · 0.85
_nodeSecretFileFunction · 0.85

Tested by

no test coverage detected