@volter/teams 0.2.54 → 0.2.55

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/wire.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.2.54",
3
+ "version": "0.2.55",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
package/server/wire.mjs CHANGED
@@ -4,7 +4,7 @@ import { createHash, randomBytes } from 'node:crypto';
4
4
 
5
5
  export class ContractError extends Error { constructor(message, details = null) { super(message); this.name = 'ContractError'; this.code = 'invalid_request'; this.details = details; } }
6
6
  export function canonicalJson(value) { if (Array.isArray(value)) return `[${value.map(canonicalJson).join(',')}]`; if (value && typeof value === 'object') return `{${Object.keys(value).sort().map(k => `${JSON.stringify(k)}:${canonicalJson(value[k])}`).join(',')}}`; return JSON.stringify(value); }
7
- export function validationFailure(error, requestId) { return { version:1, error:{ code:error?.code ?? 'invalid_request', message:error?.message ?? 'invalid request', request_id:requestId, retryable:false, details:error?.details ?? null } }; }
7
+ export function validationFailure(error, requestId) { return { version:1, error:{ code:error?.code ?? 'invalid_request', message:error?.message ?? 'invalid request', request_id:requestId, retryable:error?.retryable===true, details:error?.details ?? null } }; }
8
8
  export const cursorToken = () => randomBytes(32).toString('base64url');
9
9
  export const cursorHash = token => createHash('sha256').update(token).digest('hex');
10
10
  export const sha256 = value => createHash('sha256').update(value).digest('hex');