Replies: 3 comments
|
Confirmed independently: the same defect is still present in I encountered it while integrating an out-of-tree DSH plugin. TypeScript resolves I prepared a narrow patch here: The patch:
Regression coverage includes a positive installed-package case and a negative same-named lookalike-package case. Validation completed on the patch branch:
The direct regression fixture uses a regular Since the contribution guide currently does not accept external pull requests, please feel free to cherry-pick or adapt the commit. I can also prepare a PR if maintainers later invite one. |
|
|
I hit the same behavior in an out-of-tree Harness bundle with the generator and protocol pinned to |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The Typert generator never recognizes
@Remotein a plugin that installs@deepseek-ai/dsh-typert-protocolfrom npm, so noinvocationsare generated and the plugin has no Remote layer at all. Declaring./remoteon top of that fails the build outright.This sits one layer earlier than #1993 and #2091. Those describe a runtime module-identity split, where the markers exist but the gateway reads the wrong copy. Here the markers are never turned into descriptors in the first place, so an out-of-tree plugin cannot reach the runtime problem those threads describe.
Everything below is measured against published
0.1.0-rc.6packages.Where it fails
WorkspaceAnalyzer.isTypeMetaSymbol()inpackages/typert/generator/src/analyzer.ts— the decorator is accepted only when one of two things holds. (Both checks below are byte-identical in the publishedlib/index.jsof0.1.0-rc.6, not just in the source tree.)An npm-installed protocol satisfies neither:
Branch 1 — registration. Registrations come from
loadRegistrations(), which walks the face aggregates' project references and keeps only paths under<root>/packages/:A package resolved from
node_modulesis never a registration, soregistrationForFile()returnsundefined.Branch 2 — ambient module block. The published
.d.tsdeclaresRemoteas an ordinary module export, with no ambient wrapper:So the ancestor walk finds no matching
ModuleDeclarationeither.Reproduction
A third-party package that otherwise satisfies every discovery requirement — it sits under
<root>/packages/, is referenced fromtsconfig.host.json, and declares its service through adeclare module '@deepseek-ai/cordis'Contextmerge:Observed with
WorkspaceTypertGenerator:discover()faces: ['host'])analyze()services: ['mosaicBoard']),invocations: []generate()with./remotedeclaredtypert(host): <pkg> publishes Remote artifacts but has no Remote methodsgenerate()with./remoteremovedlib/typert.host.jscarries the service, method signatures and payload type declarations, withinvocations: []The generated artifact is internally consistent about it — the printed signature keeps the decorator text while the descriptor list stays empty:
So the failure is silent in the direction that matters: a package without a
./remoteexport builds green and simply has no RPC.Notes on what is not the blocker
Two things looked like blockers while narrowing this down and turned out not to be, in case they save someone else the detour:
ctx.remote.$mount(contribution)is public. The fixed first-party import list in@deepseek-ai/dsh-api-remotes/src/client/index.tsis that assembly's own selection, not a gate — a third-party client half can mount its own generated contribution.typert.remote-client.jsthis run generates deadlocks the generator's typecheck. First-party code sidesteps it by splitting host and client into separate packages; a single dual-face package can passgenerate(undefined, ['host'])and analyze only the contributing face.Possible fixes
Either would be enough, and they are not exclusive:
@deepseek-ai/dsh-typert-protocolis accepted, regardless of whether it is a workspace registration. This keeps the intent — only the real protocol'sRemotecounts — while allowing an installed copy.Given #1993 and #2091, (1) alone still leaves an out-of-tree plugin's Remote layer broken at runtime under the source launcher, so the compile-time and runtime halves probably want to land together to make third-party Remote actually usable.
Environment
@deepseek-ai/dsh-typert-generator@0.1.0-rc.6,@deepseek-ai/dsh-typert-protocol@0.1.0-rc.60.1.0-rc.6;dsh-testkit@0.3.1green for the same plugin's non-Remote surface (service + two tools)All reactions