fix(exports): hide private input materializer declarations - #74
Merged
Conversation
Keep the guarded private-payload materializer internal to the package implementation while preserving the public descriptor and guarded writer contract. Task: 26b5319a-ebd2-4d58-b010-1d5fe0641f5f Agent: cassianus
Contributor
Author
|
[REVIEW] GO — #74 @ cb13144 — lens: public-api+security+gates, reviewer codex (1 of 1) Verdict: GO. I found zero concrete reachable in-scope P0/P1 blockers for current API correctness, private-payload encapsulation, package compatibility, or required gates. Scope frozen:
Diff/source/package inspection:
Two-sided public-surface controls:
Declaration blast-radius controls:
Local focused validation:
GitHub required gates:
Blocking findings: none. Non-blocking follow-up:
What I did not check:
|
andrei-hasna
added a commit
that referenced
this pull request
Aug 8, 2026
Release @hasna/knowledge 0.2.96 with the public declaration/runtime export-parity fix from PR #74. Validation: exact-head CI is green across all seven protected jobs; the fixed independent reviewer returned GO; package contents, version-only generated bundles, changelog, and immutable registry version controls pass. Agent: cassianus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Todos task 26b5319a-ebd2-4d58-b010-1d5fe0641f5f (OPE32-00020).
The public package contract for
@hasna/knowledgenow keepsmaterializeKnowledgePrivateInputinternal: the root runtime export remains absent, the root declaration export remains absent, and the shippeddist/guarded-write-contract.d.tsno longer declares the private-payload materializer. The supported public path remainscreateKnowledgePrivateInputDescriptorpluscreateKnowledgeGuardedWriter.Root cause
materializeKnowledgePrivateInputwas intentionally not exported fromsrc/index.ts, and the README says the package root does not export the private payload materializer. But the helper was an exported function insrc/guarded-write-contract.ts, sotscemitted it intodist/guarded-write-contract.d.ts. Root typings reference that declaration file, creating a public declaration surface that did not match the runtime root and weakened the private-payload encapsulation story.Change
createKnowledgePrivateInputDescriptorexists in root runtime, root declarations, and guarded contract declarations;materializeKnowledgePrivateInputis absent from root runtime, root declarations, and guarded contract declarations.materializeKnowledgePrivateInputas@internal.stripInternalfor build declarations.dist/guarded-write-contract.d.tsso the private materializer declaration is removed while internal module use remains intact.RED / GREEN evidence
RED:
GREEN:
Public surface verification:
Secrets / push preflight:
Release impact
This is a declaration-surface/package-contract fix for the next
@hasna/knowledgerelease. It does not publish, install globally, deploy, or alter runtime root exports. Consumers should continue using the public descriptor + guarded writer API; consumers attempting to type against the private materializer will fail at compile time instead of seeing a declaration-only API.Rollback
Revert this commit to restore the previous declaration generation behavior. Runtime behavior is not expected to need rollback because the package root did not expose
materializeKnowledgePrivateInputat runtime before this change.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.