Repository navigation
Closed
Labels
Description
Overview
Make SchemaNode one wire type that the store fills in, carrying relationships, extends, abstract and the structural rules, and type the schema operation parameters (ADR-086 §1).
Problem Statement
- Two
SchemaNodestructs.- Core's
packages/core/src/models/schema_node.rsarrives with emptyrelationshipsafterfrom_node; the store loads them from therelationshiptable separately, andhandle_update_schemare-attaches them by hand. - The wire
SchemaNode(packages/nodespace-types/src/schema.rs) readsrelationshipsfromproperties. The daemon smuggles them there to make that work.
- Core's
extendsis lost. Neither struct carries it, soextends(ADR-078) drops out of the typed schema conversion. TypeScript'sSchemaNodehas neitherrelationshipsnorextends.- A field that's always empty. The wire
SchemaNode.descriptionis always empty; the description is the schema node's child subtree. - Untyped parameters. The schema operation parameters travel as raw JSON on the RPC (
handle_*_schema(Value)).
Proposed Solution
- One
SchemaNodeinnodespace-types, withfields,relationships,extends,abstract, the structural rules (ADR-089) and the envelope. Delete core's struct. - The store fills
relationshipsandextendsfrom the relationship table on read and writes them back on save. Nothing is smuggled throughproperties. - Drop
SchemaNode.description. CreateSchemaParams/UpdateSchemaParamsbecome wire types innodespace-types; the RPCs carry them typed.- The daemon returns the typed
SchemaNode.
Architecture Impact
Implements decisions/086-core-node-types-defined-once-typed-by-category.md §1 ("SchemaNode is the case this settles") and §6 (abstract), with ADR-070 (relationship declarations are edges) and ADR-078 (extends).
Acceptance Criteria
- One
SchemaNodetype exists, innodespace-types;packages/core/src/models/schema_node.rsholds no struct - Reading a schema returns its
relationshipsandextendspopulated, on every surface: core, daemon, Tauri, dev-proxy and TypeScript (tests) - No schema relationship is written to or read from
properties -
SchemaNode.descriptionis gone - The schema operation parameters are typed end to end
- Follows
development/node-type-sequence.md; thenode-types.mdschema sheet updated in the same PR -
bun run test:changedpasses;bun run quality:fixclean -
schema getandschema updateagree on wheretitle_templatelives: the typedSchemaNodecarries it as one field, read and written in the same place (todayupdatetakestitle_templateandgetreturnsproperties.titleTemplate)
Technical Specifications
Reference Files
packages/nodespace-types/src/schema.rspackages/core/src/models/schema_node.rs,packages/core/src/models/schema.rspackages/core/src/services/node_service/schema.rs(handle_*_schema)packages/core/src/db/sqlite_store/relationships.rs(declaration edges)packages/daemon/src/services/node_service.rs,packages/proto/proto/node_service.proto
Dependencies
Non-Goals
- Changing what a schema can declare, beyond
abstractand the structural rules
Activity
malibio commentedon Oct 2, 2026
Baseline — Frontend: 303 test files passed, 5559 tests passed
malibio commentedon Oct 2, 2026
Node-type sequence classification:
schemais a concrete core type (the meta-type), category Structured (nestedSchemaField/SchemaRelationship). State placement: the fields,abstract, the structural rules and the templates stay on the schema node's row;relationshipsandextendsstay declaration edges in the relationship table (ADR-070, ADR-078) and are filled into the one wireSchemaNodeby the store. No new field, relationship or rule is added;SchemaNode.descriptionis removed.Make SchemaNode one wire type that the store fills, with extends and …
Make SchemaNode one wire type that the store fills, with extends and …