@enricai/barnacle 1.5.0 → 1.6.0

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 (62) hide show
  1. package/README.md +29 -0
  2. package/dist/api/errors.d.ts +2 -1
  3. package/dist/api/errors.d.ts.map +1 -1
  4. package/dist/api/errors.js +3 -2
  5. package/dist/api/errors.js.map +1 -1
  6. package/dist/lib/llm/judge.d.ts +1 -1
  7. package/dist/lib/llm/judge.js +1 -1
  8. package/dist/recon/capture-filters.d.ts +40 -0
  9. package/dist/recon/capture-filters.d.ts.map +1 -0
  10. package/dist/recon/capture-filters.js +106 -0
  11. package/dist/recon/capture-filters.js.map +1 -0
  12. package/dist/recon/form-schema.d.ts +51 -0
  13. package/dist/recon/form-schema.d.ts.map +1 -0
  14. package/dist/recon/form-schema.js +20 -0
  15. package/dist/recon/form-schema.js.map +1 -0
  16. package/dist/recon/load-form-schema.d.ts +24 -0
  17. package/dist/recon/load-form-schema.d.ts.map +1 -0
  18. package/dist/recon/load-form-schema.js +66 -0
  19. package/dist/recon/load-form-schema.js.map +1 -0
  20. package/dist/scraper/errors.d.ts +14 -14
  21. package/dist/scraper/errors.d.ts.map +1 -1
  22. package/dist/scraper/errors.js +15 -15
  23. package/dist/scraper/errors.js.map +1 -1
  24. package/dist/scraper/flow-runner.d.ts.map +1 -1
  25. package/dist/scraper/flow-runner.js +9 -8
  26. package/dist/scraper/flow-runner.js.map +1 -1
  27. package/dist/scraper/http-client.d.ts +12 -0
  28. package/dist/scraper/http-client.d.ts.map +1 -1
  29. package/dist/scraper/http-client.js +11 -15
  30. package/dist/scraper/http-client.js.map +1 -1
  31. package/dist/scraper/parse-json-response.d.ts +7 -5
  32. package/dist/scraper/parse-json-response.d.ts.map +1 -1
  33. package/dist/scraper/parse-json-response.js +9 -8
  34. package/dist/scraper/parse-json-response.js.map +1 -1
  35. package/dist/scraper/rate-limited-json-client.d.ts +8 -1
  36. package/dist/scraper/rate-limited-json-client.d.ts.map +1 -1
  37. package/dist/scraper/rate-limited-json-client.js +6 -1
  38. package/dist/scraper/rate-limited-json-client.js.map +1 -1
  39. package/dist/scraper/session-browserbase.d.ts +6 -0
  40. package/dist/scraper/session-browserbase.d.ts.map +1 -1
  41. package/dist/scraper/session-browserbase.js +6 -0
  42. package/dist/scraper/session-browserbase.js.map +1 -1
  43. package/dist/scripts/recon-browser.d.ts.map +1 -1
  44. package/dist/scripts/recon-browser.js +3 -4
  45. package/dist/scripts/recon-browser.js.map +1 -1
  46. package/dist/scripts/recon-generate.d.ts +50 -21
  47. package/dist/scripts/recon-generate.d.ts.map +1 -1
  48. package/dist/scripts/recon-generate.js +190 -182
  49. package/dist/scripts/recon-generate.js.map +1 -1
  50. package/dist/scripts/recon-http.d.ts +5 -2
  51. package/dist/scripts/recon-http.d.ts.map +1 -1
  52. package/dist/scripts/recon-http.js +16 -4
  53. package/dist/scripts/recon-http.js.map +1 -1
  54. package/dist/testing/persona-fixture.d.ts +2 -2
  55. package/dist/testing/persona-fixture.d.ts.map +1 -1
  56. package/dist/testing/persona-fixture.js +2 -2
  57. package/dist/testing/persona-fixture.js.map +1 -1
  58. package/package.json +5 -1
  59. package/dist/scraper/oracle-sentinels.d.ts +0 -22
  60. package/dist/scraper/oracle-sentinels.d.ts.map +0 -1
  61. package/dist/scraper/oracle-sentinels.js +0 -40
  62. package/dist/scraper/oracle-sentinels.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"persona-fixture.js","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;IACH,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;QAChE,iBAAiB,EAAE,IAAI;QACvB,6EAA6E;QAC7E,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB;gEACwD;QACxD,MAAM,EAAE,eAAe;QACvB,yDAAyD;QACzD,WAAW,EAAE,eAAe;QAC5B,iDAAiD;QACjD,WAAW,EAAE,IAAI;KAClB;IACD;;;;OAIG;IACH,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,YAAY;IACzB,gFAAgF;IAChF,UAAU,EAAE;QACV,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,eAAe;QAC5B,YAAY,EAAE,iBAAiB;QAC/B,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,YAAY;QACrB,mBAAmB,EACjB,8FAA8F;KACjG;IACD,qFAAqF;IACrF,UAAU,EAAE;QACV;YACE,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,+BAA+B;YACtC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,8BAA8B;YACrC,KAAK,EAAE,iBAAiB;SACzB;KACF;IACD,yDAAyD;IACzD,aAAa,EAAE,oBAAoB;CAC3B,CAAC"}
1
+ {"version":3,"file":"persona-fixture.js","sourceRoot":"","sources":["../../src/testing/persona-fixture.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,WAAW;IACrB;;;;;;;;;OASG;IACH,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,gEAAgE;QAChE,iBAAiB,EAAE,IAAI;QACvB,yDAAyD;QACzD,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB;gEACwD;QACxD,MAAM,EAAE,eAAe;QACvB,yDAAyD;QACzD,WAAW,EAAE,eAAe;QAC5B,iDAAiD;QACjD,WAAW,EAAE,IAAI;KAClB;IACD;;;;OAIG;IACH,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,YAAY;IACzB,gFAAgF;IAChF,UAAU,EAAE;QACV,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,eAAe;QAC5B,YAAY,EAAE,iBAAiB;QAC/B,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,YAAY;QACrB,mBAAmB,EACjB,8FAA8F;KACjG;IACD,+EAA+E;IAC/E,UAAU,EAAE;QACV;YACE,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,+BAA+B;YACtC,KAAK,EAAE,iBAAiB;SACzB;QACD;YACE,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,8BAA8B;YACrC,KAAK,EAAE,iBAAiB;SACzB;KACF;IACD,yDAAyD;IACzD,aAAa,EAAE,oBAAoB;CAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enricai/barnacle",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Site-agnostic browser automation engine. POST a structured payload to a typed endpoint; Barnacle drives a Steel + Stagehand session through the target site and returns a structured result.",
5
5
  "license": "MIT",
6
6
  "author": "Enricai",
@@ -124,6 +124,10 @@
124
124
  "types": "./dist/plugins/loader.d.ts",
125
125
  "default": "./dist/plugins/loader.js"
126
126
  },
127
+ "./recon/form-schema": {
128
+ "types": "./dist/recon/form-schema.d.ts",
129
+ "default": "./dist/recon/form-schema.js"
130
+ },
127
131
  "./recon/vocabulary": {
128
132
  "types": "./dist/recon/vocabulary.d.ts",
129
133
  "default": "./dist/recon/vocabulary.js"
@@ -1,22 +0,0 @@
1
- /**
2
- * Pure classifier for Oracle HCM plain-text sentinel bodies. Oracle occasionally
3
- * responds with a raw ASCII token instead of JSON; the token's prefix determines
4
- * whether the failure is terminal (locked URL, must not retry) or transient
5
- * (rate-limit window, may retry).
6
- *
7
- * Isolated here so the discriminator logic is exhaustively testable without
8
- * coupling to the HTTP/p-retry machinery in http-client.ts.
9
- */
10
- /** Classification of an Oracle plain-text sentinel body. */
11
- export type OracleSentinelKind = "locked" | "transient" | "none";
12
- /**
13
- * Classifies an Oracle HCM plain-text response body.
14
- *
15
- * Returns `'locked'` for terminal sentinels (ORA_URL_LOCKED) that must not be
16
- * retried. Returns `'transient'` for ORA_IRC_* tokens that represent a
17
- * rate-limit window and should be retried. Returns `'none'` for anything else
18
- * (HTML error pages, unexpected text) so the caller can fall through to its
19
- * existing parse-and-retry logic.
20
- */
21
- export declare function classifyOracleSentinel(rawText: string): OracleSentinelKind;
22
- //# sourceMappingURL=oracle-sentinels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oracle-sentinels.d.ts","sourceRoot":"","sources":["../../src/scraper/oracle-sentinels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;AASjE;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAc1E"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- /**
3
- * Pure classifier for Oracle HCM plain-text sentinel bodies. Oracle occasionally
4
- * responds with a raw ASCII token instead of JSON; the token's prefix determines
5
- * whether the failure is terminal (locked URL, must not retry) or transient
6
- * (rate-limit window, may retry).
7
- *
8
- * Isolated here so the discriminator logic is exhaustively testable without
9
- * coupling to the HTTP/p-retry machinery in http-client.ts.
10
- */
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.classifyOracleSentinel = classifyOracleSentinel;
13
- /**
14
- * Tokens confirmed as terminal locked/rate-limit conditions. Oracle issues these
15
- * after repeated attempts against the same requisition URL; retrying cannot
16
- * succeed and may deepen the lock.
17
- */
18
- const LOCKED_SENTINELS = ["ORA_URL_LOCKED"];
19
- /**
20
- * Classifies an Oracle HCM plain-text response body.
21
- *
22
- * Returns `'locked'` for terminal sentinels (ORA_URL_LOCKED) that must not be
23
- * retried. Returns `'transient'` for ORA_IRC_* tokens that represent a
24
- * rate-limit window and should be retried. Returns `'none'` for anything else
25
- * (HTML error pages, unexpected text) so the caller can fall through to its
26
- * existing parse-and-retry logic.
27
- */
28
- function classifyOracleSentinel(rawText) {
29
- const trimmed = rawText.trim();
30
- for (const sentinel of LOCKED_SENTINELS) {
31
- if (trimmed === sentinel) {
32
- return "locked";
33
- }
34
- }
35
- if (trimmed.startsWith("ORA_IRC_")) {
36
- return "transient";
37
- }
38
- return "none";
39
- }
40
- //# sourceMappingURL=oracle-sentinels.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oracle-sentinels.js","sourceRoot":"","sources":["../../src/scraper/oracle-sentinels.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAKH;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,gBAAgB,CAAU,CAAC;AAErD;;;;;;;;GAQG;AACH,gCAAuC,OAAe;IACpD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAE/B,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE,CAAC;QACxC,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}