{"_id":"@alterno-dev/spatial-review-protocol","_rev":"7-e2882ee8933d5f369f647df672f83878","name":"@alterno-dev/spatial-review-protocol","dist-tags":{"latest":"0.7.0"},"versions":{"0.1.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.1.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.1.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"415fe56282a01783aa76e5871796070f5eca34ae","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.1.0.tgz","fileCount":18,"integrity":"sha512-fUhKIuCRgY+THFKFG4uCmWrSusQsPlH4oB7Mpaz6Mi/nQauaXM7Mtm9qvckajdvTaciP5ExlRAXzJ7oBkPA7WA==","signatures":[{"sig":"MEUCIQDTzejznWuW4vv2UIx3uoWl03u7SRDq4Sn7rgbwT0B7PwIgCVLNvEv2f223xe18lGL5yVl9vCxXmc0ecUcleRugh/U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22233},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f4e53744d7799548cfc72ba60dc7847016d3eb4e","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"_npmVersion":"10.9.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.1.0_1787388506017_0.32464378430946916","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.2.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.2.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"9c22b2386f89d25449fea395090f92928f6b3b3d","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.2.0.tgz","fileCount":18,"integrity":"sha512-4KkrOESJJcFxh80loz/ra9s7b6ALPKHnEFClJNVJfKgwAAI6WTJh+3pAuOFl1uXE4NQayfO3raEa/W1fc4C2XQ==","signatures":[{"sig":"MEYCIQDd89HUPVqPIlmU1NEIkgcY9MkPn8e8CzjQzx+tULZEVgIhAMhr+3dICm/NW4DyjFRMHmGvXHMrl4wrK/SOxER2Tww7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27496},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"fe504bbddc7638b0add99e7e0b0ebd4d3ce9a553","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"_npmVersion":"10.9.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.2.0_1787472216891_0.4454173644935506","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.3.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.3.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"e444d62588c973bd50673258ee41c414543654e0","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.3.0.tgz","fileCount":22,"integrity":"sha512-yKzg5ElD4p3TyDFX6nXlVbyEqwiZfq3yF7XcIACmDOcCvysnSHez0ndiwWc/ARjk4B3hrXeeyc4YIaQdkvayhw==","signatures":[{"sig":"MEUCIQDyCrzEz5S/GQXZGOa19cQpSTW+hwqe01lI73nzp4Jf3gIgBVNqBlB4ysy/oTGOaWgIZJSVb+HuYQxV3mDlWAJ61pM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30339},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6f0275e991bee8e448c126ab225c7304b2257913","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"_npmVersion":"10.9.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.3.0_1787481286842_0.6358395704893693","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.4.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.4.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"a597434dd5e0f608ffcb39f8455296684d70479f","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.4.0.tgz","fileCount":22,"integrity":"sha512-fJBmXt0G0MCufkRurx1NFhOGBVqq22JWqsORpLrhnJlmXkPOTHivmk5KiGsOWO5wHDX4cG9mkhKXekKKnTu1wg==","signatures":[{"sig":"MEUCIHEbAdKfOgIx5Pv6bVJtqds59n5rit4C38z6A4RjxYT1AiEAw2onFR+ZgsdKUqvCRZ+HWMp01iia3gkZ7tfCDeEnYN8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39615},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"bb7bfac609b1ef6eba68b26141b9582a04f4b326","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com","approver":{"name":"oltremago","email":"oltremago@gmail.com"}},"_npmVersion":"12.0.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.4.0_1787938920740_0.19790487355618147","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.5.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.5.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"4f28bab2adabb9b3397a5ba141dfd069b66707fb","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.5.0.tgz","fileCount":26,"integrity":"sha512-AOaAcNyHhtThiCsSiJ8vmpLm10c608UYZpNyNoSDUT3czfMYG14xMZoGP3NQBzGbWVUSfjmeuBPrlP1ReJUegw==","signatures":[{"sig":"MEUCIQCU8imWV/OGvcjgG/heDkPFWNpGCx6a6o16mzFfu3ifEQIgKKbDLoIEnm4kPx/CHAoUz8V8ApDSXAQlCV88IZta8X4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61679},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d78231744205f0df48c7404b85b7b464a4aee70f","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"_npmVersion":"10.9.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.5.0_1788039832507_0.6907864408079651","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.6.0","license":"MIT","_id":"@alterno-dev/spatial-review-protocol@0.6.0","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"dist":{"shasum":"921ee86d7961ad62871a7624b1a74d0a2eb15335","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.6.0.tgz","fileCount":26,"integrity":"sha512-39oBOssl1Rrxqkfdwx+gmt+agLuJXTcnTJ1mFyu83K71fb9aZTEJQa35qPJv+MnYA8Co044Lk11yy+/Ww9T7mg==","signatures":[{"sig":"MEQCIFspoQbDIPx7iBhvq92/3JP9fxPDWS0CiO8mAWcdGUfEAiBQpp84xCAUQljI7r1/awmaRI3Q3G0qm0Wj6YeTJegudg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76387},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0c5d127a832516b0e1c818f9e76106d1f32ea3d3","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"_npmVersion":"10.9.2","description":"Engine-neutral contracts for Alterno Spatial Review.","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spatial-review-protocol_0.6.0_1788168308688_0.08259582946287658","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@alterno-dev/spatial-review-protocol","version":"0.7.0","description":"Engine-neutral contracts for Alterno Spatial Review.","license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json"},"_id":"@alterno-dev/spatial-review-protocol@0.7.0","gitHead":"e41ac9603d40b995f1b3ea35f69ba26e07d55303","_nodeVersion":"24.19.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Mt+3bDo372GinpeE+QtZyFUfbWpQ5IN73G8BvQrShFzrR7RrOhCjLFbgImYRNWmR845ivq9e295ce4SMV/dyIg==","shasum":"917d3248c0b5184d37ec9e34d81ace70f0393499","tarball":"https://registry.npmjs.org/@alterno-dev/spatial-review-protocol/-/spatial-review-protocol-0.7.0.tgz","fileCount":26,"unpackedSize":89538,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBTd1553zGWacY3ZZZnQX83eY2EwVGqjP2BGBHvogxahAiBglIC6sCDmwGv26vpXjKJlnEXja5w/xFAA0FOr5GcQcQ=="}]},"_npmUser":{"name":"oltremago","email":"oltremago@gmail.com"},"directories":{},"maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spatial-review-protocol_0.7.0_1788459714428_0.47078661733650673"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-22T08:48:25.853Z","modified":"2026-09-03T18:21:54.763Z","0.1.0":"2026-08-22T08:48:26.194Z","0.2.0":"2026-08-23T08:03:37.022Z","0.3.0":"2026-08-23T10:34:47.015Z","0.4.0":"2026-08-28T17:42:00.845Z","0.5.0":"2026-08-29T21:43:52.657Z","0.6.0":"2026-08-31T09:25:08.815Z","0.7.0":"2026-09-03T18:21:54.583Z"},"license":"MIT","description":"Engine-neutral contracts for Alterno Spatial Review.","maintainers":[{"name":"oltremago","email":"oltremago@gmail.com"}],"readme":"# `@alterno-dev/spatial-review-protocol`\n\nVersioned, engine-neutral TypeScript contracts and URL normalization for\nAlterno Spatial Review.\n\n## Ownership-first scenes\n\nThe optional `scene-assemblies-v1` capability adds transform-only assemblies,\nexplicit actor ownership, and parent-local poses without changing the existing\nworld-space `transform` field. `SceneOwnershipOperation` separates assembly\nplacement, actor placement, and reparenting intent. Shared designs remain assets.\n`validateSceneOwnership()` validates graph and transform consistency. Read the\n[contract, compatibility, migration, and acceptance gate](../../docs/ownership-first-scene.md)\nbefore using this capability.\n\nThe browser discovery request/response messages let an embedded website\nadvertise its normalized discovery document without CORS or an editor backend.\n\nThe optional discovery `capabilities.liveCapture.editorOriginPolicy` describes\npreflight compatibility for an editor origin. It is advisory; runtime\nauthorization remains mandatory. Unauthorized catalog handshakes can receive a\ncorrelated `spatial-review:connection-rejected` response without scene data.\nConsumers can use `editorOriginPolicyAllows()` for preflight checks. Read the\n[contract, security rules, and mixed-version behavior](../../docs/editor-origin-authorization.md).\n\n## Discovery locators\n\n`discoveryUrlForWebsite(websiteUrl)` remains the compatibility helper for the\ncanonical origin-root document:\n\n```text\nhttps://example.com/.well-known/spatial-review.json\n```\n\nUse `discoveryUrlsForWebsite(websiteUrl, explicitDiscoveryUrl?)` when connecting\nto a deployed project. It returns de-duplicated candidates in this order:\n\n1. an explicitly supplied, same-origin HTTP(S) locator;\n2. the canonical origin-root document;\n3. `.well-known/spatial-review.json` below the website's project path.\n\nQuery strings and fragments on the website URL do not become part of the\nproject locator. A fragment on an explicit locator is removed. Cross-origin\nlocators, embedded credentials, and non-HTTP(S) URLs are rejected before any\nrequest is made.\n\nThe same credential-free HTTP(S) rule applies to the discovery document's\n`websiteUrl`, `scene`, `assets`, and `liveCapture` fields and to bundle URLs.\n\nAfter a candidate succeeds, pass that response's actual URL to\n`normalizeSpatialReviewDiscovery()`. Relative `websiteUrl`, `scene`, `assets`,\nand `liveCapture` fields are resolved from the successful document, including\nafter a same-origin redirect. This supports project hosting such as\n`https://owner.github.io/project/` without changing existing root-hosted\nproducers.\n\n`spatialReviewEditorUrl()` accepts `{ workspace, discoveryUrl }` to carry an\nexplicit locator into the hosted editor. The prior workspace-string argument\ncontinues to work.\n\nThe live browser protocol includes an optional `resource-transfer-v1`\ncapability. Texture map descriptors carry resource IDs, and request/response\nmessages move encoded image bytes with transferable `ArrayBuffer` values. Both\npeers advertise `maxBytes` during the catalog handshake and use the lower limit.\n\n## Progressive asset families\n\nThe optional `progressive-assets-v1` and `geometry-transfer-v1` capabilities\nextend the existing live catalog exchange without changing the default JSON\npath:\n\n1. The editor requests a catalog with `progressive: true` and a\n   `geometryTransfer` offer containing the capability and `maxBytes`.\n2. A supporting website confirms the capabilities and negotiated limit in its\n   catalog response. That catalog includes actor metadata, world bounds, and\n   asset descriptors with empty node/material lists.\n3. The editor sends `alterno:spatial-review:asset-request` for a specific\n   `assetId`, `profile`, `buildId`, and unique `requestId`.\n4. The website answers with `alterno:spatial-review:asset-response`, matching\n   those identities, and either an asset or a bounded error result.\n\nPositions, normals and UVs accept `Float32Array`; indices accept `Uint16Array`\nor `Uint32Array`. Legacy `number[]` geometry remains valid. Typed buffers are\ntransferred through the browser's structured-clone channel, not encoded as JSON.\nEach response owns its transferable buffers; sending a response must not detach\nthe source renderer or a reusable catalog cache. JSON files must represent\nattributes as number arrays.\n\nReceivers must validate the negotiated byte limit, geometry shape, finite\nvalues, indices, hierarchy and expanded-instance budgets before allocating GPU\nresources. They must also keep the original origin/window authorization and\nmatch request, build, family and profile identities. Limits are implementation\npolicy in addition to these type contracts. Empty descriptor geometry is a\nloading state; it is not a replacement for detailed asset data in a complete\nexport. Peers that do not negotiate the extension retain the full-catalog path.\n\n## Deferred asset streaming\n\n`asset-stream-v1` builds on progressive catalogs with representation metadata,\nasynchronous production, priorities, progress, cancellation, opaque revisions,\nand `knownRevision` / `notModified` reuse. `matrix-f32-v1` transfers exact,\nowned typed instance buffers without changing the JSON snapshot encoding.\n\nThe extension is explicitly negotiated and does not reinterpret existing\nmessages. Older progressive peers continue to request one family by asset and\nprofile; non-progressive peers continue to receive the complete catalog.\nDeferred-only registrations are omitted for peers that cannot request them.\n\nSee the [complete contract and migration guide](../../docs/deferred-asset-streaming.md)\nand the [live-transfer JSON schema](../../schemas/asset-stream-v1.schema.json).\n\nThe package exports the official editor origin and\n`spatialReviewEditorUrl(websiteUrl)` as convenience values. Exporting an origin\ndoes not itself authorize access; origin authorization is applied by a website\nwhen it starts an SDK discovery or capture bridge.\n","readmeFilename":"README.md"}