[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FCRFSAMJKBQJTRR05KZ47":3,"skill-same:01M78FCRFSAMJKBQJTRR05KZ47":184},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M78FCRFSAMJKBQJTRR05KZ47","model-runtime",null,"Use when loading a generated domain model (model.js from @jeswr\u002Ffederation-codegen), calling defineModel on a shape-manifest, reading or writing pod RDF through generated entities, or changing the audited guard set in @jeswr\u002Fmodel-runtime.","jeswr\u002Fsolid-sdk","jeswr","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F63333554?v=4","01M78F8AE112CQ0KHFC3R0Z8SJ","Jesse Wright","01M78F8AERJX4YWDA1S4BMF74V",2,"MIT","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: model-runtime\ndescription: Use when loading a generated domain model (model.js from @jeswr\u002Ffederation-codegen), calling defineModel on a shape-manifest, reading or writing pod RDF through generated entities, or changing the audited guard set in @jeswr\u002Fmodel-runtime.\n---\n\u003C!-- AUTHORED-BY Codex GPT-6 -->\n\u003C!-- AUTHORED-BY Codex (GPT-6.1 Sol) -->\n\u003C!-- AUTHORED-BY Claude Opus 5.5 -->\n\u003C!-- AUTHORED-BY Codex GPT-6 -->\n\n# Generated-model runtime\n\n`@jeswr\u002Fmodel-runtime` lives in `packages\u002Fmodel-runtime` and is security-critical. It is the\none interpreter for every generated domain model: a generated `model.js` inlines a JSON\nshape-manifest and calls `defineModel(manifest)`; all behaviour lives here.\n\n```ts\nimport model, { entities } from \".\u002Fgenerated\u002Fmodel.js\"; \u002F\u002F emitted by federation-codegen\n\nconst bookmark = entities.Bookmark;\nconst store = bookmark.build(resourceUrl, { url: \"https:\u002F\u002Fexample.org\u002Fa\" }); \u002F\u002F n3 Store\nconst data = bookmark.parse(resourceUrl, dataset);      \u002F\u002F object | undefined (fail-closed)\nconst ttl = await bookmark.serialize(resourceUrl, data); \u002F\u002F n3.Writer Turtle\nconst parsed = await bookmark.parseDocument(resourceUrl, body, contentType); \u002F\u002F via @jeswr\u002Ffetch-rdf\nconst w = new bookmark.Wrapper(bookmark.subject(resourceUrl), store, DataFactory);\n```\n\nMulti-subject scans should use a parse scope from `@jeswr\u002Fmodel-runtime`:\n\n```ts\nimport { createParseScope } from \"@jeswr\u002Fmodel-runtime\";\n\nconst scope = createParseScope(dataset, { maxClassReads: 100_000 });\nfor (const url of resourceUrls) bookmark.parse(url, dataset, { scope });\nif (scope.exhausted) throw new Error(\"Class scan budget exhausted\");\n```\n\nThe scope memoises membership by (class term, required-class set) and shares one raw\ntype\u002Fsubclass read budget across all root and nested `sh:class` checks. The default is\n100,000 reads; `maxClassReads` accepts integers 0–1,000,000 and rejects other values with\n`RangeError`. Once another read would exceed the budget, `scope.exhausted` stays true and\nall later class checks fail closed, including cached successes. Nested checks retain normal\nrequired\u002Foptional grading. Reuse with another dataset throws `TypeError`.\nDiscard scopes after ANY dataset mutation; the memo is valid only for an unchanged dataset.\nBuild, setters, live sets and `mark` never consult scopes. Without `parse(..., { scope })`,\nthe existing per-check 10,000-read behavior is unchanged. `parseDocument` owns a new dataset\nand does not accept a scope; scopes are for `parse` on existing datasets.\n\n## Rules\n\n- Never hand-write a manifest for production use. Manifests come from `federation-codegen`,\n  whose fidelity assertion proves every field traces to `shapes.ttl` or the committed config.\n- Keep generated artifacts data-only. A manifest must never carry code, regex source,\n  templates or path expressions; `validateManifest` rejects unknown keys and enforces caps.\n- All emission goes through `src\u002Frdf.ts`'s `serializeTurtle`, after alias migration.\n  Immediately before `n3.Writer`, reject unsafe NamedNodes in subject, predicate,\n  object and graph positions, literal datatype IRIs, prefix namespaces, and prefix\n  labels outside Turtle `PN_PREFIX` (the empty default prefix is allowed).\n  Recheck mutable manifests; never escape or canonicalize an unsafe identity.\n  Reject unsupported term kinds (including Variable\u002FQuad), invalid RDF positions,\n  invalid Turtle blank-node labels and malformed BCP 47 language tags. Re-parse\n  buffered output and check the same quad set, including literal identity and a\n  known blank-node bijection, before returning it; failure throws `TypeError`.\n- Resource URLs and every derived subject pass `isSafeAbsoluteIri` without rewriting\n  their lexical identity. `subject`, `build`, `serialize`, and direct `Wrapper`\n  construction throw `TypeError` on an unsafe or relative IRI; `parse` and\n  `parseDocument` return `undefined` (before parsing an unsafe document base).\n  Wrappers accept strings or safe absolute NamedNodes; other term kinds throw `TypeError`.\n  `storeToTurtle` also throws `TypeError` for unsafe NamedNodes and datatype IRIs\n  anywhere in the emitted graph. Public `types.add` rejects unsafe IRIs before insertion.\n  The exported `subjectIri(resourceUrl, fragment?)` validates both the resource and\n  the minted subject; flat, composite, and generated per-node handles use it.\n  Reject instead of escaping: `rdf-serialize`'s `escapeIri` percent-encodes forbidden\n  characters and changes identity, while `n3.Writer` does not validate IRIREF safety.\n- Every IRI field with `iriScheme: \"http-https\"` or `iriScheme: \"https\"` goes through `httpIriOrUndefined` on read\n  and write. On reads, first validate SHACL constraints on the original RDF term's exact\n  lexical spelling; normalization only projects an already-admitted value. IRI enum members\n  retain their exact identity on reads and writes; the scheme filter checks but never\n  rewrites them. Do not widen schemes without a new reviewed guard.\n- A Violation-graded MUST (`requiredFailClosed`) rejects the whole record on parse when\n  missing, malformed, ambiguous, or outside its set cardinality bounds. At the root,\n  optional fields drop and optional sets retain valid members. Nested validation checks all\n  present values before projection. Required sets also reject any invalid raw member.\n- build does not enforce requiredFailClosed: missing or invalid values are dropped and a\n  typed shell may be returned. This preserves the bookmark facade's write contract. Parse\n  the built store and require a defined result before publishing it if MUST validation is needed.\n- Closed `in` enums are enforced on reads, build, setters and live-set adds. Invalid enum\n  values drop, consistently with other invalid writes; they do not throw.\n  Reads compare raw literal lexical forms and datatypes against canonical enum\n  terms before mapping to JS values. Decimal\u002Finteger readers reject precision loss\n  by comparing canonical decimal spellings before\u002Fafter JS number conversion.\n  String-subtype lexical validators run on raw values on reads and writes; never\n  sanitize an invalid lexical form into a valid one.\n- Read aliases are optional `aliasTypeIris` on flat entities\u002Fcomposite nodes and ordered\n  `aliasPredicates` on flat fields (at most four distinct, Turtle-safe absolute http(s) IRIs per key).\n  They exclude canonical IRIs; predicate aliases cannot overlap any canonical\u002Falias\n  predicate across the manifest. A canonical predicate shared across owners must have no\n  aliases on any owner; co-typing means disjoint focus sets cannot be proved.\n  `rdf:type` and structural link predicates are reserved\n  from flat fields and all aliases. Type aliases cannot overlap any canonical type or\n  another owner's alias. `nested` links reject aliases, including empty arrays.\n- Singleton reads guard the canonical value first, then aliases in order; only `undefined`\n  falls back (`false`, `0`, and `\"\"` win). Defaults require all predicates to be absent,\n  cannot satisfy `requiredFailClosed`, and never apply with `maxCount: 0`.\n  Each predicate checks distinct raw terms and maxCount before mapping: ambiguity or a\n  cardinality violation drops the field without alias fallback; a required field rejects.\n  Sets expose the guarded union; parse checks raw-union maxCount and guarded raw-term-union\n  minCount before deduplicating the JS projection. Required sets reject invalid raw members.\n  Reads never mutate. Singleton migration preserves the raw term selected by canonical-first\n  reads; set serialization and live-set mutations migrate all retained guard-passing raw terms.\n  Keep exact lexical forms, datatypes, IRI spellings and raw cardinality, even for terms with\n  equal JS projections. Revalidate raw terms, never re-project and rewrite retained values.\n  Retained text is not sanitized during migration; explicitly supplied API values still pass\n  through JS write guards and sanitization. Setters clear aliases even on `undefined`\u002Finvalid\n  input; `mark` clears explicit alias types. Serialization migrates aliases in a copy only\n  at their owning shape's focus nodes: recognised entity roots (including data-graph\n  subclasses) and composite nodes reached through bounded, unambiguous links satisfying\n  explicit link classes. Determine all ownership against the original data before any\n  mutation. Preserve unrelated subjects and unreached composite nodes, including their\n  alias predicates\u002Ftypes. Preserve subclass type assertions and never add target types\n  to untyped children during migration.\n- After serialization migration, re-parse every previously recognised entity and node\n  projection, including unreached typed nodes and reached untyped child focuses. Require\n  identical recognition and parsed results; throw exported `MigrationError` before emission\n  on any change, including an invalid-record repair or a newly exposed default. Bound all\n  candidate scans, class walks and re-parse reads\u002Fvisits with a shared 10,000 budget; exhaustion\n  throws the same typed error.\n- Every write that can migrate aliases (build, singleton setters, live-set add\u002Fdelete\u002Fclear,\n  `mark()`, `storeToTurtle`, `serialize`) runs the SAME checked migration on a copy BEFORE the explicit\n  change; on `MigrationError` the live dataset is unchanged. Setters\u002Fbuild\u002Fmark may skip\n  the migration copy and audit only when the written field has no predicate aliases (or\n  mark has no type aliases) AND no other owner in any migration-context manifest has aliases.\n  This makes alias-free writes independent of unrelated dataset size without bypassing\n  field guards or sanitization. Treat other owners conservatively: data-graph subclasses\n  and co-typing prevent assuming disjoint focus nodes. Alias-bearing writes keep the\n  existing audit, preservation checks and shared 10,000-read budget.\n  Generated per-node views pass the owning manifest as `defineModel(views, { migrationManifest })`\n  so their checks see the full model. The primary manifest's own preservation checks always\n  still run alongside, so the option can only add context, never drop a check.\n- Nested links carry their own `minCount`, independent of root requiredness and severity:\n  inside strict `sh:node` validation an absent link below its minimum makes the child fail. Before deleting alias types, materialise satisfied explicit\n  link classes on affected subjects, preserving ancestry proofs as builds do.\n- Deliberate G5 migration exception (root reads): for singleton `sh:alternativePath` fields, SHACL\n  counts the union for `maxCount`, but runtime reads resolve canonical-first. A stale\n  conflicting alias beside a valid canonical value can therefore parse even when the\n  emitted SHACL rejects that union's cardinality. This preserves the reviewed bookmark\n  oracle. Writes are canonical-only and clear aliases, so the runtime never produces\n  that conflicting data at the migrated field's focus nodes.\n- Composite entities graph-walk exact link terms from the root; never assume fragments.\n  Count distinct raw object terms of every kind before filtering NamedNodes; more\n  than one rejects a required link's record or drops an optional link's whole subtree.\n  A linked NamedNode must be an absolute http(s) IRI without IRIREF-forbidden characters.\n  Follow that exact term without URL canonicalisation; an unsafe required link rejects\n  the record and an optional link drops its subtree.\n- Retain a composite link's `sh:class` as `hasClass`. Check the linked subject's actual\n  `rdf:type` values and `rdfs:subClassOf*` chains in the data graph, never the build-time\n  ontology. Without a parse scope, bound traversal to 10,000 raw reads per link and track visited class terms;\n  absence, cycles without membership, and budget exhaustion fail the link closed with its\n  required\u002Foptional grading. Node-type recognition (flat entities, composite roots,\n  and per-node wrappers) uses the same bounded walk to any canonical or alias target class,\n  with one 10,000 raw-read budget across the accepted classes. Never add or delete subclass\n  `rdf:type` assertions during recognition or serialization; `mark` retains its existing\n  explicit alias-to-canonical type migration. Builds assert the explicit link class on\n  materialised children. For composite children, validate the property constraints without\n  requiring the child shape's target type: `sh:targetClass` selects focus nodes,\n  while `sh:node` applies the child constraints directly. Every present child value must\n  satisfy its property constraints, even optional fields or deeper optional links. Absent\n  values obey the property's minimum. Check the raw path union for nested conformance before\n  canonical-first projection. A failed child rejects a required incoming link or drops an\n  optional root link's subtree. Root field parsing retains its drop-invalid-optional policy.\n  Explicit `hasClass` still applies. `classOnly: true` records `sh:class` without `sh:node`;\n  require `hasClass` to equal the child's sole canonical target class exactly. The strict\n  every-present-value rule applies to `sh:node` children only. A class-only child is its own\n  class-targeted focus node, so it parses with the root policy: its optional failures\n  (ambiguous optional links, malformed optional values) drop only that field, and only its\n  required fail-closed constraints reject it.\n  Reject a link whose `hasClass` names a type alias owned by ANY entity or node in the\n  manifest, including optional links: type migration can delete that assertion.\n- Domain policy the schema cannot express (network fetches, SSRF policy, reconciliation)\n  belongs in the consuming package's facade, not in this runtime.\n- Changes here are security-critical: add an adversarial test that fails before the fix.\n\n## Exports\n\n`defineModel`, `createParseScope`, `ParseScope`, `ParseScopeOptions`, `ParseOptions`,\n`validateManifest`, `ManifestError`, `MigrationError`, `MANIFEST_VERSION`, `RUNTIME_MAJOR`,\nmanifest types, and the shared guards `httpIriOrUndefined`, `isHttpIri`, `sanitizeText`,\n`tryRead`, `isSafeAbsoluteIri`, `isTurtlePrefixName`, `subjectIri`, the strict RDF\u002FJS `readLiteral` reader, plus the XSD datatype\nmappers. Packages migrating off hand-written models may reuse the guards so their filter\nbehaviour stays byte-identical.\n","\u003C!-- AUTHORED-BY Codex GPT-6 -->\n\u003C!-- AUTHORED-BY Codex (GPT-6.1 Sol) -->\n\u003C!-- AUTHORED-BY Claude Opus 5.5 -->\n\u003C!-- AUTHORED-BY Codex GPT-6 -->\n\n# Generated-model runtime\n\n`@jeswr\u002Fmodel-runtime` lives in `packages\u002Fmodel-runtime` and is security-critical. It is the\none interpreter for every generated domain model: a generated `model.js` inlines a JSON\nshape-manifest and calls `defineModel(manifest)`; all behaviour lives here.\n\n```ts\nimport model, { entities } from \".\u002Fgenerated\u002Fmodel.js\"; \u002F\u002F emitted by federation-codegen\n\nconst bookmark = entities.Bookmark;\nconst store = bookmark.build(resourceUrl, { url: \"https:\u002F\u002Fexample.org\u002Fa\" }); \u002F\u002F n3 Store\nconst data = bookmark.parse(resourceUrl, dataset);      \u002F\u002F object | undefined (fail-closed)\nconst ttl = await bookmark.serialize(resourceUrl, data); \u002F\u002F n3.Writer Turtle\nconst parsed = await bookmark.parseDocument(resourceUrl, body, contentType); \u002F\u002F via @jeswr\u002Ffetch-rdf\nconst w = new bookmark.Wrapper(bookmark.subject(resourceUrl), store, DataFactory);\n```\n\nMulti-subject scans should use a parse scope from `@jeswr\u002Fmodel-runtime`:\n\n```ts\nimport { createParseScope } from \"@jeswr\u002Fmodel-runtime\";\n\nconst scope = createParseScope(dataset, { maxClassReads: 100_000 });\nfor (const url of resourceUrls) bookmark.parse(url, dataset, { scope });\nif (scope.exhausted) throw new Error(\"Class scan budget exhausted\");\n```\n\nThe scope memoises membership by (class term, required-class set) and shares one raw\ntype\u002Fsubclass read budget across all root and nested `sh:class` checks. The default is\n100,000 reads; `maxClassReads` accepts integers 0–1,000,000 and rejects other values with\n`RangeError`. Once another read would exceed the budget, `scope.exhausted` stays true and\nall later class checks fail closed, including cached successes. Nested checks retain normal\nrequired\u002Foptional grading. Reuse with another dataset throws `TypeError`.\nDiscard scopes after ANY dataset mutation; the memo is valid only for an unchanged dataset.\nBuild, setters, live sets and `mark` never consult scopes. Without `parse(..., { scope })`,\nthe existing per-check 10,000-read behavior is unchanged. `parseDocument` owns a new dataset\nand does not accept a scope; scopes are for `parse` on existing datasets.\n\n## Rules\n\n- Never hand-write a manifest for production use. Manifests come from `federation-codegen`,\n  whose fidelity assertion proves every field traces to `shapes.ttl` or the committed config.\n- Keep generated artifacts data-only. A manifest must never carry code, regex source,\n  templates or path expressions; `validateManifest` rejects unknown keys and enforces caps.\n- All emission goes through `src\u002Frdf.ts`'s `serializeTurtle`, after alias migration.\n  Immediately before `n3.Writer`, reject unsafe NamedNodes in subject, predicate,\n  object and graph positions, literal datatype IRIs, prefix namespaces, and prefix\n  labels outside Turtle `PN_PREFIX` (the empty default prefix is allowed).\n  Recheck mutable manifests; never escape or canonicalize an unsafe identity.\n  Reject unsupported term kinds (including Variable\u002FQuad), invalid RDF positions,\n  invalid Turtle blank-node labels and malformed BCP 47 language tags. Re-parse\n  buffered output and check the same quad set, including literal identity and a\n  known blank-node bijection, before returning it; failure throws `TypeError`.\n- Resource URLs and every derived subject pass `isSafeAbsoluteIri` without rewriting\n  their lexical identity. `subject`, `build`, `serialize`, and direct `Wrapper`\n  construction throw `TypeError` on an unsafe or relative IRI; `parse` and\n  `parseDocument` return `undefined` (before parsing an unsafe document base).\n  Wrappers accept strings or safe absolute NamedNodes; other term kinds throw `TypeError`.\n  `storeToTurtle` also throws `TypeError` for unsafe NamedNodes and datatype IRIs\n  anywhere in the emitted graph. Public `types.add` rejects unsafe IRIs before insertion.\n  The exported `subjectIri(resourceUrl, fragment?)` validates both the resource and\n  the minted subject; flat, composite, and generated per-node handles use it.\n  Reject instead of escaping: `rdf-serialize`'s `escapeIri` percent-encodes forbidden\n  characters and changes identity, while `n3.Writer` does not validate IRIREF safety.\n- Every IRI field with `iriScheme: \"http-https\"` or `iriScheme: \"https\"` goes through `httpIriOrUndefined` on read\n  and write. On reads, first validate SHACL constraints on the original RDF term's exact\n  lexical spelling; normalization only projects an already-admitted value. IRI enum members\n  retain their exact identity on reads and writes; the scheme filter checks but never\n  rewrites them. Do not widen schemes without a new reviewed guard.\n- A Violation-graded MUST (`requiredFailClosed`) rejects the whole record on parse when\n  missing, malformed, ambiguous, or outside its set cardinality bounds. At the root,\n  optional fields drop and optional sets retain valid members. Nested validation checks all\n  present values before projection. Required sets also reject any invalid raw member.\n- build does not enforce requiredFailClosed: missing or invalid values are dropped and a\n  typed shell may be returned. This preserves the bookmark facade's write contract. Parse\n  the built store and require a defined result before publishing it if MUST validation is needed.\n- Closed `in` enums are enforced on reads, build, setters and live-set adds. Invalid enum\n  values drop, consistently with other invalid writes; they do not throw.\n  Reads compare raw literal lexical forms and datatypes against canonical enum\n  terms before mapping to JS values. Decimal\u002Finteger readers reject precision loss\n  by comparing canonical decimal spellings before\u002Fafter JS number conversion.\n  String-subtype lexical validators run on raw values on reads and writes; never\n  sanitize an invalid lexical form into a valid one.\n- Read aliases are optional `aliasTypeIris` on flat entities\u002Fcomposite nodes and ordered\n  `aliasPredicates` on flat fields (at most four distinct, Turtle-safe absolute http(s) IRIs per key).\n  They exclude canonical IRIs; predicate aliases cannot overlap any canonical\u002Falias\n  predicate across the manifest. A canonical predicate shared across owners must have no\n  aliases on any owner; co-typing means disjoint focus sets cannot be proved.\n  `rdf:type` and structural link predicates are reserved\n  from flat fields and all aliases. Type aliases cannot overlap any canonical type or\n  another owner's alias. `nested` links reject aliases, including empty arrays.\n- Singleton reads guard the canonical value first, then aliases in order; only `undefined`\n  falls back (`false`, `0`, and `\"\"` win). Defaults require all predicates to be absent,\n  cannot satisfy `requiredFailClosed`, and never apply with `maxCount: 0`.\n  Each predicate checks distinct raw terms and maxCount before mapping: ambiguity or a\n  cardinality violation drops the field without alias fallback; a required field rejects.\n  Sets expose the guarded union; parse checks raw-union maxCount and guarded raw-term-union\n  minCount before deduplicating the JS projection. Required sets reject invalid raw members.\n  Reads never mutate. Singleton migration preserves the raw term selected by canonical-first\n  reads; set serialization and live-set mutations migrate all retained guard-passing raw terms.\n  Keep exact lexical forms, datatypes, IRI spellings and raw cardinality, even for terms with\n  equal JS projections. Revalidate raw terms, never re-project and rewrite retained values.\n  Retained text is not sanitized during migration; explicitly supplied API values still pass\n  through JS write guards and sanitization. Setters clear aliases even on `undefined`\u002Finvalid\n  input; `mark` clears explicit alias types. Serialization migrates aliases in a copy only\n  at their owning shape's focus nodes: recognised entity roots (including data-graph\n  subclasses) and composite nodes reached through bounded, unambiguous links satisfying\n  explicit link classes. Determine all ownership against the original data before any\n  mutation. Preserve unrelated subjects and unreached composite nodes, including their\n  alias predicates\u002Ftypes. Preserve subclass type assertions and never add target types\n  to untyped children during migration.\n- After serialization migration, re-parse every previously recognised entity and node\n  projection, including unreached typed nodes and reached untyped child focuses. Require\n  identical recognition and parsed results; throw exported `MigrationError` before emission\n  on any change, including an invalid-record repair or a newly exposed default. Bound all\n  candidate scans, class walks and re-parse reads\u002Fvisits with a shared 10,000 budget; exhaustion\n  throws the same typed error.\n- Every write that can migrate aliases (build, singleton setters, live-set add\u002Fdelete\u002Fclear,\n  `mark()`, `storeToTurtle`, `serialize`) runs the SAME checked migration on a copy BEFORE the explicit\n  change; on `MigrationError` the live dataset is unchanged. Setters\u002Fbuild\u002Fmark may skip\n  the migration copy and audit only when the written field has no predicate aliases (or\n  mark has no type aliases) AND no other owner in any migration-context manifest has aliases.\n  This makes alias-free writes independent of unrelated dataset size without bypassing\n  field guards or sanitization. Treat other owners conservatively: data-graph subclasses\n  and co-typing prevent assuming disjoint focus nodes. Alias-bearing writes keep the\n  existing audit, preservation checks and shared 10,000-read budget.\n  Generated per-node views pass the owning manifest as `defineModel(views, { migrationManifest })`\n  so their checks see the full model. The primary manifest's own preservation checks always\n  still run alongside, so the option can only add context, never drop a check.\n- Nested links carry their own `minCount`, independent of root requiredness and severity:\n  inside strict `sh:node` validation an absent link below its minimum makes the child fail. Before deleting alias types, materialise satisfied explicit\n  link classes on affected subjects, preserving ancestry proofs as builds do.\n- Deliberate G5 migration exception (root reads): for singleton `sh:alternativePath` fields, SHACL\n  counts the union for `maxCount`, but runtime reads resolve canonical-first. A stale\n  conflicting alias beside a valid canonical value can therefore parse even when the\n  emitted SHACL rejects that union's cardinality. This preserves the reviewed bookmark\n  oracle. Writes are canonical-only and clear aliases, so the runtime never produces\n  that conflicting data at the migrated field's focus nodes.\n- Composite entities graph-walk exact link terms from the root; never assume fragments.\n  Count distinct raw object terms of every kind before filtering NamedNodes; more\n  than one rejects a required link's record or drops an optional link's whole subtree.\n  A linked NamedNode must be an absolute http(s) IRI without IRIREF-forbidden characters.\n  Follow that exact term without URL canonicalisation; an unsafe required link rejects\n  the record and an optional link drops its subtree.\n- Retain a composite link's `sh:class` as `hasClass`. Check the linked subject's actual\n  `rdf:type` values and `rdfs:subClassOf*` chains in the data graph, never the build-time\n  ontology. Without a parse scope, bound traversal to 10,000 raw reads per link and track visited class terms;\n  absence, cycles without membership, and budget exhaustion fail the link closed with its\n  required\u002Foptional grading. Node-type recognition (flat entities, composite roots,\n  and per-node wrappers) uses the same bounded walk to any canonical or alias target class,\n  with one 10,000 raw-read budget across the accepted classes. Never add or delete subclass\n  `rdf:type` assertions during recognition or serialization; `mark` retains its existing\n  explicit alias-to-canonical type migration. Builds assert the explicit link class on\n  materialised children. For composite children, validate the property constraints without\n  requiring the child shape's target type: `sh:targetClass` selects focus nodes,\n  while `sh:node` applies the child constraints directly. Every present child value must\n  satisfy its property constraints, even optional fields or deeper optional links. Absent\n  values obey the property's minimum. Check the raw path union for nested conformance before\n  canonical-first projection. A failed child rejects a required incoming link or drops an\n  optional root link's subtree. Root field parsing retains its drop-invalid-optional policy.\n  Explicit `hasClass` still applies. `classOnly: true` records `sh:class` without `sh:node`;\n  require `hasClass` to equal the child's sole canonical target class exactly. The strict\n  every-present-value rule applies to `sh:node` children only. A class-only child is its own\n  class-targeted focus node, so it parses with the root policy: its optional failures\n  (ambiguous optional links, malformed optional values) drop only that field, and only its\n  required fail-closed constraints reject it.\n  Reject a link whose `hasClass` names a type alias owned by ANY entity or node in the\n  manifest, including optional links: type migration can delete that assertion.\n- Domain policy the schema cannot express (network fetches, SSRF policy, reconciliation)\n  belongs in the consuming package's facade, not in this runtime.\n- Changes here are security-critical: add an adversarial test that fails before the fix.\n\n## Exports\n\n`defineModel`, `createParseScope`, `ParseScope`, `ParseScopeOptions`, `ParseOptions`,\n`validateManifest`, `ManifestError`, `MigrationError`, `MANIFEST_VERSION`, `RUNTIME_MAJOR`,\nmanifest types, and the shared guards `httpIriOrUndefined`, `isHttpIri`, `sanitizeText`,\n`tryRead`, `isSafeAbsoluteIri`, `isTurtlePrefixName`, `subjectIri`, the strict RDF\u002FJS `readLiteral` reader, plus the XSD datatype\nmappers. Packages migrating off hand-written models may reuse the guards so their filter\nbehaviour stays byte-identical.\n",{"name":5,"description":7},"main","5482abfe2666cc12f835fe360e8fad1f1e1dea8c","packages\u002Fmodel-runtime",0,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk","https:\u002F\u002Fgithub.com\u002Fjeswr","jeswr.org\u002F#me","@solid Lead @theodi | PhD Candidate @OxfordHCC\r\n\r\n","2026-11-15 05:20:24",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add jeswr\u002Fsolid-sdk --skill model-runtime",{"tool":40,"command":41},"bunx","bunx skills add jeswr\u002Fsolid-sdk --skill model-runtime",{"tool":43,"command":44},"pnpm","pnpm dlx skills add jeswr\u002Fsolid-sdk --skill model-runtime","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002FSKILL.md",true,[48,52,58,62,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180],{"path":49,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":16},"LICENSE","许可证",1069,{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"package.json","REFERENCE","参考文档",1693,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fpackage.json",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"README.md",18797,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002FREADME.md",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"src\u002Faliases.test.ts","SCRIPT","脚本",23669,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Faliases.test.ts",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"src\u002Fcomposite.test.ts",35537,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fcomposite.test.ts",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"src\u002Fdatatypes.ts",29002,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fdatatypes.ts",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"src\u002Fdatetime.test.ts",22698,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fdatetime.test.ts",{"path":81,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":82,"sourceHtmlUrl":83},"src\u002Fguards.test.ts",3683,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fguards.test.ts",{"path":85,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":86,"sourceHtmlUrl":87},"src\u002Fguards.ts",8210,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fguards.ts",{"path":89,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":90,"sourceHtmlUrl":91},"src\u002Findex.ts",2227,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Findex.ts",{"path":93,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":94,"sourceHtmlUrl":95},"src\u002Fmanifest.test.ts",3842,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fmanifest.test.ts",{"path":97,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":98,"sourceHtmlUrl":99},"src\u002Fmanifest.ts",35359,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fmanifest.ts",{"path":101,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":102,"sourceHtmlUrl":103},"src\u002Fmodel.test.ts",14638,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fmodel.test.ts",{"path":105,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":106,"sourceHtmlUrl":107},"src\u002Fmodel.ts",62208,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fmodel.ts",{"path":109,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":110,"sourceHtmlUrl":111},"src\u002Fparse-scope.test.ts",15000,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fparse-scope.test.ts",{"path":113,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":114,"sourceHtmlUrl":115},"src\u002Fparse-scope.ts",5999,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fparse-scope.ts",{"path":117,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":118,"sourceHtmlUrl":119},"src\u002Fphase-g.test.ts",33478,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fphase-g.test.ts",{"path":121,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":122,"sourceHtmlUrl":123},"src\u002Frdf.ts",6106,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Frdf.ts",{"path":125,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":126,"sourceHtmlUrl":127},"src\u002Fround10-review.test.ts",8039,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround10-review.test.ts",{"path":129,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":130,"sourceHtmlUrl":131},"src\u002Fround11-review.test.ts",5970,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround11-review.test.ts",{"path":133,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":134,"sourceHtmlUrl":135},"src\u002Fround12-review.test.ts",6269,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround12-review.test.ts",{"path":137,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":138,"sourceHtmlUrl":139},"src\u002Fround2-review.test.ts",7543,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround2-review.test.ts",{"path":141,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":142,"sourceHtmlUrl":143},"src\u002Fround3-review.test.ts",8121,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround3-review.test.ts",{"path":145,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":146,"sourceHtmlUrl":147},"src\u002Fround4-review.test.ts",5052,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround4-review.test.ts",{"path":149,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":150,"sourceHtmlUrl":151},"src\u002Fround5-review.test.ts",11543,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround5-review.test.ts",{"path":153,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":154,"sourceHtmlUrl":155},"src\u002Fround7-review.test.ts",4126,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround7-review.test.ts",{"path":157,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":158,"sourceHtmlUrl":159},"src\u002Fround8-review.test.ts",9680,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround8-review.test.ts",{"path":161,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":162,"sourceHtmlUrl":163},"src\u002Fround9-review.test.ts",7178,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fround9-review.test.ts",{"path":165,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":166,"sourceHtmlUrl":167},"src\u002Fsecurity-review.test.ts",11702,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fsecurity-review.test.ts",{"path":169,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":170,"sourceHtmlUrl":171},"src\u002Fwrite-cost.test.ts",6287,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fsrc\u002Fwrite-cost.test.ts",{"path":173,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":174,"sourceHtmlUrl":175},"tsconfig.build.json",118,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Ftsconfig.build.json",{"path":177,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":178,"sourceHtmlUrl":179},"tsconfig.json",577,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Ftsconfig.json",{"path":181,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":182,"sourceHtmlUrl":183},"vitest.config.ts",156,"https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fpackages\u002Fmodel-runtime\u002Fvitest.config.ts",[185,192,199,206,213,220],{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":20},"01M78FNRF6EV6SKPEYRZ6JTTQ3","storage-conformance","Work on @jeswr\u002Fstorage-conformance, the shared storage conformance suite package in the Solid SDK workspace.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Ftools\u002Fstorage-conformance\u002FSKILL.md",[],[],{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":198,"publishedAt":20},"01M78FNMS7HQGD9EE43WAFEW6A","fetch-rdf-engine-tests","Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Ftools\u002Ffetch-rdf-engine-tests\u002FSKILL.md",[],[],{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":20},"01M78FNK5M6ASAR3909JT6BZV1","alpha","Use when checking fixtures, including folded YAML descriptions.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fcheck-skills\u002Fvalid\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":212,"publishedAt":20},"01M78FNGATR8F4N09HWSFVWBAF","widget","Use when testing package skills: YAML quoting works.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fcheck-skills\u002Fvalid\u002Fpackages\u002Fwidget\u002FSKILL.md",[],[],{"skillNo":214,"name":215,"nameZh":6,"description":216,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":217,"categories":218,"keywords":219,"publishedAt":20},"01M78FN9M05GCHYTK848SSMN9R","web-seo","Use when improving technical and entity SEO for a modern personal, portfolio, documentation, or marketing site, including crawlable HTML, canonical metadata, sitemap and robots, Person\u002FProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fskills\u002Fweb-seo\u002FSKILL.md",[],[],{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":226,"publishedAt":20},"01M78FN5ANETMSPMEFACSJ7JMC","solid-wac","Use when implementing or auditing Solid server WAC authorization, ACL creation and inheritance, auxiliary-resource escalation, method-to-mode mapping, 401 versus 403 challenges, WAC-Allow, or defensive typed ACL parsing with @solid\u002Fobject and @rdfjs\u002Fwrapper.","https:\u002F\u002Fgithub.com\u002Fjeswr\u002Fsolid-sdk\u002Fblob\u002Fmain\u002Fskills\u002Fsolid-wac\u002FSKILL.md",[],[]]