Frontmatter
| id | 8173 |
| title | Implement Unique App Worker Identification & Worker Topology |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | tobiu |
| createdAt | Dec 28, 2025, 3:24 PM |
| updatedAt | Dec 28, 2025, 4:30 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8173 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | 8169 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 28, 2025, 4:30 PM |
Implement Unique App Worker Identification & Worker Topology
tobiu added parent issue #8169 on Dec 28, 2025, 3:25 PM
tobiu assigned to @tobiu on Dec 28, 2025, 3:27 PM

tobiu
Dec 28, 2025, 3:53 PM
we enhanced core.Base to enable uids inside the static config block:
construct(config={}) {
let me = this;
Object.defineProperties(me, {
[configSymbol]: {
configurable: true,
enumerable : false,
value : {},
writable : true
},
[isInstance]: {
enumerable: false,
value : true
}
});
me.id = config.id || me.constructor.config.id || IdGenerator.getId(this.getIdKey());
delete config.id;
=> the ctor check is new.

tobiu
Dec 28, 2025, 4:29 PM
Input from Gemini 3:
✦ Implementation Complete
I have established the foundation for unique App Worker identification and topology discovery.
Changes:
- Core (
src/core/Base.mjs): Updatedconstructto allowstatic config.idto act as a fallback instance ID.- Worker (
src/worker/App.mjs):
- Set
idtocrypto.randomUUID()instatic config, ensuring every App Worker instance has a unique, persistent identity (appWorkerId).- Client (
src/ai/Client.mjs):
- Implemented
registerhandshake inonSocketOpen.- Sends
appWorkerId,isSharedWorker,userAgent, andenvironmentto the MCP Server.- Server (
ConnectionService.mjs):
- Renamed internal
windowIdtosessionIdto correctly reflect Socket semantics.- Implemented
sessionDatamap to store metadata fromregisterhandshake.- Implemented
getWorkerTopologytool to return the list of connected workers.- OpenAPI & Tools:
- Added
/worker/topologyendpoint.- Mapped
get_worker_topologyintoolService.mjs.Verification:
test_connection_service.mjspasses.- Server correctly initializes and listens.
Ready for review.
tobiu closed this issue on Dec 28, 2025, 4:30 PM
To correctly map the topology of a distributed Neo.mjs environment (multiple browsers, shared workers), App Workers need globally unique identifiers when connecting to the Neural Link.
Requirements:
id) on startup.Neo.ai.Clientto send aregisterpayload upon WebSocket connection, including:appWorkerIdisSharedWorkerbooleanuserAgentenvironmentappWorkerId(or map socket ID to this metadata).get_worker_topologyto list connected workers.