Repository navigation
fix(contracts): expose Secret schemas from the package root - #127
freeqaz-openai wants to merge 4 commits into
Conversation
kevinlin-openai
left a comment
There was a problem hiding this comment.
Two P2 checker edge cases reproduced against this head using native Node loading and the actual module-boundary checker. The existing PR tests I ran passed; these findings concern valid import patterns added in isolated fixtures. A checker failure stops pnpm test, pnpm test:conformance, pnpm test:integration, and pnpm test:postgres before their tests run.
kevinslin
left a comment
There was a problem hiding this comment.
is this necessary? why can't we just have all dependencies we need exported at the root module? this adds a lot of complexity and duplicates node module resolution logic
6880df7 to
d969026
Compare
kevinslin
left a comment
There was a problem hiding this comment.
we should remove testing for this. the tests are just slop. we don't need tests for exporting a module
|
closing this and folding it into #141 instead since it's literally 3 lines now |
TypeScript consumers cannot use
SecretReference,SecretBinding, orSecretBindingsas schema values from@openclaw-enterprise/contracts: local resource types hide the wildcard-exported values, so calls such asCheck(SecretReference, reference)fail with TS1484/TS2693.Import and explicitly export the three canonical schemas at the package root so each name works as both a type and a value. Local bindings are necessary: direct
export … fromstill fails declaration generation with TS4033/TS4081. Resource declarations, schema identity, runtime validation, and the root-only package API are preserved.Related work and roadmap
This independent fix targets
mainand keeps consumers on the supported shared-contract entrypoint. It complements the persistence extraction in #128 and dependency-boundary tooling in #149/#150, supporting the target design's package ownership.Before and after
flowchart LR subgraph B["Before"] direction TB B1["TypeScript consumer"] --> B2["contracts package root"] B2 --> B3["Schema value use<br/>fails TypeScript"] end subgraph A["After"] direction TB A1["TypeScript consumer"] --> A2["Same package root<br/>with explicit bindings"] A2 --> A3["Types and schema values<br/>compile"] endValidation
Recorded during implementation:
mainand passes with the fix; canonical schema identity passes.Coverage is source, declarations, and local contract behavior.