@agentvault/claude-bridge 0.8.16 → 0.8.17

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.
@@ -0,0 +1,5 @@
1
+ import { type HistoryRecoveryCommandInput } from "@agentvault/agentvault";
2
+ type HistoryRecoveryRunner = (input: HistoryRecoveryCommandInput) => Promise<void>;
3
+ export declare function maybeRunRecoverySubcommand(argv?: string[], env?: NodeJS.ProcessEnv, runRecovery?: HistoryRecoveryRunner): Promise<boolean>;
4
+ export {};
5
+ //# sourceMappingURL=recovery.d.ts.map
package/dist/router.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface PushLike {
5
5
  push(text: string, reply?: ReplySink, opts?: {
6
6
  autoReplyOnText?: boolean;
7
7
  replyExpected?: boolean;
8
+ toolEligibleSender?: boolean;
8
9
  armed?: () => boolean;
9
10
  }): void;
10
11
  }
package/dist/session.d.ts CHANGED
@@ -106,34 +106,15 @@ export declare class PersistentClaudeSession {
106
106
  /** Reply sink bound to the message currently being processed. Set as each
107
107
  * message is handed to the model so the say tool routes to the right place. */
108
108
  private activeReply?;
109
- /**
110
- * Per-turn state for the #416 DM auto-reply fallback and the worker tool gate.
111
- *
112
- * LOAD-BEARING (one of two tool-enabling signals): `currentAutoReply` is true
113
- * ONLY on owner DM turns (`autoReplyOnText:true` from wireBridge) and false on
114
- * room turns (`autoReplyOnText:false`). The gate allows tools when EITHER
115
- * `currentAutoReply` (owner DM) OR `currentArmedGetter()` (armed room turn, Slice 2)
116
- * is true. A room-origin turn MUST keep `currentAutoReply` false; an unarmed
117
- * room turn's `currentArmedGetter()` MUST return false — or untrusted input gains full
118
- * tool access. See worker-permission.test.ts for the covering assertion.
119
- */
109
+ /** Owner-DM attestation also enables its plain-text fallback. Room turns
110
+ * carry separate sender authority and can never become DMs on disarm. */
120
111
  private currentAutoReply;
121
- /** Per-turn: a LIVE getter answering "is this turn's room armed right now?"
122
- * (Slice 2 Plan C D5). Independent of currentAutoReply (which is owner-DM-only
123
- * and also drives the #416 plain-text fallback). The gate allows tools when
124
- * EITHER currentAutoReply OR this getter is true. CRITICAL: the gate CALLS this
125
- * getter at each tool-call decision (not a boolean captured once), so a mid-turn
126
- * disarm denies the very next tool call. wireBridge binds it to the ArmingState
127
- * for this turn's room; an unarmed room turn's getter returns false. */
112
+ private currentToolEligibleSender;
113
+ private currentRoomReplyExpected;
114
+ private currentHasRoomContext;
115
+ /** Called per tool decision so a mid-turn room disarm takes effect live. */
128
116
  private currentArmedGetter;
129
- /** Per-turn: does this turn's sender expect a reply? DECOUPLED from
130
- * `currentAutoReply` on purpose — it drives ONLY the #416 plain-text fallback
131
- * (deliver assistant text when the model never calls say), NOT the tool gate.
132
- * True for owner 1:1 DMs (defaults from autoReplyOnText) AND for a HUMAN/owner
133
- * speaking in a room (wireBridge sets replyExpected from !senderIsAgent). An
134
- * agent-authored room turn keeps this false → the agent may still stay silent,
135
- * which also prevents agent↔agent reply loops. Tool access is unaffected: it
136
- * stays gated on currentAutoReply (owner DM) OR currentArmedGetter (armed room). */
117
+ /** Effective prose fallback policy, including the separate owner-DM default. */
137
118
  private currentReplyExpected;
138
119
  /** #1180: whether the say tool may deliver on this turn. Rooms pass an explicit
139
120
  * `replyExpected` (#1107: no @ → nobody replies) and that decides it; a 1:1 DM
@@ -190,6 +171,7 @@ export declare class PersistentClaudeSession {
190
171
  push(text: string, reply?: ReplySink, opts?: {
191
172
  autoReplyOnText?: boolean;
192
173
  replyExpected?: boolean;
174
+ toolEligibleSender?: boolean;
193
175
  armed?: () => boolean;
194
176
  }): void;
195
177
  /** Route a say-tool message to the reply bound to the in-flight message, falling
@@ -7,11 +7,11 @@ export type WorkerTask = {
7
7
  reply: ReplySink;
8
8
  /** Owner-DM turns want a plain-text reply fallback (#416). */
9
9
  autoReplyOnText: boolean;
10
- /** A human/owner sender expects a reply: if the worker answers in plain text
11
- * without calling say, deliver that text instead of dropping it. Decoupled from
12
- * autoReplyOnText so it delivers on a tool-capable room turn WITHOUT enabling
13
- * tools (arming governs tools). Absent/false for agent-authored turns. */
10
+ /** Shared reply policy: deliver prose when this turn owes a reply. Room
11
+ * tools require this too, alongside sender authority and room arming. */
14
12
  replyExpected?: boolean;
13
+ /** Verified human room sender; never inferred from reply eligibility. */
14
+ toolEligibleSender?: boolean;
15
15
  /** Armed-room turns: live getter the gate reads per tool decision (mid-turn
16
16
  * disarm denies the next call). Absent for owner DMs. */
17
17
  armed?: () => boolean;
@@ -54,7 +54,7 @@ export type WorkerIncident = {
54
54
  instructionChars: number;
55
55
  /**
56
56
  * Whether a reply was expected of this turn — mirrors `WorkerTask.replyExpected`,
57
- * i.e. `senderIsAgent === false` upstream. Without it a silent turn
57
+ * i.e. the shared @mention policy upstream. Without it a silent turn
58
58
  * (composed=0, said=false) is unattributable: it could be agent-authored traffic
59
59
  * that was never going to answer, or a turn that waited so long the previous one
60
60
  * already answered. Ballroom2 on 2026-08-06 produced both readings and the record
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/claude-bridge",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "type": "module",
5
5
  "description": "AgentVault Claude Bridge — daemon for bridging a Claude agent into secure E2E-encrypted AgentVault 1:1 direct messages and rooms.",
6
6
  "main": "dist/index.js",