@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.
Files changed (49) hide show
  1. package/README.md +5 -3
  2. package/dist/confirmgates.d.ts +60 -0
  3. package/dist/confirmgates.d.ts.map +1 -0
  4. package/dist/environments.d.ts +10 -0
  5. package/dist/environments.d.ts.map +1 -1
  6. package/dist/inboundguard.d.ts +86 -0
  7. package/dist/inboundguard.d.ts.map +1 -0
  8. package/dist/index.d.ts +8 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1299 -3
  11. package/dist/index.js.map +4 -4
  12. package/dist/memory.d.ts +187 -1
  13. package/dist/memory.d.ts.map +1 -1
  14. package/dist/originpolicy.d.ts +10 -0
  15. package/dist/originpolicy.d.ts.map +1 -1
  16. package/dist/phishguard.d.ts +24 -0
  17. package/dist/phishguard.d.ts.map +1 -0
  18. package/dist/policy.d.ts +122 -1
  19. package/dist/policy.d.ts.map +1 -1
  20. package/dist/protocol.d.ts +88 -0
  21. package/dist/protocol.d.ts.map +1 -1
  22. package/dist/redactshots.d.ts +54 -0
  23. package/dist/redactshots.d.ts.map +1 -0
  24. package/dist/secretvault.d.ts +89 -0
  25. package/dist/secretvault.d.ts.map +1 -0
  26. package/dist/sessioninterface.d.ts +213 -0
  27. package/dist/sessioninterface.d.ts.map +1 -0
  28. package/dist/transparency.d.ts +46 -0
  29. package/dist/transparency.d.ts.map +1 -0
  30. package/dist/types.d.ts +368 -3
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/extension/dist/background.js +1710 -55
  34. package/extension/dist/background.js.map +4 -4
  35. package/extension/dist/manifest.json +5 -1
  36. package/extension/dist/offscreen.js +4 -0
  37. package/extension/dist/offscreen.js.map +2 -2
  38. package/extension/dist/pagebridge.js.map +2 -2
  39. package/extension/dist/popup.html +1 -1
  40. package/extension/dist/popup.js +41 -0
  41. package/extension/dist/popup.js.map +2 -2
  42. package/extension/dist/sidepanel.html +1 -1
  43. package/extension/dist/sidepanel.js +462 -215
  44. package/extension/dist/sidepanel.js.map +3 -3
  45. package/extension/dist/transparencypage.html +25 -0
  46. package/extension/dist/transparencypage.js +198 -0
  47. package/extension/dist/transparencypage.js.map +7 -0
  48. package/extension/manifest.json +5 -1
  49. package/package.json +1 -1
@@ -0,0 +1,89 @@
1
+ import type { secretvaultentry, toolstep } from "./types.js";
2
+ /**
3
+ * Secret vault logic of the 1.1.62 family.
4
+ * The vault seam lives here: secrets enter through put and leave through fetch at the last possible moment before a credential field, while the persisted records carry only the label, the exact origin scope, the profile workspace, the provenance and the sha-256 verification digest — no plaintext value ever reaches a storage writer, a log entry, a memory record or an export path.
5
+ * The scan paths refuse secrets in plain sight: a step option, a variable or a plan text whose value digests to a stored vault entry is a leak that refuses the plan, and a raw typed value behind a masked field shape never rides a step at all.
6
+ * Honest limit: the browser offers no vault hardware, so the seam rides the session storage area the background wires, which keeps values in memory only and never persists them to disk; the persistence layer stores metadata alone, mirroring the immutablelog seam honesty.
7
+ */
8
+ /** The digest prefix every stored vault digest carries so raw values never persist anywhere. */
9
+ export declare const vaultdigestprefix = "sha256:";
10
+ /** Derives the sha-256 verification digest of one secret value through the platform crypto seam; the digest persists while the value never does. */
11
+ export declare function vaultdigestof(value: string): Promise<string>;
12
+ /** Builds one vault record from its metadata: the label, the exact origin scope, the profile workspace and the provenance; the digest verifies the value behind the seam without ever carrying it. */
13
+ export declare function vaultentryof(input: {
14
+ label: string;
15
+ scope: string;
16
+ profileid: string;
17
+ provenance: "user" | "session";
18
+ digest: string;
19
+ now: number;
20
+ vaultid?: string;
21
+ }): secretvaultentry;
22
+ /** Creates an in memory vault seam: values live in the map only, which is the honest fallback the background wraps with the session storage area that never persists to disk. */
23
+ export declare function inmemoryvault(): {
24
+ put(vaultid: string, value: string): Promise<void>;
25
+ fetch(vaultid: string): Promise<string | undefined>;
26
+ drop(vaultid: string): Promise<void>;
27
+ };
28
+ /** Stores one secret behind the vault seam and returns its metadata record alone: the value enters the seam and no return path carries it. */
29
+ export declare function vaultstore(input: {
30
+ seam: {
31
+ put(vaultid: string, value: string): Promise<void>;
32
+ };
33
+ label: string;
34
+ scope: string;
35
+ profileid: string;
36
+ provenance: "user" | "session";
37
+ value: string;
38
+ now: number;
39
+ }): Promise<secretvaultentry>;
40
+ /** Reads one secret from the vault seam at the last possible moment before its credential field: the value returns to the dispatching caller only, never to a log writer, and the record stamps its last use. */
41
+ export declare function vaultvaluefor(input: {
42
+ seam: {
43
+ fetch(vaultid: string): Promise<string | undefined>;
44
+ };
45
+ entry: secretvaultentry;
46
+ }): Promise<{
47
+ ok: boolean;
48
+ value?: string;
49
+ reason: string;
50
+ used?: secretvaultentry;
51
+ }>;
52
+ /** Drops one secret from the vault seam; the metadata record leaves with it because a deleted secret leaves no trace a surface could read. */
53
+ export declare function vaultdelete(input: {
54
+ seam: {
55
+ drop(vaultid: string): Promise<void>;
56
+ };
57
+ entry: secretvaultentry;
58
+ }): Promise<{
59
+ dropped: boolean;
60
+ label: string;
61
+ reason: string;
62
+ }>;
63
+ /** Reads whether one vault record covers an origin: the scope binds to exactly one origin, so a secret of one site never rides another site. */
64
+ export declare function vaultcovers(entry: secretvaultentry, origin: string): boolean;
65
+ /** Scans candidate step values, variables and plan texts for leaked secrets: a candidate whose sha-256 digest matches a stored vault digest is a leak the plan refuses, because a plaintext secret outside the vault never rides a step, a variable or a plan. */
66
+ export declare function secretleakscan(input: {
67
+ candidates: string[];
68
+ entries: secretvaultentry[];
69
+ }): Promise<{
70
+ leaks: string[];
71
+ reason: string;
72
+ }>;
73
+ /** Reads whether one step carries a raw typed value behind a masked field shape: a credential step names its vault label instead, because a raw password or token value never rides a step option. */
74
+ export declare function secretshapecarrying(step: Pick<toolstep, "kind" | "target" | "value" | "options">): {
75
+ carries: boolean;
76
+ reason: string;
77
+ };
78
+ /** Builds the vault view the surfaces render: the labels, scopes, provenance and last use times only, because no surface ever displays or exports a secret value. */
79
+ export declare function vaultview(entries: secretvaultentry[]): Array<{
80
+ vaultid: string;
81
+ label: string;
82
+ scope: string;
83
+ provenance: string;
84
+ createdat: number;
85
+ lastusedat?: number;
86
+ }>;
87
+ /** Builds the plain language prompt of one credential step: the label the vault carries, never the value. */
88
+ export declare function vaultprompttext(entry: secretvaultentry, origin: string): string;
89
+ //# sourceMappingURL=secretvault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secretvault.d.ts","sourceRoot":"","sources":["../secretvault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI7D;;;;;GAKG;AAEH,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,oJAAoJ;AACpJ,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlE;AAED,sMAAsM;AACtM,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAKxL;AAED,iLAAiL;AACjL,wBAAgB,aAAa,IAAI;IAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAOjL;AAED,8IAA8I;AAC9I,wBAAsB,UAAU,CAAC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AE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAS/I;AAQD,sMAAsM;AACtM,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAOvI;AAED,qKAAqK;AACrK,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3K;AAED,6GAA6G;AAC7G,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/E"}
@@ -0,0 +1,213 @@
1
+ import type { agentplan, cancelrunaction, consentmemoryentry, correctionentry, emptystatesurface, errorsurface, errorcause, historyindexentry, historysearchhit, historysearchquery, planprogress, recallindexentry, recallmatch, recallquery, rollbackdescriptor, runsummary, scratchpadentry, sessiongridrow, sitenote, stepoutcome, storedrunlog, tabsessionref } from "./types.js";
2
+ /** Seals one sensitive note body at rest with a local keystream; the sealed text persists while the plain body never does. */
3
+ export declare function sealnotebody(id: string, body: string): string;
4
+ /** Opens one sealed note body for the reading surface; the plain body leaves storage only through this reader. */
5
+ export declare function opennotebody(id: string, sealedbody: string): string;
6
+ /** Builds one site note record per origin: the title, the body, the author provenance and the timestamps; a sensitive note seals its body at rest while a plain note keeps its body readable. */
7
+ export declare function sitenoteof(input: {
8
+ origin: string;
9
+ title: string;
10
+ body: string;
11
+ author: string;
12
+ sensitive?: boolean;
13
+ now: number;
14
+ id?: string;
15
+ }): sitenote;
16
+ /** Reads the display body of one site note: a sensitive note opens its sealed body for the reader while a plain note returns its body. */
17
+ export declare function notebodyof(note: sitenote): string;
18
+ /** Applies one edit to a site note: the edit keeps the author provenance of the writer and the updated timestamp while the created timestamp stays. */
19
+ export declare function editnote(note: sitenote, input: {
20
+ title: string;
21
+ body: string;
22
+ author: string;
23
+ now: number;
24
+ }): sitenote;
25
+ /** Expires the site notes past the user configured window: an absent window keeps every note while the expired notes leave the store at the user boundary only. */
26
+ export declare function expirnotes(notes: sitenote[], retention: number | undefined, now: number): sitenote[];
27
+ /** Builds one append only scratchpad entry of one task with its step provenance; the scratchpad never rewrites a written entry. */
28
+ export declare function scratchentryof(input: {
29
+ taskid: string;
30
+ sessionid: string;
31
+ text: string;
32
+ stepid?: string;
33
+ author: string;
34
+ now: number;
35
+ id?: string;
36
+ }): scratchpadentry;
37
+ /** Reads the scratchpad of one task only: entries of another task never cross the owning task session boundary. */
38
+ export declare function scratchpadof(entries: scratchpadentry[], taskid: string, sessionid: string): scratchpadentry[];
39
+ /** Prunes the scratchpad entries past the user configured window: an absent window keeps every entry while the pruned entries leave the pad only at the user boundary. */
40
+ export declare function prunescratchpad(entries: scratchpadentry[], window: number | undefined, now: number): scratchpadentry[];
41
+ /** Distills one run summary from the completed run: the origins visited, the kinds executed and the per step outcomes inside the user configured window with no fixed cap; the distillation names its provenance. */
42
+ export declare function distillrunsummary(input: {
43
+ plan: agentplan;
44
+ outcomes: stepoutcome[];
45
+ origins: string[];
46
+ sessionid: string;
47
+ window?: number;
48
+ provenance: "offscreenworker" | "inline";
49
+ now: number;
50
+ }): runsummary;
51
+ /** Builds the runsummary search corpus entry of one distilled summary so historysearch indexes every summary beside the notes and the session metadata. */
52
+ export declare function summaryhistoryentry(summary: runsummary): historyindexentry;
53
+ /** Builds the sitenote search corpus entry of one note; a sensitive note indexes its title and origin only so the sealed body never enters the corpus. */
54
+ export declare function notehistoryentry(note: sitenote): historyindexentry;
55
+ /** Builds one recall index entry from a past extraction record: the fingerprint deduplicates repeated extractions while the run and step provenance stays readable. */
56
+ export declare function recallentryof(input: {
57
+ origin: string;
58
+ runid: string;
59
+ stepid: string;
60
+ text: string;
61
+ at: number;
62
+ }): recallindexentry;
63
+ /** Adds one recall index entry with fingerprint deduplication: a repeated extraction keeps its first index entry while later duplicates never double rank. */
64
+ export declare function addrecallentry(index: recallindexentry[], entry: recallindexentry): recallindexentry[];
65
+ /** Ranks the indexed extractions by local text similarity inside the worker: the jaccard overlap of the query terms and the entry terms, scoped to the origins of the run scope, with the provenance of every match. */
66
+ export declare function rankrecall(index: recallindexentry[], query: recallquery, scope: {
67
+ origins: string[];
68
+ }): recallmatch[];
69
+ /** Expires the recall index entries past the user configured window: the live index keeps the window while the extraction records themselves stay for the audit trail. */
70
+ export declare function expirerecallindex(index: recallindexentry[], window: number | undefined, now: number): recallindexentry[];
71
+ /** Builds one correction memory entry from a plan review edit: the step shape before and after the edit with the reason in plain language. */
72
+ export declare function editedcorrectionof(input: {
73
+ origin: string;
74
+ kind: string;
75
+ stepid: string;
76
+ original: string;
77
+ corrected: string;
78
+ reason: string;
79
+ now: number;
80
+ id?: string;
81
+ }): correctionentry;
82
+ /** Builds one correction memory entry from a rejected step: the step shape it refused with the rejection reason. */
83
+ export declare function rejectedcorrectionof(input: {
84
+ origin: string;
85
+ kind: string;
86
+ stepid: string;
87
+ original: string;
88
+ reason: string;
89
+ now: number;
90
+ id?: string;
91
+ }): correctionentry;
92
+ /** Reads the past corrections that match a proposed step by origin and kind so proposal requests feed the matching history in. */
93
+ export declare function matchingcorrections(corrections: correctionentry[], proposal: {
94
+ origin: string;
95
+ kind: string;
96
+ }): correctionentry[];
97
+ /** Expires the correction memory entries past the user configured window: an absent window keeps every correction. */
98
+ export declare function expirecorrections(corrections: correctionentry[], window: number | undefined, now: number): correctionentry[];
99
+ /** Builds one consent memory entry per origin: every grant, denial, expiry and revocation lands with its boundary and kinds while the record stays advisory. */
100
+ export declare function consentmemoryof(input: {
101
+ origin: string;
102
+ decision: "grant" | "deny" | "expire" | "revoke";
103
+ boundary: string;
104
+ kinds: string[];
105
+ expiresat?: number;
106
+ now: number;
107
+ id?: string;
108
+ }): consentmemoryentry;
109
+ /** Reads the prior consent decisions of one origin for the prompt surface: the history stays advisory, the denial records carry the same weight as the grants and no entry ever auto grants. */
110
+ export declare function consentadvisory(entries: consentmemoryentry[], origin: string, now: number): consentmemoryentry[];
111
+ /** Reads the advisory verdict of the consent memory for a new prompt: the latest decision names itself, a refusal keeps its refusal and no history widens a boundary. */
112
+ export declare function consentadvisoryverdict(entries: consentmemoryentry[], origin: string, kind: string): {
113
+ advisory: boolean;
114
+ reason: string;
115
+ };
116
+ /** Computes the queued and the executed steps of one run from the plan and its progress: the queued steps never executed while the executed steps stay in the sealed log. */
117
+ export declare function rollbacksplit(plan: agentplan | undefined, progress: planprogress | undefined): {
118
+ executedstepids: string[];
119
+ queuedstepids: string[];
120
+ };
121
+ /** Builds the rollback option descriptor of one cancelrun: the queued scope rolls the queued steps back only while the executed steps stay untouched in the immutable log. */
122
+ export declare function rollbackof(plan: agentplan | undefined, progress: planprogress | undefined, preference: "queued" | "none" | undefined): rollbackdescriptor;
123
+ /** Builds one cancelrun action with its rollback option descriptor; the action never touches the sealed log of the executed steps. */
124
+ export declare function cancelrunactionof(input: {
125
+ runid: string;
126
+ sessionid: string;
127
+ plan: agentplan | undefined;
128
+ progress: planprogress | undefined;
129
+ preference: "queued" | "none" | undefined;
130
+ }): cancelrunaction;
131
+ /** Builds one error surface payload of a failed step: the cause class, the message, the retry hint with the policy verdict and the context facts. */
132
+ export declare function errorsurfaceof(input: {
133
+ stepid: string;
134
+ runid: string;
135
+ message: string;
136
+ cause: errorcause;
137
+ retryallowed: boolean;
138
+ retryreason: string;
139
+ context: Record<string, string>;
140
+ now: number;
141
+ }): errorsurface;
142
+ /** Classifies the cause of one failed step: a policy refusal and a gate wait carry their own classes, a network shaped message names the network and every other failure stays with the page. */
143
+ export declare function classifyfailure(input: {
144
+ message: string;
145
+ policyrefused: boolean;
146
+ gatewait: boolean;
147
+ }): errorcause;
148
+ /** Reads the retry hint of one error surface: a retry passes only through a new reviewed dispatch, so the verdict names the reviewed path instead of an automatic one. */
149
+ export declare function retryhintof(surface: errorsurface): {
150
+ allowed: boolean;
151
+ reason: string;
152
+ };
153
+ /** Derives the session grid rows from the existing session stores with no new state: the live run derives from the session, the plan and its progress, the saved runs derive from the sealed logs and their summaries, and the per tab lock state names the concurrent holder. */
154
+ export declare function sessiongridrows(input: {
155
+ session?: {
156
+ id: string;
157
+ tabid: number;
158
+ origin: string;
159
+ stoppedat?: number;
160
+ pausedat?: number;
161
+ grants?: string[];
162
+ };
163
+ plan?: agentplan;
164
+ progress?: planprogress;
165
+ logs: storedrunlog[];
166
+ summaries: runsummary[];
167
+ locks: Array<{
168
+ runid: string;
169
+ }>;
170
+ tabsessions: tabsessionref[];
171
+ }): sessiongridrow[];
172
+ /** Normalizes one history search query: the non empty text with the optional origin, time range and outcome filters. */
173
+ export declare function historyqueryof(value: unknown): historysearchquery | undefined;
174
+ /** Adds one corpus entry to the incremental history index: each store write lands in the index at once so the search reads a growing corpus with no rebuild. */
175
+ export declare function addhistoryentry(corpus: historyindexentry[], entry: historyindexentry): historyindexentry[];
176
+ /** Extracts the matched terms of one query inside one text, case insensitive, for the result highlighting. */
177
+ export declare function highlightterms(text: string, query: string): string[];
178
+ /** Searches the one corpus of session metadata, notes and run summaries: the text matches with the matched terms highlighted, filtered by origin, time range and outcome. */
179
+ export declare function historysearch(corpus: historyindexentry[], query: historysearchquery): historysearchhit[];
180
+ /** Serves the empty state guidance of one session interface surface in plain language: the grid explains the first run, the search box suggests a first query, the notes explain the note flow and the scratchpad explains how the agent writes. */
181
+ export declare function emptystatemessage(surface: emptystatesurface, origin?: string): string;
182
+ /** Builds the per tab isolation key of one tab so parallel tabs never collide inside the session stores. */
183
+ export declare function tabsessionkey(tabid: number): string;
184
+ /** Builds one per tab session reference that isolates the session state per tab: parallel tabs keep their own session, run and origin references. */
185
+ export declare function tabsessionrefof(input: {
186
+ tabid: number;
187
+ sessionid: string;
188
+ runid?: string;
189
+ origin: string;
190
+ now: number;
191
+ }): tabsessionref;
192
+ /** Exports the site notes, the run summaries and the correction memory as one audit bundle: every record carries its provenance while sensitive note bodies stay sealed. */
193
+ export declare function sessionbundleof(input: {
194
+ notes: sitenote[];
195
+ summaries: runsummary[];
196
+ corrections: correctionentry[];
197
+ exportedat: number;
198
+ }): {
199
+ kind: "sessionbundle";
200
+ notes: sitenote[];
201
+ summaries: runsummary[];
202
+ corrections: correctionentry[];
203
+ exportedat: number;
204
+ };
205
+ /**
206
+ * The recall seam the memory adapter documents for the future remote recall backend: today the local fingerprint index answers every semanticrecall query inside the extension, and the seam keeps the query and answer shapes stable so a reviewed remote backend can take the calls later without touching the callers.
207
+ */
208
+ export interface recallseam {
209
+ recall(query: recallquery, scope: {
210
+ origins: string[];
211
+ }): Promise<recallmatch[]>;
212
+ }
213
+ //# sourceMappingURL=sessioninterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessioninterface.d.ts","sourceRoot":"","sources":["../sessioninterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA8BvX,8HAA8H;AAC9H,wBAAgB,YAAY,CAAC,EAAE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U,EAAE,CAAC;IAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAEpQ;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAClF"}
@@ -0,0 +1,46 @@
1
+ import type { automationallowlistentry, connectallowentry, consentwindow, originprofile, permdiffrecord, transparencygrant } from "./types.js";
2
+ /**
3
+ * Transparency logic of the 1.1.62 family.
4
+ * The transparencypage grammar lives here: every active grant reads as one row with its origin, scope and boundary, every consent window ever granted stays listed with its expiry even after it closed, the connectallow entries list with their senders, and the permdiff of each installed update records the added and removed permissions between two versions.
5
+ * The revoke actions stay one descriptor per grant row, because every listed grant revokes from the same page that shows it.
6
+ */
7
+ /** Computes the permdiff between two permission versions: the permissions the new version added, the permissions it removed and the computed time; an unchanged set carries empty lists while the record still lands for the audit trail. */
8
+ export declare function permissiondiff(input: {
9
+ from: string[];
10
+ to: string[];
11
+ fromversion: string;
12
+ toversion: string;
13
+ now: number;
14
+ }): permdiffrecord;
15
+ /** Reads whether one permdiff record reports a change between its versions; an unchanged permission set still records for the audit trail. */
16
+ export declare function permdiffchanged(diff: permdiffrecord): boolean;
17
+ /** Builds the plain language summary of one permdiff record for the transparencypage. */
18
+ export declare function permdiffsummary(diff: permdiffrecord): string;
19
+ /** Builds the transparency grant rows of every active grant: each allowlist origin carries its profile workspace scope and its grant time, and each originprofile carries its per kind scope. */
20
+ export declare function transparencygrants(input: {
21
+ allowlist: automationallowlistentry[];
22
+ profiles: originprofile[];
23
+ }): transparencygrant[];
24
+ /** Builds the revoke action descriptor of one transparency grant row: every listed grant revokes from the same page that shows it. */
25
+ export declare function revokeaction(grant: transparencygrant): {
26
+ action: "revoke";
27
+ origin: string;
28
+ scope: string;
29
+ };
30
+ /** Lists every consent window ever granted with its expiry: closed windows stay listed beside the active ones because the transparency page shows the whole grant history. */
31
+ export declare function windowhistory(windows: consentwindow[]): Array<{
32
+ id: string;
33
+ origin: string;
34
+ state: string;
35
+ boundary: string;
36
+ startedat: number;
37
+ expiresat: number;
38
+ }>;
39
+ /** Lists the connectallow entries with their senders: the display names, the sender ids and the origin scopes the user allowed. */
40
+ export declare function connectallowlist(entries: connectallowentry[]): Array<{
41
+ senderid: string;
42
+ displayname: string;
43
+ origin?: string;
44
+ addedat: number;
45
+ }>;
46
+ //# sourceMappingURL=transparency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transparency.d.ts","sourceRoot":"","sources":["../transparency.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/I;;;;GAIG;AAEH,6OAA6O;AAC7O,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAK3I;AAED,8IAA8I;AAC9I,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAE7D;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAM5D;AAED,iMAAiM;AACjM,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,GAAG,iBAAiB,EAAE,CAMnI;AAED,sIAAsI;AACtI,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG;IAAE,MAAM,EAAE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