@wenathlan/extension 1.1.60 → 1.1.62

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 (48) hide show
  1. package/README.md +5 -3
  2. package/dist/confirmgates.d.ts +60 -0
  3. package/dist/confirmgates.d.ts.map +1 -0
  4. package/dist/immutablelog.d.ts +73 -0
  5. package/dist/immutablelog.d.ts.map +1 -0
  6. package/dist/inboundguard.d.ts +86 -0
  7. package/dist/inboundguard.d.ts.map +1 -0
  8. package/dist/index.d.ts +10 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1278 -1
  11. package/dist/index.js.map +4 -4
  12. package/dist/maskinputs.d.ts +52 -0
  13. package/dist/maskinputs.d.ts.map +1 -0
  14. package/dist/memory.d.ts +153 -1
  15. package/dist/memory.d.ts.map +1 -1
  16. package/dist/originpolicy.d.ts +160 -0
  17. package/dist/originpolicy.d.ts.map +1 -0
  18. package/dist/phishguard.d.ts +24 -0
  19. package/dist/phishguard.d.ts.map +1 -0
  20. package/dist/policy.d.ts +123 -1
  21. package/dist/policy.d.ts.map +1 -1
  22. package/dist/protocol.d.ts +164 -1
  23. package/dist/protocol.d.ts.map +1 -1
  24. package/dist/redactshots.d.ts +54 -0
  25. package/dist/redactshots.d.ts.map +1 -0
  26. package/dist/secretvault.d.ts +89 -0
  27. package/dist/secretvault.d.ts.map +1 -0
  28. package/dist/transparency.d.ts +46 -0
  29. package/dist/transparency.d.ts.map +1 -0
  30. package/dist/types.d.ts +316 -2
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/extension/dist/background.js +1650 -56
  34. package/extension/dist/background.js.map +4 -4
  35. package/extension/dist/manifest.json +5 -1
  36. package/extension/dist/pagebridge.js +91 -28
  37. package/extension/dist/pagebridge.js.map +3 -3
  38. package/extension/dist/popup.html +1 -1
  39. package/extension/dist/popup.js +54 -0
  40. package/extension/dist/popup.js.map +2 -2
  41. package/extension/dist/sidepanel.html +1 -1
  42. package/extension/dist/sidepanel.js +331 -0
  43. package/extension/dist/sidepanel.js.map +4 -4
  44. package/extension/dist/transparencypage.html +24 -0
  45. package/extension/dist/transparencypage.js +156 -0
  46. package/extension/dist/transparencypage.js.map +7 -0
  47. package/extension/manifest.json +5 -1
  48. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2178,6 +2178,73 @@ function exportrunstate(states, now) {
2178
2178
  };
2179
2179
  }
2180
2180
 
2181
+ // immutablelog.ts
2182
+ async function sha2562(payload) {
2183
+ const bytes = new TextEncoder().encode(payload);
2184
+ const digest = await crypto.subtle.digest("SHA-256", bytes);
2185
+ return [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
2186
+ }
2187
+ function entrybody(entry) {
2188
+ return JSON.stringify({ id: entry.id, runid: entry.runid, kind: entry.kind, summary: entry.summary, origin: entry.origin, ...entry.stepid !== void 0 ? { stepid: entry.stepid } : {}, at: entry.at });
2189
+ }
2190
+ async function entryhashof(input) {
2191
+ return { previous: input.previous, current: await sha2562(`${input.previous}
2192
+ ${entrybody(input.entry)}`), algorithm: "sha-256" };
2193
+ }
2194
+ async function logentryof(input) {
2195
+ if (input.summary.trim() === "") throw new Error("The log entry needs its summary in plain language.");
2196
+ if (input.origin.trim() === "") throw new Error("The log entry needs its origin provenance.");
2197
+ const entry = { id: input.id ?? randomid(), runid: input.runid, kind: input.kind, summary: input.summary, origin: input.origin, ...input.stepid !== void 0 ? { stepid: input.stepid } : {}, at: input.at };
2198
+ return { ...entry, hash: await entryhashof({ previous: input.previous, entry }) };
2199
+ }
2200
+ function openrunlog(input) {
2201
+ if (input.runid.trim() === "" || input.sessionid.trim() === "") throw new Error("The run log needs its run and session ids.");
2202
+ return { runid: input.runid, sessionid: input.sessionid, entries: [], updatedat: input.now };
2203
+ }
2204
+ function lasthashof(log) {
2205
+ const entry = log.entries[log.entries.length - 1];
2206
+ return entry === void 0 ? "0".repeat(64) : entry.hash.current;
2207
+ }
2208
+ async function appendlogentry(input) {
2209
+ if (input.log.seal !== void 0) throw new Error(`The run log of ${input.log.runid} sealed at ${input.log.seal.sealedat} and accepts no append; the seal is terminal.`);
2210
+ const entry = await logentryof({ ...input.id !== void 0 ? { id: input.id } : {}, runid: input.log.runid, kind: input.kind, summary: input.summary, origin: input.origin, ...input.stepid !== void 0 ? { stepid: input.stepid } : {}, at: input.at, previous: lasthashof(input.log) });
2211
+ return { ...input.log, entries: [...input.log.entries, entry], updatedat: input.at };
2212
+ }
2213
+ async function sealrunlog(log, now) {
2214
+ if (log.seal !== void 0) throw new Error(`The run log of ${log.runid} already sealed at ${log.seal.sealedat}; the seal is terminal.`);
2215
+ if (log.entries.length === 0) throw new Error("The run log seals at completion with at least one entry.");
2216
+ const sealhash = await entryhashof({ previous: lasthashof(log), entry: { id: `seal:${log.runid}`, runid: log.runid, kind: "seal", summary: `The run ${log.runid} completed and the log sealed with ${log.entries.length} entries.`, origin: log.entries[log.entries.length - 1]?.origin ?? log.runid, at: now } });
2217
+ const seal = { runid: log.runid, entries: log.entries.length, sealhash, sealedat: now };
2218
+ return { log: { ...log, seal, updatedat: now }, seal };
2219
+ }
2220
+ async function verifylogchain(entries) {
2221
+ let previous = "0".repeat(64);
2222
+ for (let index = 0; index < entries.length; index += 1) {
2223
+ const entry = entries[index];
2224
+ if (entry === void 0) continue;
2225
+ if (entry.hash.previous !== previous) return { valid: false, brokenat: index, reason: `The chain link of entry ${index} carries the previous hash ${entry.hash.previous} while its predecessor hashes to ${previous}; the chain reports tamper evidence.` };
2226
+ const expected = await entryhashof({ previous, entry: { id: entry.id, runid: entry.runid, kind: entry.kind, summary: entry.summary, origin: entry.origin, ...entry.stepid !== void 0 ? { stepid: entry.stepid } : {}, at: entry.at } });
2227
+ if (entry.hash.current !== expected.current) return { valid: false, brokenat: index, reason: `The entry hash of entry ${index} matches neither its body nor its predecessor hash; the chain reports tamper evidence.` };
2228
+ previous = entry.hash.current;
2229
+ }
2230
+ return { valid: true, reason: `The hash chain of ${entries.length} entr${entries.length === 1 ? "y" : "ies"} verifies from the genesis hash to the last entry.` };
2231
+ }
2232
+ async function readverifiedlog(log) {
2233
+ const verification = await verifylogchain(log.entries);
2234
+ if (!verification.valid) return { ok: false, entries: [], reason: verification.reason };
2235
+ return { ok: true, entries: [...log.entries], reason: verification.reason };
2236
+ }
2237
+ async function chainreportof(log) {
2238
+ const verification = await verifylogchain(log.entries);
2239
+ if (!verification.valid) return { runid: log.runid, valid: false, entries: log.entries.length, ...verification.brokenat !== void 0 ? { brokenat: verification.brokenat } : {}, reason: verification.reason };
2240
+ return { runid: log.runid, valid: true, entries: log.entries.length, reason: verification.reason, ...log.seal !== void 0 ? { sealhash: log.seal.sealhash.current, sealedat: log.seal.sealedat } : {} };
2241
+ }
2242
+ async function exportlogchain(log) {
2243
+ const read = await readverifiedlog(log);
2244
+ if (!read.ok) return { runid: log.runid, entries: 0, chainvalid: false, reason: read.reason, log: [] };
2245
+ return { runid: log.runid, entries: read.entries.length, chainvalid: true, reason: read.reason, ...log.seal !== void 0 ? { sealhash: log.seal.sealhash.current, sealedat: log.seal.sealedat } : {}, log: read.entries };
2246
+ }
2247
+
2181
2248
  // memory.ts
2182
2249
  var sessionmemory = class {
2183
2250
  constructor(adapter) {
@@ -4637,6 +4704,302 @@ var sessionmemory = class {
4637
4704
  async exportrunstates() {
4638
4705
  return exportrunstate(await this.listrunstates(), Date.now());
4639
4706
  }
4707
+ /**
4708
+ * Security part one persistence of the 1.1.61 family.
4709
+ * The trust boundary records live here: the per origin automation allowlist scoped per profile workspace with one exact origin per entry, the per site originprofiles with their kind grants and denials, the active consentwindows with their expiry timestamps that expire closed past their boundary, the mid run revokerun events with the halted step ids that stay visible for later consent prompts, the fresh class consents per origin, the mask rules for field shapes per origin, and the sealed immutable run logs with their final hash.
4710
+ * The run log store exposes no update or delete path: appends land whole, the seal closes a log with its final hash and the read path verifies the chain before returning a single entry so a broken link refuses the read.
4711
+ * The adapter seam keeps every accessor a one line storage delegation so a future append only backend replaces the adapter only; the current storage areas offer no append only hardware, so the honest derivation is the hash chain that makes any rewrite detectable at read time.
4712
+ */
4713
+ /** Replaces the per origin automation allowlist of the profile workspaces; every entry carries one exact origin with no wildcard expansion. */
4714
+ async setautomationallowlist(entries) {
4715
+ return this.adapter.set("automationallowlist", entries);
4716
+ }
4717
+ /** Returns the per origin automation allowlist entries, oldest grant first. */
4718
+ async getautomationallowlist() {
4719
+ return await this.adapter.get("automationallowlist") ?? [];
4720
+ }
4721
+ /** Adds one exact origin to the automation allowlist of a profile workspace; a duplicate origin keeps its first grant. */
4722
+ async addallowlistorigin(entry) {
4723
+ const entries = await this.getautomationallowlist();
4724
+ if (entries.some((candidate) => candidate.origin === entry.origin && candidate.profileid === entry.profileid)) return;
4725
+ await this.setautomationallowlist([...entries, entry]);
4726
+ }
4727
+ /** Removes one origin from the automation allowlist; the denydefault posture refuses the origin again after the removal. */
4728
+ async removeallowlistorigin(origin, profileid) {
4729
+ await this.setautomationallowlist((await this.getautomationallowlist()).filter((entry) => !(entry.origin === origin && entry.profileid === profileid)));
4730
+ }
4731
+ /** Replaces the per site origin profiles with their kind grants and denials; one profile per origin. */
4732
+ async setoriginprofiles(profiles) {
4733
+ return this.adapter.set("originprofiles", profiles);
4734
+ }
4735
+ /** Returns the stored per site origin profiles, oldest update first. */
4736
+ async getoriginprofiles() {
4737
+ return await this.adapter.get("originprofiles") ?? [];
4738
+ }
4739
+ /** Upserts one origin profile: a profile of the same origin replaces its grants and denials while a new origin joins the list. */
4740
+ async saveoriginprofile(profile) {
4741
+ const profiles = await this.getoriginprofiles();
4742
+ await this.setoriginprofiles(profiles.some((candidate) => candidate.origin === profile.origin) ? profiles.map((candidate) => candidate.origin === profile.origin ? profile : candidate) : [...profiles, profile]);
4743
+ }
4744
+ /** Replaces the consent windows; active windows keep their expiry timestamps and closed windows stay for the audit trail. */
4745
+ async setconsentwindows(windows) {
4746
+ return this.adapter.set("consentwindows", windows);
4747
+ }
4748
+ /** Returns the stored consent windows, newest start first. */
4749
+ async getconsentwindows() {
4750
+ return await this.adapter.get("consentwindows") ?? [];
4751
+ }
4752
+ /** Expires every consent window past its duration boundary: the closed windows keep their records while their grants bind no step anymore. */
4753
+ async expireconsentwindows(now) {
4754
+ const windows = await this.getconsentwindows();
4755
+ const expired = windows.map((window) => window.state === "active" && now >= window.expiresat ? { ...window, state: "closed", closedat: now } : window);
4756
+ await this.setconsentwindows(expired);
4757
+ return expired;
4758
+ }
4759
+ /** Records one mid run revocation with its halted step ids; the history stays visible for later consent prompts. */
4760
+ async addrevocation(event) {
4761
+ await this.adapter.set("revocations", [event, ...await this.adapter.get("revocations") ?? []].slice(0, 500));
4762
+ }
4763
+ /** Returns the recorded mid run revocations with their halted step ids, newest first. */
4764
+ async getrevocations() {
4765
+ return await this.adapter.get("revocations") ?? [];
4766
+ }
4767
+ /** Replaces the fresh class consents per origin. */
4768
+ async setclassconsents(consents) {
4769
+ return this.adapter.set("classconsents", consents);
4770
+ }
4771
+ /** Returns the fresh class consents per origin, newest grant first. */
4772
+ async getclassconsents() {
4773
+ return await this.adapter.get("classconsents") ?? [];
4774
+ }
4775
+ /** Records one fresh class consent per origin; the prompt of one class never widens another class. */
4776
+ async addclassconsent(consent) {
4777
+ const consents = (await this.getclassconsents()).filter((candidate) => !(candidate.origin === consent.origin && candidate.sensitiveclass === consent.sensitiveclass));
4778
+ await this.setclassconsents([consent, ...consents]);
4779
+ }
4780
+ /** Replaces the mask rules for sensitive field shapes per origin. */
4781
+ async setmaskrules(rules) {
4782
+ return this.adapter.set("maskrules", rules);
4783
+ }
4784
+ /** Returns the stored mask rules for sensitive field shapes per origin, oldest rule first. */
4785
+ async getmaskrules() {
4786
+ return await this.adapter.get("maskrules") ?? [];
4787
+ }
4788
+ /** Adds one mask rule for field shapes, optionally scoped to one origin. */
4789
+ async addmaskrule(rule) {
4790
+ await this.setmaskrules([...await this.getmaskrules(), rule]);
4791
+ }
4792
+ /** Removes one mask rule by its id. */
4793
+ async removemaskrule(id) {
4794
+ await this.setmaskrules((await this.getmaskrules()).filter((rule) => rule.id !== id));
4795
+ }
4796
+ /** Stores the whole run log of one run: the append lands in one storage transaction so the entries and their chain links persist together. */
4797
+ async setimmutablelog(log) {
4798
+ return this.adapter.set(`immutablelog:${log.runid}`, log);
4799
+ }
4800
+ /** Returns the stored run log of one run; an absent log returns undefined. */
4801
+ async getimmutablelog(runid) {
4802
+ return this.adapter.get(`immutablelog:${runid}`);
4803
+ }
4804
+ /** Lists the stored run logs, oldest update first, with the sealed logs carrying their final hash. */
4805
+ async listimmutablelogs() {
4806
+ const index = await this.adapter.get("immutablelogindex") ?? [];
4807
+ const logs = [];
4808
+ for (const runid of index) {
4809
+ const log = await this.getimmutablelog(runid);
4810
+ if (log) logs.push(log);
4811
+ }
4812
+ return logs.sort((one, two) => one.updatedat - two.updatedat);
4813
+ }
4814
+ /** Stores the run log index entry of one run so the log listing reads every stored log. */
4815
+ async trackimmutablelog(runid) {
4816
+ const index = await this.adapter.get("immutablelogindex") ?? [];
4817
+ if (!index.includes(runid)) await this.adapter.set("immutablelogindex", [...index, runid]);
4818
+ }
4819
+ /** Exports the verified log chain of one run for the audit file: the read path verifies the whole hash chain first and a broken link refuses the export with no entries served. */
4820
+ async exportverifiedrunlog(runid) {
4821
+ const log = await this.getimmutablelog(runid);
4822
+ if (!log) throw new Error(`No run log exists for the run ${runid}.`);
4823
+ return exportlogchain(log);
4824
+ }
4825
+ /** Expires the sealed run logs past the user configured retention: the entries reduce to their chain summaries while the seal hash always survives. */
4826
+ async expireimmutablelogs(retention, now) {
4827
+ const logs = await this.listimmutablelogs();
4828
+ if (retention === void 0) return logs;
4829
+ const kept = [];
4830
+ for (const log of logs) {
4831
+ if (log.seal !== void 0 && now - log.seal.sealedat > retention) {
4832
+ const summary = { runid: log.runid, sessionid: log.sessionid, entries: [], seal: { ...log.seal, entries: log.seal.entries }, updatedat: now };
4833
+ await this.setimmutablelog(summary);
4834
+ } else {
4835
+ kept.push(log);
4836
+ }
4837
+ }
4838
+ return kept;
4839
+ }
4840
+ /**
4841
+ * Security part two persistence of the 1.1.62 family.
4842
+ * The protections for secrets, messages and money live here: the secretvault metadata with labels and scopes only and never values, scoped per profile workspace; the connectallow entries with their senders shipping empty by default; the ratelimit bucket state per origin and per session; the confirm gates with their resolution events and their human action provenance; the redactshot regions per origin and page template; the phishguard verdicts with their distance scores expiring past their freshness window; the permdiff records of each installed version; the safedefaults applications with their first seen origins; and the deferred command events waiting for their bucket reset.
4843
+ * The vault values never touch this seam: only metadata persists while the values stay behind the vault seam the background wires.
4844
+ */
4845
+ /** Replaces the secretvault metadata of the profile workspaces: labels, scopes, provenance and digests only, never values. */
4846
+ async setsecretvault(entries) {
4847
+ return this.adapter.set("secretvault", entries);
4848
+ }
4849
+ /** Returns the stored secretvault metadata, oldest record first; the values live behind the vault seam and never persist. */
4850
+ async getsecretvault() {
4851
+ return await this.adapter.get("secretvault") ?? [];
4852
+ }
4853
+ /** Adds one secretvault metadata record scoped to a profile workspace; a duplicate vault id keeps its first record. */
4854
+ async addsecret(entry) {
4855
+ const entries = await this.getsecretvault();
4856
+ if (entries.some((candidate) => candidate.vaultid === entry.vaultid)) return;
4857
+ await this.setsecretvault([...entries, entry]);
4858
+ }
4859
+ /** Removes one secretvault metadata record by its vault id; the background drops the value behind the seam in the same action. */
4860
+ async removesecret(vaultid) {
4861
+ await this.setsecretvault((await this.getsecretvault()).filter((entry) => entry.vaultid !== vaultid));
4862
+ }
4863
+ /** Stamps the last use of one secretvault record: the metadata notes when the vault last released its value while the value itself stays unrecorded. */
4864
+ async stampsecretuse(vaultid, at) {
4865
+ await this.setsecretvault((await this.getsecretvault()).map((entry) => entry.vaultid === vaultid ? { ...entry, lastusedat: at } : entry));
4866
+ }
4867
+ /** Replaces the connectallow entries of external senders; the list ships empty by default with user managed entries only. */
4868
+ async setconnectallow(entries) {
4869
+ return this.adapter.set("connectallow", entries);
4870
+ }
4871
+ /** Returns the stored connectallow entries, oldest add first. */
4872
+ async getconnectallow() {
4873
+ return await this.adapter.get("connectallow") ?? [];
4874
+ }
4875
+ /** Adds one connectallow entry for an external sender; a duplicate sender id keeps its first entry. */
4876
+ async addconnectallow(entry) {
4877
+ const entries = await this.getconnectallow();
4878
+ if (entries.some((candidate) => candidate.senderid === entry.senderid)) return;
4879
+ await this.setconnectallow([...entries, entry]);
4880
+ }
4881
+ /** Removes one connectallow entry by its sender id; the origincheck drops the sender again after the removal. */
4882
+ async removeconnectallow(senderid) {
4883
+ await this.setconnectallow((await this.getconnectallow()).filter((entry) => entry.senderid !== senderid));
4884
+ }
4885
+ /** Replaces the ratelimit bucket state per origin and per session: the user configured bounds and windows with their used counts. */
4886
+ async setratelimitbuckets(buckets) {
4887
+ return this.adapter.set("ratelimitbuckets", buckets);
4888
+ }
4889
+ /** Returns the stored ratelimit buckets per origin and per session. */
4890
+ async getratelimitbuckets() {
4891
+ return await this.adapter.get("ratelimitbuckets") ?? [];
4892
+ }
4893
+ /** Upserts one ratelimit bucket: a bucket of the same origin and session replaces its state while a new pair joins the list. */
4894
+ async saveratelimitbucket(bucket) {
4895
+ const buckets = await this.getratelimitbuckets();
4896
+ await this.setratelimitbuckets(buckets.some((candidate) => candidate.origin === bucket.origin && candidate.sessionid === bucket.sessionid) ? buckets.map((candidate) => candidate.origin === bucket.origin && candidate.sessionid === bucket.sessionid ? bucket : candidate) : [...buckets, bucket]);
4897
+ }
4898
+ /** Removes the ratelimit bucket of one origin and session; the origin runs without a bucket because the bounds stay user choices only. */
4899
+ async removeratelimitbucket(origin, sessionid) {
4900
+ await this.setratelimitbuckets((await this.getratelimitbuckets()).filter((bucket) => !(bucket.origin === origin && bucket.sessionid === sessionid)));
4901
+ }
4902
+ /** Replaces the confirm gates with their payloads and states; a resolved or refused gate stays terminal for the audit trail. */
4903
+ async setgates(gates) {
4904
+ return this.adapter.set("confirmgates", gates);
4905
+ }
4906
+ /** Returns the stored confirm gates, newest open first. */
4907
+ async getgates() {
4908
+ return await this.adapter.get("confirmgates") ?? [];
4909
+ }
4910
+ /** Upserts one confirm gate: a gate of the same step keeps its latest record because one gated step carries one live gate. */
4911
+ async savegate(gate) {
4912
+ const gates = await this.getgates();
4913
+ await this.setgates(gates.some((candidate) => candidate.stepid === gate.stepid && candidate.kind === gate.kind) ? gates.map((candidate) => candidate.stepid === gate.stepid && candidate.kind === gate.kind ? gate : candidate) : [gate, ...gates]);
4914
+ }
4915
+ /** Records one gate resolution event with its human action provenance; the resolution history stays visible for the audit trail. */
4916
+ async addgateresolution(resolution) {
4917
+ await this.adapter.set("gateresolutions", [resolution, ...await this.adapter.get("gateresolutions") ?? []].slice(0, 500));
4918
+ }
4919
+ /** Returns the recorded gate resolution events with their human action provenance, newest first. */
4920
+ async getgateresolutions() {
4921
+ return await this.adapter.get("gateresolutions") ?? [];
4922
+ }
4923
+ /** Replaces the redactshot regions per origin and page template. */
4924
+ async setredactregions(regions) {
4925
+ return this.adapter.set("redactregions", regions);
4926
+ }
4927
+ /** Returns the stored redactshot regions per origin and page template, oldest rule first. */
4928
+ async getredactregions() {
4929
+ return await this.adapter.get("redactregions") ?? [];
4930
+ }
4931
+ /** Adds one redactshot region, derived from a field shape or drawn by the user. */
4932
+ async addredactregion(region) {
4933
+ await this.setredactregions([...await this.getredactregions(), region]);
4934
+ }
4935
+ /** Removes one redactshot region by its id. */
4936
+ async removeredactregion(id) {
4937
+ await this.setredactregions((await this.getredactregions()).filter((region) => region.id !== id));
4938
+ }
4939
+ /** Records one phishguard verdict with its distance score; the records stay for the audit trail while the freshness window governs the live set. */
4940
+ async addphishverdict(verdict) {
4941
+ await this.adapter.set("phishverdicts", [verdict, ...(await this.adapter.get("phishverdicts") ?? []).filter((candidate) => candidate.origin !== verdict.origin)].slice(0, 500));
4942
+ }
4943
+ /** Returns the stored phishguard verdicts with their distance scores, newest first. */
4944
+ async getphishverdicts() {
4945
+ return await this.adapter.get("phishverdicts") ?? [];
4946
+ }
4947
+ /** Expires the phishguard verdicts past the user configured freshness window: the expired verdicts keep their records for the audit trail while the guard recomputes the next login step. */
4948
+ async expirephishverdicts(freshness, now) {
4949
+ const verdicts = await this.getphishverdicts();
4950
+ if (freshness === void 0) return verdicts;
4951
+ return verdicts.filter((verdict) => now - verdict.at < freshness);
4952
+ }
4953
+ /** Records one permdiff between two installed permission versions; the record of each installed update stays for the audit trail. */
4954
+ async addpermdiff(diff) {
4955
+ await this.adapter.set("permdiffs", [diff, ...await this.adapter.get("permdiffs") ?? []].slice(0, 500));
4956
+ }
4957
+ /** Returns the recorded permdiffs of each installed update, newest first. */
4958
+ async getpermdiffs() {
4959
+ return await this.adapter.get("permdiffs") ?? [];
4960
+ }
4961
+ /** Stores the last installed permission set the permdiff of the next update compares against. */
4962
+ async setlastpermissions(permissions, version) {
4963
+ await this.adapter.set("lastpermissions", { permissions, version });
4964
+ }
4965
+ /** Returns the last installed permission set with its version; an absent record returns undefined. */
4966
+ async getlastpermissions() {
4967
+ return this.adapter.get("lastpermissions");
4968
+ }
4969
+ /** Records one safedefaults application with its first seen origin; the first visit of an unknown origin stays visible. */
4970
+ async addsafedefaultapplication(application) {
4971
+ const applications = await this.adapter.get("safedefaults") ?? [];
4972
+ if (applications.some((candidate) => candidate.origin === application.origin)) return;
4973
+ await this.adapter.set("safedefaults", [...applications, application]);
4974
+ }
4975
+ /** Returns the recorded safedefaults applications with their first seen origins, oldest first. */
4976
+ async getsafedefaultapplications() {
4977
+ return await this.adapter.get("safedefaults") ?? [];
4978
+ }
4979
+ /** Records one deferred command event with the reset time it waits for. */
4980
+ async adddeferredevent(event) {
4981
+ await this.adapter.set("deferredevents", [event, ...await this.adapter.get("deferredevents") ?? []].slice(0, 500));
4982
+ }
4983
+ /** Returns the recorded deferred command events, newest first. */
4984
+ async getdeferredevents() {
4985
+ return await this.adapter.get("deferredevents") ?? [];
4986
+ }
4987
+ /** Serves the transparency data of the transparencypage in one read: every active grant with its origin, scope and boundary, every consent window ever granted with its expiry, the connectallow entries with their senders, the permdiff records of each installed update, the safedefaults applications and the secretvault metadata with labels and scopes only. */
4988
+ async gettransparencyview() {
4989
+ return {
4990
+ allowlist: await this.getautomationallowlist(),
4991
+ profiles: await this.getoriginprofiles(),
4992
+ windows: await this.getconsentwindows(),
4993
+ connectallow: await this.getconnectallow(),
4994
+ permdiffs: await this.getpermdiffs(),
4995
+ safedefaults: await this.getsafedefaultapplications(),
4996
+ vault: await this.getsecretvault(),
4997
+ gates: await this.getgates(),
4998
+ resolutions: await this.getgateresolutions(),
4999
+ deferred: await this.getdeferredevents(),
5000
+ phishverdicts: await this.getphishverdicts()
5001
+ };
5002
+ }
4640
5003
  };
4641
5004
  function mediakindof(record2) {
4642
5005
  if ("pages" in record2) return "pdf";
@@ -5277,6 +5640,87 @@ function tlsstateof(tls) {
5277
5640
  return { mode: tls.mode, certificaterequired: tls.mode === "required" || tls.certificatefingerprint !== void 0, verified: tls.verifiedat !== void 0 };
5278
5641
  }
5279
5642
 
5643
+ // confirmgates.ts
5644
+ function stepoptions(step) {
5645
+ if (!step.options) return {};
5646
+ try {
5647
+ const parsed = JSON.parse(step.options);
5648
+ return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
5649
+ } catch {
5650
+ return {};
5651
+ }
5652
+ }
5653
+ function gatekindfor(classes) {
5654
+ if (classes.includes("payment")) return "confirmpay";
5655
+ if (classes.includes("delete")) return "confirmdelete";
5656
+ if (classes.includes("credential")) return "confirmcreds";
5657
+ return void 0;
5658
+ }
5659
+ function paypayload(input) {
5660
+ const payload = { payeeorigin: input.payeeorigin };
5661
+ if (input.amount !== void 0 && input.amount.trim() !== "") payload.amount = input.amount.trim();
5662
+ if (input.target !== void 0 && input.target.trim() !== "") payload.target = input.target.trim();
5663
+ return payload;
5664
+ }
5665
+ function deletepayload(input) {
5666
+ const payload = { scope: input.scope, irreversibility: input.irreversibility };
5667
+ if (input.target !== void 0 && input.target.trim() !== "") payload.target = input.target.trim();
5668
+ return payload;
5669
+ }
5670
+ function credspayload(label) {
5671
+ if (label.trim() === "") throw new Error("The confirmcreds gate names its credential label; the value never appears.");
5672
+ return { label: label.trim() };
5673
+ }
5674
+ function opengate(input) {
5675
+ if (input.stepid.trim() === "" || input.runid.trim() === "" || input.origin.trim() === "") throw new Error("The confirm gate needs its step, run and origin.");
5676
+ if (Object.keys(input.payload).length === 0) throw new Error("The confirm gate carries the payload the human reviews.");
5677
+ return { gateid: input.gateid ?? randomid(), kind: input.kind, stepid: input.stepid, runid: input.runid, origin: input.origin, payload: { ...input.payload }, state: "open", openedat: input.now };
5678
+ }
5679
+ function gatestateof(gates, stepid) {
5680
+ const gate = [...gates].reverse().find((candidate) => candidate.stepid === stepid);
5681
+ if (gate === void 0) return { state: "none" };
5682
+ return { state: gate.state, gate };
5683
+ }
5684
+ function resolvegate(input) {
5685
+ if (input.actor.trim() === "") throw new Error("The gate resolution names its acting user; only a human resolves a gate.");
5686
+ const gate = input.gates.find((candidate) => candidate.gateid === input.gateid);
5687
+ if (gate === void 0) return { gates: input.gates };
5688
+ if (gate.state !== "open") return { gates: input.gates };
5689
+ const resolution = { gateid: gate.gateid, kind: gate.kind, stepid: gate.stepid, decision: input.decision, actor: input.actor, at: input.now };
5690
+ return { gates: input.gates.map((candidate) => candidate.gateid === input.gateid ? { ...candidate, state: input.decision, resolvedat: input.now, actor: input.actor } : candidate), resolution };
5691
+ }
5692
+ function nobatchresolution(gateids) {
5693
+ if (gateids.length > 1) return { allowed: false, reason: `One human action resolves exactly one gate; the batch of ${gateids.length} gates refuses in full because no batch approval exists.` };
5694
+ if (gateids.length === 0) return { allowed: false, reason: "A gate resolution names its single gate." };
5695
+ return { allowed: true, reason: "The resolution names exactly one gate; the distinct human action resolves it alone." };
5696
+ }
5697
+ function gateprompttext(gate) {
5698
+ if (gate.kind === "confirmpay") {
5699
+ const amount = gate.payload.amount !== void 0 ? `the amount ${gate.payload.amount}` : "an amount the step options name";
5700
+ const target = gate.payload.target !== void 0 ? ` on ${gate.payload.target}` : "";
5701
+ return `Approve the payment of ${amount} to ${gate.payload.payeeorigin}${target}? The step dispatches only after this distinct human action.`;
5702
+ }
5703
+ if (gate.kind === "confirmdelete") {
5704
+ const target = gate.payload.target !== void 0 ? ` on ${gate.payload.target}` : "";
5705
+ return `Approve the destructive delete${target} scoped to ${gate.payload.scope}? ${gate.payload.irreversibility} The step dispatches only after this distinct human action.`;
5706
+ }
5707
+ return `Approve the use of the credential ${gate.payload.label} on ${gate.origin}? The value stays behind the vault; the label is everything this prompt shows.`;
5708
+ }
5709
+ function gateforstep(input) {
5710
+ const kind = gatekindfor(input.classes);
5711
+ if (kind === void 0) return void 0;
5712
+ const options = stepoptions(input.step);
5713
+ if (kind === "confirmpay") {
5714
+ const amount = typeof options.amount === "string" ? options.amount : typeof options.value === "string" ? options.value : void 0;
5715
+ return opengate({ kind, stepid: input.step.id, runid: input.runid, origin: input.origin, payload: paypayload({ ...amount !== void 0 && amount !== "" ? { amount } : {}, payeeorigin: String(options.payeeorigin ?? input.origin), ...input.step.target !== void 0 && input.step.target !== "" ? { target: input.step.target } : {} }), now: input.now });
5716
+ }
5717
+ if (kind === "confirmdelete") {
5718
+ return opengate({ kind, stepid: input.step.id, runid: input.runid, origin: input.origin, payload: deletepayload({ ...input.step.target !== void 0 && input.step.target !== "" ? { target: input.step.target } : {}, scope: String(options.scope ?? input.origin), irreversibility: String(options.irreversibility ?? "A destructive delete destroys state the page cannot restore.") }), now: input.now });
5719
+ }
5720
+ if (input.credentiallabel === void 0 || input.credentiallabel.trim() === "") return void 0;
5721
+ return opengate({ kind, stepid: input.step.id, runid: input.runid, origin: input.origin, payload: credspayload(input.credentiallabel), now: input.now });
5722
+ }
5723
+
5280
5724
  // coordination.ts
5281
5725
  function lockkey(origin, selector) {
5282
5726
  return `${origin}|${selector}`;
@@ -5839,6 +6283,238 @@ async function callgraphql(input) {
5839
6283
  }
5840
6284
  }
5841
6285
 
6286
+ // inboundguard.ts
6287
+ function shapeof(value) {
6288
+ if (typeof value === "string") return "string";
6289
+ if (typeof value === "number") return "number";
6290
+ if (typeof value === "boolean") return "boolean";
6291
+ if (Array.isArray(value)) return "array";
6292
+ return "object";
6293
+ }
6294
+ function schemacheck(input) {
6295
+ const errors = [];
6296
+ for (const [field, value] of Object.entries(input.command)) {
6297
+ const expected = input.schema[field];
6298
+ if (expected === void 0) {
6299
+ errors.push({ path: field, expected: "absent", found: shapeof(value), reason: `The ${field} field sits absent from the declared grammar of the command; schemastrict refuses unknown fields before dispatch.` });
6300
+ continue;
6301
+ }
6302
+ if (expected === "absent") {
6303
+ errors.push({ path: field, expected: "absent", found: shapeof(value), reason: `The ${field} field carries no value under the declared grammar; schemastrict refuses it before dispatch.` });
6304
+ continue;
6305
+ }
6306
+ if (shapeof(value) !== expected) errors.push({ path: field, expected, found: shapeof(value), reason: `The ${field} field expects a ${expected} while the command carries a ${shapeof(value)}; schemastrict refuses the shape mismatch before dispatch.` });
6307
+ }
6308
+ for (const field of input.required ?? []) {
6309
+ if (input.command[field] === void 0) errors.push({ path: field, expected: input.schema[field] ?? "string", found: "absent", reason: `The ${field} field is required by the declared grammar and the command carries no value; schemastrict refuses the incomplete command before dispatch.` });
6310
+ }
6311
+ return { valid: errors.length === 0, errors };
6312
+ }
6313
+ function envelopecheck(input) {
6314
+ const kind = input.command.kind;
6315
+ if (typeof kind !== "string" || kind.trim() === "") return { valid: false, errors: [{ path: "kind", expected: "string", found: shapeof(kind), reason: "Every inbound command names its kind as a non-empty string; a kindless command never dispatches." }] };
6316
+ if (!input.knownkinds.includes(kind)) return { valid: false, errors: [{ path: "kind", expected: `one of ${input.knownkinds.length} declared command kinds`, found: kind, reason: `The ${kind} command kind sits absent from the dispatch registry; schemastrict refuses unknown commands before dispatch.` }] };
6317
+ return { valid: true, errors: [] };
6318
+ }
6319
+ function origincheckof(input) {
6320
+ const sender = input.senderid ?? "an unknown sender";
6321
+ const origin = input.senderorigin ?? "";
6322
+ if (input.senderid === input.extensionid) return { accepted: true, sender, origin, reason: "The sender is this extension itself; the internal surface accepts." };
6323
+ if (input.senderid !== void 0 && input.connectallow.some((entry) => entry.senderid === input.senderid && (entry.origin === void 0 || entry.origin === origin))) {
6324
+ return { accepted: true, sender, origin, reason: `The sender ${sender} sits in the connectallow list the user manages${origin !== "" ? ` for ${origin}` : ""}; the message accepts.` };
6325
+ }
6326
+ if (input.senderid === void 0) return { accepted: false, sender, origin, reason: "The message carries no sender identity; the guard drops it before any handler runs." };
6327
+ return { accepted: false, sender, origin, reason: `The sender ${sender} sits absent from the connectallow list; the guard drops the message without handler execution.` };
6328
+ }
6329
+ function portaccept(input) {
6330
+ const verdict = origincheckof(input);
6331
+ if (!verdict.accepted) return { ...verdict, reason: `The port ${input.portname} closes at its handshake: ${verdict.reason}` };
6332
+ return { ...verdict, reason: `The port ${input.portname} accepted its handshake: ${verdict.reason}` };
6333
+ }
6334
+ function connectallowentryof(input) {
6335
+ if (input.senderid.trim() === "") throw new Error("The connectallow entry needs its sender id.");
6336
+ if (input.displayname.trim() === "") throw new Error("The connectallow entry needs its display name.");
6337
+ return { senderid: input.senderid.trim(), displayname: input.displayname.trim(), ...input.origin !== void 0 && input.origin.trim() !== "" ? { origin: input.origin.trim() } : {}, addedat: input.now };
6338
+ }
6339
+ var emptyconnectallow = [];
6340
+ function bucketboundsvalid(limit, window) {
6341
+ if (!Number.isFinite(limit) || limit <= 0) return { valid: false, reason: "The ratelimit bucket limit stays a positive user value; no hidden ceiling exists." };
6342
+ if (!Number.isFinite(window) || window <= 0) return { valid: false, reason: "The ratelimit bucket window stays a positive user value in milliseconds; the window reset stays the user's choice." };
6343
+ return { valid: true, reason: `The bucket bound of ${limit} commands per ${window} milliseconds stays the user configured choice with no hidden ceiling.` };
6344
+ }
6345
+ function bucketof(input) {
6346
+ const bounds = bucketboundsvalid(input.limit, input.window);
6347
+ if (!bounds.valid) throw new Error(bounds.reason);
6348
+ return { origin: input.origin, sessionid: input.sessionid, limit: input.limit, window: input.window, used: 0, windowstartedat: input.now, resetsat: input.now + input.window };
6349
+ }
6350
+ function bucketconsume(input) {
6351
+ if (input.now >= input.bucket.resetsat) {
6352
+ const fresh = { ...input.bucket, used: 0, windowstartedat: input.now, resetsat: input.now + input.bucket.window };
6353
+ return { allowed: true, deferred: false, bucket: { ...fresh, used: 1 }, resetsat: fresh.resetsat, reason: `The bucket window of ${input.bucket.origin} reset and the command consumes the first slot of ${fresh.limit}.` };
6354
+ }
6355
+ if (input.bucket.used < input.bucket.limit) {
6356
+ return { allowed: true, deferred: false, bucket: { ...input.bucket, used: input.bucket.used + 1 }, resetsat: input.bucket.resetsat, reason: `The command consumes slot ${input.bucket.used + 1} of ${input.bucket.limit} in the bucket of ${input.bucket.origin}.` };
6357
+ }
6358
+ return { allowed: false, deferred: true, bucket: input.bucket, resetsat: input.bucket.resetsat, reason: `The bucket of ${input.bucket.origin} holds its ${input.bucket.limit} command bound; the command defers until the window resets at ${input.bucket.resetsat}.` };
6359
+ }
6360
+ function deferredeventof(input) {
6361
+ if (input.stepid.trim() === "" || input.kind.trim() === "") throw new Error("The deferred event needs its step and kind.");
6362
+ return { id: input.id ?? randomid(), stepid: input.stepid, kind: input.kind, origin: input.origin, reason: input.reason, resetsat: input.resetsat, at: input.now };
6363
+ }
6364
+ function deferredready(deferred, now) {
6365
+ return now >= deferred.resetsat;
6366
+ }
6367
+
6368
+ // originpolicy.ts
6369
+ var denydefaultposture = "denydefault";
6370
+ function exactorigin(origin, entry) {
6371
+ return origin.trim() !== "" && origin === entry;
6372
+ }
6373
+ function wildcardentry(entry) {
6374
+ return entry.includes("*") || entry.includes("://*.") || entry.trim() === "" || entry.trim() === "https://" || entry.trim() === "http://";
6375
+ }
6376
+ function allowlistcheck(input) {
6377
+ if (input.origin.trim() === "") return { allowed: false, reason: "The step needs the exact origin it targets." };
6378
+ for (const entry of input.allowlist) {
6379
+ if (wildcardentry(entry.origin)) return { allowed: false, reason: `The allowlist entry ${entry.origin} carries a wildcard; every grant binds to one exact origin with no wildcard expansion.` };
6380
+ }
6381
+ const scoped = input.profileid === void 0 ? input.allowlist : input.allowlist.filter((entry) => entry.profileid === input.profileid);
6382
+ const granted = scoped.some((entry) => exactorigin(input.origin, entry.origin));
6383
+ if (granted) return { allowed: true, reason: `The origin ${input.origin} sits inside the automation allowlist the user granted.` };
6384
+ if (input.sessionorigin !== void 0 && exactorigin(input.origin, input.sessionorigin)) return { allowed: true, reason: `The active tab grant covers ${input.origin} as exactly one explicit single origin grant.` };
6385
+ return { allowed: false, reason: `The denydefault posture refuses ${input.origin} because the origin sits absent from the automation allowlist; grant the origin first.` };
6386
+ }
6387
+ function originprofileof(input) {
6388
+ if (input.origin.trim() === "") throw new Error("The origin profile needs its exact origin.");
6389
+ return { profileid: input.profileid ?? randomid(), origin: input.origin, grants: [...input.grants ?? []], denials: [...input.denials ?? []], createdat: input.now, updatedat: input.now };
6390
+ }
6391
+ function profilekind(input) {
6392
+ if (input.profile.grants.includes(input.kind) && input.decision === "grant") return input.profile;
6393
+ if (input.profile.denials.includes(input.kind) && input.decision === "deny") return input.profile;
6394
+ const grants = input.decision === "grant" ? [.../* @__PURE__ */ new Set([...input.profile.grants, input.kind])] : input.profile.grants.filter((kind) => kind !== input.kind);
6395
+ const denials = input.decision === "deny" ? [.../* @__PURE__ */ new Set([...input.profile.denials, input.kind])] : input.profile.denials.filter((kind) => kind !== input.kind);
6396
+ return { ...input.profile, grants, denials, updatedat: input.now };
6397
+ }
6398
+ function profilegrade(input) {
6399
+ if (!input.sensitive) return { allowed: true, consult: false, reason: `The ${input.kind} kind grades non-sensitive and the origin profile needs no consult.` };
6400
+ if (input.profile === void 0) return { allowed: true, consult: true, reason: `No origin profile exists for the ${input.kind} kind, so the fresh class consent gate alone routes the sensitive step.` };
6401
+ if (input.profile.denials.includes(input.kind)) return { allowed: false, consult: true, reason: `The origin profile of ${input.profile.origin} denies the ${input.kind} kind; a denied kind never runs on that origin.` };
6402
+ if (input.profile.grants.includes(input.kind)) return { allowed: true, consult: true, reason: `The origin profile of ${input.profile.origin} grants the ${input.kind} kind the user reviewed.` };
6403
+ return { allowed: true, consult: true, reason: `The origin profile of ${input.profile.origin} carries no ${input.kind} decision, so the fresh class consent gate alone routes the sensitive step.` };
6404
+ }
6405
+ function stepoptions2(step) {
6406
+ if (!step.options) return {};
6407
+ try {
6408
+ const parsed = JSON.parse(step.options);
6409
+ return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
6410
+ } catch {
6411
+ return {};
6412
+ }
6413
+ }
6414
+ var paymentkinds = /* @__PURE__ */ new Set(["fillcard", "fillcode"]);
6415
+ var credentialkinds = /* @__PURE__ */ new Set(["consentpassword", "saveapikey", "handleauth", "authflow"]);
6416
+ var deletekinds = /* @__PURE__ */ new Set(["discardtab", "closepattern", "clearcookies", "removeattribute", "cleanupartifacts"]);
6417
+ var publishkinds = /* @__PURE__ */ new Set(["postform", "postfiles", "sendmessage", "submitform", "submitsearch", "writeclipboard"]);
6418
+ var defaultsensitivekinds = /* @__PURE__ */ new Set(["attachfile", "uploadfile", "uploadfiles", "downloadfile", "downloadimages", "batchdownload", "pausedownload", "resumedownload", "quarantinedownload", "evaluate"]);
6419
+ function sensitiveclassesof(step) {
6420
+ const options = stepoptions2(step);
6421
+ const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
6422
+ const names = [...fields.map((field) => typeof field.name === "string" ? field.name : ""), typeof options.field === "string" ? options.field : "", typeof options.target === "string" ? options.target : ""].map((name) => name.toLowerCase());
6423
+ const carries = (shape) => names.some((name) => name.includes(shape));
6424
+ const classes = /* @__PURE__ */ new Set();
6425
+ if (paymentkinds.has(step.kind) || carries("card") || carries("cvc") || carries("cvv")) classes.add("payment");
6426
+ const credentialshape = carries("password") || carries("token") || carries("secret") || carries("apikey") || carries("passphrase");
6427
+ const submits = step.kind === "submitform" || step.kind === "postform" || step.kind === "submitsearch" || step.kind === "fillform" || step.kind === "filllabel" || step.kind === "fillplaceholder";
6428
+ if (credentialkinds.has(step.kind) || submits && credentialshape) classes.add("credential");
6429
+ if (deletekinds.has(step.kind)) classes.add("delete");
6430
+ if (publishkinds.has(step.kind) || step.kind === "callrest" || step.kind === "callgraphql") {
6431
+ const verb = typeof options.method === "string" ? options.method.trim().toUpperCase() : typeof options.verb === "string" ? options.verb.trim().toUpperCase() : "";
6432
+ if (step.kind === "callrest" || step.kind === "callgraphql") {
6433
+ if (verb !== "" && !["GET", "HEAD", "OPTIONS"].includes(verb)) classes.add("publish");
6434
+ } else classes.add("publish");
6435
+ }
6436
+ const bydefault = defaultsensitivekinds.has(step.kind);
6437
+ const list = [...classes];
6438
+ if (list.length === 0 && !bydefault) return { classes: [], bydefault: false, sensitive: false, reason: `The ${step.kind} kind carries no sensitive class and no default sensitive grade.` };
6439
+ return { classes: list, bydefault, sensitive: true, reason: `The ${step.kind} kind grades sensitive${list.length > 0 ? ` through the ${list.join(", ")} class${list.length === 1 ? "" : "es"}` : ""}${bydefault ? " by default" : ""}.` };
6440
+ }
6441
+ function classconsentcovers(consents, origin, sensitiveclass, now) {
6442
+ return consents.some((consent) => consent.origin === origin && consent.sensitiveclass === sensitiveclass && consent.grantedat <= now && (consent.expiresat === void 0 || now < consent.expiresat));
6443
+ }
6444
+ function missingclassconsents(input) {
6445
+ const missing = input.classes.filter((kind) => !classconsentcovers(input.consents, input.origin, kind, input.now));
6446
+ if (missing.length > 0) return { needed: true, missing, reason: `The sensitive classes ${missing.join(", ")} need one fresh consent prompt each on ${input.origin}.` };
6447
+ if (input.bydefault && input.classes.length === 0) return { needed: true, missing: [], reason: `The ${input.origin} step grades sensitive by default and needs its fresh consent window prompt.` };
6448
+ return { needed: false, missing: [], reason: `The fresh class consents of ${input.origin} cover every class the step names.` };
6449
+ }
6450
+ function openconsentwindow(input) {
6451
+ if (input.sessionid.trim() === "" || input.origin.trim() === "") throw new Error("The consent window needs its session and its exact origin.");
6452
+ if (!Number.isFinite(input.duration) || input.duration <= 0) throw new Error("The consent window needs its duration as a positive user value; no window defaults to unlimited.");
6453
+ return { id: input.id ?? randomid(), sessionid: input.sessionid, origin: input.origin, startedat: input.now, duration: input.duration, expiresat: input.now + input.duration, boundary: input.boundary?.trim() !== "" && input.boundary !== void 0 ? input.boundary : `${input.duration} milliseconds the user chose`, kinds: [...new Set(input.kinds)], state: "active" };
6454
+ }
6455
+ function consentwindowstate(window, now) {
6456
+ if (window.state === "closed" || now >= window.expiresat) return { state: "expired", remaining: 0, reason: `The consent window of ${window.origin} closed at its ${window.boundary} boundary; the run suspends until a new explicit prompt renews it.` };
6457
+ return { state: "active", remaining: window.expiresat - now, reason: `The consent window of ${window.origin} stays active with ${window.expiresat - now} milliseconds left of its ${window.boundary} boundary.` };
6458
+ }
6459
+ function windowgatesstep(input) {
6460
+ if (input.window === void 0) return { allowed: false, suspended: false, reason: `No active consent window covers ${input.origin}; the consent prompt opens one before any step dispatches.` };
6461
+ if (input.window.sessionid !== input.sessionid) return { allowed: false, suspended: false, reason: `The consent window scopes to the session ${input.window.sessionid} only and never widens to another session.` };
6462
+ if (input.window.origin !== input.origin) return { allowed: false, suspended: false, reason: `The consent window scopes to the origin ${input.window.origin} only and never widens to another origin.` };
6463
+ const state = consentwindowstate(input.window, input.now);
6464
+ if (state.state === "expired") return { allowed: false, suspended: true, reason: state.reason };
6465
+ return { allowed: true, suspended: false, reason: state.reason };
6466
+ }
6467
+ function expireconsentwindows(windows, now) {
6468
+ return windows.map((window) => window.state === "active" && now >= window.expiresat ? { ...window, state: "closed", closedat: now } : window);
6469
+ }
6470
+ function renewconsentwindow(input) {
6471
+ const closed = input.window.state === "active" ? { ...input.window, state: "closed", closedat: input.now } : input.window;
6472
+ const renewed = openconsentwindow({ sessionid: input.window.sessionid, origin: input.window.origin, duration: input.duration, kinds: input.kinds.length > 0 ? input.kinds : input.window.kinds, now: input.now });
6473
+ return { renewed, closed };
6474
+ }
6475
+ function revokerun(input) {
6476
+ if (input.sessionid.trim() === "" || input.runid.trim() === "") throw new Error("The revocation needs its session and run ids.");
6477
+ if (input.actor.trim() === "") throw new Error("The revocation names the acting user.");
6478
+ const halted = [...input.pendingstepid !== void 0 ? [input.pendingstepid] : [], ...input.queuedstepids ?? []];
6479
+ if (halted.length === 0) throw new Error("The revocation halts at least the pending step of the run.");
6480
+ return { id: input.id ?? randomid(), sessionid: input.sessionid, runid: input.runid, haltedstepids: halted, actor: input.actor, reason: input.reason?.trim() !== "" && input.reason !== void 0 ? input.reason : "The user revoked the consent mid run.", at: input.now };
6481
+ }
6482
+ function haltedstepsof(revocation) {
6483
+ return { ...revocation.haltedstepids.length > 0 ? { pending: revocation.haltedstepids[0] } : {}, queued: revocation.haltedstepids.slice(1) };
6484
+ }
6485
+ function scopegrantof(input) {
6486
+ if (input.origin.trim() === "") throw new Error("The consent scope needs its exact origin.");
6487
+ if (input.kinds.length === 0) throw new Error("The consent scope names the kinds it covers.");
6488
+ if (input.boundary.trim() === "") throw new Error("The consent scope names its boundary; no grant defaults to unlimited.");
6489
+ return { origin: input.origin, kinds: [...new Set(input.kinds)], boundary: input.boundary, grantedat: input.now };
6490
+ }
6491
+ function deniedevidenceof(input) {
6492
+ return { origin: input.origin, kind: input.kind, reason: input.reason, at: input.now };
6493
+ }
6494
+ function consentprompttext(input) {
6495
+ const label = input.classes.length > 0 ? `the ${input.classes.join(" and ")} class${input.classes.length === 1 ? "" : "es"}` : "a sensitive by default grade";
6496
+ return `Allow the ${input.kind} step on ${input.origin} graded as ${label} for ${input.duration} milliseconds? The consent window closes at that boundary; no grant ever defaults to unlimited.`;
6497
+ }
6498
+ function denydefaultnotice(origin) {
6499
+ return `The denydefault posture refuses ${origin} until the user adds the origin to the automation allowlist; no step dispatches without the grant.`;
6500
+ }
6501
+ function profilesummary(profile) {
6502
+ if (profile === void 0) return "No origin profile exists for this origin yet; sensitive steps route through their fresh consent prompts.";
6503
+ return `The origin profile of ${profile.origin} grants ${profile.grants.length} kind${profile.grants.length === 1 ? "" : "s"} and denies ${profile.denials.length} kind${profile.denials.length === 1 ? "" : "s"} the user reviewed.`;
6504
+ }
6505
+ var safedefaultreadkinds = /* @__PURE__ */ new Set(["observe", "readhtml", "readtext", "readlinks", "readtable", "readforms", "readvisible", "readselection", "readmeta", "readlang", "readoutline", "readstyle", "readimages", "readertree"]);
6506
+ function safedefaultprofile(input) {
6507
+ if (input.origin.trim() === "") throw new Error("The safedefaults profile needs its exact origin.");
6508
+ const denials = /* @__PURE__ */ new Set([...paymentkinds, ...credentialkinds, ...deletekinds, ...publishkinds, ...defaultsensitivekinds]);
6509
+ return { profileid: input.profileid ?? randomid(), origin: input.origin.trim(), grants: [...safedefaultreadkinds], denials: [...denials], createdat: input.now, updatedat: input.now };
6510
+ }
6511
+ function safedefaultreadkind(kind) {
6512
+ return safedefaultreadkinds.has(kind);
6513
+ }
6514
+ function safedefaultnotice(origin) {
6515
+ return `The safedefaults posture profiles ${origin} on its first visit: reads only, every sensitive class denied; open the originprofile editor to widen the profile.`;
6516
+ }
6517
+
5842
6518
  // socketbus.ts
5843
6519
  var socketkinds = ["opensocket", "sendmessage", "waitmessage", "subscribesse", "longpoll"];
5844
6520
  function channelorigin(url) {
@@ -7136,6 +7812,87 @@ function consolediff(input) {
7136
7812
  return { base: input.baseid, target: input.targetid, lines, added: added.length, removed: removed.length, repeated: repeated.length, at: input.now };
7137
7813
  }
7138
7814
 
7815
+ // phishguard.ts
7816
+ function stepoptions3(step) {
7817
+ if (!step.options) return {};
7818
+ try {
7819
+ const parsed = JSON.parse(step.options);
7820
+ return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
7821
+ } catch {
7822
+ return {};
7823
+ }
7824
+ }
7825
+ function credentialstep(step) {
7826
+ const credentialkinds2 = /* @__PURE__ */ new Set(["consentpassword", "saveapikey", "handleauth", "authflow", "fillcard", "fillcode"]);
7827
+ if (credentialkinds2.has(step.kind)) return true;
7828
+ const options = stepoptions3(step);
7829
+ const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
7830
+ const names = [...fields.map((field) => typeof field.name === "string" ? field.name : ""), typeof options.field === "string" ? options.field : "", step.target ?? ""].map((name) => name.toLowerCase());
7831
+ return names.some((name) => name.includes("password") || name.includes("passwd") || name.includes("passphrase") || name.includes("token") || name.includes("secret") || name.includes("apikey"));
7832
+ }
7833
+ function originlabels(origin) {
7834
+ const host = origin.trim().replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").split("/")[0] ?? "";
7835
+ return host.split(".").filter((label) => label !== "").reverse();
7836
+ }
7837
+ function labeldistance(one, two) {
7838
+ const rows = one.length + 1;
7839
+ const columns = two.length + 1;
7840
+ let previous = Array.from({ length: columns }, (_, index) => index);
7841
+ for (let row = 1; row < rows; row += 1) {
7842
+ const current = [row, ...Array.from({ length: columns - 1 }, () => 0)];
7843
+ for (let column = 1; column < columns; column += 1) {
7844
+ const substitution = (previous[column - 1] ?? 0) + (one[row - 1] === two[column - 1] ? 0 : 1);
7845
+ current[column] = Math.min((previous[column] ?? 0) + 1, (current[column - 1] ?? 0) + 1, substitution);
7846
+ }
7847
+ previous = current;
7848
+ }
7849
+ return previous[columns - 1] ?? Math.max(one.length, two.length);
7850
+ }
7851
+ function lookalikedistance(one, two) {
7852
+ if (one.trim() === "" || two.trim() === "") return 1;
7853
+ if (one === two) return 0;
7854
+ const first = originlabels(one);
7855
+ const second = originlabels(two);
7856
+ const edits = labeldistance(first, second);
7857
+ const longest = Math.max(first.length, second.length);
7858
+ if (longest === 0) return 1;
7859
+ const distance = edits / longest;
7860
+ return Math.min(1, Math.max(0, distance));
7861
+ }
7862
+ function phishthresholdvalid(threshold) {
7863
+ if (!Number.isFinite(threshold) || threshold <= 0 || threshold >= 1) return { valid: false, reason: "The phishguard threshold stays a user choice between zero and one; the lookalike line never defaults." };
7864
+ return { valid: true, reason: `The lookalike threshold ${threshold} stays the user configured line a login origin crosses at its own risk.` };
7865
+ }
7866
+ function phishverdictof(input) {
7867
+ const threshold = phishthresholdvalid(input.threshold);
7868
+ if (!threshold.valid) throw new Error(threshold.reason);
7869
+ if (input.granted.includes(input.origin)) {
7870
+ return { origin: input.origin, distance: 0, threshold: input.threshold, blocked: false, reason: `The login origin ${input.origin} sits among the granted origins; no lookalike watch applies.`, at: input.now };
7871
+ }
7872
+ let matchedorigin;
7873
+ let distance = 1;
7874
+ for (const granted of input.granted) {
7875
+ const candidate = lookalikedistance(input.origin, granted);
7876
+ if (candidate < distance) {
7877
+ distance = candidate;
7878
+ matchedorigin = granted;
7879
+ }
7880
+ }
7881
+ if (matchedorigin !== void 0 && distance <= input.threshold) {
7882
+ return { origin: input.origin, matchedorigin, distance, threshold: input.threshold, blocked: true, reason: `The login origin ${input.origin} sits ${distance} away from the granted origin ${matchedorigin} and crosses the user threshold ${input.threshold}; the credential step blocks and the deny event names ${matchedorigin}.`, at: input.now };
7883
+ }
7884
+ return { origin: input.origin, ...matchedorigin !== void 0 ? { matchedorigin } : {}, distance, threshold: input.threshold, blocked: false, reason: matchedorigin !== void 0 ? `The login origin ${input.origin} sits ${distance} away from its closest granted origin ${matchedorigin} and stays under the user threshold ${input.threshold}.` : `The login origin ${input.origin} carries no granted origin to resemble; the watch records the first visit.`, at: input.now };
7885
+ }
7886
+ function verdictfresh(verdict, now, freshness) {
7887
+ if (freshness === void 0) return true;
7888
+ return now - verdict.at < freshness;
7889
+ }
7890
+ function phishnotetext(verdict) {
7891
+ if (verdict.blocked) return verdict.reason;
7892
+ if (verdict.matchedorigin !== void 0) return `The login origin ${verdict.origin} sits ${verdict.distance} from the granted origin ${verdict.matchedorigin}, under the user threshold ${verdict.threshold}.`;
7893
+ return `The login origin ${verdict.origin} has no granted lookalike under the user threshold ${verdict.threshold}.`;
7894
+ }
7895
+
7139
7896
  // policy.ts
7140
7897
  var sensitiveactions = /* @__PURE__ */ new Set(["click", "type", "navigate", "select", "presskey", "drag", "drop", "upload", "clear", "check", "uncheck", "toggle", "submit", "reload", "back", "forward", "writestorage", "setattribute", "removeattribute", "evaluate", "tabcreate", "tabactivate", "tabclose", "tabreload", "windowcreate", "windowclose", "windowresize", "downloadfile", "clickpoint", "shiftclick", "dismissdialog", "enterframe", "typetime", "appendtext", "setvalue", "typeedit", "keyhold", "keyrelease", "submitsearch", "selectmulti", "chooseradio", "setslider", "setdate", "setcolor", "openlink", "openprivate", "reloadcache", "stopnav", "followlink", "spanav", "rewritequery", "setfragment", "navlist", "navprofile", "handleauth", "printpdf", "prefetch", "preconnect", "deeplink", "reopentab", "pausenav", "navrate", "openclipboard", "batchopen", "duplicatetab", "closepattern", "pintab", "mutetab", "movetab", "movetabwindow", "grouptabs", "colorgroup", "collapsegroup", "discardtab", "reloadtabs", "zoomin", "zoomout", "switchtab", "maximizewindow", "minimizewindow", "restorewindow", "focuswindow", "scratchwindow", "incognitowindow", "restoretab", "restorelayout", "reopenrun", "badgetab", "fillform", "filllabel", "fillplaceholder", "submitform", "retryform", "runwizard", "selectchain", "picktypeahead", "pickdate", "attachfile", "fillcard", "fillcode", "consentpassword", "exportcsv", "exportjson", "exportexcel", "copytable", "pushsheets", "streamdisk", "paginateextract", "resumeextract", "batchdownload", "pausedownload", "resumedownload", "interceptmime", "readclipboard", "writeclipboard", "copyscreen", "quarantinedownload", "scanvirus", "cleanupartifacts", "recordscreen", "captureaudio", "downloadimages", "callrest", "callgraphql", "sendmessage", "blockrequest", "mockresponse", "rewriteheaders", "setcookies", "clearcookies", "authflow", "saveapikey", "routeproxy", "postform", "postfiles", "attachcdp", "detachcdp", "cdpcmd", "overridescript", "heapshot", "profilecpu", "capturesourcemaps", "emulatedevice", "emulatenetwork", "emulatelocate", "setuseragent", "overridepermission", "restoresession", "exportsessions", "importsessions", "runworkflow", "visitrule", "urlrule", "menurule", "keyrule", "buttonrule", "cronrule", "intervalrule", "urllistrule", "webhookrule", "eventrule"]);
7141
7898
  var interactionactions = /* @__PURE__ */ new Set(["focus", "scroll", "hover", "clickdeep", "rightclick", "doubleclick", "scrollpage", "scrollby", "scrollend", "scrolltop", "fullscreen", "zoomset", "movepointer", "clicktext", "clickaria", "clickname", "expanddetails", "pierceshadow", "retryaction", "capturebodies", "setbreakpoint", "stepcode", "watchexpr", "loop", "repeatuntil", "whileloop", "foreach", "parallel", "trycatch"]);
@@ -10217,6 +10974,127 @@ function sandboxorigingate(input) {
10217
10974
  function environmentrequirements() {
10218
10975
  return environmentrequirementsof([...allowedactions]);
10219
10976
  }
10977
+ function automationallowlistgate(input) {
10978
+ const verdict = allowlistcheck({ origin: input.origin, allowlist: input.allowlist, ...input.session !== void 0 ? { sessionorigin: input.session.origin } : {} });
10979
+ if (!verdict.allowed) return { allowed: false, reason: verdict.reason };
10980
+ return { allowed: true, reason: verdict.reason };
10981
+ }
10982
+ function originprofilegate(input) {
10983
+ const verdict = profilegrade(input);
10984
+ if (!verdict.allowed) return { allowed: false, reason: verdict.reason };
10985
+ return { allowed: true, reason: verdict.reason };
10986
+ }
10987
+ function consentwindowgate(input) {
10988
+ if (!input.sensitive) return { allowed: true, reason: "The non-sensitive step rides the session origin grants and needs no consent window of its own." };
10989
+ const verdict = windowgatesstep({ window: input.window, sessionid: input.sessionid, origin: input.origin, now: input.now });
10990
+ if (!verdict.allowed) return { allowed: false, reason: verdict.reason };
10991
+ return { allowed: true, reason: verdict.reason };
10992
+ }
10993
+ function revokerungate(input) {
10994
+ if (input.revocation === void 0) return { allowed: true, reason: "No revocation halted the run; the steps keep their reviewed order." };
10995
+ if (input.revocation.sessionid !== input.sessionid) return { allowed: true, reason: "The revocation belongs to another session and halts nothing here." };
10996
+ if (input.revocation.runid !== input.runid) return { allowed: true, reason: "The revocation belongs to another run and halts nothing here." };
10997
+ return { allowed: false, reason: `The revocation of ${input.revocation.actor} halted the pending step and ${Math.max(0, input.revocation.haltedstepids.length - 1)} queued step${Math.max(0, input.revocation.haltedstepids.length - 1) === 1 ? "" : "s"} without executing them: ${input.revocation.haltedstepids.join(", ")}.` };
10998
+ }
10999
+ function sensitiveclassgate(input) {
11000
+ if (!input.sensitive) return { allowed: true, reason: "The step carries no sensitive class and needs no fresh consent prompt." };
11001
+ const verdict = missingclassconsents({ origin: input.origin, classes: input.classes, bydefault: input.bydefault, consents: input.consents, now: input.now });
11002
+ if (verdict.needed) return { allowed: false, reason: verdict.reason };
11003
+ return { allowed: true, reason: verdict.reason };
11004
+ }
11005
+ function consentdurationvalid(duration) {
11006
+ if (!Number.isFinite(duration) || duration <= 0) return { allowed: false, reason: "The consent window duration stays a positive user value in milliseconds; no grant ever defaults to unlimited." };
11007
+ return { allowed: true, reason: `The consent window duration ${duration} milliseconds stays the user configured boundary the prompt names.` };
11008
+ }
11009
+ function logreadgate(input) {
11010
+ if (!input.valid) return { allowed: false, reason: input.brokenat !== void 0 ? `The log chain breaks at entry ${input.brokenat}; the audit accessor refuses the read of a forged record.` : "The log chain fails its verification; the audit accessor refuses the read of a forged record." };
11011
+ return { allowed: true, reason: "The log chain verifies from the genesis hash to the last entry; the audit accessor serves the entries." };
11012
+ }
11013
+ function sensitivepipelingate(input) {
11014
+ const classification = sensitiveclassesof(input.step);
11015
+ const profileverdict = originprofilegate({ profile: input.profile, kind: input.step.kind, sensitive: classification.sensitive });
11016
+ if (!profileverdict.allowed) return { allowed: false, reason: profileverdict.reason ?? "" };
11017
+ const consentverdict = sensitiveclassgate({ origin: input.origin, classes: classification.classes, bydefault: classification.bydefault, sensitive: classification.sensitive, consents: input.consents, now: input.now });
11018
+ if (!consentverdict.allowed) return { allowed: false, reason: `${classification.reason} ${consentverdict.reason}` };
11019
+ return { allowed: true, reason: `${classification.reason} ${consentverdict.reason}` };
11020
+ }
11021
+ function schemaguardgate(input) {
11022
+ if (input.errors.length === 0) return { allowed: true, reason: "The inbound command matches its declared schemastrict grammar field by field." };
11023
+ const first = input.errors[0];
11024
+ return { allowed: false, reason: `${input.errors.length} schema error${input.errors.length === 1 ? "" : "s"} refuse the command before dispatch: ${input.errors.map((error) => error.reason).join(" ")}${first !== void 0 ? ` The first error sits at ${first.path} expecting ${first.expected}.` : ""}` };
11025
+ }
11026
+ function origincheckgate(input) {
11027
+ if (!input.verdict.accepted) return { allowed: false, reason: input.verdict.reason };
11028
+ return { allowed: true, reason: input.verdict.reason };
11029
+ }
11030
+ function connectallowgate(input) {
11031
+ const verdict = origincheckof(input);
11032
+ if (!verdict.accepted) return { allowed: false, reason: verdict.reason };
11033
+ return { allowed: true, reason: verdict.reason };
11034
+ }
11035
+ function ratelimitboundsvalid(limit, window) {
11036
+ const bounds = bucketboundsvalid(limit, window);
11037
+ if (!bounds.valid) return { allowed: false, reason: bounds.reason };
11038
+ return { allowed: true, reason: bounds.reason };
11039
+ }
11040
+ function ratelimitgate(input) {
11041
+ if (input.bucket === void 0) return { allowed: true, reason: "No ratelimit bucket covers the origin of the command; the bounds stay user configured choices only." };
11042
+ if (input.now >= input.bucket.resetsat) return { allowed: true, reason: `The bucket window of ${input.bucket.origin} reset at ${input.bucket.resetsat}; the command consumes the first slot of its fresh window.` };
11043
+ if (input.bucket.used < input.bucket.limit) return { allowed: true, reason: `The command consumes slot ${input.bucket.used + 1} of ${input.bucket.limit} in the bucket of ${input.bucket.origin}.` };
11044
+ return { allowed: false, reason: `The bucket of ${input.bucket.origin} holds its ${input.bucket.limit} command bound; the command defers until the window resets at ${input.bucket.resetsat}.` };
11045
+ }
11046
+ function confirmpaygate(input) {
11047
+ const kind = gatekindfor(input.classes);
11048
+ if (kind !== "confirmpay") return { allowed: true, reason: "The step carries no payment class and needs no confirmpay gate." };
11049
+ if (input.state === "resolved") return { allowed: true, reason: "The human resolved the confirmpay gate of the payment step; the step dispatches with its reviewed amount, payee origin and target." };
11050
+ if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmpay gate of the payment step; the payment never dispatches." };
11051
+ if (input.state === "open") return { allowed: false, reason: "The confirmpay gate of the payment step stays open with the amount, the payee origin and the target element; the executor pauses until the human resolves it and no timeout ever resolves a gate." };
11052
+ return { allowed: false, reason: "The payment step opens its confirmpay gate with the amount, the payee origin and the target element; the executor pauses until one distinct human action resolves it." };
11053
+ }
11054
+ function confirmdeletegate(input) {
11055
+ const kind = gatekindfor(input.classes);
11056
+ if (kind !== "confirmdelete") return { allowed: true, reason: "The step carries no delete class and needs no confirmdelete gate." };
11057
+ if (input.state === "resolved") return { allowed: true, reason: "The human resolved the confirmdelete gate of the destructive step; the step dispatches with its reviewed target, scope and irreversibility." };
11058
+ if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmdelete gate of the destructive step; the deletion never dispatches." };
11059
+ if (input.state === "open") return { allowed: false, reason: "The confirmdelete gate of the destructive step stays open with the target, the scope and the irreversibility; the executor pauses until the human resolves it and no timeout ever resolves a gate." };
11060
+ return { allowed: false, reason: "The destructive step opens its confirmdelete gate with the target, the scope and the irreversibility; the executor pauses until one distinct human action resolves it." };
11061
+ }
11062
+ function confirmcredsgate(input) {
11063
+ const kind = gatekindfor(input.classes);
11064
+ if (kind !== "confirmcreds") return { allowed: true, reason: "The step carries no credential class and needs no confirmcreds gate." };
11065
+ if (input.state === "resolved") return { allowed: true, reason: "The human resolved the confirmcreds gate of the credential step; the step reads its value from the vault at the last possible moment and no log records it." };
11066
+ if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmcreds gate of the credential step; the credential never dispatches." };
11067
+ if (input.state === "open") return { allowed: false, reason: "The confirmcreds gate of the credential step stays open with its credential label only; the executor pauses until the human resolves it and no timeout ever resolves a gate." };
11068
+ return { allowed: false, reason: "The credential step opens its confirmcreds gate with its credential label only; the executor pauses until one distinct human action resolves it." };
11069
+ }
11070
+ function gatebatchgate(input) {
11071
+ if (input.gateids.length === 0) return { allowed: false, reason: "A gate resolution names its single gate." };
11072
+ if (input.gateids.length > 1) return { allowed: false, reason: `One human action resolves exactly one gate; the batch of ${input.gateids.length} gates refuses in full because no batch approval exists.` };
11073
+ return { allowed: true, reason: "The resolution names exactly one gate; the distinct human action resolves it alone." };
11074
+ }
11075
+ function phishthresholdgate(threshold) {
11076
+ const verdict = phishthresholdvalid(threshold);
11077
+ if (!verdict.valid) return { allowed: false, reason: verdict.reason };
11078
+ return { allowed: true, reason: verdict.reason };
11079
+ }
11080
+ function phishguardgate(input) {
11081
+ if (input.verdict.blocked) return { allowed: false, reason: input.verdict.reason };
11082
+ return { allowed: true, reason: input.verdict.reason };
11083
+ }
11084
+ function safedefaultsgate(input) {
11085
+ if (input.profile !== void 0) return { allowed: true, reason: `The origin profile of ${input.profile.origin} exists; the safedefaults posture stays out of the decision.` };
11086
+ if (!input.sensitive) return { allowed: true, reason: "The non-sensitive step rides the reads only baseline of the safedefaults posture; the first visit grants reads alone." };
11087
+ return { allowed: false, reason: `No origin profile exists and the safedefaults posture denies the sensitive ${input.classes.length > 0 ? input.classes.join(" and ") : "by default"} step; open the originprofile editor to widen the profile the user controls.` };
11088
+ }
11089
+ function vaultsecretgate(input) {
11090
+ if (input.leaks.length > 0) return { allowed: false, reason: `The plan carries ${input.leaks.length} plaintext secret value${input.leaks.length === 1 ? "" : "s"} that digest to vault records; secrets never ride step options, variables or plan texts, only the vault holds them.` };
11091
+ if (input.carries) return { allowed: false, reason: "The step types a raw value into a masked field shape; credential steps read their value from the vault at the last possible moment and never carry it in the options." };
11092
+ return { allowed: true, reason: "The step and the plan carry no secret outside the vault; the values stay behind the seam." };
11093
+ }
11094
+ function untrustedrendergate(input) {
11095
+ if (input.environment === "sandboxframe") return { allowed: true, reason: "The extracted markup renders inside the sandboxframe under its nonce with scripts and handlers stripped; the untrusted content never reenters the page context." };
11096
+ return { allowed: false, reason: `The extracted markup grades untrusted and refuses to render inside the ${input.environment}; every untrusted render routes through the sandboxframe.` };
11097
+ }
10220
11098
 
10221
11099
  // llm.ts
10222
11100
  var defaultrefusalmarkers = ["i cannot", "i can't", "i'm unable", "refusal:", "cannot comply"];
@@ -10577,7 +11455,7 @@ function budgetcheck(input) {
10577
11455
  }
10578
11456
 
10579
11457
  // version.ts
10580
- var packageversion = "1.1.60";
11458
+ var packageversion = "1.1.62";
10581
11459
 
10582
11460
  // types.ts
10583
11461
  var protocolversion = packageversion;
@@ -11173,6 +12051,79 @@ function streamsummaries(raw) {
11173
12051
  });
11174
12052
  }
11175
12053
 
12054
+ // maskinputs.ts
12055
+ var defaultmaskshapes = ["password", "token", "card", "secret"];
12056
+ var maskmarker = "[redacted]";
12057
+ function fieldshapekind(name) {
12058
+ const lowered = name.toLowerCase();
12059
+ if (lowered.includes("password") || lowered.includes("passwd") || lowered.includes("pwd") || lowered.includes("passphrase")) return "password";
12060
+ if (lowered.includes("token") || lowered.includes("apikey") || lowered.includes("api_key") || lowered.includes("auth") || lowered.includes("bearer")) return "token";
12061
+ if (lowered.includes("card") || lowered.includes("cvc") || lowered.includes("cvv") || lowered.includes("expiry") || lowered.includes("pan")) return "card";
12062
+ if (lowered.includes("secret")) return "secret";
12063
+ return void 0;
12064
+ }
12065
+ function shapesof(input) {
12066
+ const shapes = new Set(defaultmaskshapes);
12067
+ for (const shape of input.settings?.maskshapes ?? []) if (shape.trim() !== "") shapes.add(shape.trim().toLowerCase());
12068
+ for (const rule of input.rules) {
12069
+ const scoped = rule.origin === void 0 || rule.origin === "" || input.origin !== void 0 && rule.origin === input.origin;
12070
+ if (scoped) {
12071
+ for (const shape of rule.shapes) if (shape.trim() !== "") shapes.add(shape.trim().toLowerCase());
12072
+ }
12073
+ }
12074
+ return [...shapes];
12075
+ }
12076
+ function maskingfield(name, shapes) {
12077
+ if (fieldshapekind(name) !== void 0) return true;
12078
+ const lowered = name.toLowerCase();
12079
+ return shapes.some((shape) => shape !== "" && lowered.includes(shape));
12080
+ }
12081
+ function maskvalue(value) {
12082
+ return value === "" ? "" : maskmarker;
12083
+ }
12084
+ function maskfield(input) {
12085
+ return maskingfield(input.name, input.shapes) ? maskvalue(input.value) : input.value;
12086
+ }
12087
+ function maskrecord(record2, shapes) {
12088
+ const masked = {};
12089
+ for (const [key, value] of Object.entries(record2)) {
12090
+ if (typeof value === "string") {
12091
+ const sibling = record2.name;
12092
+ masked[key] = key === "value" && typeof sibling === "string" ? maskfield({ name: sibling, value, shapes }) : maskfield({ name: key, value, shapes });
12093
+ } else if (Array.isArray(value)) masked[key] = value.map((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item) ? maskrecord(item, shapes) : item);
12094
+ else if (Boolean(value) && typeof value === "object") masked[key] = maskrecord(value, shapes);
12095
+ else masked[key] = value;
12096
+ }
12097
+ return masked;
12098
+ }
12099
+ function masktypedvalues(input) {
12100
+ const sensitive = maskingfield(input.step.target ?? "", input.shapes) || maskingfield(input.step.kind, input.shapes);
12101
+ const maskedvalue = input.step.value !== void 0 && sensitive ? maskvalue(input.step.value) : input.step.value;
12102
+ let maskedoptions = input.step.options;
12103
+ if (input.step.options !== void 0) {
12104
+ try {
12105
+ const parsed = JSON.parse(input.step.options);
12106
+ if (Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed)) maskedoptions = JSON.stringify(maskrecord(parsed, input.shapes));
12107
+ } catch {
12108
+ }
12109
+ }
12110
+ return { ...maskedvalue !== void 0 ? { value: maskedvalue } : {}, ...maskedoptions !== void 0 ? { options: maskedoptions } : {} };
12111
+ }
12112
+ function maskformstate(fields, shapes) {
12113
+ return fields.map((field) => ({ ...field, value: maskfield({ name: field.name, value: field.value, shapes }) }));
12114
+ }
12115
+ function maskobservation(shot, shapes) {
12116
+ return { ...shot, forms: shot.forms.map((form) => maskingfield(form.name, shapes) ? { ...form, options: [maskmarker] } : form) };
12117
+ }
12118
+ function maskstoredvalues(record2, shapes) {
12119
+ const masked = {};
12120
+ for (const [key, value] of Object.entries(record2)) masked[key] = maskfield({ name: key, value, shapes });
12121
+ return masked;
12122
+ }
12123
+ function maskexport(record2, shapes) {
12124
+ return maskrecord(record2, shapes);
12125
+ }
12126
+
11176
12127
  // modelroute.ts
11177
12128
  function routevalid(route) {
11178
12129
  if (route.kind.trim() === "") return { allowed: false, reason: "The model route needs its task kind." };
@@ -11428,6 +12379,67 @@ function removetemplate(templates, name) {
11428
12379
  return templates.filter((template) => template.name !== name);
11429
12380
  }
11430
12381
 
12382
+ // redactshots.ts
12383
+ function regionof(input) {
12384
+ if (input.origin.trim() === "" || input.template.trim() === "") throw new Error("The redact region needs its origin and its page template.");
12385
+ for (const value of [input.x, input.y, input.width, input.height]) {
12386
+ if (!Number.isFinite(value) || value < 0) throw new Error("The redact region needs finite, non-negative geometry in css pixels.");
12387
+ }
12388
+ if (input.width <= 0 || input.height <= 0) throw new Error("The redact region needs a positive width and height so the mask covers a real area.");
12389
+ if (input.reason.trim() === "") throw new Error("The redact region names its reason in plain language.");
12390
+ return { id: input.id ?? randomid(), origin: input.origin.trim(), template: input.template.trim(), x: input.x, y: input.y, width: input.width, height: input.height, reason: input.reason.trim(), source: input.source, createdat: input.now };
12391
+ }
12392
+ function regionvalid(region) {
12393
+ return Number.isFinite(region.x) && Number.isFinite(region.y) && Number.isFinite(region.width) && Number.isFinite(region.height) && region.width > 0 && region.height > 0;
12394
+ }
12395
+ function regionsfor(regions, origin, template) {
12396
+ return regions.filter((region) => region.origin === origin && region.template === template);
12397
+ }
12398
+ function fieldshaperegions(input) {
12399
+ const regions = [];
12400
+ for (const field of input.fields) {
12401
+ if (!maskingfield(field.name, [])) continue;
12402
+ regions.push(regionof({ origin: input.origin, template: input.template, x: field.rect.x, y: field.rect.y, width: field.rect.width, height: field.rect.height, reason: `The ${field.name} field carries a sensitive field shape the recognizer masks.`, source: "fieldshape", now: input.now }));
12403
+ }
12404
+ return regions;
12405
+ }
12406
+ function mergeregions(existing, added) {
12407
+ const merged = [...existing];
12408
+ for (const region of added) {
12409
+ if (merged.some((candidate) => candidate.origin === region.origin && candidate.template === region.template && candidate.x === region.x && candidate.y === region.y && candidate.width === region.width && candidate.height === region.height)) continue;
12410
+ merged.push(region);
12411
+ }
12412
+ return merged;
12413
+ }
12414
+ function capturesurfaceof(kind) {
12415
+ if (kind === "element" || kind === "elementshot") return "element";
12416
+ if (kind === "stitched" || kind === "fullpage" || kind === "shotfullpage" || kind === "stitch" || kind === "contactsheet" || kind === "timelapse" || kind === "recordscreen") return "stitched";
12417
+ return "viewport";
12418
+ }
12419
+ function templateof(step) {
12420
+ if (step.options) {
12421
+ try {
12422
+ const parsed = JSON.parse(step.options);
12423
+ if (Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed)) {
12424
+ const template = parsed.template;
12425
+ if (typeof template === "string" && template.trim() !== "") return template.trim();
12426
+ }
12427
+ } catch {
12428
+ }
12429
+ }
12430
+ return step.kind;
12431
+ }
12432
+ function redactedshot(record2, regions) {
12433
+ if (regions.length === 0) return record2;
12434
+ return { ...record2, redacted: true, redactedregions: regions.length };
12435
+ }
12436
+ function redactionsummary(regions) {
12437
+ if (regions.length === 0) return "No redact region covered the capture; the stored bytes carry everything the surface saw.";
12438
+ const sources = { fieldshape: 0, userdrawn: 0 };
12439
+ for (const region of regions) sources[region.source] += 1;
12440
+ return `${regions.length} redact region${regions.length === 1 ? "" : "s"} covered the capture before storage: ${sources.fieldshape} derived from sensitive field shapes and ${sources.userdrawn} drawn by the user (${regions.map((region) => region.reason).join("; ")}).`;
12441
+ }
12442
+
11431
12443
  // sandboxframe.ts
11432
12444
  function stripscripts(markup) {
11433
12445
  return markup.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "").replace(/<script\b[^>]*\/>/gi, "").replace(/\son[a-z]+\s*=\s*"[^"]*"/gi, "").replace(/\son[a-z]+\s*=\s*'[^']*'/gi, "").replace(/\son[a-z]+\s*=\s*[^\s>]+/gi, "").replace(/javascript:/gi, "").trim();
@@ -11466,6 +12478,82 @@ function renderprovenance(render) {
11466
12478
  return { origin: render.sourceorigin, stepid: render.stepid, environment: "sandboxframe" };
11467
12479
  }
11468
12480
 
12481
+ // secretvault.ts
12482
+ var vaultdigestprefix = "sha256:";
12483
+ async function vaultdigestof(value) {
12484
+ const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value));
12485
+ return vaultdigestprefix + [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
12486
+ }
12487
+ function vaultentryof(input) {
12488
+ if (input.label.trim() === "") throw new Error("The vault record needs its label; the surfaces show the label only.");
12489
+ if (input.scope.trim() === "") throw new Error("The vault record needs its exact origin scope; a secret never rides every origin.");
12490
+ if (!input.digest.startsWith(vaultdigestprefix)) throw new Error("The vault record carries its sha-256 digest, never its value.");
12491
+ return { vaultid: input.vaultid ?? randomid(), label: input.label.trim(), scope: input.scope.trim(), profileid: input.profileid, provenance: input.provenance, algorithm: "sha-256", digest: input.digest, createdat: input.now };
12492
+ }
12493
+ function inmemoryvault() {
12494
+ const values = /* @__PURE__ */ new Map();
12495
+ return {
12496
+ put: async (vaultid, value) => {
12497
+ values.set(vaultid, value);
12498
+ },
12499
+ fetch: async (vaultid) => values.get(vaultid),
12500
+ drop: async (vaultid) => {
12501
+ values.delete(vaultid);
12502
+ }
12503
+ };
12504
+ }
12505
+ async function vaultstore(input) {
12506
+ if (input.value === "") throw new Error("The vault stores a secret value the user supplied; an empty value stores nothing.");
12507
+ const entry = vaultentryof({ label: input.label, scope: input.scope, profileid: input.profileid, provenance: input.provenance, digest: await vaultdigestof(input.value), now: input.now });
12508
+ await input.seam.put(entry.vaultid, input.value);
12509
+ return entry;
12510
+ }
12511
+ async function vaultvaluefor(input) {
12512
+ const value = await input.seam.fetch(input.entry.vaultid);
12513
+ if (value === void 0) return { ok: false, reason: `The vault holds no value behind the label ${input.entry.label}; add the secret again.` };
12514
+ return { ok: true, value, reason: `The vault released the value behind the label ${input.entry.label} at the last possible moment; the value reaches the credential field only and no log records it.` };
12515
+ }
12516
+ async function vaultdelete(input) {
12517
+ await input.seam.drop(input.entry.vaultid);
12518
+ return { dropped: true, label: input.entry.label, reason: `The vault dropped the secret ${input.entry.label} of ${input.entry.scope}; no value and no copy remains behind the seam.` };
12519
+ }
12520
+ function vaultcovers(entry, origin) {
12521
+ return entry.scope === origin;
12522
+ }
12523
+ async function secretleakscan(input) {
12524
+ const leaks = [];
12525
+ for (const candidate of input.candidates) {
12526
+ if (candidate.trim() === "") continue;
12527
+ const digest = await vaultdigestof(candidate);
12528
+ if (input.entries.some((entry) => entry.digest === digest)) leaks.push(candidate);
12529
+ }
12530
+ if (leaks.length > 0) return { leaks, reason: `The plan carries ${leaks.length} plaintext value${leaks.length === 1 ? "" : "s"} that digest to vault records; secrets never ride step options, variables or plan texts, only the vault holds them.` };
12531
+ return { leaks: [], reason: "No candidate value digests to a vault record; the plan carries no leaked secret." };
12532
+ }
12533
+ function stepoptions4(step) {
12534
+ if (!step.options) return {};
12535
+ try {
12536
+ const parsed = JSON.parse(step.options);
12537
+ return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
12538
+ } catch {
12539
+ return {};
12540
+ }
12541
+ }
12542
+ function secretshapecarrying(step) {
12543
+ const options = stepoptions4(step);
12544
+ const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
12545
+ const rawfield = fields.find((field) => typeof field.name === "string" && typeof field.value === "string" && field.value !== "" && maskingfield(field.name, []));
12546
+ if (rawfield !== void 0) return { carries: true, reason: `The ${step.kind} step types a raw value into the ${String(rawfield.name)} field; credential steps read their value from the vault at the last possible moment and never carry it in the options.` };
12547
+ if (typeof options.field === "string" && maskingfield(options.field, []) && step.value !== void 0 && step.value !== "") return { carries: true, reason: `The ${step.kind} step types a raw value into the ${options.field} field; credential steps read their value from the vault at the last possible moment and never carry it in the options.` };
12548
+ return { carries: false, reason: "The step carries no raw value behind a masked field shape." };
12549
+ }
12550
+ function vaultview(entries) {
12551
+ return entries.map((entry) => ({ vaultid: entry.vaultid, label: entry.label, scope: entry.scope, provenance: entry.provenance, createdat: entry.createdat, ...entry.lastusedat !== void 0 ? { lastusedat: entry.lastusedat } : {} }));
12552
+ }
12553
+ function vaultprompttext(entry, origin) {
12554
+ return `Use the credential ${entry.label} of ${entry.scope} on ${origin}? The value stays behind the vault and no surface ever displays it.`;
12555
+ }
12556
+
11469
12557
  // taskqueue.ts
11470
12558
  function emptyqueue(input = {}) {
11471
12559
  return { lanes: input.lanes ?? [], priorities: input.priorities ?? [], completionpolicy: input.completionpolicy ?? "all", items: [], claims: [] };
@@ -11561,6 +12649,40 @@ function taskcounts(queue) {
11561
12649
  };
11562
12650
  }
11563
12651
 
12652
+ // transparency.ts
12653
+ function permissiondiff(input) {
12654
+ if (input.fromversion.trim() === "" || input.toversion.trim() === "") throw new Error("The permdiff names the two versions it compares.");
12655
+ const added = [...new Set(input.to.filter((permission) => !input.from.includes(permission)))];
12656
+ const removed = [...new Set(input.from.filter((permission) => !input.to.includes(permission)))];
12657
+ return { fromversion: input.fromversion, toversion: input.toversion, added, removed, computedat: input.now };
12658
+ }
12659
+ function permdiffchanged(diff) {
12660
+ return diff.added.length > 0 || diff.removed.length > 0;
12661
+ }
12662
+ function permdiffsummary(diff) {
12663
+ if (!permdiffchanged(diff)) return `The update from ${diff.fromversion} to ${diff.toversion} changed no permission.`;
12664
+ const parts = [];
12665
+ if (diff.added.length > 0) parts.push(`added ${diff.added.join(", ")}`);
12666
+ if (diff.removed.length > 0) parts.push(`removed ${diff.removed.join(", ")}`);
12667
+ return `The update from ${diff.fromversion} to ${diff.toversion} ${parts.join(" and ")}.`;
12668
+ }
12669
+ function transparencygrants(input) {
12670
+ const grants = input.allowlist.map((entry) => ({ origin: entry.origin, scope: `automation allowlist of the profile workspace ${entry.profileid}`, boundary: "the user revokes the entry or the profile workspace", grantedat: entry.grantedat }));
12671
+ for (const profile of input.profiles) {
12672
+ grants.push({ origin: profile.origin, scope: `origin profile with ${profile.grants.length} granted and ${profile.denials.length} denied kinds`, boundary: "the user edits or revokes the profile", grantedat: profile.createdat });
12673
+ }
12674
+ return grants;
12675
+ }
12676
+ function revokeaction(grant) {
12677
+ return { action: "revoke", origin: grant.origin, scope: grant.scope };
12678
+ }
12679
+ function windowhistory(windows) {
12680
+ return windows.map((window) => ({ id: window.id, origin: window.origin, state: window.state, boundary: window.boundary, startedat: window.startedat, expiresat: window.expiresat }));
12681
+ }
12682
+ function connectallowlist(entries) {
12683
+ return entries.map((entry) => ({ senderid: entry.senderid, displayname: entry.displayname, ...entry.origin !== void 0 ? { origin: entry.origin } : {}, addedat: entry.addedat }));
12684
+ }
12685
+
11564
12686
  // protocol.ts
11565
12687
  function record(value) {
11566
12688
  if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Protocol message must be an object.");
@@ -12360,6 +13482,31 @@ function environmentreport(input) {
12360
13482
  ...input.keepalive !== void 0 ? { keepalive: input.keepalive } : {}
12361
13483
  };
12362
13484
  }
13485
+ function consentmodel() {
13486
+ return {
13487
+ version: protocolversion,
13488
+ posture: "denydefault",
13489
+ sensitiveclasses: ["payment", "credential", "delete", "publish"],
13490
+ maskshapes: [...defaultmaskshapes],
13491
+ notes: [
13492
+ "The denydefault posture refuses every origin the user never granted; the per origin automation allowlist holds one exact origin per entry with no wildcard expansion and the active tab grant counts as exactly one explicit single origin grant.",
13493
+ "The per site originprofiles grant and deny single action kinds; a denied kind never runs on that origin and a granted kind still routes its sensitive classes through the fresh consent prompts.",
13494
+ "Every consent window scopes to one session and one origin, binds the duration the user chose and names its boundary; no grant ever defaults to unlimited, and a window past its boundary suspends the run mid step until a new explicit prompt renews it.",
13495
+ "The revokerun is a terminal session event: the pending step and every queued step halt without executing and the immutable log records the user action.",
13496
+ "The immutable run log appends only: every entry chains through its loghash to the hash of its predecessor, the completion seal writes the final hash, and the read path verifies the whole chain before serving a single entry.",
13497
+ "maskinputs keeps typed values, form values and stored values out of every record behind the documented password, token, card and secret shapes the user extends; the observation schema keeps its field shapes while the values carry the redaction marker."
13498
+ ]
13499
+ };
13500
+ }
13501
+ function securityreport(input) {
13502
+ return { version: protocolversion, posture: "denydefault", allowlist: input.allowlist, profiles: input.profiles, windows: input.windows, consents: input.consents, revocations: input.revocations, maskrules: input.maskrules, chain: input.chain };
13503
+ }
13504
+ function logchainreport(input) {
13505
+ return { version: protocolversion, runid: input.runid, valid: input.valid, entries: input.entries, ...input.brokenat !== void 0 ? { brokenat: input.brokenat } : {}, reason: input.reason, ...input.sealhash !== void 0 ? { sealhash: input.sealhash } : {}, ...input.sealedat !== void 0 ? { sealedat: input.sealedat } : {} };
13506
+ }
13507
+ function transparencyreport(input) {
13508
+ return { version: protocolversion, posture: "denydefault", grants: input.grants, windows: input.windows, connectallow: input.connectallow, permdiffs: input.permdiffs, safedefaults: input.safedefaults, vault: input.vault };
13509
+ }
12363
13510
 
12364
13511
  // workfloweditor.ts
12365
13512
  var palettecategories = ["actions", "controlflow", "waits", "variables", "triggers"];
@@ -13083,6 +14230,7 @@ export {
13083
14230
  agentpresetof,
13084
14231
  agentruncontext,
13085
14232
  agentscopevalid,
14233
+ allowlistcheck,
13086
14234
  allowlistcovers,
13087
14235
  allowlistreport,
13088
14236
  alltools,
@@ -13092,6 +14240,7 @@ export {
13092
14240
  apientries,
13093
14241
  apikeyconsentgranted,
13094
14242
  apireplayspecof,
14243
+ appendlogentry,
13095
14244
  applycooldown,
13096
14245
  applyheaderules,
13097
14246
  applylayer,
@@ -13116,6 +14265,7 @@ export {
13116
14265
  authrefusedmessage,
13117
14266
  authreport,
13118
14267
  autointervalof,
14268
+ automationallowlistgate,
13119
14269
  backoffdelay,
13120
14270
  batchreport,
13121
14271
  beatrun,
@@ -13143,6 +14293,9 @@ export {
13143
14293
  breakpointinputof,
13144
14294
  broadcastrecipient,
13145
14295
  browserpermissions,
14296
+ bucketboundsvalid,
14297
+ bucketconsume,
14298
+ bucketof,
13146
14299
  budgetcheck,
13147
14300
  buildname,
13148
14301
  buildpdf,
@@ -13176,6 +14329,7 @@ export {
13176
14329
  capturesourcemaps,
13177
14330
  capturestates,
13178
14331
  capturestitched,
14332
+ capturesurfaceof,
13179
14333
  capturetargets,
13180
14334
  capturevisible,
13181
14335
  castvote,
@@ -13184,6 +14338,7 @@ export {
13184
14338
  cdpeventruleof,
13185
14339
  cdpkinds,
13186
14340
  cdpreport,
14341
+ chainreportof,
13187
14342
  channellive,
13188
14343
  channeloptionsof,
13189
14344
  channelorigin,
@@ -13192,6 +14347,7 @@ export {
13192
14347
  choosebranch,
13193
14348
  claim,
13194
14349
  claimheartbeat,
14350
+ classconsentcovers,
13195
14351
  classifyintent,
13196
14352
  closechannel,
13197
14353
  closeidlechannels,
@@ -13204,9 +14360,20 @@ export {
13204
14360
  complete,
13205
14361
  composeworkflow,
13206
14362
  conditionof,
14363
+ confirmcredsgate,
14364
+ confirmdeletegate,
13207
14365
  confirmmanualrun,
14366
+ confirmpaygate,
14367
+ connectallowentryof,
14368
+ connectallowgate,
14369
+ connectallowlist,
13208
14370
  connectclient,
13209
14371
  consensusstate,
14372
+ consentdurationvalid,
14373
+ consentmodel,
14374
+ consentprompttext,
14375
+ consentwindowgate,
14376
+ consentwindowstate,
13210
14377
  consolecapture,
13211
14378
  consoleconsentcovers,
13212
14379
  consolediff,
@@ -13226,6 +14393,8 @@ export {
13226
14393
  costbudgetvalid,
13227
14394
  cpusnap,
13228
14395
  crashinterrupted,
14396
+ credentialstep,
14397
+ credspayload,
13229
14398
  cronnext,
13230
14399
  cronparse,
13231
14400
  croprect,
@@ -13243,13 +14412,20 @@ export {
13243
14412
  defaulthttpstream,
13244
14413
  defaultidlewindowms,
13245
14414
  defaultloopbound,
14415
+ defaultmaskshapes,
13246
14416
  defaultmcpconfig,
13247
14417
  defaultmcpport,
13248
14418
  defaultpairinglifetimems,
13249
14419
  defaultrefusalmarkers,
13250
14420
  defaulttokenlifetimems,
13251
14421
  defaulttriggercooldown,
14422
+ deferredeventof,
14423
+ deferredready,
13252
14424
  delayjitter,
14425
+ deletepayload,
14426
+ deniedevidenceof,
14427
+ denydefaultnotice,
14428
+ denydefaultposture,
13253
14429
  actionrisk as deriveactionrisk,
13254
14430
  detachcdpsession,
13255
14431
  devicepresetof,
@@ -13273,6 +14449,7 @@ export {
13273
14449
  egressconsentgate,
13274
14450
  electleader,
13275
14451
  emptyboard,
14452
+ emptyconnectallow,
13276
14453
  emptyqueue,
13277
14454
  emugate,
13278
14455
  emulationkinds,
@@ -13284,6 +14461,8 @@ export {
13284
14461
  enqueue,
13285
14462
  enqueuerequest,
13286
14463
  entryfresh,
14464
+ entryhashof,
14465
+ envelopecheck,
13287
14466
  environmentgrammar,
13288
14467
  environmentgrantgate,
13289
14468
  environmentreport,
@@ -13298,11 +14477,13 @@ export {
13298
14477
  eventnotification,
13299
14478
  eventresponse,
13300
14479
  eventrulematches,
14480
+ exactorigin,
13301
14481
  exchangesreport,
13302
14482
  executorregistry,
13303
14483
  expandblocks,
13304
14484
  expandtemplate,
13305
14485
  expireapprovals,
14486
+ expireconsentwindows,
13306
14487
  expirelayers,
13307
14488
  expirelocks,
13308
14489
  expireprofilerecords,
@@ -13310,6 +14491,7 @@ export {
13310
14491
  expiresessions,
13311
14492
  expiretokens,
13312
14493
  exportcontentreview,
14494
+ exportlogchain,
13313
14495
  exportpresetlibrary,
13314
14496
  exportrunstate,
13315
14497
  exportsessionfile,
@@ -13324,6 +14506,8 @@ export {
13324
14506
  familyofkind,
13325
14507
  fetchoptionsof,
13326
14508
  fetchrequestof,
14509
+ fieldshapekind,
14510
+ fieldshaperegions,
13327
14511
  filteredsessions,
13328
14512
  filterentries,
13329
14513
  filterexchanges,
@@ -13336,6 +14520,11 @@ export {
13336
14520
  formreportresponse,
13337
14521
  framedlog,
13338
14522
  frameinterval,
14523
+ gatebatchgate,
14524
+ gateforstep,
14525
+ gatekindfor,
14526
+ gateprompttext,
14527
+ gatestateof,
13339
14528
  generatedvalueallowed,
13340
14529
  grantallowlistentry,
13341
14530
  graphqlopenvelope,
@@ -13345,6 +14534,7 @@ export {
13345
14534
  growthtrend,
13346
14535
  guardoutput,
13347
14536
  guardverdictgate,
14537
+ haltedstepsof,
13348
14538
  handleframe,
13349
14539
  handoffframe,
13350
14540
  headerfilterof,
@@ -13371,6 +14561,7 @@ export {
13371
14561
  inflightreport,
13372
14562
  inheritconsent,
13373
14563
  initialize,
14564
+ inmemoryvault,
13374
14565
  interleavetimeline,
13375
14566
  iscdpkind,
13376
14567
  iscontrolflowkind,
@@ -13400,6 +14591,7 @@ export {
13400
14591
  lanereport,
13401
14592
  lapseframes,
13402
14593
  lapseplanof,
14594
+ lasthashof,
13403
14595
  latesttemplate,
13404
14596
  launchbridge,
13405
14597
  layernames,
@@ -13417,8 +14609,12 @@ export {
13417
14609
  locationpresetof,
13418
14610
  locationrangevalid,
13419
14611
  lockkey,
14612
+ logchainreport,
14613
+ logentryof,
13420
14614
  loglevels,
14615
+ logreadgate,
13421
14616
  longtaskcapture,
14617
+ lookalikedistance,
13422
14618
  loopof,
13423
14619
  mailboxof,
13424
14620
  manualpreview,
@@ -13429,6 +14625,16 @@ export {
13429
14625
  markpending,
13430
14626
  markprovider,
13431
14627
  markuprenderstep,
14628
+ maskexport,
14629
+ maskfield,
14630
+ maskformstate,
14631
+ maskingfield,
14632
+ maskmarker,
14633
+ maskobservation,
14634
+ maskrecord,
14635
+ maskstoredvalues,
14636
+ masktypedvalues,
14637
+ maskvalue,
13432
14638
  matchmessage,
13433
14639
  matchurl,
13434
14640
  matchurlpattern,
@@ -13436,11 +14642,13 @@ export {
13436
14642
  mediaentries,
13437
14643
  mediakinds,
13438
14644
  mediareport,
14645
+ mergeregions,
13439
14646
  mergeresults,
13440
14647
  messageegressgrade,
13441
14648
  messagefilterof,
13442
14649
  methoddomain,
13443
14650
  minimapfocus,
14651
+ missingclassconsents,
13444
14652
  mockfor,
13445
14653
  mockreport,
13446
14654
  mockspecof,
@@ -13467,6 +14675,7 @@ export {
13467
14675
  newsessionrecord,
13468
14676
  newworkflowrun,
13469
14677
  nextrequest,
14678
+ nobatchresolution,
13470
14679
  nonceof,
13471
14680
  normalizeendpoint,
13472
14681
  oauthflowof,
@@ -13478,11 +14687,19 @@ export {
13478
14687
  offscreencapabilitygate,
13479
14688
  openchannel,
13480
14689
  openconsensus,
14690
+ openconsentwindow,
14691
+ opengate,
13481
14692
  openoffscreen,
13482
14693
  openrun,
14694
+ openrunlog,
13483
14695
  openseal,
13484
14696
  openstreamchannel,
13485
14697
  opentabagent,
14698
+ origincheckgate,
14699
+ origincheckof,
14700
+ originlabels,
14701
+ originprofilegate,
14702
+ originprofileof,
13486
14703
  outcomeresponse,
13487
14704
  overrideinputof,
13488
14705
  overridematches,
@@ -13513,15 +14730,24 @@ export {
13513
14730
  payloadshapeof,
13514
14731
  payloadvalid,
13515
14732
  payloadwithdefaults,
14733
+ paypayload,
13516
14734
  pdfoptionsof,
13517
14735
  pdfpagesize,
13518
14736
  pdfsegments,
13519
14737
  pdftextlayout,
14738
+ permdiffchanged,
14739
+ permdiffsummary,
14740
+ permissiondiff,
13520
14741
  permissiongrade,
13521
14742
  permissiongrantof,
13522
14743
  permissionnamevalid,
13523
14744
  permissionstates,
13524
14745
  permissionstatevalid,
14746
+ phishguardgate,
14747
+ phishnotetext,
14748
+ phishthresholdgate,
14749
+ phishthresholdvalid,
14750
+ phishverdictof,
13525
14751
  ping,
13526
14752
  planallowlist,
13527
14753
  plandraftreviewgate,
@@ -13532,13 +14758,17 @@ export {
13532
14758
  pollurl,
13533
14759
  poolplan,
13534
14760
  popscope,
14761
+ portaccept,
13535
14762
  postentry,
13536
14763
  preparehandoff,
13537
14764
  privatemime,
14765
+ profilegrade,
13538
14766
  profilegrantgranted,
14767
+ profilekind,
13539
14768
  profilereport,
13540
14769
  profileretentionwindow,
13541
14770
  profilerkinds,
14771
+ profilesummary,
13542
14772
  progressnoticeframe,
13543
14773
  promptcallframe,
13544
14774
  promptreport,
@@ -13557,13 +14787,16 @@ export {
13557
14787
  queuelanesvalid,
13558
14788
  randomid,
13559
14789
  rankapis,
14790
+ ratelimitboundsvalid,
13560
14791
  ratelimitbudgetallowed,
14792
+ ratelimitgate,
13561
14793
  ratelimitreadof,
13562
14794
  ratelimitreport,
13563
14795
  ratelimitwait,
13564
14796
  readentries,
13565
14797
  readpath,
13566
14798
  readstream,
14799
+ readverifiedlog,
13567
14800
  reattachrun,
13568
14801
  receivemessage,
13569
14802
  receivemessages,
@@ -13577,6 +14810,8 @@ export {
13577
14810
  recoveryplan,
13578
14811
  redactconsoletext,
13579
14812
  redactedcookies,
14813
+ redactedshot,
14814
+ redactionsummary,
13580
14815
  redactparams,
13581
14816
  redeempairingcode,
13582
14817
  redoedit,
@@ -13584,7 +14819,10 @@ export {
13584
14819
  reflectstep,
13585
14820
  regexextract,
13586
14821
  regexruleof,
14822
+ regionof,
14823
+ regionsfor,
13587
14824
  regionsteps,
14825
+ regionvalid,
13588
14826
  registeragent,
13589
14827
  rejectioncapture,
13590
14828
  relayframe,
@@ -13598,6 +14836,7 @@ export {
13598
14836
  renderprovenance,
13599
14837
  rendertemplate,
13600
14838
  rendertoolbriefs,
14839
+ renewconsentwindow,
13601
14840
  reordersteps,
13602
14841
  repeatuntilof,
13603
14842
  replannonfail,
@@ -13614,6 +14853,7 @@ export {
13614
14853
  resolveapproval,
13615
14854
  resolvedrisk,
13616
14855
  resolveescalation,
14856
+ resolvegate,
13617
14857
  resolverecipients,
13618
14858
  resolveroute,
13619
14859
  resolvetool,
@@ -13638,7 +14878,10 @@ export {
13638
14878
  reviewedkinds,
13639
14879
  reviewframe,
13640
14880
  revocationruleof,
14881
+ revokeaction,
13641
14882
  revokeclient,
14883
+ revokerun,
14884
+ revokerungate,
13642
14885
  rewritesourcelocation,
13643
14886
  roleaddress,
13644
14887
  roledefaults,
@@ -13667,6 +14910,10 @@ export {
13667
14910
  runurllist,
13668
14911
  runwhile,
13669
14912
  runworkflow,
14913
+ safedefaultnotice,
14914
+ safedefaultprofile,
14915
+ safedefaultreadkind,
14916
+ safedefaultsgate,
13670
14917
  safetyresponse,
13671
14918
  samplingframes,
13672
14919
  sandboxorigingate,
@@ -13678,8 +14925,12 @@ export {
13678
14925
  scanconflicts,
13679
14926
  schedulecron,
13680
14927
  scheduleinterval,
14928
+ schemacheck,
14929
+ schemaguardgate,
13681
14930
  scopecheck,
13682
14931
  scopegate,
14932
+ scopegrantof,
14933
+ sealrunlog,
13683
14934
  sealrunstate,
13684
14935
  seamweights,
13685
14936
  searchfields,
@@ -13687,11 +14938,17 @@ export {
13687
14938
  searchsessionrecords,
13688
14939
  searchsteps,
13689
14940
  searchtemplates,
14941
+ secretleakscan,
14942
+ secretshapecarrying,
14943
+ securityreport,
13690
14944
  seededrandom,
13691
14945
  selectorresponse,
13692
14946
  sendcdpcommand,
13693
14947
  sendfetch,
13694
14948
  sendmessage,
14949
+ sensitiveclassesof,
14950
+ sensitiveclassgate,
14951
+ sensitivepipelingate,
13695
14952
  sequenceintegrity,
13696
14953
  serializearg,
13697
14954
  serializecdpcommand,
@@ -13711,6 +14968,7 @@ export {
13711
14968
  sessionrestoregate,
13712
14969
  sessiontabof,
13713
14970
  setvariable,
14971
+ shapesof,
13714
14972
  sharelesson,
13715
14973
  shareworkflow,
13716
14974
  shiftentryof,
@@ -13763,6 +15021,7 @@ export {
13763
15021
  taskstatevalid,
13764
15022
  teardowncdpsession,
13765
15023
  teardownplanof,
15024
+ templateof,
13766
15025
  templateurl,
13767
15026
  templatevariables,
13768
15027
  thumbdirectiveof,
@@ -13802,6 +15061,8 @@ export {
13802
15061
  transferablekeys,
13803
15062
  transferhandoff,
13804
15063
  transformgrammar,
15064
+ transparencygrants,
15065
+ transparencyreport,
13805
15066
  triggereventcatalog,
13806
15067
  triggerfamilies,
13807
15068
  triggerfamilyof,
@@ -13815,6 +15076,7 @@ export {
13815
15076
  tryof,
13816
15077
  undoedit,
13817
15078
  unreadcount,
15079
+ untrustedrendergate,
13818
15080
  unwrapgraphql,
13819
15081
  updaterule,
13820
15082
  urlencodeform,
@@ -13831,7 +15093,19 @@ export {
13831
15093
  validatetoolcatalog,
13832
15094
  validatevaluegen,
13833
15095
  validateworkflow,
15096
+ vaultcovers,
15097
+ vaultdelete,
15098
+ vaultdigestof,
15099
+ vaultdigestprefix,
15100
+ vaultentryof,
15101
+ vaultprompttext,
15102
+ vaultsecretgate,
15103
+ vaultstore,
15104
+ vaultvaluefor,
15105
+ vaultview,
15106
+ verdictfresh,
13834
15107
  verifyauth,
15108
+ verifylogchain,
13835
15109
  verifytoken,
13836
15110
  verifywebhook,
13837
15111
  visitmatch,
@@ -13844,6 +15118,9 @@ export {
13844
15118
  watchgate,
13845
15119
  webhooksecretok,
13846
15120
  whileof,
15121
+ wildcardentry,
15122
+ windowgatesstep,
15123
+ windowhistory,
13847
15124
  wireformat,
13848
15125
  wizardreport,
13849
15126
  workerpoolsizevalid,