feat: add legacy CJS decorator entrypoint - #95
Conversation
sjungwon03-ai
left a comment
There was a problem hiding this comment.
Blocking on exact-head CI: npm 12 release readiness fails in scripts/verify-legacy-consumer.mjs because npm pack --json is destructured as an array while npm 12 returns a non-iterable object (existing scripts/pack-json.mjs already handles both shapes).
|
Addressed the npm 12 packed-consumer failure in ba843d9: |
sjungwon03-ai
left a comment
There was a problem hiding this comment.
Exact-head re-review of ba843d9: the legacy packed-consumer script now delegates npm pack JSON handling to getPackedTarballFilename(), preserving npm 11 array output and supporting npm 12 package-keyed output. Contract coverage and packed CommonJS consumer verification passed under npm 11.5.1 and 12.0.1; current CI is green. No blocking findings.
sjungwon03-ai
left a comment
There was a problem hiding this comment.
The prior npm 12 packed-consumer blocker is resolved through shared tarball JSON normalization, and the exact-head CI workflow completed both required checks successfully. The published legacy ESM/CJS contract and consumer verification are consistent with the documented compatibility boundary.
Summary
@theorvane/type-chain/legacyfor TypeScriptexperimentalDecoratorsCommonJS consumers.Agent,Tool, andPolicymetadata registration without changing the root Stage 3 API.Linked issue
Closes #94
Verification
npm run verify(Biome, typecheck, 52 tests, build, package artifact check)npm run verify:consumer(packed standard and legacy CJS consumers)git diff --checkCompatibility
./legacysupports public instance methods with string names only.toLangChainToolsandbuildAgentare async because optional LangChain dependencies load dynamically; standard and legacy decorators must not be mixed in one TypeScript compilation unit.