@oxy.so/core 1.7.1 → 1.7.3

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.
@@ -259,10 +259,10 @@ export function OxyServicesAuthMixin(Base) {
259
259
  /**
260
260
  * Whether this process can prove what it is (ADR 0026).
261
261
  *
262
- * The check and the module that performs it are loaded LAZILY and only on a
263
- * Node host. `@oxy.so/core`'s root barrel reaches React Native and Expo, and
264
- * `server/workloadIdentity` imports `node:crypto` — a static import here
265
- * would pull it into every mobile bundle for a path a phone can never take.
262
+ * The internal package subpath selects a client implementation for native
263
+ * and browser bundlers, and the signer only for Node hosts. The runtime
264
+ * Node guard avoids calling attestation on clients; the module boundary
265
+ * keeps node:crypto out of their bundle graphs (a guard alone cannot).
266
266
  *
267
267
  * @internal
268
268
  */
@@ -270,7 +270,7 @@ export function OxyServicesAuthMixin(Base) {
270
270
  if (typeof process === 'undefined' || !process.versions?.node)
271
271
  return false;
272
272
  try {
273
- const { canAttestWorkloadIdentity } = await import('../server/workloadIdentity.js');
273
+ const { canAttestWorkloadIdentity } = await import('@oxy.so/core/internal/workload-identity');
274
274
  return canAttestWorkloadIdentity();
275
275
  }
276
276
  catch {
@@ -298,7 +298,7 @@ export function OxyServicesAuthMixin(Base) {
298
298
  return entry.token;
299
299
  if (entry?.pending)
300
300
  return entry.pending;
301
- const { requestWorkloadServiceToken } = await import('../server/workloadIdentity.js');
301
+ const { requestWorkloadServiceToken } = await import('@oxy.so/core/internal/workload-identity');
302
302
  const seeded = entry ?? {
303
303
  token: '',
304
304
  expiresAt: 0,
@@ -0,0 +1,7 @@
1
+ /** Workload attestation belongs to a Node host, never a browser or device. */
2
+ export function canAttestWorkloadIdentity() {
3
+ return false;
4
+ }
5
+ export async function requestWorkloadServiceToken(_options) {
6
+ throw new Error('Workload identity is only available on a Node host');
7
+ }