unbrowse 2.12.2 → 2.12.4

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 (60) hide show
  1. package/README.md +86 -5
  2. package/SKILL.md +754 -0
  3. package/bin/unbrowse-update-hint.mjs +22 -0
  4. package/bin/unbrowse-wrapper.mjs +84 -16
  5. package/bin/unbrowse.js +0 -1
  6. package/dist/cli.js +1899 -19159
  7. package/dist/mcp.js +1796 -0
  8. package/package.json +6 -3
  9. package/runtime-src/agent-outcome.ts +166 -0
  10. package/runtime-src/analytics-session.ts +28 -6
  11. package/runtime-src/api/browse-session.ts +520 -51
  12. package/runtime-src/api/browse-submit-prereqs.ts +48 -0
  13. package/runtime-src/api/browse-submit.ts +746 -17
  14. package/runtime-src/api/routes.ts +950 -427
  15. package/runtime-src/auth/index.ts +160 -7
  16. package/runtime-src/browser/index.ts +17 -9
  17. package/runtime-src/build-info.generated.ts +4 -0
  18. package/runtime-src/capture/index.ts +30 -22
  19. package/runtime-src/cli.ts +412 -83
  20. package/runtime-src/client/index.ts +97 -24
  21. package/runtime-src/execution/index.ts +351 -60
  22. package/runtime-src/indexer/index.ts +208 -247
  23. package/runtime-src/kuri/client.ts +774 -267
  24. package/runtime-src/mcp.ts +1522 -0
  25. package/runtime-src/orchestrator/first-pass-action.ts +69 -28
  26. package/runtime-src/orchestrator/index.ts +603 -133
  27. package/runtime-src/orchestrator/passive-publish.ts +33 -3
  28. package/runtime-src/payments/wallet.ts +76 -11
  29. package/runtime-src/publish/sanitize.ts +197 -0
  30. package/runtime-src/publish-admission.ts +279 -0
  31. package/runtime-src/reverse-engineer/description-prompt.ts +83 -2
  32. package/runtime-src/reverse-engineer/index.ts +29 -10
  33. package/runtime-src/routing-telemetry.ts +395 -0
  34. package/runtime-src/runtime/browser-auth.ts +12 -0
  35. package/runtime-src/runtime/local-server.ts +107 -24
  36. package/runtime-src/runtime/setup.ts +11 -7
  37. package/runtime-src/runtime/update-hints.ts +351 -0
  38. package/runtime-src/server.ts +5 -0
  39. package/runtime-src/settings.ts +221 -0
  40. package/runtime-src/site-policy.ts +54 -0
  41. package/runtime-src/stale-cleanup-runner.ts +144 -0
  42. package/runtime-src/stale-cleanup.ts +133 -0
  43. package/runtime-src/telemetry-attribution.ts +120 -0
  44. package/runtime-src/types/skill.ts +439 -0
  45. package/runtime-src/verification/auth-gate.ts +8 -0
  46. package/runtime-src/verification/candidates.ts +27 -0
  47. package/runtime-src/verification/index.ts +21 -15
  48. package/runtime-src/version.ts +73 -13
  49. package/runtime-src/workflow/artifact.ts +161 -0
  50. package/runtime-src/workflow/compile.ts +808 -0
  51. package/runtime-src/workflow/publish.ts +205 -0
  52. package/runtime-src/workflow/runtime.ts +213 -0
  53. package/scripts/postinstall.mjs +43 -19
  54. package/scripts/release-assets.mjs +24 -0
  55. package/scripts/verify-release-assets.mjs +39 -0
  56. package/vendor/kuri/darwin-arm64/kuri +0 -0
  57. package/vendor/kuri/darwin-x64/kuri +0 -0
  58. package/vendor/kuri/linux-arm64/kuri +0 -0
  59. package/vendor/kuri/linux-x64/kuri +0 -0
  60. package/vendor/kuri/manifest.json +24 -0
@@ -0,0 +1,48 @@
1
+ export const MONTH_INDEX: Record<string, string> = {
2
+ jan: "01",
3
+ january: "01",
4
+ feb: "02",
5
+ february: "02",
6
+ mar: "03",
7
+ march: "03",
8
+ apr: "04",
9
+ april: "04",
10
+ may: "05",
11
+ jun: "06",
12
+ june: "06",
13
+ jul: "07",
14
+ july: "07",
15
+ aug: "08",
16
+ august: "08",
17
+ sep: "09",
18
+ sept: "09",
19
+ september: "09",
20
+ oct: "10",
21
+ october: "10",
22
+ nov: "11",
23
+ november: "11",
24
+ dec: "12",
25
+ december: "12",
26
+ };
27
+
28
+ export function inferCalendarIsoDate(monthLabel: string, dayLabel: string): string | null {
29
+ const day = Number.parseInt(dayLabel.trim(), 10);
30
+ if (!Number.isFinite(day) || day < 1 || day > 31) return null;
31
+
32
+ const year = monthLabel.match(/\b(\d{4})\b/)?.[1];
33
+ if (!year) return null;
34
+
35
+ const tokens = monthLabel
36
+ .toLowerCase()
37
+ .replace(/[^a-z0-9\s]+/g, " ")
38
+ .split(/\s+/)
39
+ .map((token) => token.trim())
40
+ .filter(Boolean);
41
+
42
+ const month = tokens
43
+ .map((token) => MONTH_INDEX[token] ?? MONTH_INDEX[token.slice(0, 3)])
44
+ .find(Boolean);
45
+ if (!month) return null;
46
+
47
+ return `${year}-${month}-${String(day).padStart(2, "0")}`;
48
+ }