@wenathlan/extension 1.1.60 → 1.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +5 -3
  2. package/dist/confirmgates.d.ts +60 -0
  3. package/dist/confirmgates.d.ts.map +1 -0
  4. package/dist/immutablelog.d.ts +73 -0
  5. package/dist/immutablelog.d.ts.map +1 -0
  6. package/dist/inboundguard.d.ts +86 -0
  7. package/dist/inboundguard.d.ts.map +1 -0
  8. package/dist/index.d.ts +10 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1278 -1
  11. package/dist/index.js.map +4 -4
  12. package/dist/maskinputs.d.ts +52 -0
  13. package/dist/maskinputs.d.ts.map +1 -0
  14. package/dist/memory.d.ts +153 -1
  15. package/dist/memory.d.ts.map +1 -1
  16. package/dist/originpolicy.d.ts +160 -0
  17. package/dist/originpolicy.d.ts.map +1 -0
  18. package/dist/phishguard.d.ts +24 -0
  19. package/dist/phishguard.d.ts.map +1 -0
  20. package/dist/policy.d.ts +123 -1
  21. package/dist/policy.d.ts.map +1 -1
  22. package/dist/protocol.d.ts +164 -1
  23. package/dist/protocol.d.ts.map +1 -1
  24. package/dist/redactshots.d.ts +54 -0
  25. package/dist/redactshots.d.ts.map +1 -0
  26. package/dist/secretvault.d.ts +89 -0
  27. package/dist/secretvault.d.ts.map +1 -0
  28. package/dist/transparency.d.ts +46 -0
  29. package/dist/transparency.d.ts.map +1 -0
  30. package/dist/types.d.ts +316 -2
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/extension/dist/background.js +1650 -56
  34. package/extension/dist/background.js.map +4 -4
  35. package/extension/dist/manifest.json +5 -1
  36. package/extension/dist/pagebridge.js +91 -28
  37. package/extension/dist/pagebridge.js.map +3 -3
  38. package/extension/dist/popup.html +1 -1
  39. package/extension/dist/popup.js +54 -0
  40. package/extension/dist/popup.js.map +2 -2
  41. package/extension/dist/sidepanel.html +1 -1
  42. package/extension/dist/sidepanel.js +331 -0
  43. package/extension/dist/sidepanel.js.map +4 -4
  44. package/extension/dist/transparencypage.html +24 -0
  45. package/extension/dist/transparencypage.js +156 -0
  46. package/extension/dist/transparencypage.js.map +7 -0
  47. package/extension/manifest.json +5 -1
  48. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnOEjO8Z0PDgQyfvawGcaO2j+o0GLCFTLNj7TkYC/Avo9l2NenMRq7gp90Nfd7E9MViv/OMcCKSYZ5unv12QPRtv31C+a5UQWDFAOP/cH5mwMd6hsayElrSoW8ta+FwFqmr9dIFkn7cQEU3YhZr4Gcbs+ycUHOxVgDA4NBKB0rQ6e9VW5LvTw0isRYUrqM+M72vKxHk9zUIYYn/LGPvottKBYi2GLr0PHSeC2UE+Shmq7vcFIXj6hDjvD4kLJ5sKoUllEcZ1TPuBcnHUQ9ndKA5iktXDQOIJCUJmi7a0YJ2PGg7fvpYfT9k0ai/qZ+pIoRfoOEwE01bPoDn7NjeYnNQIDAQAB",
4
4
  "name": "Devthink",
5
- "version": "1.1.60",
5
+ "version": "1.1.62",
6
6
  "description": "A consent-first bridge for reviewed browser-agent tasks.",
7
7
  "permissions": [
8
8
  "activeTab",
@@ -43,5 +43,9 @@
43
43
  },
44
44
  "side_panel": {
45
45
  "default_path": "sidepanel.html"
46
+ },
47
+ "options_ui": {
48
+ "page": "transparencypage.html",
49
+ "open_in_tab": true
46
50
  }
47
51
  }
@@ -1,35 +1,56 @@
1
1
  "use strict";
2
2
  (() => {
3
- // cdpbus.ts
4
- function breakpointinputof(value) {
5
- if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
6
- const entry = value;
7
- const url = typeof entry.url === "string" && entry.url.trim() ? entry.url.trim() : void 0;
8
- const line = typeof entry.line === "number" && Number.isInteger(entry.line) && entry.line >= 0 ? entry.line : void 0;
9
- if (url === void 0 || line === void 0) return void 0;
10
- const column = typeof entry.column === "number" && Number.isInteger(entry.column) && entry.column >= 0 ? entry.column : void 0;
11
- const condition = typeof entry.condition === "string" && entry.condition.trim() ? entry.condition.trim() : void 0;
12
- return { url, line, ...column !== void 0 ? { column } : {}, ...condition !== void 0 ? { condition } : {} };
3
+ // maskinputs.ts
4
+ var maskmarker = "[redacted]";
5
+ function fieldshapekind(name) {
6
+ const lowered = name.toLowerCase();
7
+ if (lowered.includes("password") || lowered.includes("passwd") || lowered.includes("pwd") || lowered.includes("passphrase")) return "password";
8
+ if (lowered.includes("token") || lowered.includes("apikey") || lowered.includes("api_key") || lowered.includes("auth") || lowered.includes("bearer")) return "token";
9
+ if (lowered.includes("card") || lowered.includes("cvc") || lowered.includes("cvv") || lowered.includes("expiry") || lowered.includes("pan")) return "card";
10
+ if (lowered.includes("secret")) return "secret";
11
+ return void 0;
13
12
  }
14
- function stepmodeof(value) {
15
- const modes = ["stepover", "stepinto", "stepout", "resume"];
16
- return typeof value === "string" && modes.includes(value) ? value : void 0;
13
+ function maskingfield(name, shapes) {
14
+ if (fieldshapekind(name) !== void 0) return true;
15
+ const lowered = name.toLowerCase();
16
+ return shapes.some((shape) => shape !== "" && lowered.includes(shape));
17
+ }
18
+ function maskvalue(value) {
19
+ return value === "" ? "" : maskmarker;
20
+ }
21
+ function maskfield(input) {
22
+ return maskingfield(input.name, input.shapes) ? maskvalue(input.value) : input.value;
23
+ }
24
+ function maskrecord(record, shapes) {
25
+ const masked = {};
26
+ for (const [key, value] of Object.entries(record)) {
27
+ if (typeof value === "string") {
28
+ const sibling = record.name;
29
+ masked[key] = key === "value" && typeof sibling === "string" ? maskfield({ name: sibling, value, shapes }) : maskfield({ name: key, value, shapes });
30
+ } else if (Array.isArray(value)) masked[key] = value.map((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item) ? maskrecord(item, shapes) : item);
31
+ else if (Boolean(value) && typeof value === "object") masked[key] = maskrecord(value, shapes);
32
+ else masked[key] = value;
33
+ }
34
+ return masked;
35
+ }
36
+ function masktypedvalues(input) {
37
+ const sensitive = maskingfield(input.step.target ?? "", input.shapes) || maskingfield(input.step.kind, input.shapes);
38
+ const maskedvalue = input.step.value !== void 0 && sensitive ? maskvalue(input.step.value) : input.step.value;
39
+ let maskedoptions = input.step.options;
40
+ if (input.step.options !== void 0) {
41
+ try {
42
+ const parsed = JSON.parse(input.step.options);
43
+ if (Boolean(parsed) && typeof parsed === "object" && !Array.isArray(parsed)) maskedoptions = JSON.stringify(maskrecord(parsed, input.shapes));
44
+ } catch {
45
+ }
46
+ }
47
+ return { ...maskedvalue !== void 0 ? { value: maskedvalue } : {}, ...maskedoptions !== void 0 ? { options: maskedoptions } : {} };
17
48
  }
18
- function watchexpressionof(value) {
19
- if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
20
- const entry = value;
21
- const expression = typeof entry.expression === "string" && entry.expression.trim() ? entry.expression.trim() : void 0;
22
- if (expression === void 0) return void 0;
23
- const scope = typeof entry.scope === "string" && entry.scope.trim() ? entry.scope.trim() : "topframe";
24
- return { expression, scope };
49
+ function maskformstate(fields, shapes) {
50
+ return fields.map((field) => ({ ...field, value: maskfield({ name: field.name, value: field.value, shapes }) }));
25
51
  }
26
- function overrideinputof(value) {
27
- if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
28
- const entry = value;
29
- const urlpattern = typeof entry.urlpattern === "string" && entry.urlpattern.trim() ? entry.urlpattern.trim() : void 0;
30
- const source = typeof entry.source === "string" ? entry.source : void 0;
31
- if (urlpattern === void 0 || source === void 0 || source.trim().length === 0) return void 0;
32
- return { urlpattern, source };
52
+ function maskobservation(shot, shapes) {
53
+ return { ...shot, forms: shot.forms.map((form) => maskingfield(form.name, shapes) ? { ...form, options: [maskmarker] } : form) };
33
54
  }
34
55
 
35
56
  // emulation.ts
@@ -132,6 +153,38 @@
132
153
  return walk(0, 0);
133
154
  }
134
155
 
156
+ // cdpbus.ts
157
+ function breakpointinputof(value) {
158
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
159
+ const entry = value;
160
+ const url = typeof entry.url === "string" && entry.url.trim() ? entry.url.trim() : void 0;
161
+ const line = typeof entry.line === "number" && Number.isInteger(entry.line) && entry.line >= 0 ? entry.line : void 0;
162
+ if (url === void 0 || line === void 0) return void 0;
163
+ const column = typeof entry.column === "number" && Number.isInteger(entry.column) && entry.column >= 0 ? entry.column : void 0;
164
+ const condition = typeof entry.condition === "string" && entry.condition.trim() ? entry.condition.trim() : void 0;
165
+ return { url, line, ...column !== void 0 ? { column } : {}, ...condition !== void 0 ? { condition } : {} };
166
+ }
167
+ function stepmodeof(value) {
168
+ const modes = ["stepover", "stepinto", "stepout", "resume"];
169
+ return typeof value === "string" && modes.includes(value) ? value : void 0;
170
+ }
171
+ function watchexpressionof(value) {
172
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
173
+ const entry = value;
174
+ const expression = typeof entry.expression === "string" && entry.expression.trim() ? entry.expression.trim() : void 0;
175
+ if (expression === void 0) return void 0;
176
+ const scope = typeof entry.scope === "string" && entry.scope.trim() ? entry.scope.trim() : "topframe";
177
+ return { expression, scope };
178
+ }
179
+ function overrideinputof(value) {
180
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
181
+ const entry = value;
182
+ const urlpattern = typeof entry.urlpattern === "string" && entry.urlpattern.trim() ? entry.urlpattern.trim() : void 0;
183
+ const source = typeof entry.source === "string" ? entry.source : void 0;
184
+ if (urlpattern === void 0 || source === void 0 || source.trim().length === 0) return void 0;
185
+ return { urlpattern, source };
186
+ }
187
+
135
188
  // runtimeline.ts
136
189
  var loglevels = ["error", "warn", "info", "log", "debug", "trace"];
137
190
  function levelrank(level) {
@@ -4484,6 +4537,16 @@
4484
4537
  for (const cookie of targets) document.cookie = `${cookie.name}=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT`;
4485
4538
  return { cleared: targets.length, summary: `Cleared ${targets.length} cookie${targets.length === 1 ? "" : "s"} through the page cookie jar of ${location.origin}.` };
4486
4539
  }
4487
- Object.assign(globalThis, { devthinkbridge: { capturesnapshot, previewtarget, performstep, readdialogs, measurepage, elementrect, queryelements, preparecapture, scrollcapture, restorecapture, scrollcontainercapture, waitsettle, pdfsegment, pdfbreaks, videoframe, canvasdata, streamelements, mediaelements, pageassets, pageimages, parsehtmlmarkup, resourcerecords, writecookies, readcookies, clearcookies, revertemulationlayer } });
4540
+ function maskstepvalues(step, shapes) {
4541
+ const masked = masktypedvalues({ step, shapes });
4542
+ return { ...step, ...masked.value !== void 0 ? { value: masked.value } : {}, ...masked.options !== void 0 ? { options: masked.options } : {} };
4543
+ }
4544
+ function maskobservationstate(fields, shapes) {
4545
+ return maskformstate(fields, shapes);
4546
+ }
4547
+ function maskobservationsnapshot(shot, shapes) {
4548
+ return maskobservation(shot, shapes);
4549
+ }
4550
+ Object.assign(globalThis, { devthinkbridge: { maskstepvalues, maskobservationstate, maskobservationsnapshot, capturesnapshot, previewtarget, performstep, readdialogs, measurepage, elementrect, queryelements, preparecapture, scrollcapture, restorecapture, scrollcontainercapture, waitsettle, pdfsegment, pdfbreaks, videoframe, canvasdata, streamelements, mediaelements, pageassets, pageimages, parsehtmlmarkup, resourcerecords, writecookies, readcookies, clearcookies, revertemulationlayer } });
4488
4551
  })();
4489
4552
  //# sourceMappingURL=pagebridge.js.map