()
| 521 | } |
| 522 | |
| 523 | get nodeSecretVersion() { |
| 524 | this._resolveNodeSecret(); |
| 525 | const storeVersion = parseNodeSecretVersion(this.store.getState('node_secret_version')); |
| 526 | const storeSecret = this.store.getState('node_secret') || null; |
| 527 | const storeSource = this.store.getState('node_secret_source') || null; |
| 528 | const envSecret = this._effectiveEnvNodeSecret(); |
| 529 | const envVersion = parseNodeSecretVersion(process.env.A2A_NODE_SECRET_VERSION || process.env.EVOMAP_NODE_SECRET_VERSION); |
| 530 | const validStoreSecret = validNodeSecret(storeSecret); |
| 531 | if (this._suppressEnvSecret) return validStoreSecret ? storeVersion : null; |
| 532 | if (storeSource === 'hub_rotate' && validStoreSecret) return storeVersion; |
| 533 | if (envSecret) { |
| 534 | if (envVersion) return envVersion; |
| 535 | return storeSecret === envSecret ? storeVersion : null; |
| 536 | } |
| 537 | return validStoreSecret ? storeVersion : null; |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * Resolve the active node_secret with conflict reconciliation between the |
nothing calls this directly
no test coverage detected