solid-bookmark
Use when reading or writing Solid bookmarks through @jeswr/solid-bookmark, changing its ontology or SHACL, regenerating its model core, or maintaining its public facade and legacy namespace compatibility.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- solid-bookmark
- description
- Use when reading or writing Solid bookmarks through @jeswr/solid-bookmark, changing its ontology or SHACL, regenerating its model core, or maintaining its public facade and legacy namespace compatibility.
02 资源文件 29
- 参考文档biome.json82 B
- 其他bookmark.shacl.ttl3.0 KB
- 其他bookmark.ttl5.3 KB
- 参考文档codegen.config.json884 B
- 许可证LICENSE1.0 KB
- 参考文档package.json2.4 KB
- 参考文档README.md6.3 KB
- 脚本scripts/copy-generated.mjs411 B
- 脚本src/bookmark.test.ts13.1 KB
- 脚本src/bookmark.ts8.3 KB
- 参考文档src/generated/codegen-manifest.json842 B
- 参考文档src/generated/codegen.lock.json434 B
- 脚本src/generated/model.d.ts1.8 KB
- 脚本src/generated/model.js3.7 KB
- 参考文档src/generated/model.json3.3 KB
- 其他src/generated/shapes.ttl3.8 KB
- 脚本src/index.ts2.0 KB
- 脚本src/iri.test.ts3.1 KB
- 脚本src/iri.ts476 B
- 脚本src/shape.test.ts9.2 KB
- 脚本src/shape.ts2.3 KB
- 脚本src/vocab.test.ts2.3 KB
- 脚本src/vocab.ts7.1 KB
- 脚本test/codegen.test.ts1.1 KB
- 脚本test/compatibility.test.ts8.3 KB
- 脚本test/consumer.ts782 B
- 参考文档tsconfig.build.json148 B
- 参考文档tsconfig.json591 B
- 脚本vitest.config.ts177 B
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-6.1-Sol -->
Solid bookmark model
The hand-written ontology and SHACL are the source
of truth. codegen.config.json supplies policy that SHACL cannot
express: #it subjects, false archived defaults, creation timestamps, empty text drops,
and trimmed/sorted tags. The generated manifest, JS/declarations, normalized shapes,
and hashes live in src/generated/; never edit them directly.
parseBookmark/parseBookmarkTtl validate through the SHACL profile, then carry any field
the profile omits (language-tagged or non-string text, an xsd:date created value, extra
titles) using the hand-written package's read, so a parse → edit → serialize round-trip
keeps those values. The Bookmark wrapper getters follow the profile exactly; set fields
through it on the original Store to keep the original terms (language tags, datatypes)
too. Relative resource URLs throw. README "Exact divergences" lists every case.
From the workspace root, build the generator/dependencies, then regenerate:
pnpm --filter @jeswr/federation-codegen... run build
pnpm --filter @jeswr/solid-bookmark run codegen
For a deliberate input change, review the ontology/SHACL/config diff and pass
--update-lock to the codegen command. Run
pnpm exec turbo run lint build typecheck test --filter=...@jeswr/solid-bookmark.
The regeneration test compares all six artifacts byte for byte, including the lock.
The 78 original src/*.test.ts tests are the oracle; preserve them unchanged during
generated-core migrations. dist/ is built fresh and never committed.
Keep the facade at most 150 lines. Field access, IRI guards, aliases,
and RDF parsing belong to @jeswr/model-runtime. The facade preserves original Store,
property, and plain-data JSON field order and the shared @jeswr/rdf-serialize serializer's bytes;
it does not migrate arbitrary Stores' legacy triples during serialization. The public Bookmark
class adds isBookmark and preserves the boolean archived getter/clearing setter.
vocab.ts stays hand-written. The root and /vocab entries are browser-safe;
filesystem readers belong exclusively to the Node-only /shape entry, which continues
to read the normative package-root TTL files. Preserve all exports and TTL subpaths.
Readers accept canonical and legacy bookmark types/notes/archived predicates. Reads prefer canonical values; setters clear aliases and write canonical IRIs. Alias policy comes from SHACL, never facade string matching. Use typed wrapper accessors and the runtime; no hand-built triples or LDO. Consult the package-local model-runtime and federation-codegen skills before changing generation or guard behavior.
The tsc build copies the generated JS and precise declarations into dist/generated/.
The mirror must retain @jeswr/model-runtime and receive a --dep-sha pin for its
jeswr/model-runtime mirror; declarations import runtime types, so it cannot be listed
under mirrorPublish.inlined. The generator remains build-time only.
04 同仓库更多 Skills
storage-conformance
Work on @jeswr/storage-conformance, the shared storage conformance suite package in the Solid SDK workspace.
fetch-rdf-engine-tests
Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.
alpha
Use when checking fixtures, including folded YAML descriptions.
widget
Use when testing package skills: YAML quoting works.
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/ProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.
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/object and @rdfjs/wrapper.