@agentvault/agentvault 0.23.71 → 0.23.72

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.
Files changed (71) hide show
  1. package/README.md +3 -1
  2. package/dist/atomic-file.d.ts +11 -0
  3. package/dist/atomic-file.d.ts.map +1 -0
  4. package/dist/channel.d.ts +675 -44
  5. package/dist/channel.d.ts.map +1 -1
  6. package/dist/cli.js +8162 -2403
  7. package/dist/cli.js.map +4 -4
  8. package/dist/dm-group-pins.d.ts +190 -0
  9. package/dist/dm-group-pins.d.ts.map +1 -0
  10. package/dist/dr-refusal.d.ts +54 -0
  11. package/dist/dr-refusal.d.ts.map +1 -0
  12. package/dist/file-send-failure.d.ts +115 -0
  13. package/dist/file-send-failure.d.ts.map +1 -0
  14. package/dist/file-send-policy.d.ts +251 -0
  15. package/dist/file-send-policy.d.ts.map +1 -0
  16. package/dist/full-permissions.d.ts +479 -0
  17. package/dist/full-permissions.d.ts.map +1 -0
  18. package/dist/gateway-send.d.ts +8 -0
  19. package/dist/gateway-send.d.ts.map +1 -1
  20. package/dist/harness-compat.d.ts +12 -0
  21. package/dist/harness-compat.d.ts.map +1 -1
  22. package/dist/http-handlers.d.ts +5 -1
  23. package/dist/http-handlers.d.ts.map +1 -1
  24. package/dist/index.d.ts +13 -2
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +8653 -2417
  27. package/dist/index.js.map +4 -4
  28. package/dist/local-api-server.d.ts +71 -0
  29. package/dist/local-api-server.d.ts.map +1 -0
  30. package/dist/local-api.d.ts +107 -0
  31. package/dist/local-api.d.ts.map +1 -0
  32. package/dist/mcp-handlers.d.ts +15 -1
  33. package/dist/mcp-handlers.d.ts.map +1 -1
  34. package/dist/mcp-server.d.ts +4 -1
  35. package/dist/mcp-server.d.ts.map +1 -1
  36. package/dist/off-sequence-report.d.ts +74 -0
  37. package/dist/off-sequence-report.d.ts.map +1 -0
  38. package/dist/onturn-stop.d.ts +253 -0
  39. package/dist/onturn-stop.d.ts.map +1 -0
  40. package/dist/openclaw-entry.d.ts +32 -2
  41. package/dist/openclaw-entry.d.ts.map +1 -1
  42. package/dist/openclaw-entry.js +1377 -171
  43. package/dist/openclaw-entry.js.map +4 -4
  44. package/dist/openclaw-file-send.d.ts +308 -0
  45. package/dist/openclaw-file-send.d.ts.map +1 -0
  46. package/dist/openclaw-plugin.d.ts +7 -2
  47. package/dist/openclaw-plugin.d.ts.map +1 -1
  48. package/dist/openclaw-room-taint.d.ts +43 -0
  49. package/dist/openclaw-room-taint.d.ts.map +1 -0
  50. package/dist/openclaw-sender.d.ts +47 -0
  51. package/dist/openclaw-sender.d.ts.map +1 -0
  52. package/dist/openclaw-types.d.ts +7 -1
  53. package/dist/openclaw-types.d.ts.map +1 -1
  54. package/dist/owner-devices.d.ts +71 -0
  55. package/dist/owner-devices.d.ts.map +1 -0
  56. package/dist/owner-epoch.d.ts +36 -0
  57. package/dist/owner-epoch.d.ts.map +1 -0
  58. package/dist/room-send-error.d.ts +17 -0
  59. package/dist/room-send-error.d.ts.map +1 -0
  60. package/dist/sender-binding.d.ts +130 -0
  61. package/dist/sender-binding.d.ts.map +1 -0
  62. package/dist/tool-telemetry.d.ts +1 -1
  63. package/dist/tool-telemetry.d.ts.map +1 -1
  64. package/dist/turn-token.d.ts +168 -0
  65. package/dist/turn-token.d.ts.map +1 -0
  66. package/dist/types.d.ts +160 -6
  67. package/dist/types.d.ts.map +1 -1
  68. package/openclaw.plugin.json +1 -1
  69. package/package.json +1 -1
  70. package/dist/workspace-handlers.d.ts +0 -62
  71. package/dist/workspace-handlers.d.ts.map +0 -1
@@ -0,0 +1,479 @@
1
+ /**
2
+ * #1762 PR-P1c-1 — the plugin contract for the per-agent "Full permissions"
3
+ * switch (design doc `docs/plans/2026-11-17-1762-agent-file-send-design.md`,
4
+ * §13.1, §13.8 row 4, §13.13, §13.20).
5
+ *
6
+ * THE RULE THIS MODULE EXISTS FOR: families never see a raw field.
7
+ *
8
+ * The server computes `full_permissions: "off" | "pending" | "on"` and puts
9
+ * it in the `arming_snapshot`. This module is the ONLY place that reads it.
10
+ * Families get one boolean, `effective` (true only for `"on"`), and register
11
+ * callbacks for the off sequence. They never get the string, so they cannot
12
+ * misread it — `"pending"` tested for truthiness is `true`, which is the
13
+ * exact bug this design rules out (§13.1, W4).
14
+ *
15
+ * `scripts/graph/permission-field-guard.mjs` (CI) fails any bridge source,
16
+ * any plugin source outside this module and channel.ts's passthrough, or any
17
+ * Hermes source outside its future mirror module, that reads the raw field
18
+ * names. The bridges' builds require `AV_EFFECTIVE_V1` in the bundle, so a
19
+ * stale bundled plugin without this emitter fails its build.
20
+ *
21
+ * STATES (internal to the plugin core):
22
+ * - "unknown" — no snapshot on THIS connection yet (startup, after a
23
+ * disconnect, or after `stop()`). Not "off": a disconnect is never an off
24
+ * (§13.1). New turns run restricted; running turns keep the authority they
25
+ * started with.
26
+ * - "off" — an explicit off: `full_permissions: "off"`, the field
27
+ * missing (an old or rolled-back backend, T59/T63), or any value this
28
+ * contract does not know (fail closed).
29
+ * - "pending" — intent is on, not yet confirmed on this connection. New
30
+ * turns run restricted. Never an off sequence.
31
+ * - "on" — the only state in which `effective()` is true.
32
+ *
33
+ * THE OFF-SEQUENCE REGISTRY (hardened after the review of 89a88101):
34
+ * - each callback runs independently, with its own timeout and AbortSignal,
35
+ * so one that hangs or throws cannot block another;
36
+ * - each run carries a growing `sequenceId` (per run, retries included) and
37
+ * the `onPeriod` it ends (per transition into "on"; a retry keeps it);
38
+ * - a retry re-runs ONLY the callbacks that have not completed that on
39
+ * period, so one stuck kill does not rotate the owner 1:1 on every
40
+ * reconnect; a new on period runs every callback again;
41
+ * - runs are SERIALIZED: an off that arrives while a run is in flight waits
42
+ * for it, so two runs never overlap;
43
+ * - the "was on" memory is cleared only by a run that COMPLETED with no
44
+ * failure or timeout. A failed run leaves it set, so the next explicit off
45
+ * snapshot runs the sequence again; the failure is recorded
46
+ * (`lastOffSequence()`);
47
+ * - registering the same callback twice is a no-op.
48
+ *
49
+ * PR-P1c-2 (§13.8 row 4b, §13.20) fills the seams P1c-1 left:
50
+ * - the descendant-tree stop of running on-turns (§13.13 step 2), through an
51
+ * `OnTurnStopper` (onturn-stop.ts), TIME-BOXED so a hung stop cannot
52
+ * stall the serialized run chain;
53
+ * - the not-"on" bound (`not_on_bound_s`, missing → 120 s, clamped 60–300 s;
54
+ * §13.1 W2, T69, T69-b): armed while "unknown"/"pending" and on entering
55
+ * "off", kept until a CLEAN run, re-running the stop with backoff while
56
+ * the agent was on and is still not on. A bound stop rotates nothing and
57
+ * posts nothing. Armed only for an agent that WAS on; stop-aware;
58
+ * - the intent counter (T69-c): a snapshot whose `intent_seq` differs from
59
+ * the one the current on period started under ends that period with the
60
+ * off sequence. `intent_seq` is the name PROPOSED for PR-PB-B (§13.20);
61
+ * a snapshot without it changes nothing;
62
+ * - the persisted "was on" memory (the §13.13 step-5 `was_effective`
63
+ * marker): written synchronously and atomically when "on" is entered,
64
+ * read at every construction, cleared only after a clean run. A stopped
65
+ * core never writes it, and every write carries the writing instance's
66
+ * tag, so a late write from an old channel cannot clear a new channel's
67
+ * marker (§13.20, review r3 of 0a9a48a1).
68
+ */
69
+ /**
70
+ * The contract marker. A bridge bundle must contain this string, or its build
71
+ * fails (`REQUIRED_WIRE_SYMBOLS`, T67/T71-b): a bundle without it was built
72
+ * against a plugin that predates the boolean emitter.
73
+ *
74
+ * It is referenced from the code that SENDS the permissions heartbeat, so it
75
+ * cannot be tree-shaken out of a bundle that has the emitter. Bridges must
76
+ * never spell it themselves (the guard checks), or its presence would prove
77
+ * nothing about the plugin (the #630 lesson).
78
+ */
79
+ export declare const AV_EFFECTIVE_V1: "AV_EFFECTIVE_V1";
80
+ /** The server-computed values (§13.13). */
81
+ export type FullPermissionsWire = "off" | "pending" | "on";
82
+ /** The plugin core's state: the server's value, or "unknown" between connections. */
83
+ export type FullPermissionsState = "unknown" | FullPermissionsWire;
84
+ /**
85
+ * An OWN property of a snapshot body, never one inherited through the
86
+ * prototype chain. A polluted `Object.prototype` must not be able to supply a
87
+ * field the server did not send (fail closed). Used for every snapshot read.
88
+ */
89
+ export declare function ownSnapshotField(snapshotData: unknown, key: string): unknown;
90
+ /**
91
+ * Read the snapshot's `full_permissions`. The ONE reader of the raw field.
92
+ *
93
+ * Exactly `"on"` and exactly `"pending"` are recognised. Everything else —
94
+ * `"off"`, a missing field, an inherited (prototype) field, `true`, `"ON"`,
95
+ * `1`, `null`, a non-object body — is `"off"`. Fail closed: an unknown value
96
+ * turns full tools off and runs the off sequence for an agent that was on,
97
+ * which is the safe direction.
98
+ */
99
+ export declare function parseFullPermissions(snapshotData: unknown): FullPermissionsWire;
100
+ /**
101
+ * What a family declares about itself (§13.13). Fixed per family build, never
102
+ * per flip: host trust and the sandbox are gone, so nothing about whether a
103
+ * family can enforce changes from moment to moment.
104
+ * - `supportsOn` — the family has its on branch (full tools on room turns).
105
+ * - `enforcesOff` — the family enforces the off rule (rooms limited to
106
+ * `say` + `send_file`). The backend shows the "not limited by AgentVault"
107
+ * warning for an agent that does not report it (§13.5).
108
+ * A family that has not been built for this declares nothing, and nothing is
109
+ * sent: no family can claim support it does not have.
110
+ */
111
+ export interface PermissionsSupport {
112
+ supportsOn: boolean;
113
+ enforcesOff: boolean;
114
+ }
115
+ /**
116
+ * Why the off sequence ran (§13.6 `av.gates.off_sequence` `trigger`):
117
+ * - "explicit_off" — an off snapshot ended an on period of THIS process;
118
+ * - "startup_marker" — it ended the on period loaded from the persisted
119
+ * marker (the off arrived while the agent was down, §13.13 step 5);
120
+ * - "intent_changed" — the snapshot's intent counter differs from the one the
121
+ * on period started under: the owner turned it off and on again while the
122
+ * agent was away (T69-c).
123
+ */
124
+ export type OffSequenceTrigger = "explicit_off" | "startup_marker" | "intent_changed";
125
+ export interface OffSequenceContext {
126
+ trigger: OffSequenceTrigger;
127
+ /**
128
+ * Grows by one per RUN, retries included. It does NOT tell a retry from a
129
+ * new on period — use `onPeriod` for that. Diagnostics and log correlation.
130
+ */
131
+ sequenceId: number;
132
+ /**
133
+ * IDENTIFIES the on period this run ends. A new number is drawn at every
134
+ * transition INTO "on", from a counter shared by the whole PROCESS, so two
135
+ * channel instances (an OpenClaw config reload builds a second one in the
136
+ * same process) never report the same value. A retry of the same period
137
+ * carries the same number. Use it to do something once per period (the
138
+ * owner 1:1 rotation), never `sequenceId`. It is NOT a session epoch: it
139
+ * restarts with the process and jumps by more than one — derive a rotation
140
+ * epoch from the family's own persisted counter. 0 for a run outside any on
141
+ * period.
142
+ */
143
+ onPeriod: number;
144
+ /**
145
+ * `onPeriod` made unique ACROSS processes (a process-wide random boot id
146
+ * plus the number). The key the owner 1:1 epoch helper (`OwnerEpochStore`,
147
+ * owner-epoch.ts) bumps once for. Stable across retries of one period.
148
+ */
149
+ onPeriodKey: string;
150
+ /** Aborted when this callback's timeout passes: stop work, the run moved on. */
151
+ signal: AbortSignal;
152
+ }
153
+ /**
154
+ * A family's part of the off sequence: kill its on-turns' work through its
155
+ * own registry, rotate its owner 1:1 (§13.13 steps 2–4). Best effort, and it
156
+ * must be idempotent: a failed run is retried at the next explicit off.
157
+ */
158
+ export type OffSequenceCallback = (ctx: OffSequenceContext) => void | Promise<void>;
159
+ export interface OffSequenceResult {
160
+ sequenceId: number;
161
+ trigger: OffSequenceTrigger;
162
+ ran: number;
163
+ /** Callbacks that threw, rejected or timed out (timeouts included), plus a failed tree stop. */
164
+ failed: number;
165
+ timedOut: number;
166
+ /** Processes the descendant-tree stop signalled. */
167
+ killed: number;
168
+ /**
169
+ * The stop could not PROVE it found everything: the persisted on-turn
170
+ * records of an on period loaded from the marker were missing or unreadable
171
+ * (review M2). Counted in `failed`: the marker is kept, the run retried.
172
+ */
173
+ unverified: boolean;
174
+ /** The on period this run ended (0: outside any). Same as the callbacks' `ctx.onPeriod`. */
175
+ onPeriod: number;
176
+ }
177
+ export interface SnapshotOutcome {
178
+ state: FullPermissionsWire;
179
+ /** The one value families see. */
180
+ effective: boolean;
181
+ /** An off edge for an on period whose sequence is not done or scheduled: run it. */
182
+ offSequence: boolean;
183
+ /** The trigger to pass to `runOffSequence` when `offSequence` is true. */
184
+ trigger: OffSequenceTrigger;
185
+ /** `"pending"` and a family declared support: send the permissions heartbeat now. */
186
+ reportDue: boolean;
187
+ }
188
+ /**
189
+ * What the core needs from the descendant-tree stop (onturn-stop.ts's
190
+ * `OnTurnRegistry`). Structural, so that module never imports this one.
191
+ */
192
+ export interface OnTurnStopper<F = any> {
193
+ /** Stop what `frozen` covers (default: frozen now). Rejects when processes are still there. */
194
+ stopAll(opts: {
195
+ signal?: AbortSignal;
196
+ frozen?: F;
197
+ }): Promise<{
198
+ killed: number;
199
+ remaining: number;
200
+ supported: boolean;
201
+ }>;
202
+ /** What a stop started at THIS edge may touch: later roots and the next period's nonce are outside it. */
203
+ freeze(): F;
204
+ /** A new on period: a new nonce. */
205
+ beginPeriod(): void;
206
+ /** Write the records now (atomic, 0600). Throws when it cannot. */
207
+ persistNow(): void;
208
+ /** The previous process's records were expected but missing or unreadable. */
209
+ recordsLost(): boolean;
210
+ /** This boot's session id (null where the platform has none). */
211
+ bootSessionId(): string | null;
212
+ /** The wall-clock boot time, unix seconds (the fallback when no session id can be read). */
213
+ bootTimeS(): number;
214
+ /** Forget what a clean run covered (frozen-scoped). */
215
+ clearRecorded(frozen?: F): void;
216
+ }
217
+ /** A bound stop happened (§13.6 `av.gates.unknown_kill`). */
218
+ export interface BoundStopReport {
219
+ killed: number;
220
+ state: Exclude<FullPermissionsState, "on">;
221
+ failed: boolean;
222
+ /** Counted in `failed`: the stop could not prove it found everything (see `OffSequenceResult`). */
223
+ unverified: boolean;
224
+ /** 1 for the stop at the bound itself, then 2, 3, … for the backoff retries. */
225
+ attempt: number;
226
+ /** The on period whose on-turns were stopped. */
227
+ onPeriod: number;
228
+ }
229
+ export interface FullPermissionsCoreOptions {
230
+ /** Per-callback timeout for the off sequence. Default 30 s. */
231
+ callbackTimeoutMs?: number;
232
+ /**
233
+ * The agent's data dir: where the `was_effective` marker lives. Set BEFORE
234
+ * `_loadWasOnHook` runs in the constructor. Without one the memory is kept
235
+ * in memory only.
236
+ */
237
+ dataDir?: string;
238
+ /** The descendant-tree stop. Without one the stop step does nothing. */
239
+ onTurns?: OnTurnStopper;
240
+ /** The time box on the descendant-tree stop itself. Default 20 s. */
241
+ stopHookTimeoutMs?: number;
242
+ /** Called after every stop at the not-"on" bound. Must not throw (it is caught). */
243
+ onBoundStop?: (r: BoundStopReport) => void;
244
+ /** One line per marker problem. Default `console.warn`. */
245
+ log?: (line: string) => void;
246
+ }
247
+ export declare const DEFAULT_OFF_CALLBACK_TIMEOUT_MS = 30000;
248
+ /** The time box on `_descendantTreeStopHook`: the stop's own 10 s budget plus a margin. */
249
+ export declare const DEFAULT_STOP_HOOK_TIMEOUT_MS = 20000;
250
+ /** §13.1 W2/G2: the bound when the snapshot carries none (an old backend), and its clamp. */
251
+ export declare const DEFAULT_NOT_ON_BOUND_S = 120;
252
+ export declare const MIN_NOT_ON_BOUND_S = 60;
253
+ export declare const MAX_NOT_ON_BOUND_S = 300;
254
+ /** After a bound stop: retry with backoff, 30 s doubling to 5 min, while still not on. */
255
+ export declare const BOUND_RETRY_BASE_MS = 30000;
256
+ export declare const BOUND_RETRY_MAX_MS = 300000;
257
+ /** The snapshot field carrying the bound (§13.1; PR-PB-B sends it). */
258
+ export declare const NOT_ON_BOUND_FIELD = "not_on_bound_s";
259
+ /**
260
+ * The snapshot field carrying the intent counter (§13.13 "ack cycle", T69-c),
261
+ * echoed in `permissions_heartbeat` under the same name. PROPOSED for PR-PB-B,
262
+ * which owns the wire name (§13.20); absent today.
263
+ */
264
+ export declare const INTENT_SEQ_FIELD = "intent_seq";
265
+ /** The §13.13 step-5 marker, in the data dir. */
266
+ export declare const WAS_ON_MARKER_FILE = "was_effective.json";
267
+ /**
268
+ * `not_on_bound_s` in milliseconds: a finite number of seconds, clamped to
269
+ * 60–300; anything else (missing, a string, NaN, an inherited field) → 120.
270
+ */
271
+ export declare function parseNotOnBoundMs(snapshotData: unknown): number;
272
+ /** `intent_seq`: a non-negative safe integer, or undefined (absent or malformed: no comparison). */
273
+ export declare function parseIntentSeq(snapshotData: unknown): number | undefined;
274
+ /** The stop ran, but cannot prove it found the previous process's on-turns (review M2). */
275
+ export declare class OnTurnStopUnverified extends Error {
276
+ readonly killed: number;
277
+ constructor(killed: number);
278
+ }
279
+ export declare class StopHookTimeout extends Error {
280
+ constructor(ms: number);
281
+ }
282
+ export declare class FullPermissionsCore {
283
+ private _state;
284
+ /**
285
+ * The "was on" memory, as three generation counters:
286
+ * - `_onGen` a new process-wide number each time the state
287
+ * ENTERS "on" (it only grows, but not by exactly one);
288
+ * - `_doneGen` the highest on period whose off sequence COMPLETED cleanly;
289
+ * - `_scheduledGen` the highest on period whose off sequence is scheduled
290
+ * or running (reset to `_doneGen` after a failed run).
291
+ * "Was on" = `_onGen > _doneGen`. It survives disconnects (an on-turn may
292
+ * still be running across one), so a revoke delivered by disconnect still
293
+ * runs the off sequence when the reconnect snapshot says off. Without it,
294
+ * every reconnect of an agent that was off all along would run it — and
295
+ * rotate its owner 1:1 on every network blip.
296
+ */
297
+ private _onGen;
298
+ private _doneGen;
299
+ private _scheduledGen;
300
+ /** What the scheduled run may stop, frozen at its off edge (review M4). */
301
+ private _scheduledFreeze;
302
+ /** The on period loaded from the marker at construction (0: none). Its run is "startup_marker". */
303
+ private _loadedGen;
304
+ private readonly _callbacks;
305
+ /**
306
+ * Per callback: the highest on period it completed. A retry of a period
307
+ * runs only the callbacks that have not completed it, so a stuck kill does
308
+ * not re-run the owner 1:1 rotation on every reconnect.
309
+ */
310
+ private readonly _cbDonePeriod;
311
+ private readonly _dataDir;
312
+ private readonly _onTurns;
313
+ private readonly _onBoundStop;
314
+ private readonly _log;
315
+ private _support;
316
+ private readonly _callbackTimeoutMs;
317
+ private readonly _stopHookTimeoutMs;
318
+ private _sequenceSeq;
319
+ /** Serializes runs (and bound stops): each starts after the previous one settled. */
320
+ private _runChain;
321
+ private _lastResult;
322
+ /** This core's tag on every marker write (§13.20, review r3). */
323
+ private readonly _instanceId;
324
+ /** The writer tag the marker carried when this core loaded it: this core may clear THAT marker too. */
325
+ private _loadedWriter;
326
+ /**
327
+ * The loaded marker was written by ANOTHER process (or cannot say): only
328
+ * then can its on-turn records be missing from this process's registry.
329
+ * A marker this same process wrote (an OpenClaw config reload builds a new
330
+ * core) has its records in the shared registry's memory (review r2).
331
+ */
332
+ private _loadedForeign;
333
+ /**
334
+ * A REAL loss in this boot (review r3): an earlier process's on-turn
335
+ * records were lost, so nothing this boot runs can prove its work stopped.
336
+ * Carried in every marker this core writes (`lostBoot`), so a later reload
337
+ * in this process — which sees a same-process marker — still reports
338
+ * unverified. Only a reboot (a different boot-session id) ends it.
339
+ */
340
+ private _lost;
341
+ /** `stop()` was called: no marker writes, no bound stops, no snapshots. */
342
+ private _stopped;
343
+ /** The bound, from the latest snapshot (§13.1). */
344
+ private _boundMs;
345
+ private _boundTimer;
346
+ private _boundAttempt;
347
+ /** The intent counter of the latest snapshot on THIS connection (echoed in the heartbeat). */
348
+ private _intentSeq;
349
+ /** The intent counter the current on period started under (persisted in the marker). */
350
+ private _onIntent;
351
+ constructor(opts?: FullPermissionsCoreOptions);
352
+ state(): FullPermissionsState;
353
+ /** The agent's data dir (where the `was_effective` marker lives). */
354
+ dataDir(): string | undefined;
355
+ /** The one boolean. True only in "on"; "unknown", "pending" and "off" are false. */
356
+ effective(): boolean;
357
+ /** True while an on period has no cleanly completed off sequence. */
358
+ wasOn(): boolean;
359
+ /** The bound now in force, in ms (diagnostics and tests). */
360
+ notOnBoundMs(): number;
361
+ /** True while the not-"on" bound (or its backoff retry) is armed. */
362
+ boundArmed(): boolean;
363
+ applySnapshot(snapshotData: unknown): SnapshotOutcome;
364
+ /**
365
+ * A connection ended, a new one started: "unknown", never "off" (§13.1).
366
+ * Runs no off sequence; arms the bound for an agent that was on.
367
+ */
368
+ connectionLost(): void;
369
+ /**
370
+ * The channel was stopped (`SecureChannel.stop()`, an OpenClaw config
371
+ * reload): "unknown" for good. No off sequence, no bound stop, and no marker
372
+ * write from this core from now on — a run still in flight finishes its
373
+ * callbacks but cannot clear a marker a newer channel relies on. The
374
+ * descendant registry is shared per data dir, so the new channel's core
375
+ * still finds the on-turns started under this one.
376
+ */
377
+ stop(): void;
378
+ stopped(): boolean;
379
+ /**
380
+ * The same channel object is started again (`SecureChannel.start()` after
381
+ * `stop()` — a supported reuse): it is the live channel once more. Still
382
+ * "unknown" until the new connection's snapshot.
383
+ */
384
+ resume(): void;
385
+ /**
386
+ * Register a callback. Registering the same function again is a no-op.
387
+ * The returned handle unregisters it (calling it twice is harmless).
388
+ */
389
+ onOffSequence(cb: OffSequenceCallback): () => void;
390
+ /**
391
+ * Run the off sequence for the on period scheduled by the last off edge.
392
+ * `effective()` is already false (step 1, new work stops). Waits for any
393
+ * earlier run, then the descendant-tree stop (time-boxed), then each family
394
+ * callback that has not yet completed this on period — independently, each
395
+ * with its own timeout. A retry therefore re-runs only what failed. Never
396
+ * throws. Clears the "was on" memory only when the run had no failure.
397
+ */
398
+ runOffSequence(trigger: OffSequenceTrigger, onError?: (err: unknown) => void): Promise<OffSequenceResult>;
399
+ private _runOnce;
400
+ private _runOne;
401
+ /**
402
+ * `_descendantTreeStopHook` with a time box (§13.20): `_runOnce` awaits it
403
+ * inside the serialized chain, so a hung stop would otherwise stall every
404
+ * later run. On timeout the hook's signal is aborted and the run records a
405
+ * failure (the "was on" memory stays, the bound stays armed).
406
+ */
407
+ private _timeBoxedStop;
408
+ /** The last completed run, for diagnostics: a failure is recorded, not lost. */
409
+ lastOffSequence(): (OffSequenceResult & {
410
+ completedAt: number;
411
+ }) | null;
412
+ declareSupport(s: {
413
+ supportsOn?: boolean;
414
+ enforcesOff?: boolean;
415
+ }): void;
416
+ /** null until a family declares: then nothing is ever sent. */
417
+ support(): PermissionsSupport | null;
418
+ /**
419
+ * What the `permissions_heartbeat` frame reports (§13.13): the declared
420
+ * support, plus the intent counter of this connection's latest snapshot
421
+ * (T69-c; the server counts a report only for the current cycle). null
422
+ * until a family declares. `intentSeq` is absent until a snapshot carried one.
423
+ */
424
+ heartbeatReport(): (PermissionsSupport & {
425
+ intentSeq?: number;
426
+ }) | null;
427
+ /**
428
+ * Called on "unknown", "pending" AND "off". Arms the bound once — it measures
429
+ * how long the state has STAYED not-"on", so a later not-"on" state does not
430
+ * restart it — and only for an agent that WAS on: an agent that never was
431
+ * has nothing to stop, and no timer runs for it. Stop-aware.
432
+ */
433
+ protected _notOnBoundHook(_state: Exclude<FullPermissionsState, "on">): void;
434
+ private _armBound;
435
+ private _disarmBound;
436
+ /**
437
+ * The bound passed. While the agent was on and is still not on: stop the
438
+ * on-turns' trees (no callbacks — so no rotation and no system line, T69,
439
+ * T69-b), then retry with backoff until "on" returns or a clean run clears
440
+ * the memory. Serialized with the runs.
441
+ */
442
+ private _onBoundExpired;
443
+ /**
444
+ * §13.13 step 2 (W1, C2; T5, T35, T35-b, T35-c): stop every running
445
+ * on-turn's descendant tree through the `OnTurnStopper` (pid/ppid/pgid/sid
446
+ * walk, the `AV_ONTURN` nonce, recorded groups, SIGTERM → SIGKILL with a
447
+ * start-time re-check, until empty or 10 s), limited to what `frozen`
448
+ * covers. Resolves with the number of processes signalled; rejects when
449
+ * processes are still there, and with `OnTurnStopUnverified` when the on
450
+ * period loaded from the marker has no records to check against (they were
451
+ * lost or unreadable: finding nothing then proves nothing, review M2).
452
+ * Time-boxed by the caller. Without a stopper (no agent can be on without
453
+ * one in production — SecureChannel always passes it) it does nothing.
454
+ */
455
+ protected _descendantTreeStopHook(_trigger: OffSequenceTrigger | "bound", _sequenceId: number, signal?: AbortSignal, frozen?: unknown): Promise<number | void>;
456
+ private _markerPath;
457
+ private _readMarker;
458
+ /**
459
+ * §13.13 step 5 / §13.20: PERSIST the "was on" memory.
460
+ * - `true`: written synchronously and atomically (0600, fsync'd) with this
461
+ * core's tag and the period's intent counter (the nonces live in the
462
+ * on-turn records file, written just before). THROWS when it cannot be written (the caller stays not-on).
463
+ * - `false`: the marker is removed — only when it is this core's own, or
464
+ * the one this core loaded, and nobody rewrote it since. Never throws.
465
+ * A STOPPED core writes nothing (an old channel's late run cannot clear a
466
+ * new channel's marker). Without a data dir: memory only.
467
+ */
468
+ protected _persistWasOnHook(wasOn: boolean, intentSeq?: number): void;
469
+ /**
470
+ * §13.13 step 5 / §13.20: READ the marker at EVERY construction. True for a
471
+ * marker that says the agent was on — and for a marker that exists but
472
+ * cannot be read or parsed (fail closed: one extra off sequence at the next
473
+ * explicit off is the safe direction). Adopts the persisted intent counter.
474
+ * (The nonces and records are the on-turn registry's own file.) Writes
475
+ * nothing.
476
+ */
477
+ protected _loadWasOnHook(): boolean;
478
+ }
479
+ //# sourceMappingURL=full-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-permissions.d.ts","sourceRoot":"","sources":["../src/full-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAOH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAG,iBAA0B,CAAC;AAE1D,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,CAAC;AAE3D,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,mBAAmB,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAG5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,OAAO,GAAG,mBAAmB,CAK/E;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQ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,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IA8BrE;;;;;;;OAOG;IACH,SAAS,CAAC,cAAc,IAAI,OAAO;CAmCpC"}
@@ -12,6 +12,14 @@ export interface GatewaySendOptions {
12
12
  host?: string;
13
13
  /** AbortSignal for cancellation */
14
14
  signal?: AbortSignal;
15
+ /**
16
+ * #1791: the agent's local API token. Default: read from `dataDir`, then
17
+ * the token of a server started in this process, then the
18
+ * AGENTVAULT_LOCAL_TOKEN env var, then AGENTVAULT_DATA_DIR's token file.
19
+ */
20
+ token?: string;
21
+ /** #1791: the agent's data folder; its `local-api.token` is sent. */
22
+ dataDir?: string;
15
23
  }
16
24
  export interface GatewaySendResult {
17
25
  ok: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-send.d.ts","sourceRoot":"","sources":["../src/gateway-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAyCD;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CA4B5B;AAED;;;GAGG;AACH,wB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ACH,wBAAsB,WAAW,CAC/B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzK;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAoB9B"}
@@ -47,6 +47,18 @@ export declare const MIN_OPENCLAW_VERSION = "2026.3.0";
47
47
  * other two were removed in #1481: they never produced a span on any version.
48
48
  */
49
49
  export declare const TESTED_THROUGH_OPENCLAW_VERSION = "2026.10.8";
50
+ /**
51
+ * #1800 PR B (design §1.3): the OpenClaw version on which a non-owner turn's
52
+ * `CommandInterpretationSuppressed: true` was verified to stop command
53
+ * interpretation (inbound-context, commands, get-reply, command-auth). With
54
+ * `commands.allowFrom` set, `CommandAuthorized: false` alone is bypassed.
55
+ */
56
+ export declare const COMMAND_SUPPRESSION_VERIFIED_OPENCLAW_VERSION = "2026.10.8";
57
+ /**
58
+ * #1800 PR B — a one-line warning when the harness is not the version the
59
+ * suppression was verified on (OpenClaw updates itself), else null. Never throws.
60
+ */
61
+ export declare function commandSuppressionWarning(version?: string | null): string | null;
50
62
  export type HarnessVerdict = "ok" | "too-old" | "untested";
51
63
  export interface HarnessCompat {
52
64
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"harness-compat.d.ts","sourceRoot":"","sources":["../src/harness-compat.ts"],"names":[],"mappings":"AAUA;;;;;;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,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/C;AAKD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAEf;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA0B1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAErD;AAED,sEAAsE;AACtE,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,UAAU,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAa1C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAS1E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,MAAM,GAAG,IAA8B,GAAG,aAAa,GAAG,IAAI,CA+BzG"}
@@ -48,6 +48,10 @@ export declare function handleTrustRequest(channel: SecureChannel): HandlerResul
48
48
  *
49
49
  * Returns JSON suitable for adding to Claude Code, Cursor, or other MCP host
50
50
  * configuration files.
51
+ *
52
+ * #1791: `/mcp` requires the agent's local API token like every other local
53
+ * route, so the block carries it as a header. Only a caller that already
54
+ * presented the token can read this response.
51
55
  */
52
- export declare function handleMcpConfigRequest(agentName: string, port: number, mcpSkillCount: number): HandlerResult;
56
+ export declare function handleMcpConfigRequest(agentName: string, port: number, mcpSkillCount: number, token?: string): HandlerResult;
53
57
  //# sourceMappingURL=http-handlers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-handlers.d.ts","sourceRoot":"","sources":["../src/http-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAkDD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CA2BxB;AAoHD;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAqCxB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAsCxB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAUzE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAW1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,GACrB,aAAa,CAiBf;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,aAAa,CAkBf"}
1
+ {"version":3,"file":"http-handlers.d.ts","sourceRoot":"","sources":["../src/http-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAyED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CA2BxB;AA4HD;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAqCxB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAsCxB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAUzE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAW1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,GACrB,aAAa,CAiBf;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,MAAM,GACb,aAAa,CAmBf"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,16 @@
1
1
  export { SecureChannel } from "./channel.js";
2
- export type { SecureChannelConfig, ChannelState, MessageMetadata, AttachmentData, PersistedState, LegacyPersistedState, DeviceSession, HistoryEntry, SendOptions, OwnerAudience, DecisionOption, DecisionRequest, DecisionResponse, ContextRef, HeartbeatStatus, StatusAlert, RoomInfo, RoomMemberInfo, RoomConversationInfo, RoomState, A2AChannel, A2AMessage, RoomParticipantEvent, DeliveryTarget, DeliveryContent, DeliveryOptions, DeliveryReceipt, TargetInfo, ActionConfirmation, ArtifactPayload, PolicyAlert, ApprovalRequest, ApprovalResponse, CredentialGrantPayload, CredentialRevokePayload, CredentialAckPayload, CredentialRequestPayload, } from "./types.js";
2
+ export { AV_EFFECTIVE_V1 } from "./full-permissions.js";
3
+ export type { OffSequenceCallback, OffSequenceContext, OffSequenceTrigger, OffSequenceResult } from "./full-permissions.js";
4
+ export { OwnerEpochStore, type OwnerEpochRotation } from "./owner-epoch.js";
5
+ export { ONTURN_ENV } from "./onturn-stop.js";
6
+ export { isOffSequenceNotice, offSequenceFailedNotice } from "./off-sequence-report.js";
7
+ export { RoomSendNotWritten } from "./room-send-error.js";
8
+ export { claimsAttachment, neutralizeSystemPrefix, fileSendNoticeFor, fileLostNoticeFor, isFileSendNotice, NO_ATTACHMENT_NOTICE, fileSendReason, fileSendToolResult, renderHistoryFiles, stagingLineFor, FILE_SEND_RULE, FILE_SEND_RULE_CONTENT, FILE_SEND_UNAVAILABLE, } from "./file-send-failure.js";
9
+ export type { FileSendCode, FileSendResult } from "./file-send-failure.js";
10
+ export { FileSendPolicy, MAX_FILE_SEND_BYTES, mimeForFilename, ROOM_ID_RE, isDeniedSendFilename } from "./file-send-policy.js";
11
+ export type { FileSendTarget } from "./file-send-policy.js";
12
+ export type { TurnToken } from "./turn-token.js";
13
+ export type { SecureChannelConfig, ChannelState, MessageMetadata, AttachmentData, PersistedState, LegacyPersistedState, DeviceSession, HistoryEntry, HistoryReadEntry, SendOptions, OwnerAudience, DecisionOption, DecisionRequest, DecisionResponse, ContextRef, HeartbeatStatus, StatusAlert, RoomInfo, RoomMemberInfo, RoomConversationInfo, RoomState, A2AChannel, A2AMessage, RoomParticipantEvent, DeliveryTarget, DeliveryContent, DeliveryOptions, DeliveryReceipt, TargetInfo, ActionConfirmation, ArtifactPayload, PolicyAlert, ApprovalRequest, ApprovalResponse, CredentialGrantPayload, CredentialRevokePayload, CredentialAckPayload, CredentialRequestPayload, } from "./types.js";
3
14
  export { parseTarget } from "./types.js";
4
15
  export { historyRecoveryCodePath, loadHistoryRecoveryCode, configureHistoryRecoveryCode, clearHistoryRecoveryCode, readMaskedHistoryRecoveryCode, runHistoryRecoveryCommand, offerHistoryRecoveryConfiguration, } from "./history-recovery-code.js";
5
16
  export type { StoredHistoryRecoveryCode, HistoryRecoveryCommandInput, } from "./history-recovery-code.js";
@@ -16,7 +27,7 @@ export { handleSendRequest, handleActionRequest, handleDecisionRequest, handleSt
16
27
  export type { HandlerResult } from "./http-handlers.js";
17
28
  export { AgentVaultMcpServer } from "./mcp-server.js";
18
29
  export type { SkillDefinition, McpServerOpts } from "./mcp-server.js";
19
- export { createMcpHandler, getMcpStatus } from "./mcp-handlers.js";
30
+ export { createMcpHandler, getMcpStatus, type McpHandlerAuth } from "./mcp-handlers.js";
20
31
  export { parseSkillMd, loadSkillsFromDirectory, loadSkillsFromApi, mergeSkills } from "./skill-manifest.js";
21
32
  export type { SkillManifest } from "./skill-manifest.js";
22
33
  export { invokeSkill } from "./skill-invoker.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,cAAc,EACd,oBAAo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