Part of #327
Handle: #E1 · Milestone: 0.0.1-beta.8 (precursor — land early in the window). · Depends on: nothing (server-side ServiceApp.fetch() mount seam already ships). Blocks: #E4.
Scope — in-process link-mode adapter for single-process service mounting
Add createInProcessClientLink (packages/sdk/src/client/in-process-client-link.ts), the in-process registry (packages/sdk/src/client/in-process-registry.ts: registerInProcessService/resolveInProcessService/clearInProcessServices), the ServiceClientTransport discriminated union + transport option on CreateServiceClientOptions, the branch in createServiceClient, and the createInProcessServiceClient convenience. Export all on the @netscript/sdk mod + JSR export map.
Strikes the mis-referenced "172a-2 service-base-seam" dependency — PR #172 is merged CLI type-soundness, unrelated (drift E1).
Acceptance
createInProcessClientLink reuses oRPC RPCLink with fetch: (req,init) => app.fetch(new Request(req,init)) and the identical apiPath/apiVersion/pathSegment pathname as the HTTP link — no bespoke RPC codec.
- In-process and HTTP clients for the same built service return byte-identical results for a representative contract (round-trip parity test — the anti-divergence guarantee).
- W3C trace propagation preserved in-process (traceparent/tracestate reach the mounted app).
transport defaults to http; every existing createServiceClient caller unchanged (existing sdk tests stay green).
- Registry: unknown serviceName throws a clear error;
clearInProcessServices() isolates tests.
gate:jsr: deno doc --lint clean on the new public surface (A1); no any, no upstream oRPC/Hono types leaked into the public signature beyond existing structural mirrors (A7); deno publish --dry-run green.
- Decide the sdk↔service dependency direction for
ServiceApp (O-1): import type {ServiceApp} from @netscript/service or mirror its 2-method structural shape in sdk. Record choice + rationale.
Design source: design/E-desktop/epic-and-issues.md (#E1).
Part of #327
Handle: #E1 · Milestone:
0.0.1-beta.8(precursor — land early in the window). · Depends on: nothing (server-sideServiceApp.fetch()mount seam already ships). Blocks: #E4.Scope — in-process link-mode adapter for single-process service mounting
Add
createInProcessClientLink(packages/sdk/src/client/in-process-client-link.ts), the in-process registry (packages/sdk/src/client/in-process-registry.ts:registerInProcessService/resolveInProcessService/clearInProcessServices), theServiceClientTransportdiscriminated union +transportoption onCreateServiceClientOptions, the branch increateServiceClient, and thecreateInProcessServiceClientconvenience. Export all on the@netscript/sdkmod + JSR export map.Acceptance
createInProcessClientLinkreuses oRPCRPCLinkwithfetch: (req,init) => app.fetch(new Request(req,init))and the identicalapiPath/apiVersion/pathSegmentpathname as the HTTP link — no bespoke RPC codec.transportdefaults tohttp; every existingcreateServiceClientcaller unchanged (existing sdk tests stay green).clearInProcessServices()isolates tests.gate:jsr:deno doc --lintclean on the new public surface (A1); noany, no upstream oRPC/Hono types leaked into the public signature beyond existing structural mirrors (A7);deno publish --dry-rungreen.ServiceApp(O-1): importtype {ServiceApp}from@netscript/serviceor mirror its 2-method structural shape in sdk. Record choice + rationale.Design source:
design/E-desktop/epic-and-issues.md(#E1).