@astrale-os/kernel-client 0.6.0-beta.67 → 0.6.0-beta.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,9 +97,23 @@ export class SessionDispatcher {
97
97
  ...sessionTransportOptions(operation, options.idempotencyKey),
98
98
  routing: learned.route.via,
99
99
  };
100
+ // The source has admitted this fingerprint against the exact Publication carried by Via.
101
+ // Pin that revision at the destination so existing Workers can execute the same admitted
102
+ // callable without understanding the newer fingerprint Target representation. The cache
103
+ // remains partitioned by the original fingerprint, and stale recovery re-admits it at source.
104
+ const destinationCall = typeof call.target !== 'string' && call.target.fingerprint !== undefined
105
+ ? {
106
+ ...call,
107
+ target: invocationProtocol.Target({
108
+ callable: call.target.callable,
109
+ revision: learned.route.via.publication.revision,
110
+ ...(call.target.instance === undefined ? {} : { instance: call.target.instance }),
111
+ }),
112
+ }
113
+ : call;
100
114
  const result = await runSessionOperation(operation, () => trace === undefined
101
- ? authenticated(envelope.client, learned.credential).dispatch(call, requestOptions)
102
- : dispatchTrace(envelope.client, learned.credential, call, requestOptions, trace));
115
+ ? authenticated(envelope.client, learned.credential).dispatch(destinationCall, requestOptions)
116
+ : dispatchTrace(envelope.client, learned.credential, destinationCall, requestOptions, trace));
103
117
  if (result.kind === 'redirect') {
104
118
  throw new ClientError('A destination redirect is invalid; only the source Kernel may redirect.');
105
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-client",
3
- "version": "0.6.0-beta.67",
3
+ "version": "0.6.0-beta.68",
4
4
  "description": "Universal Client — protocol-first, transport-agnostic",
5
5
  "keywords": [
6
6
  "astrale",