@m8tes/sdk 0.1.0-alpha.4 → 0.1.0-alpha.6
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/CHANGELOG.md +89 -1
- package/README.md +7 -1
- package/dist/{chunk-CURNMC4F.js → chunk-F6B6R3SP.js} +17 -2
- package/dist/chunk-F6B6R3SP.js.map +1 -0
- package/dist/index.cjs +90 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +163 -33
- package/dist/index.d.ts +163 -33
- package/dist/index.js +77 -24
- package/dist/index.js.map +1 -1
- package/dist/protocol/index.cjs +15 -0
- package/dist/protocol/index.cjs.map +1 -1
- package/dist/protocol/index.d.cts +4 -2
- package/dist/protocol/index.d.ts +4 -2
- package/dist/protocol/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CURNMC4F.js.map +0 -1
package/dist/protocol/index.cjs
CHANGED
|
@@ -641,6 +641,21 @@ function createNormalizer() {
|
|
|
641
641
|
case "permission_request":
|
|
642
642
|
emitApprovalGate(frame, out);
|
|
643
643
|
return;
|
|
644
|
+
case "permission_resolved": {
|
|
645
|
+
const requestId = str(frame, "request_id");
|
|
646
|
+
const status = str(frame, "resolved_status");
|
|
647
|
+
if (!requestId || !["allowed", "denied", "cancelled", "timeout"].includes(status ?? "")) {
|
|
648
|
+
out.push({ type: "unknown", wireType: type });
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
out.push({
|
|
652
|
+
type: "approval-resolved",
|
|
653
|
+
requestId,
|
|
654
|
+
resolved: status === "allowed" ? "approved" : status,
|
|
655
|
+
remembered: status === "allowed" ? typeof frame.remembered === "boolean" ? frame.remembered : null : false
|
|
656
|
+
});
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
644
659
|
/* ---- sandbox + notices ---- */
|
|
645
660
|
case "sandbox-connecting":
|
|
646
661
|
out.push({
|