openmausbot 0.1.62 → 0.1.63

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.
@@ -936,8 +936,8 @@ async function botOverview(bot) {
936
936
  /** Defense in depth for hand-edited/corrupt durable records: elevated
937
937
  * approval semantics require an implemented provider mapping. The trusted transition enforces
938
938
  * this too, but no provider dispatch or later permission callback relies on
939
- * persistence having been produced exclusively by that route. And a turn
940
- * another bot started never runs as Full — see approvalModeForOrigin. */
939
+ * persistence having been produced exclusively by that route. Delegation
940
+ * uses the receiving bot's grant, never the sender's — see approvalModeForOrigin. */
941
941
  const approvalModeForTurn = (bot, peerInitiated = false) => {
942
942
  const mode = approvalModeForOrigin(approvalModeFor(bot), { peerInitiated });
943
943
  if (!supportsApprovalMode(registry.cliTarget(bot.modelSelection.instanceId)?.driverKind, mode)) {
@@ -2469,8 +2469,7 @@ bus.subscribe((event) => {
2469
2469
  const effectiveApprovalMode = asker ? approvalModeForTurn(asker, isInternalTurn(event.threadId)) : "ask";
2470
2470
  const verdict = permission && asker && event.requestId
2471
2471
  ? autoVerdict({
2472
- // the same origin the dispatch used, so a peer-started turn's
2473
- // residual asks are judged as Approve for me here too
2472
+ // Use the same receiving-bot mode as the provider dispatch.
2474
2473
  approvalMode: effectiveApprovalMode,
2475
2474
  autoApprove: false,
2476
2475
  alwaysAllow: asker.alwaysAllow,
@@ -2478,11 +2477,9 @@ bus.subscribe((event) => {
2478
2477
  unattended,
2479
2478
  scope: event.approvalScope,
2480
2479
  requiresExplicitApproval: event.requiresExplicitApproval,
2481
- // Antigravity's residual asks must use a peer-started turn's
2482
- // effective safe Auto mode, not its durable Full grant.
2483
- // Preserve the existing policy of every other provider.
2484
- nativeApproval: requiresNativeApproval(event.provider, event.provider === "antigravityAgent"
2485
- ? effectiveApprovalMode : approvalModeForTurn(asker)),
2480
+ // Match the dispatched mode for every provider, including
2481
+ // delegated Custom and unattended Auto downgrades.
2482
+ nativeApproval: requiresNativeApproval(event.provider, effectiveApprovalMode),
2486
2483
  })
2487
2484
  : null;
2488
2485
  if (verdict?.approve && asker && event.requestId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmausbot",
3
- "version": "0.1.62",
3
+ "version": "0.1.63",
4
4
  "description": "Run the OpenMausBot server anywhere and pair your devices to it",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",