@syengup/fridaynext-hermes-channel 0.0.0-stage → 0.1.0-beta.2
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.
- package/README.md +20 -2
- package/install-runtime.js +193 -0
- package/install.js +32 -0
- package/package.json +20 -4
- package/plugin/README.md +21 -0
- package/plugin/__init__.py +3 -0
- package/plugin/fridaynext_plugin/__init__.py +71 -0
- package/plugin/fridaynext_plugin/adapter.py +1114 -0
- package/plugin/fridaynext_plugin/agent_defaults.py +107 -0
- package/plugin/fridaynext_plugin/canonical_control.py +509 -0
- package/plugin/fridaynext_plugin/compat_v0225.py +837 -0
- package/plugin/fridaynext_plugin/control_cli.py +101 -0
- package/plugin/fridaynext_plugin/controls.py +296 -0
- package/plugin/fridaynext_plugin/delivery_context.py +210 -0
- package/plugin/fridaynext_plugin/diagnostics.py +165 -0
- package/plugin/fridaynext_plugin/history.py +421 -0
- package/plugin/fridaynext_plugin/host.py +317 -0
- package/plugin/fridaynext_plugin/initial_settings.py +184 -0
- package/plugin/fridaynext_plugin/inline_media.py +58 -0
- package/plugin/fridaynext_plugin/media_input.py +139 -0
- package/plugin/fridaynext_plugin/media_observations.py +172 -0
- package/plugin/fridaynext_plugin/media_output.py +277 -0
- package/plugin/fridaynext_plugin/recovery.py +214 -0
- package/plugin/fridaynext_plugin/runtime_port.py +571 -0
- package/plugin/fridaynext_plugin/sessions.py +184 -0
- package/plugin/fridaynext_plugin/settings.py +695 -0
- package/plugin/fridaynext_plugin/settings_control.py +101 -0
- package/plugin/fridaynext_plugin/state.py +155 -0
- package/plugin/fridaynext_plugin/stream_bridge.py +493 -0
- package/plugin/fridaynext_plugin/stream_media.py +59 -0
- package/plugin/fridaynext_plugin/stream_projection.py +269 -0
- package/plugin/plugin.yaml +18 -0
- package/plugin/runtime/dist/host-peer.js +106 -0
- package/plugin/runtime/dist/hosted-artifacts.js +189 -0
- package/plugin/runtime/dist/hosted-backend.js +168 -0
- package/plugin/runtime/dist/hosted-delivery-observations.js +91 -0
- package/plugin/runtime/dist/hosted-media.js +327 -0
- package/plugin/runtime/dist/hosted-recovery.js +55 -0
- package/plugin/runtime/dist/hosted-settings.js +26 -0
- package/plugin/runtime/dist/hosted-stream.js +104 -0
- package/plugin/runtime/dist/identity.js +55 -0
- package/plugin/runtime/dist/kit-contract.json +1 -0
- package/plugin/runtime/dist/media-transport.js +168 -0
- package/plugin/runtime/dist/oss-upload-worker.js +7 -0
- package/plugin/runtime/dist/oss-upload.js +94 -0
- package/plugin/runtime/dist/ownership.js +21 -0
- package/plugin/runtime/dist/platform-service.js +32 -0
- package/plugin/runtime/dist/plugin-control.js +189 -0
- package/plugin/runtime/dist/plugin-worker.js +43 -0
- package/plugin/runtime/dist/private-files.js +24 -0
- package/plugin/runtime/dist/process-lock.js +40 -0
- package/plugin/runtime/dist/public-config.js +58 -0
- package/plugin/runtime/dist/service-errors.js +11 -0
- package/plugin/runtime/dist/service-host.js +240 -0
- package/plugin/runtime/node_modules/.package-lock.json +436 -0
- package/plugin/runtime/node_modules/@noble/hashes/LICENSE +21 -0
- package/plugin/runtime/node_modules/@noble/hashes/README.md +521 -0
- package/plugin/runtime/node_modules/@noble/hashes/_assert.d.ts +17 -0
- package/plugin/runtime/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_assert.js +18 -0
- package/plugin/runtime/node_modules/@noble/hashes/_assert.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_blake.d.ts +14 -0
- package/plugin/runtime/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_blake.js +50 -0
- package/plugin/runtime/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_md.d.ts +51 -0
- package/plugin/runtime/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_md.js +162 -0
- package/plugin/runtime/node_modules/@noble/hashes/_md.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/plugin/runtime/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/_u64.js +90 -0
- package/plugin/runtime/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/plugin/runtime/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/argon2.js +401 -0
- package/plugin/runtime/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake1.d.ts +106 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake1.js +459 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2.js +420 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2b.d.ts +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2b.js +14 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2b.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2s.d.ts +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2s.js +24 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake2s.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake3.js +255 -0
- package/plugin/runtime/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/crypto.d.ts +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/crypto.js +5 -0
- package/plugin/runtime/node_modules/@noble/hashes/crypto.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.js +18 -0
- package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/eskdf.d.ts +47 -0
- package/plugin/runtime/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/eskdf.js +166 -0
- package/plugin/runtime/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.d.ts +17 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.js +15 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.d.ts +14 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.js +45 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_md.d.ts +51 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_md.js +155 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.js +67 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.js +392 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.d.ts +106 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.js +452 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.d.ts +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.js +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.d.ts +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.js +21 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.js +251 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.js +160 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.js +82 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.d.ts +35 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.js +86 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/index.d.ts +2 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/index.js +33 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/index.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/package.json +10 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.d.ts +13 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.js +13 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.js +228 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.d.ts +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.js +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.d.ts +159 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.js +375 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.d.ts +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.js +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.d.ts +142 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.js +393 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.d.ts +53 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.js +234 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.d.ts +26 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.js +26 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/utils.d.ts +161 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/utils.js +281 -0
- package/plugin/runtime/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/plugin/runtime/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/hkdf.js +88 -0
- package/plugin/runtime/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/hmac.d.ts +35 -0
- package/plugin/runtime/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/hmac.js +91 -0
- package/plugin/runtime/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/index.d.ts +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/index.js +33 -0
- package/plugin/runtime/node_modules/@noble/hashes/index.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/plugin/runtime/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/legacy.js +287 -0
- package/plugin/runtime/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/package.json +266 -0
- package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
- package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.js +101 -0
- package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/ripemd160.d.ts +13 -0
- package/plugin/runtime/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/ripemd160.js +16 -0
- package/plugin/runtime/node_modules/@noble/hashes/ripemd160.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/scrypt.d.ts +34 -0
- package/plugin/runtime/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/scrypt.js +232 -0
- package/plugin/runtime/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha1.d.ts +11 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha1.js +14 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha1.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha2.d.ts +159 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha2.js +384 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha256.d.ts +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha256.js +23 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha256.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.d.ts +142 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.js +402 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3.d.ts +53 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3.js +239 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha512.d.ts +26 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha512.js +29 -0
- package/plugin/runtime/node_modules/@noble/hashes/sha512.js.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/_assert.ts +22 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/_blake.ts +50 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/_md.ts +176 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/_u64.ts +91 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/argon2.ts +497 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/blake1.ts +534 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/blake2b.ts +10 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/blake2s.ts +20 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/blake3.ts +272 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/crypto.ts +9 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/eskdf.ts +187 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/hkdf.ts +88 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/hmac.ts +94 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/index.ts +31 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/pbkdf2.ts +122 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/ripemd160.ts +12 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/scrypt.ts +257 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha1.ts +10 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha2.ts +402 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha256.ts +24 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha3-addons.ts +499 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha3.ts +258 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/sha512.ts +34 -0
- package/plugin/runtime/node_modules/@noble/hashes/src/utils.ts +395 -0
- package/plugin/runtime/node_modules/@noble/hashes/utils.d.ts +161 -0
- package/plugin/runtime/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/plugin/runtime/node_modules/@noble/hashes/utils.js +313 -0
- package/plugin/runtime/node_modules/@noble/hashes/utils.js.map +1 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/API.md +416 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/LICENSE +21 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/README.md +77 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attachment/store.d.ts +57 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attachment/store.js +618 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-gate.d.ts +29 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-gate.js +58 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-key-prune.d.ts +17 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-key-prune.js +37 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-store.d.ts +27 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-store.js +146 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/verifier.d.ts +1 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/verifier.js +2 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/delivery-observations.d.ts +38 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/delivery-observations.js +85 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.d.ts +88 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.js +176 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/pairing-codec.d.ts +39 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/pairing-codec.js +233 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/reconciliation.d.ts +6 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/reconciliation.js +17 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.d.ts +234 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.js +32 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/coordinator.d.ts +19 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/coordinator.js +113 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/pending-store.d.ts +37 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/pending-store.js +67 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/results.d.ts +14 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/results.js +39 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.d.ts +16 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.js +15 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/og-parse.d.ts +21 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/og-parse.js +234 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/preview-service.d.ts +39 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/preview-service.js +232 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/ssrf-guard.d.ts +52 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/ssrf-guard.js +236 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/prompt-capsules/capsules-store.d.ts +38 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/prompt-capsules/capsules-store.js +149 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/attachment-crypto.d.ts +4 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/attachment-crypto.js +73 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/cert-selfsign.d.ts +6 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/cert-selfsign.js +88 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/filter-proxy.d.ts +17 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/filter-proxy.js +231 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/frpc-manager.d.ts +76 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/frpc-manager.js +1332 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/oss-transfer.d.ts +43 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/oss-transfer.js +280 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/pairing-voucher.d.ts +13 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/pairing-voucher.js +58 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/private-file.d.ts +2 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/private-file.js +11 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/standby-loop-guard.d.ts +9 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/standby-loop-guard.js +24 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tls-identity.d.ts +36 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tls-identity.js +151 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tunnel-watchdog-policy.d.ts +24 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tunnel-watchdog-policy.js +49 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/push-runtime.d.ts +45 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/push-runtime.js +233 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/relay-transport.d.ts +8 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/relay-transport.js +27 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.d.ts +49 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.js +307 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-runtime.d.ts +2 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-runtime.js +2 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/delivery-observation-publisher.d.ts +43 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/delivery-observation-publisher.js +211 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.d.ts +247 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.js +1525 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.d.ts +36 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.js +269 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/scheduler.d.ts +13 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/scheduler.js +130 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/server-name/server-name-store.d.ts +21 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/server-name/server-name-store.js +52 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/channel-service.d.ts +38 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/channel-service.js +266 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/infrastructure.d.ts +87 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/infrastructure.js +179 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/contract-harness.d.ts +25 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/contract-harness.js +44 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/reference-adapter.d.ts +39 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/reference-adapter.js +76 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/weaknet-server.d.ts +6 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/weaknet-server.js +130 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/attest.d.ts +39 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/attest.js +114 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/body.d.ts +2 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/body.js +24 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.d.ts +9 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.js +112 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-download.d.ts +18 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-download.js +197 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-upload.d.ts +20 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-upload.js +227 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/link-preview.d.ts +15 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/link-preview.js +45 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/messages.d.ts +10 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/messages.js +105 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/pairing.d.ts +22 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/pairing.js +138 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/prompt-capsules.d.ts +8 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/prompt-capsules.js +65 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/push.d.ts +13 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/push.js +65 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.d.ts +50 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.js +400 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/server-name.d.ts +8 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/server-name.js +43 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/session-settings.d.ts +5 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/session-settings.js +121 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/sessions.d.ts +20 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/sessions.js +118 -0
- package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/package.json +40 -0
- package/plugin/runtime/node_modules/ansi-regex/index.d.ts +37 -0
- package/plugin/runtime/node_modules/ansi-regex/index.js +10 -0
- package/plugin/runtime/node_modules/ansi-regex/license +9 -0
- package/plugin/runtime/node_modules/ansi-regex/package.json +55 -0
- package/plugin/runtime/node_modules/ansi-regex/readme.md +78 -0
- package/plugin/runtime/node_modules/ansi-styles/index.d.ts +345 -0
- package/plugin/runtime/node_modules/ansi-styles/index.js +163 -0
- package/plugin/runtime/node_modules/ansi-styles/license +9 -0
- package/plugin/runtime/node_modules/ansi-styles/package.json +56 -0
- package/plugin/runtime/node_modules/ansi-styles/readme.md +152 -0
- package/plugin/runtime/node_modules/asn1js/LICENSE +30 -0
- package/plugin/runtime/node_modules/asn1js/README.md +222 -0
- package/plugin/runtime/node_modules/asn1js/build/index.d.ts +1412 -0
- package/plugin/runtime/node_modules/asn1js/build/index.es.js +3705 -0
- package/plugin/runtime/node_modules/asn1js/build/index.js +3773 -0
- package/plugin/runtime/node_modules/asn1js/package.json +89 -0
- package/plugin/runtime/node_modules/bytestreamjs/LICENSE +29 -0
- package/plugin/runtime/node_modules/bytestreamjs/README.MD +196 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/bit.js +91 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/bit_stream.js +400 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/byte_stream.js +648 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/helpers.js +59 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/index.js +21 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/seq_bit_stream.js +114 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/cjs/seq_stream.js +437 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/bit.js +88 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/bit_stream.js +396 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/byte_stream.js +644 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/helpers.js +55 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/index.js +5 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/seq_bit_stream.js +110 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/mjs/seq_stream.js +433 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/bit.d.ts +1 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/bit_stream.d.ts +222 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/byte_stream.d.ts +292 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/helpers.d.ts +23 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/index.d.ts +5 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/seq_bit_stream.d.ts +47 -0
- package/plugin/runtime/node_modules/bytestreamjs/build/types/seq_stream.d.ts +255 -0
- package/plugin/runtime/node_modules/bytestreamjs/package.json +66 -0
- package/plugin/runtime/node_modules/camelcase/index.d.ts +63 -0
- package/plugin/runtime/node_modules/camelcase/index.js +76 -0
- package/plugin/runtime/node_modules/camelcase/license +9 -0
- package/plugin/runtime/node_modules/camelcase/package.json +43 -0
- package/plugin/runtime/node_modules/camelcase/readme.md +99 -0
- package/plugin/runtime/node_modules/cbor/LICENSE.md +20 -0
- package/plugin/runtime/node_modules/cbor/README.md +282 -0
- package/plugin/runtime/node_modules/cbor/lib/cbor.js +114 -0
- package/plugin/runtime/node_modules/cbor/lib/commented.js +382 -0
- package/plugin/runtime/node_modules/cbor/lib/constants.js +79 -0
- package/plugin/runtime/node_modules/cbor/lib/decoder.js +680 -0
- package/plugin/runtime/node_modules/cbor/lib/diagnose.js +274 -0
- package/plugin/runtime/node_modules/cbor/lib/encoder.js +1121 -0
- package/plugin/runtime/node_modules/cbor/lib/map.js +185 -0
- package/plugin/runtime/node_modules/cbor/lib/objectRecorder.js +71 -0
- package/plugin/runtime/node_modules/cbor/lib/sharedValueEncoder.js +141 -0
- package/plugin/runtime/node_modules/cbor/lib/simple.js +104 -0
- package/plugin/runtime/node_modules/cbor/lib/tagged.js +378 -0
- package/plugin/runtime/node_modules/cbor/lib/utils.js +308 -0
- package/plugin/runtime/node_modules/cbor/package.json +47 -0
- package/plugin/runtime/node_modules/cbor/types/lib/cbor.d.ts +34 -0
- package/plugin/runtime/node_modules/cbor/types/lib/commented.d.ts +109 -0
- package/plugin/runtime/node_modules/cbor/types/lib/constants.d.ts +63 -0
- package/plugin/runtime/node_modules/cbor/types/lib/decoder.d.ts +199 -0
- package/plugin/runtime/node_modules/cbor/types/lib/diagnose.d.ts +91 -0
- package/plugin/runtime/node_modules/cbor/types/lib/encoder.d.ts +477 -0
- package/plugin/runtime/node_modules/cbor/types/lib/map.d.ts +78 -0
- package/plugin/runtime/node_modules/cbor/types/lib/objectRecorder.d.ts +36 -0
- package/plugin/runtime/node_modules/cbor/types/lib/sharedValueEncoder.d.ts +21 -0
- package/plugin/runtime/node_modules/cbor/types/lib/simple.d.ts +47 -0
- package/plugin/runtime/node_modules/cbor/types/lib/tagged.d.ts +74 -0
- package/plugin/runtime/node_modules/cbor/types/lib/utils.d.ts +20 -0
- package/plugin/runtime/node_modules/cbor/types/vendor/binary-parse-stream/index.d.ts +34 -0
- package/plugin/runtime/node_modules/cbor/vendor/binary-parse-stream/README.md +49 -0
- package/plugin/runtime/node_modules/cbor/vendor/binary-parse-stream/index.js +111 -0
- package/plugin/runtime/node_modules/cliui/CHANGELOG.md +76 -0
- package/plugin/runtime/node_modules/cliui/LICENSE.txt +14 -0
- package/plugin/runtime/node_modules/cliui/README.md +115 -0
- package/plugin/runtime/node_modules/cliui/index.js +354 -0
- package/plugin/runtime/node_modules/cliui/package.json +65 -0
- package/plugin/runtime/node_modules/color-convert/CHANGELOG.md +54 -0
- package/plugin/runtime/node_modules/color-convert/LICENSE +21 -0
- package/plugin/runtime/node_modules/color-convert/README.md +68 -0
- package/plugin/runtime/node_modules/color-convert/conversions.js +839 -0
- package/plugin/runtime/node_modules/color-convert/index.js +81 -0
- package/plugin/runtime/node_modules/color-convert/package.json +48 -0
- package/plugin/runtime/node_modules/color-convert/route.js +97 -0
- package/plugin/runtime/node_modules/color-name/LICENSE +8 -0
- package/plugin/runtime/node_modules/color-name/README.md +11 -0
- package/plugin/runtime/node_modules/color-name/index.js +152 -0
- package/plugin/runtime/node_modules/color-name/package.json +28 -0
- package/plugin/runtime/node_modules/decamelize/index.js +13 -0
- package/plugin/runtime/node_modules/decamelize/license +21 -0
- package/plugin/runtime/node_modules/decamelize/package.json +38 -0
- package/plugin/runtime/node_modules/decamelize/readme.md +48 -0
- package/plugin/runtime/node_modules/dijkstrajs/.travis.yml +4 -0
- package/plugin/runtime/node_modules/dijkstrajs/CONTRIBUTING.md +8 -0
- package/plugin/runtime/node_modules/dijkstrajs/LICENSE.md +19 -0
- package/plugin/runtime/node_modules/dijkstrajs/README.md +18 -0
- package/plugin/runtime/node_modules/dijkstrajs/dijkstra.js +165 -0
- package/plugin/runtime/node_modules/dijkstrajs/package.json +60 -0
- package/plugin/runtime/node_modules/dijkstrajs/test/dijkstra.test.js +96 -0
- package/plugin/runtime/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/plugin/runtime/node_modules/emoji-regex/README.md +73 -0
- package/plugin/runtime/node_modules/emoji-regex/es2015/index.js +6 -0
- package/plugin/runtime/node_modules/emoji-regex/es2015/text.js +6 -0
- package/plugin/runtime/node_modules/emoji-regex/index.d.ts +23 -0
- package/plugin/runtime/node_modules/emoji-regex/index.js +6 -0
- package/plugin/runtime/node_modules/emoji-regex/package.json +50 -0
- package/plugin/runtime/node_modules/emoji-regex/text.js +6 -0
- package/plugin/runtime/node_modules/find-up/index.d.ts +137 -0
- package/plugin/runtime/node_modules/find-up/index.js +89 -0
- package/plugin/runtime/node_modules/find-up/license +9 -0
- package/plugin/runtime/node_modules/find-up/package.json +53 -0
- package/plugin/runtime/node_modules/find-up/readme.md +156 -0
- package/plugin/runtime/node_modules/get-caller-file/LICENSE.md +6 -0
- package/plugin/runtime/node_modules/get-caller-file/README.md +41 -0
- package/plugin/runtime/node_modules/get-caller-file/index.d.ts +2 -0
- package/plugin/runtime/node_modules/get-caller-file/index.js +22 -0
- package/plugin/runtime/node_modules/get-caller-file/index.js.map +1 -0
- package/plugin/runtime/node_modules/get-caller-file/package.json +42 -0
- package/plugin/runtime/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/plugin/runtime/node_modules/is-fullwidth-code-point/index.js +50 -0
- package/plugin/runtime/node_modules/is-fullwidth-code-point/license +9 -0
- package/plugin/runtime/node_modules/is-fullwidth-code-point/package.json +42 -0
- package/plugin/runtime/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/plugin/runtime/node_modules/locate-path/index.d.ts +83 -0
- package/plugin/runtime/node_modules/locate-path/index.js +65 -0
- package/plugin/runtime/node_modules/locate-path/license +9 -0
- package/plugin/runtime/node_modules/locate-path/package.json +45 -0
- package/plugin/runtime/node_modules/locate-path/readme.md +122 -0
- package/plugin/runtime/node_modules/node-app-attest/.github/dependabot.yml +6 -0
- package/plugin/runtime/node_modules/node-app-attest/.github/workflows/ci.yml +43 -0
- package/plugin/runtime/node_modules/node-app-attest/.prettierrc +1 -0
- package/plugin/runtime/node_modules/node-app-attest/.yarnrc.yml +1 -0
- package/plugin/runtime/node_modules/node-app-attest/LICENSE +21 -0
- package/plugin/runtime/node_modules/node-app-attest/README.md +300 -0
- package/plugin/runtime/node_modules/node-app-attest/eslint.config.js +30 -0
- package/plugin/runtime/node_modules/node-app-attest/package.json +44 -0
- package/plugin/runtime/node_modules/node-app-attest/src/index.js +4 -0
- package/plugin/runtime/node_modules/node-app-attest/src/verifyAssertion.js +81 -0
- package/plugin/runtime/node_modules/node-app-attest/src/verifyAttestation.js +211 -0
- package/plugin/runtime/node_modules/node-app-attest/test/fixtures/attestation-development.json +5 -0
- package/plugin/runtime/node_modules/node-app-attest/test/fixtures/attestation-production.json +5 -0
- package/plugin/runtime/node_modules/node-app-attest/test/verifyAssertion.test.js +119 -0
- package/plugin/runtime/node_modules/node-app-attest/test/verifyAttestation.test.js +303 -0
- package/plugin/runtime/node_modules/node-app-attest/tsconfig.json +11 -0
- package/plugin/runtime/node_modules/node-app-attest/types/index.d.ts +4 -0
- package/plugin/runtime/node_modules/node-app-attest/types/index.d.ts.map +1 -0
- package/plugin/runtime/node_modules/node-app-attest/types/verifyAssertion.d.ts +5 -0
- package/plugin/runtime/node_modules/node-app-attest/types/verifyAssertion.d.ts.map +1 -0
- package/plugin/runtime/node_modules/node-app-attest/types/verifyAttestation.d.ts +8 -0
- package/plugin/runtime/node_modules/node-app-attest/types/verifyAttestation.d.ts.map +1 -0
- package/plugin/runtime/node_modules/nofilter/LICENSE.md +20 -0
- package/plugin/runtime/node_modules/nofilter/README.md +36 -0
- package/plugin/runtime/node_modules/nofilter/lib/index.js +1055 -0
- package/plugin/runtime/node_modules/nofilter/package.json +60 -0
- package/plugin/runtime/node_modules/nofilter/types/index.d.ts +573 -0
- package/plugin/runtime/node_modules/p-limit/index.d.ts +38 -0
- package/plugin/runtime/node_modules/p-limit/index.js +57 -0
- package/plugin/runtime/node_modules/p-limit/license +9 -0
- package/plugin/runtime/node_modules/p-limit/package.json +52 -0
- package/plugin/runtime/node_modules/p-limit/readme.md +101 -0
- package/plugin/runtime/node_modules/p-locate/index.d.ts +64 -0
- package/plugin/runtime/node_modules/p-locate/index.js +52 -0
- package/plugin/runtime/node_modules/p-locate/license +9 -0
- package/plugin/runtime/node_modules/p-locate/package.json +53 -0
- package/plugin/runtime/node_modules/p-locate/readme.md +90 -0
- package/plugin/runtime/node_modules/p-try/index.d.ts +39 -0
- package/plugin/runtime/node_modules/p-try/index.js +9 -0
- package/plugin/runtime/node_modules/p-try/license +9 -0
- package/plugin/runtime/node_modules/p-try/package.json +42 -0
- package/plugin/runtime/node_modules/p-try/readme.md +58 -0
- package/plugin/runtime/node_modules/path-exists/index.d.ts +28 -0
- package/plugin/runtime/node_modules/path-exists/index.js +23 -0
- package/plugin/runtime/node_modules/path-exists/license +9 -0
- package/plugin/runtime/node_modules/path-exists/package.json +39 -0
- package/plugin/runtime/node_modules/path-exists/readme.md +52 -0
- package/plugin/runtime/node_modules/pkijs/LICENSE +30 -0
- package/plugin/runtime/node_modules/pkijs/README.md +81 -0
- package/plugin/runtime/node_modules/pkijs/build/index.d.ts +9419 -0
- package/plugin/runtime/node_modules/pkijs/build/index.es.js +18789 -0
- package/plugin/runtime/node_modules/pkijs/build/index.js +19014 -0
- package/plugin/runtime/node_modules/pkijs/package.json +98 -0
- package/plugin/runtime/node_modules/pngjs/.eslintignore +2 -0
- package/plugin/runtime/node_modules/pngjs/.eslintrc.json +19 -0
- package/plugin/runtime/node_modules/pngjs/.prettierignore +3 -0
- package/plugin/runtime/node_modules/pngjs/LICENSE +20 -0
- package/plugin/runtime/node_modules/pngjs/README.md +429 -0
- package/plugin/runtime/node_modules/pngjs/browser.js +16096 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/base.css +354 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +881 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +554 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/block-navigation.js +77 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +647 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/constants.js.html +176 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/crc.js.html +200 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +593 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +152 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +143 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +611 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +359 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/index.html +426 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/interlace.js.html +365 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +230 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +248 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer.js.html +467 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +128 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +575 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +404 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser.js.html +950 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +116 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/png.js.html +662 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/prettify.css +101 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/prettify.js +1007 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sorter.js +169 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +584 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +215 -0
- package/plugin/runtime/node_modules/pngjs/coverage/lcov.info +2177 -0
- package/plugin/runtime/node_modules/pngjs/lib/bitmapper.js +267 -0
- package/plugin/runtime/node_modules/pngjs/lib/bitpacker.js +158 -0
- package/plugin/runtime/node_modules/pngjs/lib/chunkstream.js +189 -0
- package/plugin/runtime/node_modules/pngjs/lib/constants.js +32 -0
- package/plugin/runtime/node_modules/pngjs/lib/crc.js +40 -0
- package/plugin/runtime/node_modules/pngjs/lib/filter-pack.js +171 -0
- package/plugin/runtime/node_modules/pngjs/lib/filter-parse-async.js +24 -0
- package/plugin/runtime/node_modules/pngjs/lib/filter-parse-sync.js +21 -0
- package/plugin/runtime/node_modules/pngjs/lib/filter-parse.js +177 -0
- package/plugin/runtime/node_modules/pngjs/lib/format-normaliser.js +93 -0
- package/plugin/runtime/node_modules/pngjs/lib/interlace.js +95 -0
- package/plugin/runtime/node_modules/pngjs/lib/packer-async.js +50 -0
- package/plugin/runtime/node_modules/pngjs/lib/packer-sync.js +56 -0
- package/plugin/runtime/node_modules/pngjs/lib/packer.js +129 -0
- package/plugin/runtime/node_modules/pngjs/lib/paeth-predictor.js +16 -0
- package/plugin/runtime/node_modules/pngjs/lib/parser-async.js +165 -0
- package/plugin/runtime/node_modules/pngjs/lib/parser-sync.js +108 -0
- package/plugin/runtime/node_modules/pngjs/lib/parser.js +290 -0
- package/plugin/runtime/node_modules/pngjs/lib/png-sync.js +12 -0
- package/plugin/runtime/node_modules/pngjs/lib/png.js +194 -0
- package/plugin/runtime/node_modules/pngjs/lib/sync-inflate.js +168 -0
- package/plugin/runtime/node_modules/pngjs/lib/sync-reader.js +45 -0
- package/plugin/runtime/node_modules/pngjs/package.json +73 -0
- package/plugin/runtime/node_modules/pvtsutils/LICENSE +21 -0
- package/plugin/runtime/node_modules/pvtsutils/README.md +80 -0
- package/plugin/runtime/node_modules/pvtsutils/build/index.d.ts +208 -0
- package/plugin/runtime/node_modules/pvtsutils/build/index.es.js +393 -0
- package/plugin/runtime/node_modules/pvtsutils/build/index.js +399 -0
- package/plugin/runtime/node_modules/pvtsutils/package.json +76 -0
- package/plugin/runtime/node_modules/pvutils/LICENSE +24 -0
- package/plugin/runtime/node_modules/pvutils/README.md +24 -0
- package/plugin/runtime/node_modules/pvutils/build/index.d.ts +116 -0
- package/plugin/runtime/node_modules/pvutils/build/utils.es.js +340 -0
- package/plugin/runtime/node_modules/pvutils/build/utils.js +361 -0
- package/plugin/runtime/node_modules/pvutils/package.json +63 -0
- package/plugin/runtime/node_modules/qrcode/README.md +770 -0
- package/plugin/runtime/node_modules/qrcode/bin/qrcode +159 -0
- package/plugin/runtime/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
- package/plugin/runtime/node_modules/qrcode/helper/to-sjis.js +105 -0
- package/plugin/runtime/node_modules/qrcode/lib/browser.js +76 -0
- package/plugin/runtime/node_modules/qrcode/lib/can-promise.js +7 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/byte-data.js +30 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/format-info.js +29 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/galois-field.js +69 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/kanji-data.js +54 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/mode.js +167 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/numeric-data.js +43 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/polynomial.js +62 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/qrcode.js +495 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/regex.js +31 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/segments.js +330 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/utils.js +63 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/version-check.js +9 -0
- package/plugin/runtime/node_modules/qrcode/lib/core/version.js +163 -0
- package/plugin/runtime/node_modules/qrcode/lib/index.js +12 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/canvas.js +63 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/png.js +78 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/svg.js +19 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal.js +9 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/utf8.js +71 -0
- package/plugin/runtime/node_modules/qrcode/lib/renderer/utils.js +99 -0
- package/plugin/runtime/node_modules/qrcode/lib/server.js +138 -0
- package/plugin/runtime/node_modules/qrcode/license +10 -0
- package/plugin/runtime/node_modules/qrcode/package.json +77 -0
- package/plugin/runtime/node_modules/require-directory/.jshintrc +67 -0
- package/plugin/runtime/node_modules/require-directory/.travis.yml +3 -0
- package/plugin/runtime/node_modules/require-directory/LICENSE +22 -0
- package/plugin/runtime/node_modules/require-directory/README.markdown +184 -0
- package/plugin/runtime/node_modules/require-directory/index.js +86 -0
- package/plugin/runtime/node_modules/require-directory/package.json +40 -0
- package/plugin/runtime/node_modules/require-main-filename/CHANGELOG.md +26 -0
- package/plugin/runtime/node_modules/require-main-filename/LICENSE.txt +14 -0
- package/plugin/runtime/node_modules/require-main-filename/README.md +26 -0
- package/plugin/runtime/node_modules/require-main-filename/index.js +18 -0
- package/plugin/runtime/node_modules/require-main-filename/package.json +35 -0
- package/plugin/runtime/node_modules/set-blocking/CHANGELOG.md +26 -0
- package/plugin/runtime/node_modules/set-blocking/LICENSE.txt +14 -0
- package/plugin/runtime/node_modules/set-blocking/README.md +31 -0
- package/plugin/runtime/node_modules/set-blocking/index.js +7 -0
- package/plugin/runtime/node_modules/set-blocking/package.json +42 -0
- package/plugin/runtime/node_modules/string-width/index.d.ts +29 -0
- package/plugin/runtime/node_modules/string-width/index.js +47 -0
- package/plugin/runtime/node_modules/string-width/license +9 -0
- package/plugin/runtime/node_modules/string-width/package.json +56 -0
- package/plugin/runtime/node_modules/string-width/readme.md +50 -0
- package/plugin/runtime/node_modules/strip-ansi/index.d.ts +17 -0
- package/plugin/runtime/node_modules/strip-ansi/index.js +4 -0
- package/plugin/runtime/node_modules/strip-ansi/license +9 -0
- package/plugin/runtime/node_modules/strip-ansi/package.json +54 -0
- package/plugin/runtime/node_modules/strip-ansi/readme.md +46 -0
- package/plugin/runtime/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/plugin/runtime/node_modules/tslib/LICENSE.txt +12 -0
- package/plugin/runtime/node_modules/tslib/README.md +164 -0
- package/plugin/runtime/node_modules/tslib/SECURITY.md +41 -0
- package/plugin/runtime/node_modules/tslib/modules/index.d.ts +38 -0
- package/plugin/runtime/node_modules/tslib/modules/index.js +70 -0
- package/plugin/runtime/node_modules/tslib/modules/package.json +3 -0
- package/plugin/runtime/node_modules/tslib/package.json +47 -0
- package/plugin/runtime/node_modules/tslib/tslib.d.ts +460 -0
- package/plugin/runtime/node_modules/tslib/tslib.es6.html +1 -0
- package/plugin/runtime/node_modules/tslib/tslib.es6.js +402 -0
- package/plugin/runtime/node_modules/tslib/tslib.es6.mjs +401 -0
- package/plugin/runtime/node_modules/tslib/tslib.html +1 -0
- package/plugin/runtime/node_modules/tslib/tslib.js +484 -0
- package/plugin/runtime/node_modules/which-module/LICENSE +13 -0
- package/plugin/runtime/node_modules/which-module/README.md +58 -0
- package/plugin/runtime/node_modules/which-module/index.js +9 -0
- package/plugin/runtime/node_modules/which-module/package.json +41 -0
- package/plugin/runtime/node_modules/wrap-ansi/index.js +186 -0
- package/plugin/runtime/node_modules/wrap-ansi/license +9 -0
- package/plugin/runtime/node_modules/wrap-ansi/package.json +61 -0
- package/plugin/runtime/node_modules/wrap-ansi/readme.md +97 -0
- package/plugin/runtime/node_modules/y18n/CHANGELOG.md +35 -0
- package/plugin/runtime/node_modules/y18n/LICENSE +13 -0
- package/plugin/runtime/node_modules/y18n/README.md +109 -0
- package/plugin/runtime/node_modules/y18n/index.js +188 -0
- package/plugin/runtime/node_modules/y18n/package.json +39 -0
- package/plugin/runtime/node_modules/yargs/CHANGELOG.md +420 -0
- package/plugin/runtime/node_modules/yargs/LICENSE +21 -0
- package/plugin/runtime/node_modules/yargs/README.md +140 -0
- package/plugin/runtime/node_modules/yargs/build/lib/apply-extends.d.ts +2 -0
- package/plugin/runtime/node_modules/yargs/build/lib/apply-extends.js +65 -0
- package/plugin/runtime/node_modules/yargs/build/lib/argsert.d.ts +2 -0
- package/plugin/runtime/node_modules/yargs/build/lib/argsert.js +65 -0
- package/plugin/runtime/node_modules/yargs/build/lib/command.d.ts +64 -0
- package/plugin/runtime/node_modules/yargs/build/lib/command.js +416 -0
- package/plugin/runtime/node_modules/yargs/build/lib/common-types.d.ts +36 -0
- package/plugin/runtime/node_modules/yargs/build/lib/common-types.js +25 -0
- package/plugin/runtime/node_modules/yargs/build/lib/completion-templates.d.ts +2 -0
- package/plugin/runtime/node_modules/yargs/build/lib/completion-templates.js +50 -0
- package/plugin/runtime/node_modules/yargs/build/lib/completion.d.ts +21 -0
- package/plugin/runtime/node_modules/yargs/build/lib/completion.js +135 -0
- package/plugin/runtime/node_modules/yargs/build/lib/is-promise.d.ts +1 -0
- package/plugin/runtime/node_modules/yargs/build/lib/is-promise.js +9 -0
- package/plugin/runtime/node_modules/yargs/build/lib/levenshtein.d.ts +1 -0
- package/plugin/runtime/node_modules/yargs/build/lib/levenshtein.js +58 -0
- package/plugin/runtime/node_modules/yargs/build/lib/middleware.d.ts +10 -0
- package/plugin/runtime/node_modules/yargs/build/lib/middleware.js +57 -0
- package/plugin/runtime/node_modules/yargs/build/lib/obj-filter.d.ts +1 -0
- package/plugin/runtime/node_modules/yargs/build/lib/obj-filter.js +14 -0
- package/plugin/runtime/node_modules/yargs/build/lib/parse-command.d.ts +11 -0
- package/plugin/runtime/node_modules/yargs/build/lib/parse-command.js +36 -0
- package/plugin/runtime/node_modules/yargs/build/lib/process-argv.d.ts +2 -0
- package/plugin/runtime/node_modules/yargs/build/lib/process-argv.js +31 -0
- package/plugin/runtime/node_modules/yargs/build/lib/usage.d.ts +49 -0
- package/plugin/runtime/node_modules/yargs/build/lib/usage.js +540 -0
- package/plugin/runtime/node_modules/yargs/build/lib/validation.d.ts +34 -0
- package/plugin/runtime/node_modules/yargs/build/lib/validation.js +330 -0
- package/plugin/runtime/node_modules/yargs/build/lib/yargs.d.ts +274 -0
- package/plugin/runtime/node_modules/yargs/build/lib/yargs.js +1190 -0
- package/plugin/runtime/node_modules/yargs/build/lib/yerror.d.ts +4 -0
- package/plugin/runtime/node_modules/yargs/build/lib/yerror.js +11 -0
- package/plugin/runtime/node_modules/yargs/index.js +40 -0
- package/plugin/runtime/node_modules/yargs/locales/be.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/de.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/en.json +51 -0
- package/plugin/runtime/node_modules/yargs/locales/es.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/fi.json +49 -0
- package/plugin/runtime/node_modules/yargs/locales/fr.json +53 -0
- package/plugin/runtime/node_modules/yargs/locales/hi.json +49 -0
- package/plugin/runtime/node_modules/yargs/locales/hu.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/id.json +50 -0
- package/plugin/runtime/node_modules/yargs/locales/it.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/ja.json +51 -0
- package/plugin/runtime/node_modules/yargs/locales/ko.json +49 -0
- package/plugin/runtime/node_modules/yargs/locales/nb.json +44 -0
- package/plugin/runtime/node_modules/yargs/locales/nl.json +49 -0
- package/plugin/runtime/node_modules/yargs/locales/nn.json +44 -0
- package/plugin/runtime/node_modules/yargs/locales/pirate.json +13 -0
- package/plugin/runtime/node_modules/yargs/locales/pl.json +49 -0
- package/plugin/runtime/node_modules/yargs/locales/pt.json +45 -0
- package/plugin/runtime/node_modules/yargs/locales/pt_BR.json +48 -0
- package/plugin/runtime/node_modules/yargs/locales/ru.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/th.json +46 -0
- package/plugin/runtime/node_modules/yargs/locales/tr.json +48 -0
- package/plugin/runtime/node_modules/yargs/locales/zh_CN.json +48 -0
- package/plugin/runtime/node_modules/yargs/locales/zh_TW.json +47 -0
- package/plugin/runtime/node_modules/yargs/package.json +92 -0
- package/plugin/runtime/node_modules/yargs/yargs.js +14 -0
- package/plugin/runtime/node_modules/yargs-parser/CHANGELOG.md +601 -0
- package/plugin/runtime/node_modules/yargs-parser/LICENSE.txt +14 -0
- package/plugin/runtime/node_modules/yargs-parser/README.md +449 -0
- package/plugin/runtime/node_modules/yargs-parser/index.js +1032 -0
- package/plugin/runtime/node_modules/yargs-parser/lib/tokenize-arg-string.js +40 -0
- package/plugin/runtime/node_modules/yargs-parser/package.json +46 -0
- package/plugin/runtime/package-lock.json +447 -0
- package/plugin/runtime/package.json +13 -0
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
"""固定版身份、平台授权/首次注册、已授权FIFO、默认配置与原控制观察;公开协议优先,必要配置写入固定封装,告警保持。"""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import logging
|
|
5
|
+
import os
|
|
6
|
+
import subprocess
|
|
7
|
+
import time
|
|
8
|
+
import threading
|
|
9
|
+
from collections import OrderedDict
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from gateway import config as gateway_config
|
|
12
|
+
from .runtime_port import PublicRuntimeUnavailable, InputAdmissionRefused, InputAdmissionUnconfirmed
|
|
13
|
+
|
|
14
|
+
APPROVED_REVISION = "bf0203a794a07aac3ff764972ab9087baa4e4f4e"
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
_resolved_default_warning_emitted = False
|
|
18
|
+
_model_names_warning_emitted = False
|
|
19
|
+
_profile_defaults_warning_emitted = False
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def profile_default_config(profile, *, expected_version=None, update=None, prepare=None):
|
|
23
|
+
"""固定0.22.5配置兼容:当前owner Profile内CAS及一次原子文件写入。
|
|
24
|
+
|
|
25
|
+
公开RPC不能成对保存主模型/思考;复用宿主配置锁、保留注释的原子writer与真实解析器。
|
|
26
|
+
不接受远端Profile路径,不保存展开后的凭据,不修改Hermes core。
|
|
27
|
+
"""
|
|
28
|
+
import hashlib
|
|
29
|
+
import json
|
|
30
|
+
from hermes_constants import set_hermes_home_override, reset_hermes_home_override, resolve_reasoning_config, parse_reasoning_effort
|
|
31
|
+
from hermes_cli import config as config_mod
|
|
32
|
+
|
|
33
|
+
global _profile_defaults_warning_emitted
|
|
34
|
+
if not _profile_defaults_warning_emitted:
|
|
35
|
+
_profile_defaults_warning_emitted = True
|
|
36
|
+
logger.warning("hermes.compat.profile_defaults_v0_22_5:使用固定版配置锁/原子writer,非公开稳定默认写入RPC")
|
|
37
|
+
token = set_hermes_home_override(profile)
|
|
38
|
+
def digest(value):
|
|
39
|
+
return hashlib.sha256(json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode()).hexdigest()
|
|
40
|
+
try:
|
|
41
|
+
with config_mod._CONFIG_LOCK:
|
|
42
|
+
path = config_mod.get_config_path()
|
|
43
|
+
raw = config_mod.require_readable_config_before_write(path)
|
|
44
|
+
if not isinstance(raw, dict):
|
|
45
|
+
raise ValueError("DEFAULT_CONFIG_UNREADABLE")
|
|
46
|
+
def snapshot():
|
|
47
|
+
current_raw = config_mod.require_readable_config_before_write(path)
|
|
48
|
+
effective = config_mod.load_config()
|
|
49
|
+
model = effective.get("model", {})
|
|
50
|
+
model = model if isinstance(model, dict) else {"default": model}
|
|
51
|
+
name = model.get("default") or model.get("model") or ""
|
|
52
|
+
reasoning = resolve_reasoning_config(effective, name)
|
|
53
|
+
effort = "none" if isinstance(reasoning, dict) and reasoning.get("enabled") is False else (reasoning or {}).get("effort")
|
|
54
|
+
return {"version": digest([str(Path(profile).resolve()), current_raw, effective]),
|
|
55
|
+
"fingerprint": digest(current_raw), "writable": not config_mod.is_managed(), "model": name, "provider": model.get("provider", ""),
|
|
56
|
+
"thinkingLevel": effort}
|
|
57
|
+
before = snapshot()
|
|
58
|
+
if update is None:
|
|
59
|
+
return before
|
|
60
|
+
if before["version"] != expected_version:
|
|
61
|
+
return {"status": "conflict", "snapshot": before}
|
|
62
|
+
if config_mod.is_managed():
|
|
63
|
+
raise ValueError("DEFAULT_CONFIG_MANAGED")
|
|
64
|
+
if set(update) - {"model", "provider", "thinkingLevel"} or any(
|
|
65
|
+
not isinstance(update.get(key), str) or not update[key].strip() for key in ("model", "provider")
|
|
66
|
+
):
|
|
67
|
+
raise ValueError("INVALID_DEFAULT_SELECTION")
|
|
68
|
+
if "thinkingLevel" in update and parse_reasoning_effort(update["thinkingLevel"]) is None:
|
|
69
|
+
raise ValueError("INVALID_DEFAULT_REASONING")
|
|
70
|
+
# raw保留模板和无关键;一次写入同时提交模型/provider与明确选择的思考。
|
|
71
|
+
import copy
|
|
72
|
+
target = copy.deepcopy(raw)
|
|
73
|
+
model = target.get("model")
|
|
74
|
+
model = model if isinstance(model, dict) else {}
|
|
75
|
+
from hermes_cli.model_switch import ModelSwitchResult, apply_model_selection
|
|
76
|
+
from hermes_cli.providers import resolve_provider_full, determine_api_mode
|
|
77
|
+
from hermes_cli.web_server_config import _resolve_assignment_credentials
|
|
78
|
+
effective = config_mod.load_config()
|
|
79
|
+
definition = resolve_provider_full(update["provider"], effective.get("providers"), effective.get("custom_providers"))
|
|
80
|
+
same_provider = model.get("provider") == update["provider"]
|
|
81
|
+
base_url = (model.get("base_url") or "") if same_provider else (definition.base_url if definition else "")
|
|
82
|
+
if not same_provider and definition is None:
|
|
83
|
+
raise ValueError("DEFAULT_PROVIDER_ROUTE_UNRESOLVED")
|
|
84
|
+
result = ModelSwitchResult(success=True, new_model=update["model"], target_provider=update["provider"],
|
|
85
|
+
base_url=base_url, api_mode=determine_api_mode(update["provider"], base_url, update["model"]))
|
|
86
|
+
target["model"] = apply_model_selection(model, result)
|
|
87
|
+
_resolve_assignment_credentials(target["model"], update["provider"], (effective.get("providers") or {}).get(update["provider"]))
|
|
88
|
+
if "thinkingLevel" in update:
|
|
89
|
+
agent = target.setdefault("agent", {})
|
|
90
|
+
if not isinstance(agent, dict):
|
|
91
|
+
raise ValueError("INVALID_AGENT_CONFIG")
|
|
92
|
+
overrides = agent.setdefault("reasoning_overrides", {})
|
|
93
|
+
if not isinstance(overrides, dict):
|
|
94
|
+
raise ValueError("INVALID_REASONING_OVERRIDES")
|
|
95
|
+
agent["reasoning_effort"] = update["thinkingLevel"]
|
|
96
|
+
# 精确模型键优先于拼写/前缀兼容匹配;保留其他模型的专项配置。
|
|
97
|
+
overrides[update["model"]] = update["thinkingLevel"]
|
|
98
|
+
resolved = resolve_reasoning_config(target, update["model"])
|
|
99
|
+
if resolved != parse_reasoning_effort(update["thinkingLevel"]):
|
|
100
|
+
raise ValueError("DEFAULT_REASONING_NOT_EFFECTIVE")
|
|
101
|
+
if prepare:
|
|
102
|
+
prepare(digest(target))
|
|
103
|
+
# 原生模型选择会删除旧路由的端点/凭据指针;其余完整raw快照保持。
|
|
104
|
+
config_mod.atomic_config_replace(path, target)
|
|
105
|
+
after = snapshot()
|
|
106
|
+
if after["model"] != update["model"] or after["provider"] != update["provider"] or (
|
|
107
|
+
"thinkingLevel" in update and after["thinkingLevel"] != update["thinkingLevel"]
|
|
108
|
+
):
|
|
109
|
+
raise ValueError("DEFAULT_READBACK_MISMATCH")
|
|
110
|
+
return {"status": "applied", "snapshot": after}
|
|
111
|
+
finally:
|
|
112
|
+
reset_hermes_home_override(token)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def model_display_names(profile, models):
|
|
116
|
+
"""固定版展示兼容:只读原profile的名称元数据,不刷新网络或改变模型身份。"""
|
|
117
|
+
global _model_names_warning_emitted
|
|
118
|
+
from hermes_constants import set_hermes_home_override, reset_hermes_home_override
|
|
119
|
+
|
|
120
|
+
token = set_hermes_home_override(profile)
|
|
121
|
+
names = {}
|
|
122
|
+
try:
|
|
123
|
+
from agent.models_dev import get_model_info
|
|
124
|
+
from hermes_cli.config import load_config_readonly
|
|
125
|
+
|
|
126
|
+
config = load_config_readonly()
|
|
127
|
+
for model in models:
|
|
128
|
+
try:
|
|
129
|
+
info = get_model_info(model["provider"], model["name"], allow_network=False, config=config)
|
|
130
|
+
name = info.name if info else None
|
|
131
|
+
if isinstance(name, str) and name.strip():
|
|
132
|
+
names[(model["provider"], model["name"])] = name.strip()
|
|
133
|
+
except Exception:
|
|
134
|
+
if not _model_names_warning_emitted:
|
|
135
|
+
_model_names_warning_emitted = True
|
|
136
|
+
logger.warning("hermes.compat.model_names_v0_22_5:名称元数据不可读,保留原模型ID")
|
|
137
|
+
except Exception:
|
|
138
|
+
if not _model_names_warning_emitted:
|
|
139
|
+
_model_names_warning_emitted = True
|
|
140
|
+
logger.warning("hermes.compat.model_names_v0_22_5:名称配置不可读,保留原模型ID")
|
|
141
|
+
finally:
|
|
142
|
+
reset_hermes_home_override(token)
|
|
143
|
+
return names
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def resolved_reasoning_default(model: str):
|
|
147
|
+
"""固定版兼容:用Hermes自身合并配置解析当前模型的默认reasoning effort。
|
|
148
|
+
|
|
149
|
+
Hermes 0.22.5 的公开 model.options 不发布默认值;这里只读 `hermes_cli.config.load_config_readonly()`
|
|
150
|
+
的合并结果,再走 `hermes_constants.resolve_reasoning_config()`(per-model overrides → 全局
|
|
151
|
+
agent.reasoning_effort → 无配置则 None,交给provider默认)。读取失败不发布默认值并告警,
|
|
152
|
+
不写配置、不创建会话、不猜测档位。
|
|
153
|
+
"""
|
|
154
|
+
global _resolved_default_warning_emitted
|
|
155
|
+
if not isinstance(model, str) or not model.strip():
|
|
156
|
+
return None
|
|
157
|
+
try:
|
|
158
|
+
from hermes_cli.config import load_config_readonly
|
|
159
|
+
from hermes_constants import resolve_reasoning_config
|
|
160
|
+
|
|
161
|
+
return resolve_reasoning_config(load_config_readonly(), model)
|
|
162
|
+
except Exception:
|
|
163
|
+
if not _resolved_default_warning_emitted:
|
|
164
|
+
_resolved_default_warning_emitted = True
|
|
165
|
+
logger.warning(
|
|
166
|
+
"hermes.compat.resolved_reasoning_default_v0_22_5:无法读取宿主默认思考强度,"
|
|
167
|
+
"模型目录不发布defaultValue(公开默认值API可用后替换)"
|
|
168
|
+
)
|
|
169
|
+
return None
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def profile_reasoning_default(profile, model):
|
|
173
|
+
"""目录默认与写入使用同一owner Profile;ContextVar不污染其他Profile。"""
|
|
174
|
+
from hermes_constants import set_hermes_home_override, reset_hermes_home_override
|
|
175
|
+
token = set_hermes_home_override(profile)
|
|
176
|
+
try:
|
|
177
|
+
return resolved_reasoning_default(model)
|
|
178
|
+
finally:
|
|
179
|
+
reset_hermes_home_override(token)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
CRITICAL_FILES = [
|
|
183
|
+
"gateway/session_authorities.py",
|
|
184
|
+
"gateway/session_identity.py",
|
|
185
|
+
"gateway/session.py",
|
|
186
|
+
"gateway/platforms/base.py",
|
|
187
|
+
"hermes_state_runtime.py",
|
|
188
|
+
"gateway/session_envelope.py",
|
|
189
|
+
"gateway/session_authority.py",
|
|
190
|
+
"gateway/authz_mixin.py",
|
|
191
|
+
"gateway/run_adapters.py",
|
|
192
|
+
"gateway/run_inbound.py",
|
|
193
|
+
"gateway/run_inbound_hooks.py",
|
|
194
|
+
"gateway/run.py",
|
|
195
|
+
"gateway/run_busy.py",
|
|
196
|
+
"gateway/run_startup.py",
|
|
197
|
+
"gateway/run_runtime_init.py",
|
|
198
|
+
"gateway/session_ingress.py",
|
|
199
|
+
"gateway/session_ingress_burst.py",
|
|
200
|
+
"gateway/platforms/event.py",
|
|
201
|
+
"gateway/session_ingress_media.py",
|
|
202
|
+
"agent/image_routing.py",
|
|
203
|
+
"agent/session_persistence.py",
|
|
204
|
+
"gateway/session_images.py",
|
|
205
|
+
"tui_gateway/prompt_attachments.py",
|
|
206
|
+
"gateway/session_authority.py",
|
|
207
|
+
"gateway/session_pending_controls.py",
|
|
208
|
+
"tools/approval.py",
|
|
209
|
+
"tools/approval_gateway_wait.py",
|
|
210
|
+
"tools/clarify_gateway.py",
|
|
211
|
+
"gateway/session_server_requests.py",
|
|
212
|
+
"gateway/session_usage.py",
|
|
213
|
+
"gateway/session_controls.py",
|
|
214
|
+
"gateway/session_events.py",
|
|
215
|
+
"gateway/session_contract.py",
|
|
216
|
+
"gateway/runtime_ownership.py",
|
|
217
|
+
"gateway/control_socket.py",
|
|
218
|
+
"gateway/run_bootstrap.py",
|
|
219
|
+
"tui_gateway/transport.py",
|
|
220
|
+
"gateway/session_context.py",
|
|
221
|
+
"agent/plugin_stream_hooks.py",
|
|
222
|
+
"agent/stream_delivery.py",
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class MediaDeliveryBoundary:
|
|
227
|
+
def media_source_references(self, event, extracted):
|
|
228
|
+
# pre_extract是固定_ExtractedResponse内部字段,并非公开保证;只读配对,不改parser/dispatcher。
|
|
229
|
+
from gateway.platforms.base import _ExtractedResponse
|
|
230
|
+
if not isinstance(extracted, _ExtractedResponse):
|
|
231
|
+
return ()
|
|
232
|
+
targets = list(dict.fromkeys([path for path, _ in extracted.media_files] + extracted.local_files))
|
|
233
|
+
original = getattr(extracted, "pre_extract", None)
|
|
234
|
+
if not isinstance(original, str):
|
|
235
|
+
return tuple((target, None) for target in targets)
|
|
236
|
+
with self._media_delivery_scope(event.source):
|
|
237
|
+
media, body = self.extract_media(original)
|
|
238
|
+
_, body = self.extract_images(body)
|
|
239
|
+
local, _ = self.extract_local_files(body)
|
|
240
|
+
candidates = list(dict.fromkeys([path for path, _ in media] + local))
|
|
241
|
+
route = self._source_session_key(event.source)
|
|
242
|
+
mapped = [(candidate, self.validate_media_delivery_path(candidate, session_key=route)) for candidate in candidates]
|
|
243
|
+
# 多义/失配只拒绝对应目标;不以basename或唯一当前run归属其他合法输出。
|
|
244
|
+
return tuple((target, matches[0] if len(matches := [raw for raw, normalized in mapped if normalized == target]) == 1 else None)
|
|
245
|
+
for target in targets)
|
|
246
|
+
|
|
247
|
+
async def extract_owned_response(self, record, response):
|
|
248
|
+
# 只投影原持久结果;此event不重新进入handle_message、授权或模型循环。
|
|
249
|
+
lease = self._recovery().lease()
|
|
250
|
+
event = await lease[0].delivery_event(record)
|
|
251
|
+
self._recovery().check(lease)
|
|
252
|
+
if event is None:
|
|
253
|
+
return None
|
|
254
|
+
extracted = await self._extract_response_content(response, event, self._source_session_key(event.source), is_ephemeral_response=False)
|
|
255
|
+
self._recovery().check(lease)
|
|
256
|
+
return extracted
|
|
257
|
+
|
|
258
|
+
async def _deliver_attachments(self, event, *args, **kwargs):
|
|
259
|
+
# 正常及原生恢复均经此含原event的固定边界;parser/派发全部继续使用SDK原实现。
|
|
260
|
+
extracted = args[0] if args else kwargs.get("extracted")
|
|
261
|
+
if extracted is not None and not any(getattr(extracted, field, ()) for field in ("images", "media_files", "local_files")):
|
|
262
|
+
return await super()._deliver_attachments(event, *args, **kwargs)
|
|
263
|
+
references = self.media_source_references(event, extracted)
|
|
264
|
+
async with self.delivery_context(event, media_sources=references):
|
|
265
|
+
return await super()._deliver_attachments(event, *args, **kwargs)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def verified_source():
|
|
269
|
+
root = Path(gateway_config.__file__).resolve().parents[1]
|
|
270
|
+
try:
|
|
271
|
+
revision = subprocess.check_output(
|
|
272
|
+
["git", "-C", str(root), "rev-parse", "HEAD"],
|
|
273
|
+
text=True,
|
|
274
|
+
stderr=subprocess.DEVNULL,
|
|
275
|
+
timeout=3,
|
|
276
|
+
).strip()
|
|
277
|
+
clean = (
|
|
278
|
+
subprocess.run(
|
|
279
|
+
[
|
|
280
|
+
"git",
|
|
281
|
+
"-C",
|
|
282
|
+
str(root),
|
|
283
|
+
"diff",
|
|
284
|
+
"--quiet",
|
|
285
|
+
"HEAD",
|
|
286
|
+
"--",
|
|
287
|
+
*CRITICAL_FILES,
|
|
288
|
+
],
|
|
289
|
+
stderr=subprocess.DEVNULL,
|
|
290
|
+
timeout=3,
|
|
291
|
+
).returncode
|
|
292
|
+
== 0
|
|
293
|
+
)
|
|
294
|
+
except (OSError, subprocess.SubprocessError):
|
|
295
|
+
raise PublicRuntimeUnavailable("HERMES_COMPAT_REVISION_UNVERIFIED")
|
|
296
|
+
if revision != APPROVED_REVISION or not clean:
|
|
297
|
+
raise PublicRuntimeUnavailable("HERMES_COMPAT_REVISION_UNSUPPORTED")
|
|
298
|
+
return root
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class BindingLocator:
|
|
302
|
+
platform = "fridaynext"
|
|
303
|
+
hermes_version = "0.22.5"
|
|
304
|
+
|
|
305
|
+
def __init__(self, adapter, profile):
|
|
306
|
+
verified_source()
|
|
307
|
+
logger.warning("hermes.compat.media_source_reference_v0_22_5:依赖内部pre_extract;公开原引用接缝可用后替换")
|
|
308
|
+
# 静态导入保留validator可见性;不动态拼接名称隐藏耦合。
|
|
309
|
+
from gateway.session_authorities import authority_for_home, owner_scope
|
|
310
|
+
from gateway.session_identity import identity_of
|
|
311
|
+
from hermes_state_runtime import list_session_admissions
|
|
312
|
+
|
|
313
|
+
self.adapter = adapter
|
|
314
|
+
self.profile_home = str(profile)
|
|
315
|
+
self.authority_for_home = authority_for_home
|
|
316
|
+
self.owner_scope = owner_scope
|
|
317
|
+
self.identity_of = identity_of
|
|
318
|
+
self.list_admissions = list_session_admissions
|
|
319
|
+
self.observed_controls = {}
|
|
320
|
+
self.reasoning_sources = OrderedDict()
|
|
321
|
+
self.reasoning_lock = threading.Lock()
|
|
322
|
+
self.reasoning_warning_emitted = False
|
|
323
|
+
|
|
324
|
+
def publish_reasoning(self, event):
|
|
325
|
+
"""公开钩子的文本,用原回调 ContextVar 输入身份发布到原执行的回放流。
|
|
326
|
+
|
|
327
|
+
公开钩子没有 admission/generation;这里不按会话取最新运行,也不替换 Agent 回调。
|
|
328
|
+
固定版 observer 复制产生事件时的上下文,迟到回调仍指向旧输入,原代发布会拒绝它。
|
|
329
|
+
"""
|
|
330
|
+
from hermes_constants import get_hermes_home
|
|
331
|
+
from gateway.session_context import (
|
|
332
|
+
_SESSION_MESSAGE_ID, _SESSION_CHAT_ID, _SESSION_KEY, _SESSION_ID, _SESSION_PLATFORM,
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
delta = event.get("delta")
|
|
336
|
+
native, turn, iteration = event.get("session_id"), event.get("turn_id"), event.get("iteration")
|
|
337
|
+
source = (_SESSION_MESSAGE_ID.get(None), _SESSION_CHAT_ID.get(None), _SESSION_KEY.get(None),
|
|
338
|
+
_SESSION_ID.get(None), _SESSION_PLATFORM.get(None))
|
|
339
|
+
if (event.get("kind") != "reasoning" or not isinstance(delta, str) or not delta
|
|
340
|
+
or not isinstance(turn, str) or not turn or type(iteration) is not int or iteration < 1
|
|
341
|
+
or any(not isinstance(value, str) or not value for value in source)
|
|
342
|
+
or source[3] != native or source[4] != self.platform or event.get("surface") != self.platform
|
|
343
|
+
or str(Path(get_hermes_home()).resolve()) != self.profile_home):
|
|
344
|
+
return False
|
|
345
|
+
adapter = self.adapter
|
|
346
|
+
runtime = adapter.runtime
|
|
347
|
+
identity = getattr(getattr(runtime, "client", None), "identity", None)
|
|
348
|
+
if not adapter.plugin_enabled or not identity or adapter.host is None:
|
|
349
|
+
return False
|
|
350
|
+
authority = self.authority()
|
|
351
|
+
if identity.get("authority_epoch") != authority.epoch:
|
|
352
|
+
return False
|
|
353
|
+
input_id, chat_id, session_key, _, _ = source
|
|
354
|
+
with self.reasoning_lock:
|
|
355
|
+
if not self.reasoning_warning_emitted:
|
|
356
|
+
self.reasoning_warning_emitted = True
|
|
357
|
+
logger.warning("hermes.compat.reasoning_identity_v0_22_5:文本来自公开on_stream_delta;原输入ContextVar与执行发布为固定版兼容接缝")
|
|
358
|
+
key = (authority, authority.epoch, source, turn)
|
|
359
|
+
original = self.reasoning_sources.get(key)
|
|
360
|
+
if original is None:
|
|
361
|
+
owner = authority.logical_owner(native)
|
|
362
|
+
live = authority.sessions.get(owner)
|
|
363
|
+
if (live is None or getattr(live.source, "chat_id", None) != chat_id
|
|
364
|
+
or adapter._source_session_key(live.source) != session_key):
|
|
365
|
+
return False
|
|
366
|
+
with self.owner_scope(authority):
|
|
367
|
+
rows = [row for row in self.list_admissions(authority.db, session_id=owner, pending_only=False)
|
|
368
|
+
if row.get("request_id") == input_id]
|
|
369
|
+
if len(rows) != 1:
|
|
370
|
+
return False
|
|
371
|
+
row = rows[0]
|
|
372
|
+
payload = row.get("payload", {}).get("native_text_v1", {})
|
|
373
|
+
original_source = payload.get("source", {})
|
|
374
|
+
original_event = payload.get("event", {})
|
|
375
|
+
if (original_source.get("platform") != self.platform or original_source.get("chat_id") != chat_id
|
|
376
|
+
or original_source.get("message_id") != input_id or original_event.get("message_id") != input_id
|
|
377
|
+
or original_event.get("allow_gateway_control") is not False
|
|
378
|
+
or row.get("owner_epoch") != authority.epoch or type(row.get("generation")) is not int):
|
|
379
|
+
return False
|
|
380
|
+
original = (owner, row["generation"])
|
|
381
|
+
self.reasoning_sources[key] = original
|
|
382
|
+
while len(self.reasoning_sources) > 128:
|
|
383
|
+
self.reasoning_sources.popitem(last=False)
|
|
384
|
+
else:
|
|
385
|
+
self.reasoning_sources.move_to_end(key)
|
|
386
|
+
# 原生流锁同步检查执行代并打原准入stamp;停止后或下一代已运行则拒绝。
|
|
387
|
+
return authority.publish_execution(*original, "reasoning.delta", {
|
|
388
|
+
"text": delta, "turn_id": turn, "iteration": iteration,
|
|
389
|
+
})
|
|
390
|
+
|
|
391
|
+
def authority(self):
|
|
392
|
+
value = self.authority_for_home(
|
|
393
|
+
self.adapter.gateway_runner, Path(self.profile_home)
|
|
394
|
+
)
|
|
395
|
+
if value is None:
|
|
396
|
+
raise RuntimeError("PROFILE_NOT_SERVED")
|
|
397
|
+
return value
|
|
398
|
+
|
|
399
|
+
def ingress_rejection(self, source):
|
|
400
|
+
"""宿主 ingress 丢事件后,判断这是不是"明确未授权"。
|
|
401
|
+
|
|
402
|
+
宿主把不在允许列表里的发送者直接丢弃(`gateway/run_inbound.py` 的 "Unauthorized user"),
|
|
403
|
+
只留下 None,客户端看不到任何原因(FN-171)。这里用宿主自己的授权判定复核同一来源:
|
|
404
|
+
只有明确 False 才是确定拒绝;None(没装回调,"trust unknown")、True、异常或非布尔都
|
|
405
|
+
不算,保持原来的 unknown 语义,不把合法入站误判成拒绝。
|
|
406
|
+
"""
|
|
407
|
+
runner = self.adapter.gateway_runner
|
|
408
|
+
probe = getattr(runner, "_is_user_authorized_for_source", None)
|
|
409
|
+
if not callable(probe):
|
|
410
|
+
return None
|
|
411
|
+
try:
|
|
412
|
+
verdict = probe(source)
|
|
413
|
+
except Exception:
|
|
414
|
+
return None
|
|
415
|
+
if verdict is not False:
|
|
416
|
+
return None
|
|
417
|
+
return InputAdmissionRefused("HOST_SOURCE_UNAUTHORIZED", "ingress-auth")
|
|
418
|
+
|
|
419
|
+
def validate_source(self, source):
|
|
420
|
+
self.adapter._canonicalize(source)
|
|
421
|
+
identity = self.identity_of(source)
|
|
422
|
+
return identity is not None and Path(identity.runtime_home).resolve() == Path(
|
|
423
|
+
self.profile_home
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
def input_media_policy(self, *, shared=False):
|
|
427
|
+
# 只通过公开图片大小helper读原owner profile;范围切换继续收在固定兼容层。
|
|
428
|
+
from gateway.platforms.base import get_inbound_media_max_bytes
|
|
429
|
+
with self.owner_scope(self.authority()):
|
|
430
|
+
policy = {"version": 1, "maxCount": 10, "maxBytes": max(0, get_inbound_media_max_bytes())}
|
|
431
|
+
if shared:
|
|
432
|
+
# 公开stage RPC未声明可读的limit字段;固定实现的额外25MiB/张合同明确收在兼容层。
|
|
433
|
+
from tui_gateway.prompt_attachments import _ATTACH_BYTES_MAX_BYTES
|
|
434
|
+
policy["maxFileBytes"] = _ATTACH_BYTES_MAX_BYTES
|
|
435
|
+
return policy
|
|
436
|
+
|
|
437
|
+
def selected_image_root(self):
|
|
438
|
+
from gateway.platforms.base import get_image_cache_dir
|
|
439
|
+
with self.owner_scope(self.authority()):
|
|
440
|
+
root = Path(get_image_cache_dir())
|
|
441
|
+
if not root.is_absolute() or root.resolve() != root or root.is_symlink():
|
|
442
|
+
raise RuntimeError("MEDIA_SCOPE_INVALID")
|
|
443
|
+
return str(root)
|
|
444
|
+
|
|
445
|
+
def output_media_roots(self):
|
|
446
|
+
from gateway.platforms.base import get_image_cache_dir, get_document_cache_dir
|
|
447
|
+
with self.owner_scope(self.authority()):
|
|
448
|
+
roots = [Path(get_image_cache_dir()), Path(get_document_cache_dir()), *self.adapter.media_output_roots]
|
|
449
|
+
if any(not path.is_absolute() or path.resolve() != path or path.is_symlink()
|
|
450
|
+
or path in (Path("/"), Path.home(), Path(self.profile_home)) for path in roots):
|
|
451
|
+
raise RuntimeError("MEDIA_OUTPUT_ROOT_INVALID")
|
|
452
|
+
return tuple(roots)
|
|
453
|
+
|
|
454
|
+
def extract_selected_response(self, response):
|
|
455
|
+
# selected原会话没有平台event;只在原profile作用域调用SDK公开parser,不复造私有分发事件。
|
|
456
|
+
with self.owner_scope(self.authority()):
|
|
457
|
+
media, body = self.adapter.extract_media(response)
|
|
458
|
+
images, body = self.adapter.extract_images(body)
|
|
459
|
+
local, body = self.adapter.extract_local_files(body)
|
|
460
|
+
body = self.adapter.strip_media_directives_for_display(body)
|
|
461
|
+
return {"text": body, "images": images, "paths": list(dict.fromkeys([path for path, _ in media] + local)),
|
|
462
|
+
"force_document": "[[as_document]]" in response}
|
|
463
|
+
|
|
464
|
+
async def cache_output_image(self, url, limit):
|
|
465
|
+
from urllib.parse import urlsplit
|
|
466
|
+
from gateway.platforms.helpers import platform_http_client
|
|
467
|
+
from gateway.platforms.base import cache_image_from_bytes_async
|
|
468
|
+
from .media_input import image_mime, MIMES
|
|
469
|
+
parsed = urlsplit(url)
|
|
470
|
+
if (parsed.scheme not in ("http", "https") or not parsed.hostname or parsed.username is not None
|
|
471
|
+
or parsed.password is not None or type(limit) is not int or limit < 1):
|
|
472
|
+
raise RuntimeError("MEDIA_REMOTE_URL_INVALID")
|
|
473
|
+
# SDK公开client负责实际连接IP与每跳重定向;这里仅执行本插件已有输出上限。
|
|
474
|
+
with self.owner_scope(self.authority()):
|
|
475
|
+
async with platform_http_client(timeout=15.0, max_redirects=5) as client:
|
|
476
|
+
async with client.stream("GET", url, headers={"Accept": "image/*"}) as response:
|
|
477
|
+
response.raise_for_status()
|
|
478
|
+
try:
|
|
479
|
+
declared = int(response.headers.get("content-length", "0"))
|
|
480
|
+
except ValueError:
|
|
481
|
+
declared = 0
|
|
482
|
+
if declared > limit:
|
|
483
|
+
raise RuntimeError("MEDIA_OUTPUT_SIZE_INVALID")
|
|
484
|
+
chunks, total = [], 0
|
|
485
|
+
async for chunk in response.aiter_bytes():
|
|
486
|
+
total += len(chunk)
|
|
487
|
+
if total > limit:
|
|
488
|
+
raise RuntimeError("MEDIA_OUTPUT_SIZE_INVALID")
|
|
489
|
+
chunks.append(chunk)
|
|
490
|
+
data = b"".join(chunks)
|
|
491
|
+
mime = image_mime(data[:12])
|
|
492
|
+
if not mime:
|
|
493
|
+
raise RuntimeError("MEDIA_OUTPUT_MIME_INVALID")
|
|
494
|
+
extension = MIMES[mime]
|
|
495
|
+
path = await cache_image_from_bytes_async(data, ext=extension)
|
|
496
|
+
return {"path": path, "filename": "image" + extension}
|
|
497
|
+
|
|
498
|
+
def delivery_event(self, record):
|
|
499
|
+
from hermes_state_runtime import get_session_admission
|
|
500
|
+
from gateway.session_envelope import restore_native_source
|
|
501
|
+
from gateway.platforms.event import MessageEvent, MessageType
|
|
502
|
+
if (record.get("legacy") or record.get("shared") or record.get("profile") != self.profile_home
|
|
503
|
+
or record.get("service_id") != self.adapter.service_id or not record.get("admission_id")):
|
|
504
|
+
return None
|
|
505
|
+
authority = self.authority()
|
|
506
|
+
with self.owner_scope(authority):
|
|
507
|
+
row = get_session_admission(authority.db, admission_id=record["admission_id"])
|
|
508
|
+
projected = self._project(row, record["input_id"])
|
|
509
|
+
if (projected is None or projected["admission_id"] != record["admission_id"]
|
|
510
|
+
or projected["conversation_id"] != record["native_id"] or projected["chat_id"] != record["chat_id"]):
|
|
511
|
+
return None
|
|
512
|
+
payload = row["payload"]; native = payload["native_text_v1"]
|
|
513
|
+
if (native.get("event", {}).get("message_id") != record["input_id"]
|
|
514
|
+
or native.get("event", {}).get("allow_gateway_control") is not False):
|
|
515
|
+
return None
|
|
516
|
+
source = restore_native_source(payload, self.adapter.gateway_runner)
|
|
517
|
+
if not self.validate_source(source):
|
|
518
|
+
return None
|
|
519
|
+
# 图片源只用于入站执行;展示解析保留原已证明身份,不因输入缓存回收重新读取图片。
|
|
520
|
+
return MessageEvent(text=payload["text"], source=source, message_id=record["input_id"],
|
|
521
|
+
message_type=MessageType(native.get("message_type", "text")), allow_gateway_control=False)
|
|
522
|
+
|
|
523
|
+
def input_media_history(self, record):
|
|
524
|
+
"""仅原准入有限字段证明历史注记;不读正文路径猜归属、不改原生历史。"""
|
|
525
|
+
from hermes_state_runtime import get_session_admission
|
|
526
|
+
if (record.get("legacy")
|
|
527
|
+
or record.get("profile") != self.profile_home
|
|
528
|
+
or record.get("service_id") != self.adapter.service_id
|
|
529
|
+
or not record.get("admission_id") or not record.get("input_media")):
|
|
530
|
+
return None
|
|
531
|
+
with self.owner_scope(self.authority()):
|
|
532
|
+
row = get_session_admission(self.authority().db, admission_id=record["admission_id"])
|
|
533
|
+
if (row is None or row.get("admission_id") != record["admission_id"]
|
|
534
|
+
or row.get("request_id") != record.get("input_id")
|
|
535
|
+
or row.get("target_session_id") != record.get("native_id")):
|
|
536
|
+
return None
|
|
537
|
+
payload = row.get("payload", {})
|
|
538
|
+
frozen = record["input_media"]
|
|
539
|
+
if record.get("shared"):
|
|
540
|
+
envelope = payload.get("attachments_v1", {})
|
|
541
|
+
if "native_text_v1" in payload:
|
|
542
|
+
return None
|
|
543
|
+
media, types = envelope.get("media"), envelope.get("media_types")
|
|
544
|
+
else:
|
|
545
|
+
native = payload.get("native_text_v1", {})
|
|
546
|
+
source, event = native.get("source", {}), native.get("event", {})
|
|
547
|
+
if (source.get("platform") != self.platform or source.get("chat_id") != record.get("chat_id")
|
|
548
|
+
or source.get("message_id") != record.get("input_id") or event.get("message_id") != record.get("input_id")):
|
|
549
|
+
return None
|
|
550
|
+
media, types = native.get("media"), event.get("media_types")
|
|
551
|
+
if (not isinstance(payload.get("text"), str) or type(media) is not list
|
|
552
|
+
or type(frozen) is not list or not 1 <= len(media) <= 10 or len(media) != len(frozen)
|
|
553
|
+
or types != [item.get("mimeType") for item in frozen]
|
|
554
|
+
or any(type(item) is not dict or not isinstance(item.get("path"), str)
|
|
555
|
+
or item.get("sha256") != original.get("sha256")
|
|
556
|
+
or item.get("size") != original.get("size") for item, original in zip(media, frozen))):
|
|
557
|
+
return None
|
|
558
|
+
text = payload["text"]
|
|
559
|
+
# 固定image_routing与session_persistence的完整生成形态;只比较全值,不解析/删正文子串。
|
|
560
|
+
rendered = (text.strip() or "What do you see in this image?") + "\n\n"
|
|
561
|
+
rendered += "\n".join("[Image attached at: " + item["path"] + "]" for item in media)
|
|
562
|
+
rendered += "\n[screenshot]" * len(media)
|
|
563
|
+
return {"version": 1, "text": text, "rendered": rendered,
|
|
564
|
+
"sha256": [item["sha256"] for item in media]}
|
|
565
|
+
|
|
566
|
+
def input_identity(self, event):
|
|
567
|
+
source = event.source
|
|
568
|
+
if (not self.validate_source(source)
|
|
569
|
+
or getattr(source.platform, "value", source.platform) != self.platform
|
|
570
|
+
or not isinstance(event.message_id, str) or not event.message_id
|
|
571
|
+
or source.message_id != event.message_id):
|
|
572
|
+
raise RuntimeError("FIFO_INPUT_SCOPE_MISMATCH")
|
|
573
|
+
return (str(Path(self.identity_of(source).runtime_home).resolve()),
|
|
574
|
+
source.chat_id, source.chat_type, source.user_id, source.thread_id,
|
|
575
|
+
event.message_id)
|
|
576
|
+
|
|
577
|
+
async def prepare_input(self, event, *, runtime):
|
|
578
|
+
"""完整宿主门禁先执行;已授权事件再使用原宿主FIFO标记,仍经标准handle_message。"""
|
|
579
|
+
adapter, runner = self.adapter, self.adapter.gateway_runner
|
|
580
|
+
if (hasattr(event, "_fifo_only") or event.internal is not False
|
|
581
|
+
or event.allow_gateway_control is not False
|
|
582
|
+
or asyncio.get_running_loop() is not adapter.owner_loop
|
|
583
|
+
or getattr(runner, "_running", False) is not True
|
|
584
|
+
or type(getattr(runner, "_startup_restore_in_progress", None)) is not bool
|
|
585
|
+
or runner._startup_restore_in_progress):
|
|
586
|
+
raise InputAdmissionRefused()
|
|
587
|
+
authority = self.authority()
|
|
588
|
+
lease = (adapter.runtime, adapter.host, adapter.bindings, adapter.service_id, authority,
|
|
589
|
+
authority.epoch, str(Path(adapter.profile).resolve()))
|
|
590
|
+
identity = getattr(runtime.client, "identity", None)
|
|
591
|
+
if (lease[0] is not runtime or not isinstance(identity, dict)
|
|
592
|
+
or identity.get("authority_epoch") != authority.epoch or lease[6] != self.profile_home):
|
|
593
|
+
raise RuntimeError("FIFO_INPUT_CONTEXT_CHANGED")
|
|
594
|
+
with self.owner_scope(authority):
|
|
595
|
+
expected = self.input_identity(event)
|
|
596
|
+
route = adapter._source_session_key(event.source)
|
|
597
|
+
stop_epoch = runner._route_stop_epoch(route)
|
|
598
|
+
# 固定源码在startup分支之前无await;True时不能让未授权事件进入恢复队列。
|
|
599
|
+
admitted = await runner._hm_admit_event(event)
|
|
600
|
+
if admitted is None:
|
|
601
|
+
# 宿主默认拒绝不在允许列表里的发送者,且在 ingress 就把事件丢掉。这与 hook 消费、
|
|
602
|
+
# 生命周期变化一样只表现为"没有返回",但原因不同:未授权是确定的拒绝,必须让客户端
|
|
603
|
+
# 看到可读失败(FN-171),不能和 unknown 混在一起。
|
|
604
|
+
rejection = self.ingress_rejection(event.source)
|
|
605
|
+
if rejection is not None:
|
|
606
|
+
raise rejection
|
|
607
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_NOT_ADMITTED", "ingress-result")
|
|
608
|
+
current = (adapter.runtime, adapter.host, adapter.bindings, adapter.service_id, self.authority(),
|
|
609
|
+
authority.epoch, str(Path(adapter.profile).resolve()))
|
|
610
|
+
identity = getattr(runtime.client, "identity", None)
|
|
611
|
+
if (any(current[i] is not lease[i] for i in (0, 1, 2, 4)) or current[3] != lease[3]
|
|
612
|
+
or current[5:] != lease[5:] or not isinstance(identity, dict)
|
|
613
|
+
or identity.get("authority_epoch") != lease[5]
|
|
614
|
+
or getattr(runner, "_running", False) is not True
|
|
615
|
+
or getattr(runner, "_startup_restore_in_progress", None) is not False):
|
|
616
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_CONTEXT_CHANGED", "after-ingress")
|
|
617
|
+
if runner._route_stop_epoch(route) != stop_epoch:
|
|
618
|
+
raise InputAdmissionUnconfirmed("FIFO_STOP_EPOCH_CHANGED", "after-ingress")
|
|
619
|
+
accepted_event, source, internal = admitted
|
|
620
|
+
if (internal is not False or accepted_event.internal is not False
|
|
621
|
+
or accepted_event.allow_gateway_control is not False
|
|
622
|
+
or hasattr(accepted_event, "_fifo_only")
|
|
623
|
+
or accepted_event.source is not source
|
|
624
|
+
or self.input_identity(accepted_event) != expected
|
|
625
|
+
or adapter._source_session_key(source) != route):
|
|
626
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_SCOPE_MISMATCH", "after-ingress")
|
|
627
|
+
# 该标记会跳过第二次ingress,因此只允许在上述真实授权与原epoch核对后设置。
|
|
628
|
+
accepted_event._fifo_only = True
|
|
629
|
+
accepted_event._stop_epoch = stop_epoch
|
|
630
|
+
return accepted_event
|
|
631
|
+
|
|
632
|
+
def prepared_input_guard(self, event, *, runtime):
|
|
633
|
+
"""只校验刚完成完整门禁的原事件;首次配置的每个await继续使用同一栅栏。"""
|
|
634
|
+
adapter, runner = self.adapter, self.adapter.gateway_runner
|
|
635
|
+
authority = self.authority()
|
|
636
|
+
source = event.source
|
|
637
|
+
expected = self.input_identity(event)
|
|
638
|
+
route = adapter._source_session_key(source)
|
|
639
|
+
epoch = authority.epoch
|
|
640
|
+
stop_epoch = getattr(event, "_stop_epoch", None)
|
|
641
|
+
lease = (adapter.runtime, adapter.host, adapter.bindings, adapter.service_id,
|
|
642
|
+
str(Path(adapter.profile).resolve()), adapter.owner_loop)
|
|
643
|
+
instance = runtime.client.identity.get("instance_id")
|
|
644
|
+
|
|
645
|
+
def check():
|
|
646
|
+
identity = runtime.client.identity
|
|
647
|
+
current = (adapter.runtime, adapter.host, adapter.bindings, adapter.service_id,
|
|
648
|
+
str(Path(adapter.profile).resolve()), adapter.owner_loop)
|
|
649
|
+
if (any(current[i] is not lease[i] for i in (0, 1, 2, 5)) or current[3:5] != lease[3:5]
|
|
650
|
+
or runtime is not lease[0] or adapter.gateway_runner is not runner
|
|
651
|
+
or getattr(adapter, "plugin_enabled", None) is not True or not isinstance(identity, dict)
|
|
652
|
+
or identity.get("instance_id") != instance or identity.get("authority_epoch") != epoch
|
|
653
|
+
or self.authority() is not authority or authority.epoch != epoch
|
|
654
|
+
or asyncio.get_running_loop() is not lease[5]
|
|
655
|
+
or getattr(runner, "_running", False) is not True
|
|
656
|
+
or getattr(runner, "_startup_restore_in_progress", None) is not False):
|
|
657
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_CONTEXT_CHANGED", "initial-settings")
|
|
658
|
+
with self.owner_scope(authority):
|
|
659
|
+
try:
|
|
660
|
+
current_identity = self.input_identity(event)
|
|
661
|
+
current_route = adapter._source_session_key(source)
|
|
662
|
+
except (RuntimeError, ValueError):
|
|
663
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_SCOPE_MISMATCH", "initial-settings") from None
|
|
664
|
+
if (event.source is not source or current_identity != expected
|
|
665
|
+
or current_route != route
|
|
666
|
+
or getattr(event, "_fifo_only", None) is not True
|
|
667
|
+
or getattr(event, "_stop_epoch", None) != stop_epoch):
|
|
668
|
+
raise InputAdmissionUnconfirmed("FIFO_INPUT_SCOPE_MISMATCH", "initial-settings")
|
|
669
|
+
if runner._route_stop_epoch(route) != stop_epoch:
|
|
670
|
+
raise InputAdmissionUnconfirmed("FIFO_STOP_EPOCH_CHANGED", "initial-settings")
|
|
671
|
+
|
|
672
|
+
check()
|
|
673
|
+
return check
|
|
674
|
+
|
|
675
|
+
def _project(self, row, input_id):
|
|
676
|
+
if row is None or row.get("request_id") != input_id:
|
|
677
|
+
return None
|
|
678
|
+
source = row.get("payload", {}).get("native_text_v1", {}).get("source", {})
|
|
679
|
+
if source.get("platform") != self.platform:
|
|
680
|
+
return None # 不把旧canonical会话冒认成本平台;迁移须先排空旧运行。
|
|
681
|
+
return {
|
|
682
|
+
"profile_home": self.profile_home,
|
|
683
|
+
"platform": self.platform,
|
|
684
|
+
"chat_id": source.get("chat_id"),
|
|
685
|
+
"conversation_id": row["target_session_id"],
|
|
686
|
+
"input_id": input_id,
|
|
687
|
+
"admission_id": row["admission_id"],
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
def authorize_initial_source(self, source):
|
|
691
|
+
if not self.validate_source(source):
|
|
692
|
+
return False
|
|
693
|
+
with self.owner_scope(self.authority()):
|
|
694
|
+
return (
|
|
695
|
+
self.adapter._is_sender_authorized(
|
|
696
|
+
source.user_id, source.chat_type, source.chat_id
|
|
697
|
+
)
|
|
698
|
+
is True
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
def current_initial_session(self, source):
|
|
702
|
+
if not self.validate_source(source):
|
|
703
|
+
raise RuntimeError("CROSS_PROFILE_ROUTE_UNSUPPORTED")
|
|
704
|
+
authority = self.authority()
|
|
705
|
+
with self.owner_scope(authority):
|
|
706
|
+
key = self.adapter._source_session_key(source)
|
|
707
|
+
native = self.adapter.gateway_runner.session_store.peek_session_id(key)
|
|
708
|
+
return authority.logical_owner(native) if native else None
|
|
709
|
+
|
|
710
|
+
async def ensure_initial_session(self, source, *, check=None):
|
|
711
|
+
from .canonical_control import NativeControlError
|
|
712
|
+
|
|
713
|
+
if asyncio.get_running_loop() is not self.adapter.owner_loop:
|
|
714
|
+
raise NativeControlError("INITIAL_SETTINGS_OWNER_LOOP_MISMATCH")
|
|
715
|
+
if self.authorize_initial_source(source) is not True:
|
|
716
|
+
raise NativeControlError("permission_denied")
|
|
717
|
+
authority = self.authority()
|
|
718
|
+
if check:
|
|
719
|
+
check()
|
|
720
|
+
with self.owner_scope(authority):
|
|
721
|
+
# SDK自己维护路由/保留行;磁盘预留离开loop,发布仍由原owner loop完成。
|
|
722
|
+
reservation = asyncio.create_task(
|
|
723
|
+
asyncio.to_thread(authority._reserve_route, source)
|
|
724
|
+
)
|
|
725
|
+
try:
|
|
726
|
+
native, route = await asyncio.shield(reservation)
|
|
727
|
+
except asyncio.CancelledError:
|
|
728
|
+
await asyncio.gather(reservation, return_exceptions=True)
|
|
729
|
+
raise
|
|
730
|
+
if check:
|
|
731
|
+
check()
|
|
732
|
+
if self.current_initial_session(source) != native:
|
|
733
|
+
raise NativeControlError("INITIAL_SETTINGS_SCOPE_CHANGED")
|
|
734
|
+
ref = authority._publish_route(source, native, route)
|
|
735
|
+
if ref.profile_id != self.profile_home or ref.session_id != native:
|
|
736
|
+
raise NativeControlError("INITIAL_SETTINGS_SCOPE_CHANGED")
|
|
737
|
+
return {"native_id": native, "route_key": route}
|
|
738
|
+
|
|
739
|
+
def lookup_input(self, *, chat_id, input_id):
|
|
740
|
+
authority = self.authority()
|
|
741
|
+
source = self.adapter.build_source(
|
|
742
|
+
chat_id, chat_type="dm", user_id="owner", message_id=input_id
|
|
743
|
+
)
|
|
744
|
+
if not self.validate_source(source):
|
|
745
|
+
raise RuntimeError("CROSS_PROFILE_ROUTE_UNSUPPORTED")
|
|
746
|
+
with self.owner_scope(authority):
|
|
747
|
+
key = self.adapter._source_session_key(source)
|
|
748
|
+
session_id = self.adapter.gateway_runner.session_store.peek_session_id(key)
|
|
749
|
+
if not session_id:
|
|
750
|
+
return None
|
|
751
|
+
matches = [
|
|
752
|
+
row
|
|
753
|
+
for row in self.list_admissions(
|
|
754
|
+
authority.db, session_id=session_id, pending_only=False
|
|
755
|
+
)
|
|
756
|
+
if row.get("request_id") == input_id
|
|
757
|
+
]
|
|
758
|
+
if len(matches) != 1:
|
|
759
|
+
return None
|
|
760
|
+
result = self._project(matches[0], input_id)
|
|
761
|
+
if result and result["chat_id"] != chat_id:
|
|
762
|
+
raise RuntimeError("RECEIPT_SCOPE_MISMATCH")
|
|
763
|
+
return result
|
|
764
|
+
|
|
765
|
+
def control_key(self, binding, prompt_id, generation, epoch, kind):
|
|
766
|
+
return (self.adapter.service_id, binding["conversation_id"], binding["admission_id"],
|
|
767
|
+
binding["input_id"], epoch, generation, prompt_id, kind)
|
|
768
|
+
|
|
769
|
+
def observe_control(self, binding, *, prompt_id, generation, epoch, kind):
|
|
770
|
+
# 不观察secret/sudo或未知请求;不注册回调、不替换resolver、不修改waiter。
|
|
771
|
+
if kind not in ("approval", "clarify") or binding["profile_home"] != self.profile_home:
|
|
772
|
+
raise PublicRuntimeUnavailable("CONTROL_OBSERVATION_SCOPE_INVALID")
|
|
773
|
+
from tools import approval as approvals
|
|
774
|
+
from tools import clarify_gateway as clarifies
|
|
775
|
+
|
|
776
|
+
key = self.control_key(binding, prompt_id, generation, epoch, kind)
|
|
777
|
+
authority = self.authority()
|
|
778
|
+
if authority.epoch != epoch:
|
|
779
|
+
return None
|
|
780
|
+
observed = self.observed_controls.get(key)
|
|
781
|
+
if observed is None:
|
|
782
|
+
live = authority.sessions.get(binding["conversation_id"])
|
|
783
|
+
if live is None:
|
|
784
|
+
return None
|
|
785
|
+
with live.event_stream.lock:
|
|
786
|
+
active = live.event_stream.execution
|
|
787
|
+
current = live.controls.pending.get(prompt_id)
|
|
788
|
+
if (not current or not isinstance(active, dict) or active.get("admission_id") != binding["admission_id"]
|
|
789
|
+
or active.get("authority_epoch") != epoch
|
|
790
|
+
or authority.executing.get(binding["conversation_id"]) != generation):
|
|
791
|
+
return None
|
|
792
|
+
route, prompt = current
|
|
793
|
+
if (prompt.get("kind") != kind or prompt.get("execution_generation") != generation
|
|
794
|
+
or prompt_id in live.controls.remote_responders or (kind == "approval" and not isinstance(route, str))):
|
|
795
|
+
return None
|
|
796
|
+
lock = approvals._lock if kind == "approval" else clarifies._lock
|
|
797
|
+
with lock:
|
|
798
|
+
if kind == "approval":
|
|
799
|
+
entries = [entry for entry in approvals._gateway_queues.get(route, [])
|
|
800
|
+
if entry.data.get("request_id") == prompt_id]
|
|
801
|
+
if len(entries) != 1:
|
|
802
|
+
return None
|
|
803
|
+
entry = entries[0]
|
|
804
|
+
else:
|
|
805
|
+
entry = clarifies._entries.get(prompt_id)
|
|
806
|
+
if entry is None or entry is not route or entry.clarify_id != prompt_id:
|
|
807
|
+
return None
|
|
808
|
+
observed = (authority, entry, tuple(prompt["choices"]))
|
|
809
|
+
self.observed_controls[key] = observed
|
|
810
|
+
if observed[0] is not authority:
|
|
811
|
+
return None
|
|
812
|
+
_, entry, choices = observed
|
|
813
|
+
lock = approvals._lock if kind == "approval" else clarifies._lock
|
|
814
|
+
with lock:
|
|
815
|
+
if not entry.event.is_set():
|
|
816
|
+
return {"status": "pending"}
|
|
817
|
+
if kind == "approval":
|
|
818
|
+
answer = entry.result
|
|
819
|
+
if answer in choices:
|
|
820
|
+
return {"status": "resolved", "winner": answer}
|
|
821
|
+
if entry.expired:
|
|
822
|
+
return {"status": "expired"}
|
|
823
|
+
if entry.cancelled:
|
|
824
|
+
return {"status": "cancelled"}
|
|
825
|
+
else:
|
|
826
|
+
answer = entry.response
|
|
827
|
+
if answer == clarifies.CANCELLED:
|
|
828
|
+
return {"status": "cancelled"}
|
|
829
|
+
if isinstance(answer, str):
|
|
830
|
+
return {"status": "resolved", "winner": "" if answer == clarifies.SKIPPED else answer}
|
|
831
|
+
return {"status": "resolved", "resolution_unknown": True}
|
|
832
|
+
|
|
833
|
+
def forget_control(self, binding, *, prompt_id, generation, epoch, kind):
|
|
834
|
+
self.observed_controls.pop(self.control_key(binding, prompt_id, generation, epoch, kind), None)
|
|
835
|
+
|
|
836
|
+
def close_observations(self):
|
|
837
|
+
self.observed_controls.clear()
|