@wenathlan/extension 1.1.61 → 1.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/confirmgates.d.ts +60 -0
- package/dist/confirmgates.d.ts.map +1 -0
- package/dist/environments.d.ts +10 -0
- package/dist/environments.d.ts.map +1 -1
- package/dist/inboundguard.d.ts +86 -0
- package/dist/inboundguard.d.ts.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1299 -3
- package/dist/index.js.map +4 -4
- package/dist/memory.d.ts +187 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/originpolicy.d.ts +10 -0
- package/dist/originpolicy.d.ts.map +1 -1
- package/dist/phishguard.d.ts +24 -0
- package/dist/phishguard.d.ts.map +1 -0
- package/dist/policy.d.ts +122 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +88 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/redactshots.d.ts +54 -0
- package/dist/redactshots.d.ts.map +1 -0
- package/dist/secretvault.d.ts +89 -0
- package/dist/secretvault.d.ts.map +1 -0
- package/dist/sessioninterface.d.ts +213 -0
- package/dist/sessioninterface.d.ts.map +1 -0
- package/dist/transparency.d.ts +46 -0
- package/dist/transparency.d.ts.map +1 -0
- package/dist/types.d.ts +368 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/extension/dist/background.js +1710 -55
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +5 -1
- package/extension/dist/offscreen.js +4 -0
- package/extension/dist/offscreen.js.map +2 -2
- package/extension/dist/pagebridge.js.map +2 -2
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +41 -0
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +462 -215
- package/extension/dist/sidepanel.js.map +3 -3
- package/extension/dist/transparencypage.html +25 -0
- package/extension/dist/transparencypage.js +198 -0
- package/extension/dist/transparencypage.js.map +7 -0
- package/extension/manifest.json +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4837,6 +4837,375 @@ var sessionmemory = class {
|
|
|
4837
4837
|
}
|
|
4838
4838
|
return kept;
|
|
4839
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
|
+
}
|
|
5003
|
+
/**
|
|
5004
|
+
* Session interface persistence of the 1.1.63 family.
|
|
5005
|
+
* The five session stores live here, scoped per profile workspace: the sitenotes per origin with sensitive bodies sealed at rest, the append only scratchpad entries per task with their step provenance, the distilled runsummaries per run and origin, the correctionmemory entries per origin and kind captured from plan review, and the consentmemory entries per origin with every grant, denial, expiry and revocation carrying its boundary; beside them the semanticrecall index with fingerprint deduplication answers ranked queries inside the run scope, the incremental historysearch corpus indexes session metadata, notes and summaries as they are written, the errorsurface payloads of failed steps keep their retry hints with the policy verdict, the per tab session references isolate parallel tabs, and the export bundles notes, summaries and corrections as one audit bundle.
|
|
5006
|
+
* The recall seam stays documented: the local fingerprint index answers every query today while a future remote recall backend can take the same shapes behind the seam without touching the callers.
|
|
5007
|
+
*/
|
|
5008
|
+
/** Replaces the stored site notes; a sensitive note carries its sealedbody only so the plain body never persists. */
|
|
5009
|
+
async setsitenotes(notes) {
|
|
5010
|
+
return this.adapter.set("sitenotes", notes);
|
|
5011
|
+
}
|
|
5012
|
+
/** Returns the stored site notes, oldest update first. */
|
|
5013
|
+
async getsitenotes() {
|
|
5014
|
+
return await this.adapter.get("sitenotes") ?? [];
|
|
5015
|
+
}
|
|
5016
|
+
/** Reads the site notes of one origin only; the read gate keeps the origin inside the session grants. */
|
|
5017
|
+
async readsitenotes(origin) {
|
|
5018
|
+
return (await this.getsitenotes()).filter((note) => note.origin === origin);
|
|
5019
|
+
}
|
|
5020
|
+
/** Writes one site note: a note of the same id keeps its latest edit while a new note joins the store. */
|
|
5021
|
+
async writesitenote(note) {
|
|
5022
|
+
const notes = await this.getsitenotes();
|
|
5023
|
+
await this.setsitenotes(notes.some((candidate) => candidate.id === note.id) ? notes.map((candidate) => candidate.id === note.id ? note : candidate) : [...notes, note]);
|
|
5024
|
+
}
|
|
5025
|
+
/** Removes one site note by its id. */
|
|
5026
|
+
async removesitenote(id) {
|
|
5027
|
+
await this.setsitenotes((await this.getsitenotes()).filter((note) => note.id !== id));
|
|
5028
|
+
}
|
|
5029
|
+
/** Expires the site notes past the user configured window; an absent window keeps every note. */
|
|
5030
|
+
async expiresitenotes(retention, now) {
|
|
5031
|
+
if (retention === void 0) return await this.getsitenotes();
|
|
5032
|
+
const kept = (await this.getsitenotes()).filter((note) => now - note.updatedat < retention);
|
|
5033
|
+
await this.setsitenotes(kept);
|
|
5034
|
+
return kept;
|
|
5035
|
+
}
|
|
5036
|
+
/** Replaces the stored scratchpad entries per task. */
|
|
5037
|
+
async setscratchpad(entries) {
|
|
5038
|
+
return this.adapter.set("scratchpad", entries);
|
|
5039
|
+
}
|
|
5040
|
+
/** Returns every stored scratchpad entry, newest first. */
|
|
5041
|
+
async getscratchpadall() {
|
|
5042
|
+
return await this.adapter.get("scratchpad") ?? [];
|
|
5043
|
+
}
|
|
5044
|
+
/** Appends one scratchpad entry: the pad stays append only so no later write rewrites an earlier entry. */
|
|
5045
|
+
async appendscratchentry(entry) {
|
|
5046
|
+
await this.setscratchpad([entry, ...await this.getscratchpadall()]);
|
|
5047
|
+
}
|
|
5048
|
+
/** Reads the scratchpad of one task session, newest first; entries of another task never cross the boundary. */
|
|
5049
|
+
async readscratchpad(taskid, sessionid) {
|
|
5050
|
+
return (await this.getscratchpadall()).filter((entry) => entry.taskid === taskid && entry.sessionid === sessionid);
|
|
5051
|
+
}
|
|
5052
|
+
/** Prunes the scratchpad entries past the user configured window; an absent window keeps every entry. */
|
|
5053
|
+
async prunescratchentries(window, now) {
|
|
5054
|
+
if (window === void 0) return await this.getscratchpadall();
|
|
5055
|
+
const kept = (await this.getscratchpadall()).filter((entry) => now - entry.at < window);
|
|
5056
|
+
await this.setscratchpad(kept);
|
|
5057
|
+
return kept;
|
|
5058
|
+
}
|
|
5059
|
+
/** Stores one distilled run summary of a completed run. */
|
|
5060
|
+
async setrunsummary(summary) {
|
|
5061
|
+
return this.adapter.set(`runsummary:${summary.runid}`, summary);
|
|
5062
|
+
}
|
|
5063
|
+
/** Returns the stored run summary of one run; an absent summary returns undefined. */
|
|
5064
|
+
async getrunsummary(runid) {
|
|
5065
|
+
return this.adapter.get(`runsummary:${runid}`);
|
|
5066
|
+
}
|
|
5067
|
+
/** Lists the stored run summaries, oldest distillation first, optionally filtered by origin. */
|
|
5068
|
+
async listrunsummaries(origin) {
|
|
5069
|
+
const index = await this.adapter.get("runsummaryindex") ?? [];
|
|
5070
|
+
const summaries = [];
|
|
5071
|
+
for (const runid of index) {
|
|
5072
|
+
const summary = await this.getrunsummary(runid);
|
|
5073
|
+
if (summary) summaries.push(summary);
|
|
5074
|
+
}
|
|
5075
|
+
const filtered = origin === void 0 ? summaries : summaries.filter((summary) => summary.origins.includes(origin));
|
|
5076
|
+
return filtered.sort((one, two) => one.distilledat - two.distilledat);
|
|
5077
|
+
}
|
|
5078
|
+
/** Tracks one run in the run summary index so the listing reads every stored summary. */
|
|
5079
|
+
async trackrunsummary(runid) {
|
|
5080
|
+
const index = await this.adapter.get("runsummaryindex") ?? [];
|
|
5081
|
+
if (!index.includes(runid)) await this.adapter.set("runsummaryindex", [...index, runid]);
|
|
5082
|
+
}
|
|
5083
|
+
/** Expires the run summaries past the user configured window; an absent window keeps every summary. */
|
|
5084
|
+
async expirerunsummaries(retention, now) {
|
|
5085
|
+
const summaries = await this.listrunsummaries();
|
|
5086
|
+
if (retention === void 0) return summaries;
|
|
5087
|
+
const kept = [];
|
|
5088
|
+
for (const summary of summaries) {
|
|
5089
|
+
if (now - summary.distilledat > retention) await this.adapter.set(`runsummary:${summary.runid}`, { ...summary, steps: [], kinds: [], origins: summary.origins });
|
|
5090
|
+
else kept.push(summary);
|
|
5091
|
+
}
|
|
5092
|
+
return kept;
|
|
5093
|
+
}
|
|
5094
|
+
/** Replaces the semantic recall index with its fingerprint deduplicated entries. */
|
|
5095
|
+
async setrecallindex(index) {
|
|
5096
|
+
return this.adapter.set("recallindex", index);
|
|
5097
|
+
}
|
|
5098
|
+
/** Returns the stored semantic recall index entries, newest first. */
|
|
5099
|
+
async getrecallindex() {
|
|
5100
|
+
return await this.adapter.get("recallindex") ?? [];
|
|
5101
|
+
}
|
|
5102
|
+
/** Adds one recall index entry with fingerprint deduplication: a repeated extraction keeps its first entry. */
|
|
5103
|
+
async addrecallentry(entry) {
|
|
5104
|
+
const index = await this.getrecallindex();
|
|
5105
|
+
if (index.some((candidate) => candidate.fingerprint === entry.fingerprint && candidate.origin === entry.origin)) return;
|
|
5106
|
+
await this.setrecallindex([entry, ...index]);
|
|
5107
|
+
}
|
|
5108
|
+
/** Answers one semantic recall query across the extraction stores: the local index ranks by text similarity inside the run scope and returns the provenance of every match. */
|
|
5109
|
+
async semanticrecall(query, scope, rank) {
|
|
5110
|
+
return rank(await this.getrecallindex(), query, scope);
|
|
5111
|
+
}
|
|
5112
|
+
/** Expires the recall index entries past the user configured window; the extraction records themselves stay for the audit trail. */
|
|
5113
|
+
async expirerecallentries(window, now) {
|
|
5114
|
+
if (window === void 0) return await this.getrecallindex();
|
|
5115
|
+
const kept = (await this.getrecallindex()).filter((entry) => now - entry.at < window);
|
|
5116
|
+
await this.setrecallindex(kept);
|
|
5117
|
+
return kept;
|
|
5118
|
+
}
|
|
5119
|
+
/** Replaces the stored correction memory entries per origin and kind. */
|
|
5120
|
+
async setcorrections(corrections) {
|
|
5121
|
+
return this.adapter.set("corrections", corrections);
|
|
5122
|
+
}
|
|
5123
|
+
/** Returns the stored correction memory entries, newest first, optionally filtered by origin and kind. */
|
|
5124
|
+
async getcorrections(filter) {
|
|
5125
|
+
const entries = await this.adapter.get("corrections") ?? [];
|
|
5126
|
+
return entries.filter((entry) => (filter?.origin === void 0 || entry.origin === filter.origin) && (filter?.kind === void 0 || entry.kind === filter.kind));
|
|
5127
|
+
}
|
|
5128
|
+
/** Records one correction memory entry captured from a plan review edit or rejection. */
|
|
5129
|
+
async addcorrection(entry) {
|
|
5130
|
+
await this.setcorrections([entry, ...await this.adapter.get("corrections") ?? []]);
|
|
5131
|
+
}
|
|
5132
|
+
/** Expires the correction memory entries past the user configured window; an absent window keeps every correction. */
|
|
5133
|
+
async expirecorrectionentries(window, now) {
|
|
5134
|
+
if (window === void 0) return await this.getcorrections();
|
|
5135
|
+
const kept = (await this.getcorrections()).filter((entry) => now - entry.at < window);
|
|
5136
|
+
await this.setcorrections(kept);
|
|
5137
|
+
return kept;
|
|
5138
|
+
}
|
|
5139
|
+
/** Replaces the stored consent memory entries per origin. */
|
|
5140
|
+
async setconsentmemory(entries) {
|
|
5141
|
+
return this.adapter.set("consentmemory", entries);
|
|
5142
|
+
}
|
|
5143
|
+
/** Returns the stored consent memory entries, newest first, optionally filtered by origin. */
|
|
5144
|
+
async getconsentmemory(origin) {
|
|
5145
|
+
const entries = await this.adapter.get("consentmemory") ?? [];
|
|
5146
|
+
return origin === void 0 ? entries : entries.filter((entry) => entry.origin === origin);
|
|
5147
|
+
}
|
|
5148
|
+
/** Records one consent memory entry per origin: every grant, denial, expiry and revocation lands with its boundary and kinds. */
|
|
5149
|
+
async addconsentmemoryentry(entry) {
|
|
5150
|
+
await this.setconsentmemory([entry, ...await this.adapter.get("consentmemory") ?? []]);
|
|
5151
|
+
}
|
|
5152
|
+
/** Replaces the stored error surface payloads of failed steps. */
|
|
5153
|
+
async seterrorsurfaces(surfaces) {
|
|
5154
|
+
return this.adapter.set("errorsurfaces", surfaces);
|
|
5155
|
+
}
|
|
5156
|
+
/** Returns the stored error surface payloads, newest first, optionally filtered by step. */
|
|
5157
|
+
async geterrorsurfaces(stepid) {
|
|
5158
|
+
const surfaces = await this.adapter.get("errorsurfaces") ?? [];
|
|
5159
|
+
return stepid === void 0 ? surfaces : surfaces.filter((surface) => surface.stepid === stepid);
|
|
5160
|
+
}
|
|
5161
|
+
/** Records one error surface payload of a failed step with its retry hint and the policy verdict. */
|
|
5162
|
+
async adderrorsurface(surface) {
|
|
5163
|
+
await this.seterrorsurfaces([surface, ...await this.adapter.get("errorsurfaces") ?? []].slice(0, 500));
|
|
5164
|
+
}
|
|
5165
|
+
/** Replaces the incremental history search corpus of session metadata, notes and run summaries. */
|
|
5166
|
+
async sethistoryindex(corpus) {
|
|
5167
|
+
return this.adapter.set("historyindex", corpus);
|
|
5168
|
+
}
|
|
5169
|
+
/** Returns the incremental history search corpus, newest entry first. */
|
|
5170
|
+
async gethistoryindex() {
|
|
5171
|
+
return await this.adapter.get("historyindex") ?? [];
|
|
5172
|
+
}
|
|
5173
|
+
/** Adds one corpus entry to the incremental history index on each store write. */
|
|
5174
|
+
async addhistoryentry(entry) {
|
|
5175
|
+
const corpus = await this.gethistoryindex();
|
|
5176
|
+
await this.sethistoryindex([entry, ...corpus.filter((candidate) => !(candidate.source === entry.source && candidate.id === entry.id))]);
|
|
5177
|
+
}
|
|
5178
|
+
/** Answers one history search query against the incremental corpus with the matched terms highlighted. */
|
|
5179
|
+
async historysearch(query, search) {
|
|
5180
|
+
return search(await this.gethistoryindex(), query);
|
|
5181
|
+
}
|
|
5182
|
+
/** Stores one per tab session reference so parallel tabs never collide inside the session stores. */
|
|
5183
|
+
async settabsession(ref) {
|
|
5184
|
+
return this.adapter.set(`tabsession:${ref.tabid}`, ref);
|
|
5185
|
+
}
|
|
5186
|
+
/** Returns the per tab session reference of one tab; an absent reference returns undefined. */
|
|
5187
|
+
async gettabsession(tabid) {
|
|
5188
|
+
return this.adapter.get(`tabsession:${tabid}`);
|
|
5189
|
+
}
|
|
5190
|
+
/** Lists every per tab session reference so the sessiongrid reads the per tab lock state of concurrent sessions. */
|
|
5191
|
+
async listtabsessions() {
|
|
5192
|
+
const tabs = await this.adapter.get("tabsessionindex") ?? [];
|
|
5193
|
+
const refs = [];
|
|
5194
|
+
for (const tabid of tabs) {
|
|
5195
|
+
const ref = await this.gettabsession(tabid);
|
|
5196
|
+
if (ref) refs.push(ref);
|
|
5197
|
+
}
|
|
5198
|
+
return refs;
|
|
5199
|
+
}
|
|
5200
|
+
/** Tracks one tab in the per tab session index so the listing reads every isolated reference. */
|
|
5201
|
+
async tracktabsession(tabid) {
|
|
5202
|
+
const tabs = await this.adapter.get("tabsessionindex") ?? [];
|
|
5203
|
+
if (!tabs.includes(tabid)) await this.adapter.set("tabsessionindex", [...tabs, tabid]);
|
|
5204
|
+
}
|
|
5205
|
+
/** Exports the site notes, the run summaries and the correction memory as one audit bundle: sensitive note bodies stay sealed in the export. */
|
|
5206
|
+
async exportsessionbundle(exportedat) {
|
|
5207
|
+
return { kind: "sessionbundle", notes: await this.getsitenotes(), summaries: await this.listrunsummaries(), corrections: await this.getcorrections(), exportedat };
|
|
5208
|
+
}
|
|
4840
5209
|
};
|
|
4841
5210
|
function mediakindof(record2) {
|
|
4842
5211
|
if ("pages" in record2) return "pdf";
|
|
@@ -5477,6 +5846,87 @@ function tlsstateof(tls) {
|
|
|
5477
5846
|
return { mode: tls.mode, certificaterequired: tls.mode === "required" || tls.certificatefingerprint !== void 0, verified: tls.verifiedat !== void 0 };
|
|
5478
5847
|
}
|
|
5479
5848
|
|
|
5849
|
+
// confirmgates.ts
|
|
5850
|
+
function stepoptions(step) {
|
|
5851
|
+
if (!step.options) return {};
|
|
5852
|
+
try {
|
|
5853
|
+
const parsed = JSON.parse(step.options);
|
|
5854
|
+
return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
5855
|
+
} catch {
|
|
5856
|
+
return {};
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
function gatekindfor(classes) {
|
|
5860
|
+
if (classes.includes("payment")) return "confirmpay";
|
|
5861
|
+
if (classes.includes("delete")) return "confirmdelete";
|
|
5862
|
+
if (classes.includes("credential")) return "confirmcreds";
|
|
5863
|
+
return void 0;
|
|
5864
|
+
}
|
|
5865
|
+
function paypayload(input) {
|
|
5866
|
+
const payload = { payeeorigin: input.payeeorigin };
|
|
5867
|
+
if (input.amount !== void 0 && input.amount.trim() !== "") payload.amount = input.amount.trim();
|
|
5868
|
+
if (input.target !== void 0 && input.target.trim() !== "") payload.target = input.target.trim();
|
|
5869
|
+
return payload;
|
|
5870
|
+
}
|
|
5871
|
+
function deletepayload(input) {
|
|
5872
|
+
const payload = { scope: input.scope, irreversibility: input.irreversibility };
|
|
5873
|
+
if (input.target !== void 0 && input.target.trim() !== "") payload.target = input.target.trim();
|
|
5874
|
+
return payload;
|
|
5875
|
+
}
|
|
5876
|
+
function credspayload(label) {
|
|
5877
|
+
if (label.trim() === "") throw new Error("The confirmcreds gate names its credential label; the value never appears.");
|
|
5878
|
+
return { label: label.trim() };
|
|
5879
|
+
}
|
|
5880
|
+
function opengate(input) {
|
|
5881
|
+
if (input.stepid.trim() === "" || input.runid.trim() === "" || input.origin.trim() === "") throw new Error("The confirm gate needs its step, run and origin.");
|
|
5882
|
+
if (Object.keys(input.payload).length === 0) throw new Error("The confirm gate carries the payload the human reviews.");
|
|
5883
|
+
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 };
|
|
5884
|
+
}
|
|
5885
|
+
function gatestateof(gates, stepid) {
|
|
5886
|
+
const gate = [...gates].reverse().find((candidate) => candidate.stepid === stepid);
|
|
5887
|
+
if (gate === void 0) return { state: "none" };
|
|
5888
|
+
return { state: gate.state, gate };
|
|
5889
|
+
}
|
|
5890
|
+
function resolvegate(input) {
|
|
5891
|
+
if (input.actor.trim() === "") throw new Error("The gate resolution names its acting user; only a human resolves a gate.");
|
|
5892
|
+
const gate = input.gates.find((candidate) => candidate.gateid === input.gateid);
|
|
5893
|
+
if (gate === void 0) return { gates: input.gates };
|
|
5894
|
+
if (gate.state !== "open") return { gates: input.gates };
|
|
5895
|
+
const resolution = { gateid: gate.gateid, kind: gate.kind, stepid: gate.stepid, decision: input.decision, actor: input.actor, at: input.now };
|
|
5896
|
+
return { gates: input.gates.map((candidate) => candidate.gateid === input.gateid ? { ...candidate, state: input.decision, resolvedat: input.now, actor: input.actor } : candidate), resolution };
|
|
5897
|
+
}
|
|
5898
|
+
function nobatchresolution(gateids) {
|
|
5899
|
+
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.` };
|
|
5900
|
+
if (gateids.length === 0) return { allowed: false, reason: "A gate resolution names its single gate." };
|
|
5901
|
+
return { allowed: true, reason: "The resolution names exactly one gate; the distinct human action resolves it alone." };
|
|
5902
|
+
}
|
|
5903
|
+
function gateprompttext(gate) {
|
|
5904
|
+
if (gate.kind === "confirmpay") {
|
|
5905
|
+
const amount = gate.payload.amount !== void 0 ? `the amount ${gate.payload.amount}` : "an amount the step options name";
|
|
5906
|
+
const target = gate.payload.target !== void 0 ? ` on ${gate.payload.target}` : "";
|
|
5907
|
+
return `Approve the payment of ${amount} to ${gate.payload.payeeorigin}${target}? The step dispatches only after this distinct human action.`;
|
|
5908
|
+
}
|
|
5909
|
+
if (gate.kind === "confirmdelete") {
|
|
5910
|
+
const target = gate.payload.target !== void 0 ? ` on ${gate.payload.target}` : "";
|
|
5911
|
+
return `Approve the destructive delete${target} scoped to ${gate.payload.scope}? ${gate.payload.irreversibility} The step dispatches only after this distinct human action.`;
|
|
5912
|
+
}
|
|
5913
|
+
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.`;
|
|
5914
|
+
}
|
|
5915
|
+
function gateforstep(input) {
|
|
5916
|
+
const kind = gatekindfor(input.classes);
|
|
5917
|
+
if (kind === void 0) return void 0;
|
|
5918
|
+
const options = stepoptions(input.step);
|
|
5919
|
+
if (kind === "confirmpay") {
|
|
5920
|
+
const amount = typeof options.amount === "string" ? options.amount : typeof options.value === "string" ? options.value : void 0;
|
|
5921
|
+
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 });
|
|
5922
|
+
}
|
|
5923
|
+
if (kind === "confirmdelete") {
|
|
5924
|
+
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 });
|
|
5925
|
+
}
|
|
5926
|
+
if (input.credentiallabel === void 0 || input.credentiallabel.trim() === "") return void 0;
|
|
5927
|
+
return opengate({ kind, stepid: input.step.id, runid: input.runid, origin: input.origin, payload: credspayload(input.credentiallabel), now: input.now });
|
|
5928
|
+
}
|
|
5929
|
+
|
|
5480
5930
|
// coordination.ts
|
|
5481
5931
|
function lockkey(origin, selector) {
|
|
5482
5932
|
return `${origin}|${selector}`;
|
|
@@ -5752,6 +6202,11 @@ function isolatedinjection(step) {
|
|
|
5752
6202
|
}
|
|
5753
6203
|
return { world: "ISOLATED", code: step.value, args };
|
|
5754
6204
|
}
|
|
6205
|
+
var runsummarytask = "runsummary";
|
|
6206
|
+
function summaryrequestof(input) {
|
|
6207
|
+
if (input.payload.trim() === "") throw new Error("The runsummary request needs its payload reference.");
|
|
6208
|
+
return { id: input.id, runid: input.runid, stepid: input.sessionid, task: runsummarytask, payload: input.payload, transferables: [], sentat: input.sentat };
|
|
6209
|
+
}
|
|
5755
6210
|
|
|
5756
6211
|
// httpclient.ts
|
|
5757
6212
|
var httpkinds = ["fetchurl", "parsejson", "parsehtml", "callrest", "callgraphql"];
|
|
@@ -6039,6 +6494,88 @@ async function callgraphql(input) {
|
|
|
6039
6494
|
}
|
|
6040
6495
|
}
|
|
6041
6496
|
|
|
6497
|
+
// inboundguard.ts
|
|
6498
|
+
function shapeof(value) {
|
|
6499
|
+
if (typeof value === "string") return "string";
|
|
6500
|
+
if (typeof value === "number") return "number";
|
|
6501
|
+
if (typeof value === "boolean") return "boolean";
|
|
6502
|
+
if (Array.isArray(value)) return "array";
|
|
6503
|
+
return "object";
|
|
6504
|
+
}
|
|
6505
|
+
function schemacheck(input) {
|
|
6506
|
+
const errors = [];
|
|
6507
|
+
for (const [field, value] of Object.entries(input.command)) {
|
|
6508
|
+
const expected = input.schema[field];
|
|
6509
|
+
if (expected === void 0) {
|
|
6510
|
+
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.` });
|
|
6511
|
+
continue;
|
|
6512
|
+
}
|
|
6513
|
+
if (expected === "absent") {
|
|
6514
|
+
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.` });
|
|
6515
|
+
continue;
|
|
6516
|
+
}
|
|
6517
|
+
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.` });
|
|
6518
|
+
}
|
|
6519
|
+
for (const field of input.required ?? []) {
|
|
6520
|
+
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.` });
|
|
6521
|
+
}
|
|
6522
|
+
return { valid: errors.length === 0, errors };
|
|
6523
|
+
}
|
|
6524
|
+
function envelopecheck(input) {
|
|
6525
|
+
const kind = input.command.kind;
|
|
6526
|
+
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." }] };
|
|
6527
|
+
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.` }] };
|
|
6528
|
+
return { valid: true, errors: [] };
|
|
6529
|
+
}
|
|
6530
|
+
function origincheckof(input) {
|
|
6531
|
+
const sender = input.senderid ?? "an unknown sender";
|
|
6532
|
+
const origin = input.senderorigin ?? "";
|
|
6533
|
+
if (input.senderid === input.extensionid) return { accepted: true, sender, origin, reason: "The sender is this extension itself; the internal surface accepts." };
|
|
6534
|
+
if (input.senderid !== void 0 && input.connectallow.some((entry) => entry.senderid === input.senderid && (entry.origin === void 0 || entry.origin === origin))) {
|
|
6535
|
+
return { accepted: true, sender, origin, reason: `The sender ${sender} sits in the connectallow list the user manages${origin !== "" ? ` for ${origin}` : ""}; the message accepts.` };
|
|
6536
|
+
}
|
|
6537
|
+
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." };
|
|
6538
|
+
return { accepted: false, sender, origin, reason: `The sender ${sender} sits absent from the connectallow list; the guard drops the message without handler execution.` };
|
|
6539
|
+
}
|
|
6540
|
+
function portaccept(input) {
|
|
6541
|
+
const verdict = origincheckof(input);
|
|
6542
|
+
if (!verdict.accepted) return { ...verdict, reason: `The port ${input.portname} closes at its handshake: ${verdict.reason}` };
|
|
6543
|
+
return { ...verdict, reason: `The port ${input.portname} accepted its handshake: ${verdict.reason}` };
|
|
6544
|
+
}
|
|
6545
|
+
function connectallowentryof(input) {
|
|
6546
|
+
if (input.senderid.trim() === "") throw new Error("The connectallow entry needs its sender id.");
|
|
6547
|
+
if (input.displayname.trim() === "") throw new Error("The connectallow entry needs its display name.");
|
|
6548
|
+
return { senderid: input.senderid.trim(), displayname: input.displayname.trim(), ...input.origin !== void 0 && input.origin.trim() !== "" ? { origin: input.origin.trim() } : {}, addedat: input.now };
|
|
6549
|
+
}
|
|
6550
|
+
var emptyconnectallow = [];
|
|
6551
|
+
function bucketboundsvalid(limit, window) {
|
|
6552
|
+
if (!Number.isFinite(limit) || limit <= 0) return { valid: false, reason: "The ratelimit bucket limit stays a positive user value; no hidden ceiling exists." };
|
|
6553
|
+
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." };
|
|
6554
|
+
return { valid: true, reason: `The bucket bound of ${limit} commands per ${window} milliseconds stays the user configured choice with no hidden ceiling.` };
|
|
6555
|
+
}
|
|
6556
|
+
function bucketof(input) {
|
|
6557
|
+
const bounds = bucketboundsvalid(input.limit, input.window);
|
|
6558
|
+
if (!bounds.valid) throw new Error(bounds.reason);
|
|
6559
|
+
return { origin: input.origin, sessionid: input.sessionid, limit: input.limit, window: input.window, used: 0, windowstartedat: input.now, resetsat: input.now + input.window };
|
|
6560
|
+
}
|
|
6561
|
+
function bucketconsume(input) {
|
|
6562
|
+
if (input.now >= input.bucket.resetsat) {
|
|
6563
|
+
const fresh = { ...input.bucket, used: 0, windowstartedat: input.now, resetsat: input.now + input.bucket.window };
|
|
6564
|
+
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}.` };
|
|
6565
|
+
}
|
|
6566
|
+
if (input.bucket.used < input.bucket.limit) {
|
|
6567
|
+
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}.` };
|
|
6568
|
+
}
|
|
6569
|
+
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}.` };
|
|
6570
|
+
}
|
|
6571
|
+
function deferredeventof(input) {
|
|
6572
|
+
if (input.stepid.trim() === "" || input.kind.trim() === "") throw new Error("The deferred event needs its step and kind.");
|
|
6573
|
+
return { id: input.id ?? randomid(), stepid: input.stepid, kind: input.kind, origin: input.origin, reason: input.reason, resetsat: input.resetsat, at: input.now };
|
|
6574
|
+
}
|
|
6575
|
+
function deferredready(deferred, now) {
|
|
6576
|
+
return now >= deferred.resetsat;
|
|
6577
|
+
}
|
|
6578
|
+
|
|
6042
6579
|
// originpolicy.ts
|
|
6043
6580
|
var denydefaultposture = "denydefault";
|
|
6044
6581
|
function exactorigin(origin, entry) {
|
|
@@ -6076,7 +6613,7 @@ function profilegrade(input) {
|
|
|
6076
6613
|
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.` };
|
|
6077
6614
|
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.` };
|
|
6078
6615
|
}
|
|
6079
|
-
function
|
|
6616
|
+
function stepoptions2(step) {
|
|
6080
6617
|
if (!step.options) return {};
|
|
6081
6618
|
try {
|
|
6082
6619
|
const parsed = JSON.parse(step.options);
|
|
@@ -6091,7 +6628,7 @@ var deletekinds = /* @__PURE__ */ new Set(["discardtab", "closepattern", "clearc
|
|
|
6091
6628
|
var publishkinds = /* @__PURE__ */ new Set(["postform", "postfiles", "sendmessage", "submitform", "submitsearch", "writeclipboard"]);
|
|
6092
6629
|
var defaultsensitivekinds = /* @__PURE__ */ new Set(["attachfile", "uploadfile", "uploadfiles", "downloadfile", "downloadimages", "batchdownload", "pausedownload", "resumedownload", "quarantinedownload", "evaluate"]);
|
|
6093
6630
|
function sensitiveclassesof(step) {
|
|
6094
|
-
const options =
|
|
6631
|
+
const options = stepoptions2(step);
|
|
6095
6632
|
const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
|
|
6096
6633
|
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());
|
|
6097
6634
|
const carries = (shape) => names.some((name) => name.includes(shape));
|
|
@@ -6176,6 +6713,18 @@ function profilesummary(profile) {
|
|
|
6176
6713
|
if (profile === void 0) return "No origin profile exists for this origin yet; sensitive steps route through their fresh consent prompts.";
|
|
6177
6714
|
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.`;
|
|
6178
6715
|
}
|
|
6716
|
+
var safedefaultreadkinds = /* @__PURE__ */ new Set(["observe", "readhtml", "readtext", "readlinks", "readtable", "readforms", "readvisible", "readselection", "readmeta", "readlang", "readoutline", "readstyle", "readimages", "readertree"]);
|
|
6717
|
+
function safedefaultprofile(input) {
|
|
6718
|
+
if (input.origin.trim() === "") throw new Error("The safedefaults profile needs its exact origin.");
|
|
6719
|
+
const denials = /* @__PURE__ */ new Set([...paymentkinds, ...credentialkinds, ...deletekinds, ...publishkinds, ...defaultsensitivekinds]);
|
|
6720
|
+
return { profileid: input.profileid ?? randomid(), origin: input.origin.trim(), grants: [...safedefaultreadkinds], denials: [...denials], createdat: input.now, updatedat: input.now };
|
|
6721
|
+
}
|
|
6722
|
+
function safedefaultreadkind(kind) {
|
|
6723
|
+
return safedefaultreadkinds.has(kind);
|
|
6724
|
+
}
|
|
6725
|
+
function safedefaultnotice(origin) {
|
|
6726
|
+
return `The safedefaults posture profiles ${origin} on its first visit: reads only, every sensitive class denied; open the originprofile editor to widen the profile.`;
|
|
6727
|
+
}
|
|
6179
6728
|
|
|
6180
6729
|
// socketbus.ts
|
|
6181
6730
|
var socketkinds = ["opensocket", "sendmessage", "waitmessage", "subscribesse", "longpoll"];
|
|
@@ -7474,6 +8023,87 @@ function consolediff(input) {
|
|
|
7474
8023
|
return { base: input.baseid, target: input.targetid, lines, added: added.length, removed: removed.length, repeated: repeated.length, at: input.now };
|
|
7475
8024
|
}
|
|
7476
8025
|
|
|
8026
|
+
// phishguard.ts
|
|
8027
|
+
function stepoptions3(step) {
|
|
8028
|
+
if (!step.options) return {};
|
|
8029
|
+
try {
|
|
8030
|
+
const parsed = JSON.parse(step.options);
|
|
8031
|
+
return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
8032
|
+
} catch {
|
|
8033
|
+
return {};
|
|
8034
|
+
}
|
|
8035
|
+
}
|
|
8036
|
+
function credentialstep(step) {
|
|
8037
|
+
const credentialkinds2 = /* @__PURE__ */ new Set(["consentpassword", "saveapikey", "handleauth", "authflow", "fillcard", "fillcode"]);
|
|
8038
|
+
if (credentialkinds2.has(step.kind)) return true;
|
|
8039
|
+
const options = stepoptions3(step);
|
|
8040
|
+
const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
|
|
8041
|
+
const names = [...fields.map((field) => typeof field.name === "string" ? field.name : ""), typeof options.field === "string" ? options.field : "", step.target ?? ""].map((name) => name.toLowerCase());
|
|
8042
|
+
return names.some((name) => name.includes("password") || name.includes("passwd") || name.includes("passphrase") || name.includes("token") || name.includes("secret") || name.includes("apikey"));
|
|
8043
|
+
}
|
|
8044
|
+
function originlabels(origin) {
|
|
8045
|
+
const host = origin.trim().replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").split("/")[0] ?? "";
|
|
8046
|
+
return host.split(".").filter((label) => label !== "").reverse();
|
|
8047
|
+
}
|
|
8048
|
+
function labeldistance(one, two) {
|
|
8049
|
+
const rows = one.length + 1;
|
|
8050
|
+
const columns = two.length + 1;
|
|
8051
|
+
let previous = Array.from({ length: columns }, (_, index) => index);
|
|
8052
|
+
for (let row = 1; row < rows; row += 1) {
|
|
8053
|
+
const current = [row, ...Array.from({ length: columns - 1 }, () => 0)];
|
|
8054
|
+
for (let column = 1; column < columns; column += 1) {
|
|
8055
|
+
const substitution = (previous[column - 1] ?? 0) + (one[row - 1] === two[column - 1] ? 0 : 1);
|
|
8056
|
+
current[column] = Math.min((previous[column] ?? 0) + 1, (current[column - 1] ?? 0) + 1, substitution);
|
|
8057
|
+
}
|
|
8058
|
+
previous = current;
|
|
8059
|
+
}
|
|
8060
|
+
return previous[columns - 1] ?? Math.max(one.length, two.length);
|
|
8061
|
+
}
|
|
8062
|
+
function lookalikedistance(one, two) {
|
|
8063
|
+
if (one.trim() === "" || two.trim() === "") return 1;
|
|
8064
|
+
if (one === two) return 0;
|
|
8065
|
+
const first = originlabels(one);
|
|
8066
|
+
const second = originlabels(two);
|
|
8067
|
+
const edits = labeldistance(first, second);
|
|
8068
|
+
const longest = Math.max(first.length, second.length);
|
|
8069
|
+
if (longest === 0) return 1;
|
|
8070
|
+
const distance = edits / longest;
|
|
8071
|
+
return Math.min(1, Math.max(0, distance));
|
|
8072
|
+
}
|
|
8073
|
+
function phishthresholdvalid(threshold) {
|
|
8074
|
+
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." };
|
|
8075
|
+
return { valid: true, reason: `The lookalike threshold ${threshold} stays the user configured line a login origin crosses at its own risk.` };
|
|
8076
|
+
}
|
|
8077
|
+
function phishverdictof(input) {
|
|
8078
|
+
const threshold = phishthresholdvalid(input.threshold);
|
|
8079
|
+
if (!threshold.valid) throw new Error(threshold.reason);
|
|
8080
|
+
if (input.granted.includes(input.origin)) {
|
|
8081
|
+
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 };
|
|
8082
|
+
}
|
|
8083
|
+
let matchedorigin;
|
|
8084
|
+
let distance = 1;
|
|
8085
|
+
for (const granted of input.granted) {
|
|
8086
|
+
const candidate = lookalikedistance(input.origin, granted);
|
|
8087
|
+
if (candidate < distance) {
|
|
8088
|
+
distance = candidate;
|
|
8089
|
+
matchedorigin = granted;
|
|
8090
|
+
}
|
|
8091
|
+
}
|
|
8092
|
+
if (matchedorigin !== void 0 && distance <= input.threshold) {
|
|
8093
|
+
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 };
|
|
8094
|
+
}
|
|
8095
|
+
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 };
|
|
8096
|
+
}
|
|
8097
|
+
function verdictfresh(verdict, now, freshness) {
|
|
8098
|
+
if (freshness === void 0) return true;
|
|
8099
|
+
return now - verdict.at < freshness;
|
|
8100
|
+
}
|
|
8101
|
+
function phishnotetext(verdict) {
|
|
8102
|
+
if (verdict.blocked) return verdict.reason;
|
|
8103
|
+
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}.`;
|
|
8104
|
+
return `The login origin ${verdict.origin} has no granted lookalike under the user threshold ${verdict.threshold}.`;
|
|
8105
|
+
}
|
|
8106
|
+
|
|
7477
8107
|
// policy.ts
|
|
7478
8108
|
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"]);
|
|
7479
8109
|
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"]);
|
|
@@ -10599,6 +11229,127 @@ function sensitivepipelingate(input) {
|
|
|
10599
11229
|
if (!consentverdict.allowed) return { allowed: false, reason: `${classification.reason} ${consentverdict.reason}` };
|
|
10600
11230
|
return { allowed: true, reason: `${classification.reason} ${consentverdict.reason}` };
|
|
10601
11231
|
}
|
|
11232
|
+
function schemaguardgate(input) {
|
|
11233
|
+
if (input.errors.length === 0) return { allowed: true, reason: "The inbound command matches its declared schemastrict grammar field by field." };
|
|
11234
|
+
const first = input.errors[0];
|
|
11235
|
+
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}.` : ""}` };
|
|
11236
|
+
}
|
|
11237
|
+
function origincheckgate(input) {
|
|
11238
|
+
if (!input.verdict.accepted) return { allowed: false, reason: input.verdict.reason };
|
|
11239
|
+
return { allowed: true, reason: input.verdict.reason };
|
|
11240
|
+
}
|
|
11241
|
+
function connectallowgate(input) {
|
|
11242
|
+
const verdict = origincheckof(input);
|
|
11243
|
+
if (!verdict.accepted) return { allowed: false, reason: verdict.reason };
|
|
11244
|
+
return { allowed: true, reason: verdict.reason };
|
|
11245
|
+
}
|
|
11246
|
+
function ratelimitboundsvalid(limit, window) {
|
|
11247
|
+
const bounds = bucketboundsvalid(limit, window);
|
|
11248
|
+
if (!bounds.valid) return { allowed: false, reason: bounds.reason };
|
|
11249
|
+
return { allowed: true, reason: bounds.reason };
|
|
11250
|
+
}
|
|
11251
|
+
function ratelimitgate(input) {
|
|
11252
|
+
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." };
|
|
11253
|
+
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.` };
|
|
11254
|
+
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}.` };
|
|
11255
|
+
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}.` };
|
|
11256
|
+
}
|
|
11257
|
+
function confirmpaygate(input) {
|
|
11258
|
+
const kind = gatekindfor(input.classes);
|
|
11259
|
+
if (kind !== "confirmpay") return { allowed: true, reason: "The step carries no payment class and needs no confirmpay gate." };
|
|
11260
|
+
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." };
|
|
11261
|
+
if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmpay gate of the payment step; the payment never dispatches." };
|
|
11262
|
+
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." };
|
|
11263
|
+
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." };
|
|
11264
|
+
}
|
|
11265
|
+
function confirmdeletegate(input) {
|
|
11266
|
+
const kind = gatekindfor(input.classes);
|
|
11267
|
+
if (kind !== "confirmdelete") return { allowed: true, reason: "The step carries no delete class and needs no confirmdelete gate." };
|
|
11268
|
+
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." };
|
|
11269
|
+
if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmdelete gate of the destructive step; the deletion never dispatches." };
|
|
11270
|
+
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." };
|
|
11271
|
+
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." };
|
|
11272
|
+
}
|
|
11273
|
+
function confirmcredsgate(input) {
|
|
11274
|
+
const kind = gatekindfor(input.classes);
|
|
11275
|
+
if (kind !== "confirmcreds") return { allowed: true, reason: "The step carries no credential class and needs no confirmcreds gate." };
|
|
11276
|
+
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." };
|
|
11277
|
+
if (input.state === "refused") return { allowed: false, reason: "The human refused the confirmcreds gate of the credential step; the credential never dispatches." };
|
|
11278
|
+
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." };
|
|
11279
|
+
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." };
|
|
11280
|
+
}
|
|
11281
|
+
function gatebatchgate(input) {
|
|
11282
|
+
if (input.gateids.length === 0) return { allowed: false, reason: "A gate resolution names its single gate." };
|
|
11283
|
+
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.` };
|
|
11284
|
+
return { allowed: true, reason: "The resolution names exactly one gate; the distinct human action resolves it alone." };
|
|
11285
|
+
}
|
|
11286
|
+
function phishthresholdgate(threshold) {
|
|
11287
|
+
const verdict = phishthresholdvalid(threshold);
|
|
11288
|
+
if (!verdict.valid) return { allowed: false, reason: verdict.reason };
|
|
11289
|
+
return { allowed: true, reason: verdict.reason };
|
|
11290
|
+
}
|
|
11291
|
+
function phishguardgate(input) {
|
|
11292
|
+
if (input.verdict.blocked) return { allowed: false, reason: input.verdict.reason };
|
|
11293
|
+
return { allowed: true, reason: input.verdict.reason };
|
|
11294
|
+
}
|
|
11295
|
+
function safedefaultsgate(input) {
|
|
11296
|
+
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.` };
|
|
11297
|
+
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." };
|
|
11298
|
+
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.` };
|
|
11299
|
+
}
|
|
11300
|
+
function vaultsecretgate(input) {
|
|
11301
|
+
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.` };
|
|
11302
|
+
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." };
|
|
11303
|
+
return { allowed: true, reason: "The step and the plan carry no secret outside the vault; the values stay behind the seam." };
|
|
11304
|
+
}
|
|
11305
|
+
function untrustedrendergate(input) {
|
|
11306
|
+
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." };
|
|
11307
|
+
return { allowed: false, reason: `The extracted markup grades untrusted and refuses to render inside the ${input.environment}; every untrusted render routes through the sandboxframe.` };
|
|
11308
|
+
}
|
|
11309
|
+
function sitenotesreadgate(input) {
|
|
11310
|
+
if (input.grants.includes(input.origin)) return { allowed: true, reason: `The session granted ${input.origin}, so the site notes of the origin read.` };
|
|
11311
|
+
return { allowed: false, reason: `The session never granted ${input.origin}; the site notes of the origin refuse the read.` };
|
|
11312
|
+
}
|
|
11313
|
+
function sitenoteswritegate(input) {
|
|
11314
|
+
if (!input.consent) return { allowed: false, reason: `The site note write for ${input.origin} needs the explicit consent of the user; no note lands without a reviewed write.` };
|
|
11315
|
+
return { allowed: true, reason: `The user consented to the site note write for ${input.origin}; the note keeps its author provenance and its timestamps.` };
|
|
11316
|
+
}
|
|
11317
|
+
function scratchpadscopegate(input) {
|
|
11318
|
+
if (input.taskid !== input.entrytaskid || input.sessionid !== input.entrysessionid) return { allowed: false, reason: `The scratchpad entry belongs to the task ${input.entrytaskid} of the session ${input.entrysessionid}; the task ${input.taskid} of the session ${input.sessionid} never crosses that boundary.` };
|
|
11319
|
+
return { allowed: true, reason: `The scratchpad entry belongs to the task ${input.taskid} of the session ${input.sessionid} that asks for it.` };
|
|
11320
|
+
}
|
|
11321
|
+
function memoryreadscopegate(input) {
|
|
11322
|
+
if (input.phase === "planning" || input.phase === "prompting") return { allowed: true, reason: `The ${input.phase} phase reads the correction and consent memory so the proposal and the prompt carry the prior decisions.` };
|
|
11323
|
+
return { allowed: false, reason: `The ${input.phase} phase reads no correction or consent memory; the history serves the planning and the prompting alone.` };
|
|
11324
|
+
}
|
|
11325
|
+
function semanticrecallscopegate(input) {
|
|
11326
|
+
if (input.origin === void 0) return { allowed: true, reason: `The recall query names no origin, so it ranks the ${input.scope.length} origin${input.scope.length === 1 ? "" : "s"} of the run scope only.` };
|
|
11327
|
+
if (!input.scope.includes(input.origin)) return { allowed: false, reason: `The recall query asks for ${input.origin} while the run scope holds ${input.scope.length > 0 ? input.scope.join(", ") : "no origin"}; a recall across origins outside the run scope refuses.` };
|
|
11328
|
+
return { allowed: true, reason: `The recall query asks for ${input.origin} inside the run scope; the ranking stays scoped.` };
|
|
11329
|
+
}
|
|
11330
|
+
function summarywindowvalid(window) {
|
|
11331
|
+
if (window === void 0) return { allowed: true, reason: "No runsummary window is configured, so the distillation keeps every step with no fixed cap." };
|
|
11332
|
+
if (!Number.isInteger(window) || window < 0) return { allowed: false, reason: "The runsummary window stays a whole number of steps the user chose; no engine cap exists." };
|
|
11333
|
+
return { allowed: true, reason: `The runsummary window of ${window} step${window === 1 ? "" : "s"} stays the user configured choice; no engine cap exists.` };
|
|
11334
|
+
}
|
|
11335
|
+
function sessionretentionvalid(window) {
|
|
11336
|
+
if (window === void 0) return { allowed: true, reason: "No retention window is configured, so the session store keeps every record forever." };
|
|
11337
|
+
if (!Number.isFinite(window) || window <= 0) return { allowed: false, reason: "The retention window stays a positive user value in milliseconds; no engine boundary expires a record." };
|
|
11338
|
+
return { allowed: true, reason: `The retention window of ${window} milliseconds stays the user configured choice.` };
|
|
11339
|
+
}
|
|
11340
|
+
function consentmemoryadvisorygate(input) {
|
|
11341
|
+
if (input.auto) return { allowed: false, reason: `The consent memory never auto grants: the prior decisions of ${input.latest?.origin ?? "the origin"} stay advisory and every grant needs its own prompt.` };
|
|
11342
|
+
if (input.latest !== void 0 && input.latest.decision === "deny") return { allowed: true, reason: `The consent memory holds a prior denial for ${input.latest.origin} with the same weight as a grant; the prompt shows the refusal and the user decides again.` };
|
|
11343
|
+
return { allowed: true, reason: "The consent memory stays advisory; the prompt opens with the prior decisions and the user decides." };
|
|
11344
|
+
}
|
|
11345
|
+
function cancelrungate(input) {
|
|
11346
|
+
if (input.rollbackscope === "none") return { allowed: true, reason: `The cancelrun stops the run with no rollback; the ${input.queuedstepids.length} queued step${input.queuedstepids.length === 1 ? "" : "s"} stay as the run left them and the ${input.executedstepids.length} executed step${input.executedstepids.length === 1 ? "" : "s"} stay in the sealed log.` };
|
|
11347
|
+
return { allowed: true, reason: `The cancelrun rolls the ${input.queuedstepids.length} queued step${input.queuedstepids.length === 1 ? "" : "s"} back${input.queuedstepids.length > 0 ? ` (${input.queuedstepids.join(", ")})` : ""} while the ${input.executedstepids.length} executed step${input.executedstepids.length === 1 ? "" : "s"} stay untouched in the sealed log.` };
|
|
11348
|
+
}
|
|
11349
|
+
function retrydispatchgate(input) {
|
|
11350
|
+
if (!input.reviewed) return { allowed: false, reason: `The retry of the step ${input.stepid} passes only through a new reviewed dispatch; an automatic retry never bypasses the review.` };
|
|
11351
|
+
return { allowed: true, reason: `The retry of the step ${input.stepid} dispatches again through the full consent gate chain: the session, the plan and the origin gates all recheck the step.` };
|
|
11352
|
+
}
|
|
10602
11353
|
|
|
10603
11354
|
// llm.ts
|
|
10604
11355
|
var defaultrefusalmarkers = ["i cannot", "i can't", "i'm unable", "refusal:", "cannot comply"];
|
|
@@ -10959,7 +11710,7 @@ function budgetcheck(input) {
|
|
|
10959
11710
|
}
|
|
10960
11711
|
|
|
10961
11712
|
// version.ts
|
|
10962
|
-
var packageversion = "1.1.
|
|
11713
|
+
var packageversion = "1.1.63";
|
|
10963
11714
|
|
|
10964
11715
|
// types.ts
|
|
10965
11716
|
var protocolversion = packageversion;
|
|
@@ -11883,6 +12634,67 @@ function removetemplate(templates, name) {
|
|
|
11883
12634
|
return templates.filter((template) => template.name !== name);
|
|
11884
12635
|
}
|
|
11885
12636
|
|
|
12637
|
+
// redactshots.ts
|
|
12638
|
+
function regionof(input) {
|
|
12639
|
+
if (input.origin.trim() === "" || input.template.trim() === "") throw new Error("The redact region needs its origin and its page template.");
|
|
12640
|
+
for (const value of [input.x, input.y, input.width, input.height]) {
|
|
12641
|
+
if (!Number.isFinite(value) || value < 0) throw new Error("The redact region needs finite, non-negative geometry in css pixels.");
|
|
12642
|
+
}
|
|
12643
|
+
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.");
|
|
12644
|
+
if (input.reason.trim() === "") throw new Error("The redact region names its reason in plain language.");
|
|
12645
|
+
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 };
|
|
12646
|
+
}
|
|
12647
|
+
function regionvalid(region) {
|
|
12648
|
+
return Number.isFinite(region.x) && Number.isFinite(region.y) && Number.isFinite(region.width) && Number.isFinite(region.height) && region.width > 0 && region.height > 0;
|
|
12649
|
+
}
|
|
12650
|
+
function regionsfor(regions, origin, template) {
|
|
12651
|
+
return regions.filter((region) => region.origin === origin && region.template === template);
|
|
12652
|
+
}
|
|
12653
|
+
function fieldshaperegions(input) {
|
|
12654
|
+
const regions = [];
|
|
12655
|
+
for (const field of input.fields) {
|
|
12656
|
+
if (!maskingfield(field.name, [])) continue;
|
|
12657
|
+
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 }));
|
|
12658
|
+
}
|
|
12659
|
+
return regions;
|
|
12660
|
+
}
|
|
12661
|
+
function mergeregions(existing, added) {
|
|
12662
|
+
const merged = [...existing];
|
|
12663
|
+
for (const region of added) {
|
|
12664
|
+
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;
|
|
12665
|
+
merged.push(region);
|
|
12666
|
+
}
|
|
12667
|
+
return merged;
|
|
12668
|
+
}
|
|
12669
|
+
function capturesurfaceof(kind) {
|
|
12670
|
+
if (kind === "element" || kind === "elementshot") return "element";
|
|
12671
|
+
if (kind === "stitched" || kind === "fullpage" || kind === "shotfullpage" || kind === "stitch" || kind === "contactsheet" || kind === "timelapse" || kind === "recordscreen") return "stitched";
|
|
12672
|
+
return "viewport";
|
|
12673
|
+
}
|
|
12674
|
+
function templateof(step) {
|
|
12675
|
+
if (step.options) {
|
|
12676
|
+
try {
|
|
12677
|
+
const parsed = JSON.parse(step.options);
|
|
12678
|
+
if (Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
12679
|
+
const template = parsed.template;
|
|
12680
|
+
if (typeof template === "string" && template.trim() !== "") return template.trim();
|
|
12681
|
+
}
|
|
12682
|
+
} catch {
|
|
12683
|
+
}
|
|
12684
|
+
}
|
|
12685
|
+
return step.kind;
|
|
12686
|
+
}
|
|
12687
|
+
function redactedshot(record2, regions) {
|
|
12688
|
+
if (regions.length === 0) return record2;
|
|
12689
|
+
return { ...record2, redacted: true, redactedregions: regions.length };
|
|
12690
|
+
}
|
|
12691
|
+
function redactionsummary(regions) {
|
|
12692
|
+
if (regions.length === 0) return "No redact region covered the capture; the stored bytes carry everything the surface saw.";
|
|
12693
|
+
const sources = { fieldshape: 0, userdrawn: 0 };
|
|
12694
|
+
for (const region of regions) sources[region.source] += 1;
|
|
12695
|
+
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("; ")}).`;
|
|
12696
|
+
}
|
|
12697
|
+
|
|
11886
12698
|
// sandboxframe.ts
|
|
11887
12699
|
function stripscripts(markup) {
|
|
11888
12700
|
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();
|
|
@@ -11921,6 +12733,329 @@ function renderprovenance(render) {
|
|
|
11921
12733
|
return { origin: render.sourceorigin, stepid: render.stepid, environment: "sandboxframe" };
|
|
11922
12734
|
}
|
|
11923
12735
|
|
|
12736
|
+
// secretvault.ts
|
|
12737
|
+
var vaultdigestprefix = "sha256:";
|
|
12738
|
+
async function vaultdigestof(value) {
|
|
12739
|
+
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value));
|
|
12740
|
+
return vaultdigestprefix + [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
12741
|
+
}
|
|
12742
|
+
function vaultentryof(input) {
|
|
12743
|
+
if (input.label.trim() === "") throw new Error("The vault record needs its label; the surfaces show the label only.");
|
|
12744
|
+
if (input.scope.trim() === "") throw new Error("The vault record needs its exact origin scope; a secret never rides every origin.");
|
|
12745
|
+
if (!input.digest.startsWith(vaultdigestprefix)) throw new Error("The vault record carries its sha-256 digest, never its value.");
|
|
12746
|
+
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 };
|
|
12747
|
+
}
|
|
12748
|
+
function inmemoryvault() {
|
|
12749
|
+
const values = /* @__PURE__ */ new Map();
|
|
12750
|
+
return {
|
|
12751
|
+
put: async (vaultid, value) => {
|
|
12752
|
+
values.set(vaultid, value);
|
|
12753
|
+
},
|
|
12754
|
+
fetch: async (vaultid) => values.get(vaultid),
|
|
12755
|
+
drop: async (vaultid) => {
|
|
12756
|
+
values.delete(vaultid);
|
|
12757
|
+
}
|
|
12758
|
+
};
|
|
12759
|
+
}
|
|
12760
|
+
async function vaultstore(input) {
|
|
12761
|
+
if (input.value === "") throw new Error("The vault stores a secret value the user supplied; an empty value stores nothing.");
|
|
12762
|
+
const entry = vaultentryof({ label: input.label, scope: input.scope, profileid: input.profileid, provenance: input.provenance, digest: await vaultdigestof(input.value), now: input.now });
|
|
12763
|
+
await input.seam.put(entry.vaultid, input.value);
|
|
12764
|
+
return entry;
|
|
12765
|
+
}
|
|
12766
|
+
async function vaultvaluefor(input) {
|
|
12767
|
+
const value = await input.seam.fetch(input.entry.vaultid);
|
|
12768
|
+
if (value === void 0) return { ok: false, reason: `The vault holds no value behind the label ${input.entry.label}; add the secret again.` };
|
|
12769
|
+
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.` };
|
|
12770
|
+
}
|
|
12771
|
+
async function vaultdelete(input) {
|
|
12772
|
+
await input.seam.drop(input.entry.vaultid);
|
|
12773
|
+
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.` };
|
|
12774
|
+
}
|
|
12775
|
+
function vaultcovers(entry, origin) {
|
|
12776
|
+
return entry.scope === origin;
|
|
12777
|
+
}
|
|
12778
|
+
async function secretleakscan(input) {
|
|
12779
|
+
const leaks = [];
|
|
12780
|
+
for (const candidate of input.candidates) {
|
|
12781
|
+
if (candidate.trim() === "") continue;
|
|
12782
|
+
const digest = await vaultdigestof(candidate);
|
|
12783
|
+
if (input.entries.some((entry) => entry.digest === digest)) leaks.push(candidate);
|
|
12784
|
+
}
|
|
12785
|
+
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.` };
|
|
12786
|
+
return { leaks: [], reason: "No candidate value digests to a vault record; the plan carries no leaked secret." };
|
|
12787
|
+
}
|
|
12788
|
+
function stepoptions4(step) {
|
|
12789
|
+
if (!step.options) return {};
|
|
12790
|
+
try {
|
|
12791
|
+
const parsed = JSON.parse(step.options);
|
|
12792
|
+
return Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
12793
|
+
} catch {
|
|
12794
|
+
return {};
|
|
12795
|
+
}
|
|
12796
|
+
}
|
|
12797
|
+
function secretshapecarrying(step) {
|
|
12798
|
+
const options = stepoptions4(step);
|
|
12799
|
+
const fields = Array.isArray(options.fields) ? options.fields.filter((item) => Boolean(item) && typeof item === "object") : [];
|
|
12800
|
+
const rawfield = fields.find((field) => typeof field.name === "string" && typeof field.value === "string" && field.value !== "" && maskingfield(field.name, []));
|
|
12801
|
+
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.` };
|
|
12802
|
+
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.` };
|
|
12803
|
+
return { carries: false, reason: "The step carries no raw value behind a masked field shape." };
|
|
12804
|
+
}
|
|
12805
|
+
function vaultview(entries) {
|
|
12806
|
+
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 } : {} }));
|
|
12807
|
+
}
|
|
12808
|
+
function vaultprompttext(entry, origin) {
|
|
12809
|
+
return `Use the credential ${entry.label} of ${entry.scope} on ${origin}? The value stays behind the vault and no surface ever displays it.`;
|
|
12810
|
+
}
|
|
12811
|
+
|
|
12812
|
+
// sessioninterface.ts
|
|
12813
|
+
function textfingerprint(text2) {
|
|
12814
|
+
let hash = 2166136261;
|
|
12815
|
+
for (let index = 0; index < text2.length; index += 1) {
|
|
12816
|
+
hash ^= text2.charCodeAt(index);
|
|
12817
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
12818
|
+
}
|
|
12819
|
+
return hash.toString(16).padStart(8, "0");
|
|
12820
|
+
}
|
|
12821
|
+
function keystreambyte(id, position) {
|
|
12822
|
+
let hash = 2166136261;
|
|
12823
|
+
const source = `${id}:${position}`;
|
|
12824
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
12825
|
+
hash ^= source.charCodeAt(index);
|
|
12826
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
12827
|
+
}
|
|
12828
|
+
return hash & 255;
|
|
12829
|
+
}
|
|
12830
|
+
function sealnotebody(id, body) {
|
|
12831
|
+
const sealed = Array.from(body, (character, index) => String.fromCharCode(character.charCodeAt(0) ^ keystreambyte(id, index))).join("");
|
|
12832
|
+
return `sealed:${btoa(sealed)}`;
|
|
12833
|
+
}
|
|
12834
|
+
function opennotebody(id, sealedbody) {
|
|
12835
|
+
if (!sealedbody.startsWith("sealed:")) return "";
|
|
12836
|
+
try {
|
|
12837
|
+
const sealed = atob(sealedbody.slice("sealed:".length));
|
|
12838
|
+
return Array.from(sealed, (character, index) => String.fromCharCode(character.charCodeAt(0) ^ keystreambyte(id, index))).join("");
|
|
12839
|
+
} catch {
|
|
12840
|
+
return "";
|
|
12841
|
+
}
|
|
12842
|
+
}
|
|
12843
|
+
function sitenoteof(input) {
|
|
12844
|
+
if (input.origin.trim() === "") throw new Error("The site note needs its origin.");
|
|
12845
|
+
if (input.title.trim() === "") throw new Error("The site note needs its title.");
|
|
12846
|
+
if (input.body.trim() === "") throw new Error("The site note needs its body.");
|
|
12847
|
+
const id = input.id ?? randomid();
|
|
12848
|
+
if (input.sensitive === true) return { id, origin: input.origin, title: input.title.trim(), sealedbody: sealnotebody(id, input.body), author: input.author, sensitive: true, createdat: input.now, updatedat: input.now };
|
|
12849
|
+
return { id, origin: input.origin, title: input.title.trim(), body: input.body, author: input.author, sensitive: false, createdat: input.now, updatedat: input.now };
|
|
12850
|
+
}
|
|
12851
|
+
function notebodyof(note) {
|
|
12852
|
+
if (note.sensitive) return note.sealedbody !== void 0 ? opennotebody(note.id, note.sealedbody) : "";
|
|
12853
|
+
return note.body ?? "";
|
|
12854
|
+
}
|
|
12855
|
+
function editnote(note, input) {
|
|
12856
|
+
if (input.title.trim() === "") throw new Error("The site note keeps a non empty title.");
|
|
12857
|
+
if (input.body.trim() === "") throw new Error("The site note keeps a non empty body.");
|
|
12858
|
+
if (note.sensitive) return { ...note, title: input.title.trim(), sealedbody: sealnotebody(note.id, input.body), updatedat: input.now, author: input.author };
|
|
12859
|
+
return { ...note, title: input.title.trim(), body: input.body, updatedat: input.now, author: input.author };
|
|
12860
|
+
}
|
|
12861
|
+
function expirnotes(notes, retention, now) {
|
|
12862
|
+
if (retention === void 0) return notes;
|
|
12863
|
+
return notes.filter((note) => now - note.updatedat < retention);
|
|
12864
|
+
}
|
|
12865
|
+
function scratchentryof(input) {
|
|
12866
|
+
if (input.taskid.trim() === "") throw new Error("The scratchpad entry needs its task.");
|
|
12867
|
+
if (input.text.trim() === "") throw new Error("The scratchpad entry needs its text.");
|
|
12868
|
+
return { id: input.id ?? randomid(), taskid: input.taskid, sessionid: input.sessionid, text: input.text, ...input.stepid !== void 0 && input.stepid.trim() !== "" ? { stepid: input.stepid } : {}, author: input.author, at: input.now };
|
|
12869
|
+
}
|
|
12870
|
+
function scratchpadof(entries, taskid, sessionid) {
|
|
12871
|
+
return entries.filter((entry) => entry.taskid === taskid && entry.sessionid === sessionid);
|
|
12872
|
+
}
|
|
12873
|
+
function prunescratchpad(entries, window, now) {
|
|
12874
|
+
if (window === void 0) return entries;
|
|
12875
|
+
return entries.filter((entry) => now - entry.at < window);
|
|
12876
|
+
}
|
|
12877
|
+
function distillrunsummary(input) {
|
|
12878
|
+
const steps = input.outcomes.map((outcome) => {
|
|
12879
|
+
const step = input.plan.steps.find((candidate) => candidate.id === outcome.stepid);
|
|
12880
|
+
return { stepid: outcome.stepid, kind: step?.kind ?? "unknown", ok: outcome.ok, summary: outcome.summary };
|
|
12881
|
+
});
|
|
12882
|
+
const windowed = input.window !== void 0 && Number.isInteger(input.window) && input.window >= 0 ? steps.slice(Math.max(0, steps.length - input.window)) : steps;
|
|
12883
|
+
const kinds = [...new Set(windowed.map((step) => step.kind))];
|
|
12884
|
+
return { runid: input.plan.id, sessionid: input.sessionid, origins: [...new Set(input.origins)], kinds, steps: windowed, ...input.window !== void 0 && Number.isInteger(input.window) && input.window >= 0 ? { window: input.window } : {}, task: "runsummary", provenance: input.provenance, distilledat: input.now };
|
|
12885
|
+
}
|
|
12886
|
+
function summaryhistoryentry(summary) {
|
|
12887
|
+
return { source: "summary", id: summary.runid, title: `Run summary of ${summary.runid}`, text: `${summary.origins.join(" ")} ${summary.kinds.join(" ")} ${summary.steps.map((step) => step.summary).join(" ")}`, outcome: summary.steps.every((step) => step.ok) ? "completed" : "failed", at: summary.distilledat };
|
|
12888
|
+
}
|
|
12889
|
+
function notehistoryentry(note) {
|
|
12890
|
+
return { source: "note", id: note.id, ...note.origin !== "" ? { origin: note.origin } : {}, title: note.title, text: note.sensitive ? note.title : `${note.title} ${note.body ?? ""}`, at: note.updatedat };
|
|
12891
|
+
}
|
|
12892
|
+
function recallentryof(input) {
|
|
12893
|
+
if (input.text.trim() === "") throw new Error("The recall index entry needs its text.");
|
|
12894
|
+
if (input.stepid.trim() === "" || input.runid.trim() === "") throw new Error("The recall index entry needs its run and step provenance.");
|
|
12895
|
+
const normalized = input.text.trim().replace(/\s+/g, " ");
|
|
12896
|
+
return { fingerprint: textfingerprint(normalized), origin: input.origin, runid: input.runid, stepid: input.stepid, text: normalized, at: input.at };
|
|
12897
|
+
}
|
|
12898
|
+
function addrecallentry(index, entry) {
|
|
12899
|
+
if (index.some((candidate) => candidate.fingerprint === entry.fingerprint && candidate.origin === entry.origin)) return index;
|
|
12900
|
+
return [...index, entry];
|
|
12901
|
+
}
|
|
12902
|
+
function termsof(text2) {
|
|
12903
|
+
return new Set(text2.toLowerCase().split(/[^a-z0-9]+/).filter((term) => term.length > 1));
|
|
12904
|
+
}
|
|
12905
|
+
function rankrecall(index, query, scope) {
|
|
12906
|
+
if (query.text.trim() === "") return [];
|
|
12907
|
+
const terms = termsof(query.text);
|
|
12908
|
+
const scoped = query.origin !== void 0 && query.origin.trim() !== "" ? [query.origin] : scope.origins;
|
|
12909
|
+
const matches = [];
|
|
12910
|
+
for (const entry of index) {
|
|
12911
|
+
if (!scoped.includes(entry.origin)) continue;
|
|
12912
|
+
const entryterms = termsof(entry.text);
|
|
12913
|
+
let shared = 0;
|
|
12914
|
+
for (const term of terms) if (entryterms.has(term)) shared += 1;
|
|
12915
|
+
const union = (/* @__PURE__ */ new Set([...terms, ...entryterms])).size;
|
|
12916
|
+
const score = union === 0 ? 0 : shared / union;
|
|
12917
|
+
if (score <= 0) continue;
|
|
12918
|
+
matches.push({ entry, score, reason: `The extraction of ${entry.origin} shares ${shared} term${shared === 1 ? "" : "s"} with the query at the score ${score.toFixed(3)}; the match carries the run ${entry.runid} and the step ${entry.stepid}.` });
|
|
12919
|
+
}
|
|
12920
|
+
const ranked = matches.sort((one, two) => two.score - one.score);
|
|
12921
|
+
return query.limit !== void 0 && Number.isInteger(query.limit) && query.limit >= 0 ? ranked.slice(0, query.limit) : ranked;
|
|
12922
|
+
}
|
|
12923
|
+
function expirerecallindex(index, window, now) {
|
|
12924
|
+
if (window === void 0) return index;
|
|
12925
|
+
return index.filter((entry) => now - entry.at < window);
|
|
12926
|
+
}
|
|
12927
|
+
function editedcorrectionof(input) {
|
|
12928
|
+
if (input.stepid.trim() === "" || input.kind.trim() === "") throw new Error("The correction needs its step and kind.");
|
|
12929
|
+
if (input.original === input.corrected) throw new Error("The correction needs a changed step shape.");
|
|
12930
|
+
return { id: input.id ?? randomid(), origin: input.origin, kind: input.kind, stepid: input.stepid, source: "edited", original: input.original, corrected: input.corrected, reason: input.reason, at: input.now };
|
|
12931
|
+
}
|
|
12932
|
+
function rejectedcorrectionof(input) {
|
|
12933
|
+
if (input.stepid.trim() === "" || input.reason.trim() === "") throw new Error("The rejected correction needs its step and its rejection reason.");
|
|
12934
|
+
return { id: input.id ?? randomid(), origin: input.origin, kind: input.kind, stepid: input.stepid, source: "rejected", original: input.original, reason: input.reason, at: input.now };
|
|
12935
|
+
}
|
|
12936
|
+
function matchingcorrections(corrections, proposal) {
|
|
12937
|
+
return corrections.filter((entry) => entry.origin === proposal.origin && entry.kind === proposal.kind);
|
|
12938
|
+
}
|
|
12939
|
+
function expirecorrections(corrections, window, now) {
|
|
12940
|
+
if (window === void 0) return corrections;
|
|
12941
|
+
return corrections.filter((entry) => now - entry.at < window);
|
|
12942
|
+
}
|
|
12943
|
+
function consentmemoryof(input) {
|
|
12944
|
+
if (input.origin.trim() === "") throw new Error("The consent memory entry needs its origin.");
|
|
12945
|
+
if (input.boundary.trim() === "") throw new Error("The consent memory entry needs the boundary the prompt named.");
|
|
12946
|
+
return { id: input.id ?? randomid(), origin: input.origin, decision: input.decision, boundary: input.boundary, kinds: [...new Set(input.kinds)], at: input.now, ...input.expiresat !== void 0 ? { expiresat: input.expiresat } : {} };
|
|
12947
|
+
}
|
|
12948
|
+
function consentadvisory(entries, origin, now) {
|
|
12949
|
+
return entries.filter((entry) => entry.origin === origin && (entry.expiresat === void 0 || entry.expiresat > now));
|
|
12950
|
+
}
|
|
12951
|
+
function consentadvisoryverdict(entries, origin, kind) {
|
|
12952
|
+
const matching = entries.filter((entry) => entry.origin === origin && entry.kinds.includes(kind));
|
|
12953
|
+
const latest = matching[matching.length - 1];
|
|
12954
|
+
if (latest === void 0) return { advisory: false, reason: `No prior decision exists for the ${kind} kind on ${origin}; the prompt opens fresh.` };
|
|
12955
|
+
if (latest.decision === "deny") return { advisory: true, reason: `The consent memory holds a prior denial of the ${kind} kind on ${origin} from ${new Date(latest.at).toISOString()}; the denial carries the same weight as a grant and the record stays advisory only.` };
|
|
12956
|
+
return { advisory: true, reason: `The consent memory holds a prior ${latest.decision} of the ${kind} kind on ${origin} with the boundary ${latest.boundary}; the record advises the new prompt and never auto grants.` };
|
|
12957
|
+
}
|
|
12958
|
+
function rollbacksplit(plan, progress) {
|
|
12959
|
+
const executed = progress && progress.planid === plan?.id ? progress.completedsteps : [];
|
|
12960
|
+
const executedset = new Set(executed);
|
|
12961
|
+
const queued = (plan?.steps ?? []).map((step) => step.id).filter((id) => !executedset.has(id));
|
|
12962
|
+
return { executedstepids: executed, queuedstepids: queued };
|
|
12963
|
+
}
|
|
12964
|
+
function rollbackof(plan, progress, preference) {
|
|
12965
|
+
const split = rollbacksplit(plan, progress);
|
|
12966
|
+
if (preference === "none") return { scope: "none", label: `Stop the run ${plan?.id ?? ""} without a rollback; the ${split.queuedstepids.length} queued step${split.queuedstepids.length === 1 ? "" : "s"} stay as the run left them.`, queuedstepids: split.queuedstepids };
|
|
12967
|
+
return { scope: "queued", label: `Cancel the run ${plan?.id ?? ""} and roll its ${split.queuedstepids.length} queued step${split.queuedstepids.length === 1 ? "" : "s"} back${split.queuedstepids.length > 0 ? ` (${split.queuedstepids.join(", ")})` : ""} while the ${split.executedstepids.length} executed step${split.executedstepids.length === 1 ? "" : "s"} stay untouched in the sealed log.`, queuedstepids: split.queuedstepids };
|
|
12968
|
+
}
|
|
12969
|
+
function cancelrunactionof(input) {
|
|
12970
|
+
return { runid: input.runid, sessionid: input.sessionid, rollback: rollbackof(input.plan, input.progress, input.preference) };
|
|
12971
|
+
}
|
|
12972
|
+
function errorsurfaceof(input) {
|
|
12973
|
+
if (input.message.trim() === "") throw new Error("The error surface needs its message in plain language.");
|
|
12974
|
+
return { stepid: input.stepid, runid: input.runid, cause: input.cause, message: input.message, retry: { allowed: input.retryallowed, reason: input.retryreason }, context: input.context, at: input.now };
|
|
12975
|
+
}
|
|
12976
|
+
function classifyfailure(input) {
|
|
12977
|
+
if (input.gatewait) return "gate";
|
|
12978
|
+
if (input.policyrefused) return "policy";
|
|
12979
|
+
if (/\b(network|offline|timeout|timed out|fetch failed|socket|dns|connection)\b/i.test(input.message)) return "network";
|
|
12980
|
+
return "page";
|
|
12981
|
+
}
|
|
12982
|
+
function retryhintof(surface) {
|
|
12983
|
+
if (!surface.retry.allowed) return { allowed: false, reason: `The ${surface.cause} failure of the step ${surface.stepid} refuses the retry: ${surface.retry.reason}` };
|
|
12984
|
+
return { allowed: true, reason: `The ${surface.cause} failure of the step ${surface.stepid} may retry through a new reviewed dispatch; the retry rides the full consent gate chain and never bypasses the review.` };
|
|
12985
|
+
}
|
|
12986
|
+
function sessiongridrows(input) {
|
|
12987
|
+
const rows = [];
|
|
12988
|
+
if (input.session && input.plan && ["pending", "approved"].includes(input.plan.state)) {
|
|
12989
|
+
const split = rollbacksplit(input.plan, input.progress);
|
|
12990
|
+
const held = input.locks.some((lock) => lock.runid === input.plan?.id);
|
|
12991
|
+
const origins = [.../* @__PURE__ */ new Set([input.session.origin, ...input.session.grants ?? []])];
|
|
12992
|
+
const actions = ["cancelrun"];
|
|
12993
|
+
if (input.session.pausedat !== void 0) actions.push("resume");
|
|
12994
|
+
rows.push({ sessionid: input.session.id, runid: input.plan.id, origins, state: "live", outcome: `${split.executedstepids.length} of ${input.plan.steps.length} reviewed steps executed`, steps: input.plan.steps.length, completed: split.executedstepids.length, lock: held ? "held" : "free", tabid: input.session.tabid, updatedat: input.plan.createdat, actions });
|
|
12995
|
+
}
|
|
12996
|
+
for (const log of input.logs) {
|
|
12997
|
+
const summary = input.summaries.find((candidate) => candidate.runid === log.runid);
|
|
12998
|
+
const tabsession = input.tabsessions.find((candidate) => candidate.runid === log.runid);
|
|
12999
|
+
const held = input.locks.some((lock) => lock.runid === log.runid);
|
|
13000
|
+
rows.push({ sessionid: log.sessionid, runid: log.runid, origins: [...new Set(log.entries.map((entry) => entry.origin).filter((origin) => origin !== ""))], state: "saved", outcome: summary !== void 0 ? summary.steps.every((step) => step.ok) ? "completed" : "failed" : log.seal !== void 0 ? "sealed" : "open", steps: summary?.steps.length ?? log.entries.filter((entry) => entry.kind === "step").length, completed: summary?.steps.filter((step) => step.ok).length ?? log.entries.filter((entry) => entry.kind === "step").length, lock: held ? "held" : "free", ...log.seal !== void 0 ? { sealhash: log.seal.sealhash.current } : {}, ...tabsession !== void 0 ? { tabid: tabsession.tabid } : {}, updatedat: log.updatedat, actions: ["reopen"] });
|
|
13001
|
+
}
|
|
13002
|
+
return rows.sort((one, two) => two.updatedat - one.updatedat);
|
|
13003
|
+
}
|
|
13004
|
+
function historyqueryof(value) {
|
|
13005
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
13006
|
+
const candidate = value;
|
|
13007
|
+
if (typeof candidate.text !== "string" || candidate.text.trim() === "") return void 0;
|
|
13008
|
+
const origin = typeof candidate.origin === "string" && candidate.origin.trim() !== "" ? candidate.origin.trim() : void 0;
|
|
13009
|
+
const from = typeof candidate.from === "number" && Number.isFinite(candidate.from) ? candidate.from : void 0;
|
|
13010
|
+
const to = typeof candidate.to === "number" && Number.isFinite(candidate.to) ? candidate.to : void 0;
|
|
13011
|
+
if (from !== void 0 && to !== void 0 && from > to) return void 0;
|
|
13012
|
+
const outcome = typeof candidate.outcome === "string" && candidate.outcome.trim() !== "" ? candidate.outcome.trim() : void 0;
|
|
13013
|
+
return { text: candidate.text.trim(), ...origin !== void 0 ? { origin } : {}, ...from !== void 0 ? { from } : {}, ...to !== void 0 ? { to } : {}, ...outcome !== void 0 ? { outcome } : {} };
|
|
13014
|
+
}
|
|
13015
|
+
function addhistoryentry(corpus, entry) {
|
|
13016
|
+
return [entry, ...corpus.filter((candidate) => !(candidate.source === entry.source && candidate.id === entry.id))];
|
|
13017
|
+
}
|
|
13018
|
+
function highlightterms(text2, query) {
|
|
13019
|
+
const terms = query.toLowerCase().split(/[^a-z0-9]+/).filter((term) => term.length > 1);
|
|
13020
|
+
const lower = text2.toLowerCase();
|
|
13021
|
+
return [...new Set(terms.filter((term) => lower.includes(term)))];
|
|
13022
|
+
}
|
|
13023
|
+
function historysearch(corpus, query) {
|
|
13024
|
+
const terms = query.text.toLowerCase().split(/[^a-z0-9]+/).filter((term) => term.length > 1);
|
|
13025
|
+
const hits = [];
|
|
13026
|
+
for (const entry of corpus) {
|
|
13027
|
+
if (query.origin !== void 0 && entry.origin !== query.origin) continue;
|
|
13028
|
+
if (query.from !== void 0 && entry.at < query.from) continue;
|
|
13029
|
+
if (query.to !== void 0 && entry.at > query.to) continue;
|
|
13030
|
+
if (query.outcome !== void 0 && entry.outcome !== query.outcome) continue;
|
|
13031
|
+
const haystack = `${entry.title} ${entry.text}`.toLowerCase();
|
|
13032
|
+
const matched = terms.filter((term) => haystack.includes(term));
|
|
13033
|
+
if (matched.length === 0) continue;
|
|
13034
|
+
const position = haystack.indexOf(matched[0] ?? "");
|
|
13035
|
+
const start = Math.max(0, position - 40);
|
|
13036
|
+
const excerpt = `${start > 0 ? "\u2026" : ""}${`${entry.title} ${entry.text}`.slice(start, start + 160)}${start + 160 < `${entry.title} ${entry.text}`.length ? "\u2026" : ""}`;
|
|
13037
|
+
hits.push({ source: entry.source, id: entry.id, title: entry.title, excerpt, highlights: [...new Set(matched)], ...entry.origin !== void 0 ? { origin: entry.origin } : {}, ...entry.outcome !== void 0 ? { outcome: entry.outcome } : {}, at: entry.at });
|
|
13038
|
+
}
|
|
13039
|
+
return hits.sort((one, two) => two.at - one.at);
|
|
13040
|
+
}
|
|
13041
|
+
function emptystatemessage(surface, origin) {
|
|
13042
|
+
if (surface === "historysearch") return "No history matches yet; start with a first query such as an origin, a note title or a kind the runs executed.";
|
|
13043
|
+
if (surface === "sitenotes") return `No site note exists${origin !== void 0 ? ` for ${origin}` : ""} yet; write the first note with a title and a body and the note flow keeps it per origin with its author provenance.`;
|
|
13044
|
+
if (surface === "scratchpad") return "The scratchpad holds no entry yet; the agent appends its per task notes here while the reviewed steps run, and every entry carries its step provenance.";
|
|
13045
|
+
return "No session exists yet; start the first run by describing an objective and reviewing the plan the agent proposes.";
|
|
13046
|
+
}
|
|
13047
|
+
function tabsessionkey(tabid) {
|
|
13048
|
+
return `tabsession:${tabid}`;
|
|
13049
|
+
}
|
|
13050
|
+
function tabsessionrefof(input) {
|
|
13051
|
+
if (!Number.isInteger(input.tabid) || input.tabid < 0) throw new Error("The per tab session reference needs its tab.");
|
|
13052
|
+
if (input.sessionid.trim() === "") throw new Error("The per tab session reference needs its session.");
|
|
13053
|
+
return { tabid: input.tabid, sessionid: input.sessionid, ...input.runid !== void 0 && input.runid.trim() !== "" ? { runid: input.runid } : {}, origin: input.origin, updatedat: input.now };
|
|
13054
|
+
}
|
|
13055
|
+
function sessionbundleof(input) {
|
|
13056
|
+
return { kind: "sessionbundle", notes: input.notes, summaries: input.summaries, corrections: input.corrections, exportedat: input.exportedat };
|
|
13057
|
+
}
|
|
13058
|
+
|
|
11924
13059
|
// taskqueue.ts
|
|
11925
13060
|
function emptyqueue(input = {}) {
|
|
11926
13061
|
return { lanes: input.lanes ?? [], priorities: input.priorities ?? [], completionpolicy: input.completionpolicy ?? "all", items: [], claims: [] };
|
|
@@ -12016,6 +13151,40 @@ function taskcounts(queue) {
|
|
|
12016
13151
|
};
|
|
12017
13152
|
}
|
|
12018
13153
|
|
|
13154
|
+
// transparency.ts
|
|
13155
|
+
function permissiondiff(input) {
|
|
13156
|
+
if (input.fromversion.trim() === "" || input.toversion.trim() === "") throw new Error("The permdiff names the two versions it compares.");
|
|
13157
|
+
const added = [...new Set(input.to.filter((permission) => !input.from.includes(permission)))];
|
|
13158
|
+
const removed = [...new Set(input.from.filter((permission) => !input.to.includes(permission)))];
|
|
13159
|
+
return { fromversion: input.fromversion, toversion: input.toversion, added, removed, computedat: input.now };
|
|
13160
|
+
}
|
|
13161
|
+
function permdiffchanged(diff) {
|
|
13162
|
+
return diff.added.length > 0 || diff.removed.length > 0;
|
|
13163
|
+
}
|
|
13164
|
+
function permdiffsummary(diff) {
|
|
13165
|
+
if (!permdiffchanged(diff)) return `The update from ${diff.fromversion} to ${diff.toversion} changed no permission.`;
|
|
13166
|
+
const parts = [];
|
|
13167
|
+
if (diff.added.length > 0) parts.push(`added ${diff.added.join(", ")}`);
|
|
13168
|
+
if (diff.removed.length > 0) parts.push(`removed ${diff.removed.join(", ")}`);
|
|
13169
|
+
return `The update from ${diff.fromversion} to ${diff.toversion} ${parts.join(" and ")}.`;
|
|
13170
|
+
}
|
|
13171
|
+
function transparencygrants(input) {
|
|
13172
|
+
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 }));
|
|
13173
|
+
for (const profile of input.profiles) {
|
|
13174
|
+
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 });
|
|
13175
|
+
}
|
|
13176
|
+
return grants;
|
|
13177
|
+
}
|
|
13178
|
+
function revokeaction(grant) {
|
|
13179
|
+
return { action: "revoke", origin: grant.origin, scope: grant.scope };
|
|
13180
|
+
}
|
|
13181
|
+
function windowhistory(windows) {
|
|
13182
|
+
return windows.map((window) => ({ id: window.id, origin: window.origin, state: window.state, boundary: window.boundary, startedat: window.startedat, expiresat: window.expiresat }));
|
|
13183
|
+
}
|
|
13184
|
+
function connectallowlist(entries) {
|
|
13185
|
+
return entries.map((entry) => ({ senderid: entry.senderid, displayname: entry.displayname, ...entry.origin !== void 0 ? { origin: entry.origin } : {}, addedat: entry.addedat }));
|
|
13186
|
+
}
|
|
13187
|
+
|
|
12019
13188
|
// protocol.ts
|
|
12020
13189
|
function record(value) {
|
|
12021
13190
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Protocol message must be an object.");
|
|
@@ -12837,6 +14006,9 @@ function securityreport(input) {
|
|
|
12837
14006
|
function logchainreport(input) {
|
|
12838
14007
|
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 } : {} };
|
|
12839
14008
|
}
|
|
14009
|
+
function transparencyreport(input) {
|
|
14010
|
+
return { version: protocolversion, posture: "denydefault", grants: input.grants, windows: input.windows, connectallow: input.connectallow, permdiffs: input.permdiffs, safedefaults: input.safedefaults, vault: input.vault };
|
|
14011
|
+
}
|
|
12840
14012
|
|
|
12841
14013
|
// workfloweditor.ts
|
|
12842
14014
|
var palettecategories = ["actions", "controlflow", "waits", "variables", "triggers"];
|
|
@@ -13549,7 +14721,9 @@ export {
|
|
|
13549
14721
|
acquirerunlock,
|
|
13550
14722
|
activelayers,
|
|
13551
14723
|
addedge,
|
|
14724
|
+
addhistoryentry,
|
|
13552
14725
|
addnode,
|
|
14726
|
+
addrecallentry,
|
|
13553
14727
|
addusage,
|
|
13554
14728
|
agentbudgetcheck,
|
|
13555
14729
|
agentbudgetvalid,
|
|
@@ -13623,6 +14797,9 @@ export {
|
|
|
13623
14797
|
breakpointinputof,
|
|
13624
14798
|
broadcastrecipient,
|
|
13625
14799
|
browserpermissions,
|
|
14800
|
+
bucketboundsvalid,
|
|
14801
|
+
bucketconsume,
|
|
14802
|
+
bucketof,
|
|
13626
14803
|
budgetcheck,
|
|
13627
14804
|
buildname,
|
|
13628
14805
|
buildpdf,
|
|
@@ -13641,6 +14818,8 @@ export {
|
|
|
13641
14818
|
cancelframes,
|
|
13642
14819
|
cancellederror,
|
|
13643
14820
|
cancelrun,
|
|
14821
|
+
cancelrunactionof,
|
|
14822
|
+
cancelrungate,
|
|
13644
14823
|
canceltask,
|
|
13645
14824
|
canexecute,
|
|
13646
14825
|
capturebody,
|
|
@@ -13656,6 +14835,7 @@ export {
|
|
|
13656
14835
|
capturesourcemaps,
|
|
13657
14836
|
capturestates,
|
|
13658
14837
|
capturestitched,
|
|
14838
|
+
capturesurfaceof,
|
|
13659
14839
|
capturetargets,
|
|
13660
14840
|
capturevisible,
|
|
13661
14841
|
castvote,
|
|
@@ -13674,6 +14854,7 @@ export {
|
|
|
13674
14854
|
claim,
|
|
13675
14855
|
claimheartbeat,
|
|
13676
14856
|
classconsentcovers,
|
|
14857
|
+
classifyfailure,
|
|
13677
14858
|
classifyintent,
|
|
13678
14859
|
closechannel,
|
|
13679
14860
|
closeidlechannels,
|
|
@@ -13686,10 +14867,20 @@ export {
|
|
|
13686
14867
|
complete,
|
|
13687
14868
|
composeworkflow,
|
|
13688
14869
|
conditionof,
|
|
14870
|
+
confirmcredsgate,
|
|
14871
|
+
confirmdeletegate,
|
|
13689
14872
|
confirmmanualrun,
|
|
14873
|
+
confirmpaygate,
|
|
14874
|
+
connectallowentryof,
|
|
14875
|
+
connectallowgate,
|
|
14876
|
+
connectallowlist,
|
|
13690
14877
|
connectclient,
|
|
13691
14878
|
consensusstate,
|
|
14879
|
+
consentadvisory,
|
|
14880
|
+
consentadvisoryverdict,
|
|
13692
14881
|
consentdurationvalid,
|
|
14882
|
+
consentmemoryadvisorygate,
|
|
14883
|
+
consentmemoryof,
|
|
13693
14884
|
consentmodel,
|
|
13694
14885
|
consentprompttext,
|
|
13695
14886
|
consentwindowgate,
|
|
@@ -13713,6 +14904,8 @@ export {
|
|
|
13713
14904
|
costbudgetvalid,
|
|
13714
14905
|
cpusnap,
|
|
13715
14906
|
crashinterrupted,
|
|
14907
|
+
credentialstep,
|
|
14908
|
+
credspayload,
|
|
13716
14909
|
cronnext,
|
|
13717
14910
|
cronparse,
|
|
13718
14911
|
croprect,
|
|
@@ -13737,7 +14930,10 @@ export {
|
|
|
13737
14930
|
defaultrefusalmarkers,
|
|
13738
14931
|
defaulttokenlifetimems,
|
|
13739
14932
|
defaulttriggercooldown,
|
|
14933
|
+
deferredeventof,
|
|
14934
|
+
deferredready,
|
|
13740
14935
|
delayjitter,
|
|
14936
|
+
deletepayload,
|
|
13741
14937
|
deniedevidenceof,
|
|
13742
14938
|
denydefaultnotice,
|
|
13743
14939
|
denydefaultposture,
|
|
@@ -13751,6 +14947,7 @@ export {
|
|
|
13751
14947
|
disarmkillswitch,
|
|
13752
14948
|
disconnectclient,
|
|
13753
14949
|
dispatchtool,
|
|
14950
|
+
distillrunsummary,
|
|
13754
14951
|
domainkinds,
|
|
13755
14952
|
downloadreport,
|
|
13756
14953
|
draftplan,
|
|
@@ -13758,13 +14955,17 @@ export {
|
|
|
13758
14955
|
dryrunprojection,
|
|
13759
14956
|
dryrunreport,
|
|
13760
14957
|
dryrunworkflow,
|
|
14958
|
+
editedcorrectionof,
|
|
14959
|
+
editnote,
|
|
13761
14960
|
editorsavegate,
|
|
13762
14961
|
editorstate,
|
|
13763
14962
|
editstep,
|
|
13764
14963
|
egressconsentgate,
|
|
13765
14964
|
electleader,
|
|
13766
14965
|
emptyboard,
|
|
14966
|
+
emptyconnectallow,
|
|
13767
14967
|
emptyqueue,
|
|
14968
|
+
emptystatemessage,
|
|
13768
14969
|
emugate,
|
|
13769
14970
|
emulationkinds,
|
|
13770
14971
|
emulationreport,
|
|
@@ -13776,6 +14977,7 @@ export {
|
|
|
13776
14977
|
enqueuerequest,
|
|
13777
14978
|
entryfresh,
|
|
13778
14979
|
entryhashof,
|
|
14980
|
+
envelopecheck,
|
|
13779
14981
|
environmentgrammar,
|
|
13780
14982
|
environmentgrantgate,
|
|
13781
14983
|
environmentreport,
|
|
@@ -13784,6 +14986,7 @@ export {
|
|
|
13784
14986
|
environmentsof,
|
|
13785
14987
|
errorcapture,
|
|
13786
14988
|
errorreportresponse,
|
|
14989
|
+
errorsurfaceof,
|
|
13787
14990
|
escalate,
|
|
13788
14991
|
evaluatecondition,
|
|
13789
14992
|
evaluatetrigger,
|
|
@@ -13797,12 +15000,15 @@ export {
|
|
|
13797
15000
|
expandtemplate,
|
|
13798
15001
|
expireapprovals,
|
|
13799
15002
|
expireconsentwindows,
|
|
15003
|
+
expirecorrections,
|
|
13800
15004
|
expirelayers,
|
|
13801
15005
|
expirelocks,
|
|
13802
15006
|
expireprofilerecords,
|
|
15007
|
+
expirerecallindex,
|
|
13803
15008
|
expirerunlocks,
|
|
13804
15009
|
expiresessions,
|
|
13805
15010
|
expiretokens,
|
|
15011
|
+
expirnotes,
|
|
13806
15012
|
exportcontentreview,
|
|
13807
15013
|
exportlogchain,
|
|
13808
15014
|
exportpresetlibrary,
|
|
@@ -13820,6 +15026,7 @@ export {
|
|
|
13820
15026
|
fetchoptionsof,
|
|
13821
15027
|
fetchrequestof,
|
|
13822
15028
|
fieldshapekind,
|
|
15029
|
+
fieldshaperegions,
|
|
13823
15030
|
filteredsessions,
|
|
13824
15031
|
filterentries,
|
|
13825
15032
|
filterexchanges,
|
|
@@ -13832,6 +15039,11 @@ export {
|
|
|
13832
15039
|
formreportresponse,
|
|
13833
15040
|
framedlog,
|
|
13834
15041
|
frameinterval,
|
|
15042
|
+
gatebatchgate,
|
|
15043
|
+
gateforstep,
|
|
15044
|
+
gatekindfor,
|
|
15045
|
+
gateprompttext,
|
|
15046
|
+
gatestateof,
|
|
13835
15047
|
generatedvalueallowed,
|
|
13836
15048
|
grantallowlistentry,
|
|
13837
15049
|
graphqlopenvelope,
|
|
@@ -13852,6 +15064,9 @@ export {
|
|
|
13852
15064
|
heartbeatreport,
|
|
13853
15065
|
heldkeysreport,
|
|
13854
15066
|
hideblackboxedframes,
|
|
15067
|
+
highlightterms,
|
|
15068
|
+
historyqueryof,
|
|
15069
|
+
historysearch,
|
|
13855
15070
|
hostpattern,
|
|
13856
15071
|
htmlqueriesof,
|
|
13857
15072
|
httpframepipeline,
|
|
@@ -13868,6 +15083,7 @@ export {
|
|
|
13868
15083
|
inflightreport,
|
|
13869
15084
|
inheritconsent,
|
|
13870
15085
|
initialize,
|
|
15086
|
+
inmemoryvault,
|
|
13871
15087
|
interleavetimeline,
|
|
13872
15088
|
iscdpkind,
|
|
13873
15089
|
iscontrolflowkind,
|
|
@@ -13920,6 +15136,7 @@ export {
|
|
|
13920
15136
|
loglevels,
|
|
13921
15137
|
logreadgate,
|
|
13922
15138
|
longtaskcapture,
|
|
15139
|
+
lookalikedistance,
|
|
13923
15140
|
loopof,
|
|
13924
15141
|
mailboxof,
|
|
13925
15142
|
manualpreview,
|
|
@@ -13940,6 +15157,7 @@ export {
|
|
|
13940
15157
|
maskstoredvalues,
|
|
13941
15158
|
masktypedvalues,
|
|
13942
15159
|
maskvalue,
|
|
15160
|
+
matchingcorrections,
|
|
13943
15161
|
matchmessage,
|
|
13944
15162
|
matchurl,
|
|
13945
15163
|
matchurlpattern,
|
|
@@ -13947,6 +15165,8 @@ export {
|
|
|
13947
15165
|
mediaentries,
|
|
13948
15166
|
mediakinds,
|
|
13949
15167
|
mediareport,
|
|
15168
|
+
memoryreadscopegate,
|
|
15169
|
+
mergeregions,
|
|
13950
15170
|
mergeresults,
|
|
13951
15171
|
messageegressgrade,
|
|
13952
15172
|
messagefilterof,
|
|
@@ -13979,8 +15199,11 @@ export {
|
|
|
13979
15199
|
newsessionrecord,
|
|
13980
15200
|
newworkflowrun,
|
|
13981
15201
|
nextrequest,
|
|
15202
|
+
nobatchresolution,
|
|
13982
15203
|
nonceof,
|
|
13983
15204
|
normalizeendpoint,
|
|
15205
|
+
notebodyof,
|
|
15206
|
+
notehistoryentry,
|
|
13984
15207
|
oauthflowof,
|
|
13985
15208
|
observationmodeof,
|
|
13986
15209
|
observationresponse,
|
|
@@ -13991,12 +15214,17 @@ export {
|
|
|
13991
15214
|
openchannel,
|
|
13992
15215
|
openconsensus,
|
|
13993
15216
|
openconsentwindow,
|
|
15217
|
+
opengate,
|
|
15218
|
+
opennotebody,
|
|
13994
15219
|
openoffscreen,
|
|
13995
15220
|
openrun,
|
|
13996
15221
|
openrunlog,
|
|
13997
15222
|
openseal,
|
|
13998
15223
|
openstreamchannel,
|
|
13999
15224
|
opentabagent,
|
|
15225
|
+
origincheckgate,
|
|
15226
|
+
origincheckof,
|
|
15227
|
+
originlabels,
|
|
14000
15228
|
originprofilegate,
|
|
14001
15229
|
originprofileof,
|
|
14002
15230
|
outcomeresponse,
|
|
@@ -14029,15 +15257,24 @@ export {
|
|
|
14029
15257
|
payloadshapeof,
|
|
14030
15258
|
payloadvalid,
|
|
14031
15259
|
payloadwithdefaults,
|
|
15260
|
+
paypayload,
|
|
14032
15261
|
pdfoptionsof,
|
|
14033
15262
|
pdfpagesize,
|
|
14034
15263
|
pdfsegments,
|
|
14035
15264
|
pdftextlayout,
|
|
15265
|
+
permdiffchanged,
|
|
15266
|
+
permdiffsummary,
|
|
15267
|
+
permissiondiff,
|
|
14036
15268
|
permissiongrade,
|
|
14037
15269
|
permissiongrantof,
|
|
14038
15270
|
permissionnamevalid,
|
|
14039
15271
|
permissionstates,
|
|
14040
15272
|
permissionstatevalid,
|
|
15273
|
+
phishguardgate,
|
|
15274
|
+
phishnotetext,
|
|
15275
|
+
phishthresholdgate,
|
|
15276
|
+
phishthresholdvalid,
|
|
15277
|
+
phishverdictof,
|
|
14041
15278
|
ping,
|
|
14042
15279
|
planallowlist,
|
|
14043
15280
|
plandraftreviewgate,
|
|
@@ -14048,6 +15285,7 @@ export {
|
|
|
14048
15285
|
pollurl,
|
|
14049
15286
|
poolplan,
|
|
14050
15287
|
popscope,
|
|
15288
|
+
portaccept,
|
|
14051
15289
|
postentry,
|
|
14052
15290
|
preparehandoff,
|
|
14053
15291
|
privatemime,
|
|
@@ -14068,6 +15306,7 @@ export {
|
|
|
14068
15306
|
proxygate,
|
|
14069
15307
|
proxyrouteof,
|
|
14070
15308
|
prunerunstates,
|
|
15309
|
+
prunescratchpad,
|
|
14071
15310
|
publishmessage,
|
|
14072
15311
|
pushscope,
|
|
14073
15312
|
quarantinereport,
|
|
@@ -14076,7 +15315,10 @@ export {
|
|
|
14076
15315
|
queuelanesvalid,
|
|
14077
15316
|
randomid,
|
|
14078
15317
|
rankapis,
|
|
15318
|
+
rankrecall,
|
|
15319
|
+
ratelimitboundsvalid,
|
|
14079
15320
|
ratelimitbudgetallowed,
|
|
15321
|
+
ratelimitgate,
|
|
14080
15322
|
ratelimitreadof,
|
|
14081
15323
|
ratelimitreport,
|
|
14082
15324
|
ratelimitwait,
|
|
@@ -14085,6 +15327,7 @@ export {
|
|
|
14085
15327
|
readstream,
|
|
14086
15328
|
readverifiedlog,
|
|
14087
15329
|
reattachrun,
|
|
15330
|
+
recallentryof,
|
|
14088
15331
|
receivemessage,
|
|
14089
15332
|
receivemessages,
|
|
14090
15333
|
reconnectwaits,
|
|
@@ -14097,6 +15340,8 @@ export {
|
|
|
14097
15340
|
recoveryplan,
|
|
14098
15341
|
redactconsoletext,
|
|
14099
15342
|
redactedcookies,
|
|
15343
|
+
redactedshot,
|
|
15344
|
+
redactionsummary,
|
|
14100
15345
|
redactparams,
|
|
14101
15346
|
redeempairingcode,
|
|
14102
15347
|
redoedit,
|
|
@@ -14104,8 +15349,12 @@ export {
|
|
|
14104
15349
|
reflectstep,
|
|
14105
15350
|
regexextract,
|
|
14106
15351
|
regexruleof,
|
|
15352
|
+
regionof,
|
|
15353
|
+
regionsfor,
|
|
14107
15354
|
regionsteps,
|
|
15355
|
+
regionvalid,
|
|
14108
15356
|
registeragent,
|
|
15357
|
+
rejectedcorrectionof,
|
|
14109
15358
|
rejectioncapture,
|
|
14110
15359
|
relayframe,
|
|
14111
15360
|
releaselock,
|
|
@@ -14135,6 +15384,7 @@ export {
|
|
|
14135
15384
|
resolveapproval,
|
|
14136
15385
|
resolvedrisk,
|
|
14137
15386
|
resolveescalation,
|
|
15387
|
+
resolvegate,
|
|
14138
15388
|
resolverecipients,
|
|
14139
15389
|
resolveroute,
|
|
14140
15390
|
resolvetool,
|
|
@@ -14152,6 +15402,8 @@ export {
|
|
|
14152
15402
|
retireentries,
|
|
14153
15403
|
retireentry,
|
|
14154
15404
|
retryafterof,
|
|
15405
|
+
retrydispatchgate,
|
|
15406
|
+
retryhintof,
|
|
14155
15407
|
revertalllayers,
|
|
14156
15408
|
revertlayer,
|
|
14157
15409
|
revertplanof,
|
|
@@ -14159,12 +15411,15 @@ export {
|
|
|
14159
15411
|
reviewedkinds,
|
|
14160
15412
|
reviewframe,
|
|
14161
15413
|
revocationruleof,
|
|
15414
|
+
revokeaction,
|
|
14162
15415
|
revokeclient,
|
|
14163
15416
|
revokerun,
|
|
14164
15417
|
revokerungate,
|
|
14165
15418
|
rewritesourcelocation,
|
|
14166
15419
|
roleaddress,
|
|
14167
15420
|
roledefaults,
|
|
15421
|
+
rollbackof,
|
|
15422
|
+
rollbacksplit,
|
|
14168
15423
|
rotatelogs,
|
|
14169
15424
|
rotationruleof,
|
|
14170
15425
|
routeenvironment,
|
|
@@ -14185,11 +15440,16 @@ export {
|
|
|
14185
15440
|
runrepeatuntil,
|
|
14186
15441
|
runreviewgranted,
|
|
14187
15442
|
runstep,
|
|
15443
|
+
runsummarytask,
|
|
14188
15444
|
runtobreakpoint,
|
|
14189
15445
|
runtry,
|
|
14190
15446
|
runurllist,
|
|
14191
15447
|
runwhile,
|
|
14192
15448
|
runworkflow,
|
|
15449
|
+
safedefaultnotice,
|
|
15450
|
+
safedefaultprofile,
|
|
15451
|
+
safedefaultreadkind,
|
|
15452
|
+
safedefaultsgate,
|
|
14193
15453
|
safetyresponse,
|
|
14194
15454
|
samplingframes,
|
|
14195
15455
|
sandboxorigingate,
|
|
@@ -14201,9 +15461,15 @@ export {
|
|
|
14201
15461
|
scanconflicts,
|
|
14202
15462
|
schedulecron,
|
|
14203
15463
|
scheduleinterval,
|
|
15464
|
+
schemacheck,
|
|
15465
|
+
schemaguardgate,
|
|
14204
15466
|
scopecheck,
|
|
14205
15467
|
scopegate,
|
|
14206
15468
|
scopegrantof,
|
|
15469
|
+
scratchentryof,
|
|
15470
|
+
scratchpadof,
|
|
15471
|
+
scratchpadscopegate,
|
|
15472
|
+
sealnotebody,
|
|
14207
15473
|
sealrunlog,
|
|
14208
15474
|
sealrunstate,
|
|
14209
15475
|
seamweights,
|
|
@@ -14212,9 +15478,12 @@ export {
|
|
|
14212
15478
|
searchsessionrecords,
|
|
14213
15479
|
searchsteps,
|
|
14214
15480
|
searchtemplates,
|
|
15481
|
+
secretleakscan,
|
|
15482
|
+
secretshapecarrying,
|
|
14215
15483
|
securityreport,
|
|
14216
15484
|
seededrandom,
|
|
14217
15485
|
selectorresponse,
|
|
15486
|
+
semanticrecallscopegate,
|
|
14218
15487
|
sendcdpcommand,
|
|
14219
15488
|
sendfetch,
|
|
14220
15489
|
sendmessage,
|
|
@@ -14230,14 +15499,17 @@ export {
|
|
|
14230
15499
|
servercapabilities,
|
|
14231
15500
|
serverenablementgate,
|
|
14232
15501
|
servermethods,
|
|
15502
|
+
sessionbundleof,
|
|
14233
15503
|
sessionfileversion,
|
|
14234
15504
|
sessionfolderof,
|
|
14235
15505
|
sessionfolderunique,
|
|
15506
|
+
sessiongridrows,
|
|
14236
15507
|
sessionkinds,
|
|
14237
15508
|
sessionmemory,
|
|
14238
15509
|
sessionnameunique,
|
|
14239
15510
|
sessionreport,
|
|
14240
15511
|
sessionrestoregate,
|
|
15512
|
+
sessionretentionvalid,
|
|
14241
15513
|
sessiontabof,
|
|
14242
15514
|
setvariable,
|
|
14243
15515
|
shapesof,
|
|
@@ -14245,6 +15517,9 @@ export {
|
|
|
14245
15517
|
shareworkflow,
|
|
14246
15518
|
shiftentryof,
|
|
14247
15519
|
signalsreport,
|
|
15520
|
+
sitenoteof,
|
|
15521
|
+
sitenotesreadgate,
|
|
15522
|
+
sitenoteswritegate,
|
|
14248
15523
|
snapnode,
|
|
14249
15524
|
snapshotplanof,
|
|
14250
15525
|
snapshotretentionwindow,
|
|
@@ -14279,6 +15554,9 @@ export {
|
|
|
14279
15554
|
submitreviewgranted,
|
|
14280
15555
|
subscriptionframes,
|
|
14281
15556
|
subscriptionoptionsof,
|
|
15557
|
+
summaryhistoryentry,
|
|
15558
|
+
summaryrequestof,
|
|
15559
|
+
summarywindowvalid,
|
|
14282
15560
|
swarmcosts,
|
|
14283
15561
|
swarmoverview,
|
|
14284
15562
|
swarmreport,
|
|
@@ -14286,6 +15564,8 @@ export {
|
|
|
14286
15564
|
swarmstatereport,
|
|
14287
15565
|
sweepreviews,
|
|
14288
15566
|
tabreportresponse,
|
|
15567
|
+
tabsessionkey,
|
|
15568
|
+
tabsessionrefof,
|
|
14289
15569
|
targetgate,
|
|
14290
15570
|
taskcounts,
|
|
14291
15571
|
taskstatechecksum,
|
|
@@ -14293,6 +15573,7 @@ export {
|
|
|
14293
15573
|
taskstatevalid,
|
|
14294
15574
|
teardowncdpsession,
|
|
14295
15575
|
teardownplanof,
|
|
15576
|
+
templateof,
|
|
14296
15577
|
templateurl,
|
|
14297
15578
|
templatevariables,
|
|
14298
15579
|
thumbdirectiveof,
|
|
@@ -14332,6 +15613,8 @@ export {
|
|
|
14332
15613
|
transferablekeys,
|
|
14333
15614
|
transferhandoff,
|
|
14334
15615
|
transformgrammar,
|
|
15616
|
+
transparencygrants,
|
|
15617
|
+
transparencyreport,
|
|
14335
15618
|
triggereventcatalog,
|
|
14336
15619
|
triggerfamilies,
|
|
14337
15620
|
triggerfamilyof,
|
|
@@ -14345,6 +15628,7 @@ export {
|
|
|
14345
15628
|
tryof,
|
|
14346
15629
|
undoedit,
|
|
14347
15630
|
unreadcount,
|
|
15631
|
+
untrustedrendergate,
|
|
14348
15632
|
unwrapgraphql,
|
|
14349
15633
|
updaterule,
|
|
14350
15634
|
urlencodeform,
|
|
@@ -14361,6 +15645,17 @@ export {
|
|
|
14361
15645
|
validatetoolcatalog,
|
|
14362
15646
|
validatevaluegen,
|
|
14363
15647
|
validateworkflow,
|
|
15648
|
+
vaultcovers,
|
|
15649
|
+
vaultdelete,
|
|
15650
|
+
vaultdigestof,
|
|
15651
|
+
vaultdigestprefix,
|
|
15652
|
+
vaultentryof,
|
|
15653
|
+
vaultprompttext,
|
|
15654
|
+
vaultsecretgate,
|
|
15655
|
+
vaultstore,
|
|
15656
|
+
vaultvaluefor,
|
|
15657
|
+
vaultview,
|
|
15658
|
+
verdictfresh,
|
|
14364
15659
|
verifyauth,
|
|
14365
15660
|
verifylogchain,
|
|
14366
15661
|
verifytoken,
|
|
@@ -14377,6 +15672,7 @@ export {
|
|
|
14377
15672
|
whileof,
|
|
14378
15673
|
wildcardentry,
|
|
14379
15674
|
windowgatesstep,
|
|
15675
|
+
windowhistory,
|
|
14380
15676
|
wireformat,
|
|
14381
15677
|
wizardreport,
|
|
14382
15678
|
workerpoolsizevalid,
|