You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dsh-storage-domain: let plugins supply a record schema without their own zod
#9399
Context (DSH 0.2.1-alpha.2): a plugin that keeps records in a storage
domain must pass a Zod record schema (dsh-storage-domain
lib/types/spec.d.ts:10,26,80). The package consumes it by parse only
(lib/index.js:46-47 wraps the schema; :371 and :383 call .parse; :419-429
wrap errors as invalid-record), never by instanceof, and it exports no
zod or schema builder (:454). dsh-schedule imports zod directly
(lib/index.js:9,1675-1689).
Consequence for out-of-tree plugins: every plugin that uses a storage
domain needs its own zod dependency. In a DSH profile (an isolated pnpm
root under the home root) that is always a second physical zod copy
beside the one the DSH CLI resolves, and the plugin's pin must track the
version DSH's storage-domain resolves. We handle this in @sessionbus/dsh
0.1.0-pre.19 by declaring zod as a peer at dsh-storage-domain's own range
(^4.4.3) and deriving the exact pin from the executing CLI at install
time, with a CI leg proving that a separately installed zod 4.5.4 schema
is accepted by the native domain (open, read, write, reopen, invalid
record, repair).
Two ways DSH could remove the dependency entirely; either is fine:
Re-export its zod (or a defineRecordSchema helper) from
dsh-storage-domain, so plugins build schemas from DSH's instance.
Accept any Standard Schema (~standard interface) for domain record
schemas, since zod 4 and schemastery (already a DSH peer every plugin
carries) both implement it; the domain only needs parse/validate.
Evidence: sessionbus/sessionbus-dsh PR #59, CI script
.github/scripts/prove-domain-schema.mjs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context (DSH 0.2.1-alpha.2): a plugin that keeps records in a storage
domain must pass a Zod record schema (dsh-storage-domain
lib/types/spec.d.ts:10,26,80). The package consumes it by parse only
(lib/index.js:46-47 wraps the schema; :371 and :383 call .parse; :419-429
wrap errors as invalid-record), never by instanceof, and it exports no
zod or schema builder (:454). dsh-schedule imports zod directly
(lib/index.js:9,1675-1689).
Consequence for out-of-tree plugins: every plugin that uses a storage
domain needs its own zod dependency. In a DSH profile (an isolated pnpm
root under the home root) that is always a second physical zod copy
beside the one the DSH CLI resolves, and the plugin's pin must track the
version DSH's storage-domain resolves. We handle this in @sessionbus/dsh
0.1.0-pre.19 by declaring zod as a peer at dsh-storage-domain's own range
(^4.4.3) and deriving the exact pin from the executing CLI at install
time, with a CI leg proving that a separately installed zod 4.5.4 schema
is accepted by the native domain (open, read, write, reopen, invalid
record, repair).
Two ways DSH could remove the dependency entirely; either is fine:
defineRecordSchemahelper) fromdsh-storage-domain, so plugins build schemas from DSH's instance.
~standardinterface) for domain recordschemas, since zod 4 and schemastery (already a DSH peer every plugin
carries) both implement it; the domain only needs parse/validate.
Evidence: sessionbus/sessionbus-dsh PR #59, CI script
.github/scripts/prove-domain-schema.mjs.
All reactions