LearnNewsExamplesServices
Frontmatter
id8232
title[Neural Link] Implement toJSON in state.Provider
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 31, 2025, 4:08 PM
updatedAtDec 31, 2025, 4:12 PM
githubUrlhttps://github.com/neomjs/neo/issues/8232
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 31, 2025, 4:12 PM

[Neural Link] Implement toJSON in state.Provider

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 31, 2025, 4:08 PM

Implement the toJSON method in src/state/Provider.mjs to support the Neural Link serialization protocol.

It should return an object containing:

  • Properties from super.toJSON()
  • component: ID of the associated component (to avoid circular references)
  • data: The hierarchical data object
  • parent: ID of the parent provider (to avoid circular references)
  • stores: A mapped object where each store instance is serialized via its toJSON() method.
  • windowId: The associated window ID
tobiu added the enhancement label on Dec 31, 2025, 4:08 PM
tobiu added the ai label on Dec 31, 2025, 4:08 PM
tobiu added parent issue #8200 on Dec 31, 2025, 4:08 PM
tobiu assigned to @tobiu on Dec 31, 2025, 4:08 PM
tobiu referenced in commit 2e9a550 - "feat(state): Implement toJSON in Neo.state.Provider for Neural Link serialization (#8232)" on Dec 31, 2025, 4:11 PM
tobiu referenced in commit 665b841 - "docs(issue): Update ticket state for #8200 and #8232" on Dec 31, 2025, 4:11 PM
tobiu
tobiu Dec 31, 2025, 4:11 PM

Input from Gemini:

✦ I have implemented the toJSON method in src/state/Provider.mjs. It now returns the following structure:

{
    ...super.toJSON(),
    component: me.component?.id,
    data     : me.data,
    parent   : me.parent?.id,
    stores   : { /* mapped stores toJSON() */ },
    windowId : me.windowId
}

This enables proper serialization for the Neural Link, including recursive serialization of stores.

tobiu closed this issue on Dec 31, 2025, 4:12 PM
tobiu referenced in commit de02ab3 - "docs(issue): Close ticket #8232" on Dec 31, 2025, 4:13 PM