AgPerry commited on
Commit
3c51732
·
verified ·
1 Parent(s): aa10972

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. tasks/legalnature/environment/agent-browser/browser-use +152 -0
  2. tasks/legalnature/environment/agent-browser/gateway.py +524 -0
  3. tasks/legalnature/environment/candidate-abi/websitebench-candidate-preflight +5 -0
  4. tasks/legalnature/environment/mailbox/Dockerfile +5 -0
  5. tasks/legalnature/environment/mailbox/mailbox.py +2433 -0
  6. tasks/legalnature/environment/reference/.websitebench-reference-tls/ca.crt +20 -0
  7. tasks/legalnature/environment/reference/.websitebench-reference-tls/reference.crt +20 -0
  8. tasks/legalnature/environment/reference/.websitebench-reference-tls/reference.key +28 -0
  9. tasks/legalnature/environment/reference/.websitebench-reference-tls/tls_proxy.py +164 -0
  10. tasks/legalnature/environment/reference/Dockerfile +19 -0
  11. tasks/legalnature/environment/reference/README.md +5 -0
  12. tasks/legalnature/environment/reference/backend/model.json +435 -0
  13. tasks/legalnature/environment/reference/backend/runtime.json +104 -0
  14. tasks/legalnature/environment/reference/clone/app.py +1135 -0
  15. tasks/legalnature/environment/reference/clone/backend/catalog.py +344 -0
  16. tasks/legalnature/environment/reference/clone/backend/documents.py +1352 -0
  17. tasks/legalnature/environment/reference/clone/backend/site_backend_integration.py +112 -0
  18. tasks/legalnature/environment/reference/clone/backend/store.py +659 -0
  19. tasks/legalnature/environment/reference/clone/data/site/assets.json +393 -0
  20. tasks/legalnature/environment/reference/clone/data/site/build-report.json +322 -0
  21. tasks/legalnature/environment/reference/clone/data/site/catalogue.json +0 -0
  22. tasks/legalnature/environment/reference/clone/data/site/content/business-formation--c2b469a188.json +1 -0
  23. tasks/legalnature/environment/reference/clone/data/site/content/business-formation-nonprofit--f78d346155.json +1 -0
  24. tasks/legalnature/environment/reference/clone/data/site/content/careers--4cd7bb4519.json +1 -0
  25. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-arbitration-agreement--f8d4a3f590.json +1 -0
  26. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-certificate-of-incorporation--ba592f1039.json +1 -0
  27. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-corporate-resolution--8efee1f955.json +1 -0
  28. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-llc-operating-agreement--28504c414c.json +1 -0
  29. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-meeting_minutes--e0b18f29c8.json +1 -0
  30. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-partnership-agreement--c2ded7cef7.json +1 -0
  31. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-shareholder-agreement--767d7ffcca.json +1 -0
  32. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-stock-certificate--3578835985.json +1 -0
  33. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-general-services-agreement--9462ffff25.json +1 -0
  34. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-hold-harmless-agreement--679b0f26b1.json +1 -0
  35. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-investment-agreement--8d22a53ed3.json +1 -0
  36. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-letter-of-resignation--dab89ce22e.json +1 -0
  37. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-online-terms-and-conditions--58f80bdec8.json +1 -0
  38. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-security-agreement--401848563b.json +1 -0
  39. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-articles-of-incorporation--90f20d9026.json +1 -0
  40. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-articles-of-organization--1b3224f7eb.json +1 -0
  41. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-license-research--e4ba2e2189.json +1 -0
  42. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-software-license-agreement--564b5caabb.json +1 -0
  43. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-statement-of-work--5751226d7c.json +1 -0
  44. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-stock-purchase-agreement--f3f20d8b31.json +1 -0
  45. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-terms-of-use--c8505a2486.json +1 -0
  46. tasks/legalnature/environment/reference/clone/data/site/content/categories-business-waiver-and-release-of-liability--258846774a.json +1 -0
  47. tasks/legalnature/environment/reference/clone/data/site/content/categories-commercial-property-commercial-sublease-agreement--f91ae3fecb.json +1 -0
  48. tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-affidavit-of-heirship--5aa4ec7db3.json +1 -0
  49. tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-joint-revocable-living-trust--33473974f0.json +1 -0
  50. tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-lady-bird-deed--a4681e8669.json +1 -0
tasks/legalnature/environment/agent-browser/browser-use ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Forward the safe Browser Use CLI subset to the isolated browser sidecar."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import json
7
+ import os
8
+ import shutil
9
+ import sys
10
+ import urllib.error
11
+ import urllib.request
12
+ import uuid
13
+ from pathlib import Path
14
+
15
+
16
+ GATEWAY_URL = os.environ.get(
17
+ "WEBSITEBENCH_BROWSER_GATEWAY_URL",
18
+ "http://browser:9224/v1/command",
19
+ )
20
+ SHARED_ROOT = Path("/browser-share")
21
+
22
+
23
+ def _translate_candidate_origin(arguments: list[str]) -> list[str]:
24
+ public_origin = os.environ.get(
25
+ "WEBSITEBENCH_CANDIDATE_URL", "http://127.0.0.1:3000"
26
+ ).rstrip("/")
27
+ browser_origin = os.environ.get(
28
+ "WEBSITEBENCH_BROWSER_CANDIDATE_URL", "http://candidate:3000"
29
+ ).rstrip("/")
30
+ return [
31
+ browser_origin + value[len(public_origin) :]
32
+ if value == public_origin or value.startswith(public_origin + "/")
33
+ else value
34
+ for value in arguments
35
+ ]
36
+
37
+
38
+ def _command_index(arguments: list[str]) -> int | None:
39
+ index = 0
40
+ while index < len(arguments):
41
+ value = arguments[index]
42
+ if value in {"--session"}:
43
+ index += 2
44
+ continue
45
+ if value.startswith("--session=") or value == "--json":
46
+ index += 1
47
+ continue
48
+ if value in {"-h", "--help"}:
49
+ return None
50
+ if value.startswith("-"):
51
+ return index
52
+ return index
53
+ return None
54
+
55
+
56
+ def _prepare_screenshot(arguments: list[str]) -> tuple[list[str], Path | None, Path | None]:
57
+ forwarded = list(arguments)
58
+ command_index = _command_index(forwarded)
59
+ if command_index is None or forwarded[command_index] != "screenshot":
60
+ return forwarded, None, None
61
+
62
+ local_path: Path | None = None
63
+ path_index: int | None = None
64
+ for index in range(command_index + 1, len(forwarded)):
65
+ if forwarded[index] == "--path" and index + 1 < len(forwarded):
66
+ path_index = index + 1
67
+ local_path = Path(forwarded[path_index])
68
+ break
69
+ if not forwarded[index].startswith("-"):
70
+ path_index = index
71
+ local_path = Path(forwarded[path_index])
72
+ break
73
+ if local_path is None:
74
+ local_path = Path("screenshot.png")
75
+ forwarded.append(str(local_path))
76
+ path_index = len(forwarded) - 1
77
+
78
+ shared_path = SHARED_ROOT / f"screenshot-{uuid.uuid4().hex}.png"
79
+ assert path_index is not None
80
+ forwarded[path_index] = str(shared_path)
81
+ return forwarded, local_path, shared_path
82
+
83
+
84
+ def _prepare_asset(arguments: list[str]) -> tuple[list[str], Path | None, Path | None]:
85
+ forwarded = list(arguments)
86
+ command_index = _command_index(forwarded)
87
+ if command_index is None or forwarded[command_index] != "save-asset":
88
+ return forwarded, None, None
89
+ tail = forwarded[command_index + 1 :]
90
+ if len(tail) != 2:
91
+ # Let the gateway reject the malformed command with its own message.
92
+ return forwarded, None, None
93
+ local_path = Path(tail[1])
94
+ shared_path = SHARED_ROOT / f"asset-{uuid.uuid4().hex}"
95
+ forwarded[command_index + 2] = str(shared_path)
96
+ return forwarded, local_path, shared_path
97
+
98
+
99
+ def main() -> int:
100
+ translated = _translate_candidate_origin(sys.argv[1:])
101
+ arguments, local_screenshot, shared_screenshot = _prepare_screenshot(translated)
102
+ if local_screenshot is None:
103
+ arguments, local_screenshot, shared_screenshot = _prepare_asset(arguments)
104
+ request = urllib.request.Request(
105
+ GATEWAY_URL,
106
+ data=json.dumps({"argv": arguments}, separators=(",", ":")).encode("utf-8"),
107
+ headers={"Content-Type": "application/json"},
108
+ method="POST",
109
+ )
110
+ try:
111
+ with urllib.request.urlopen(request, timeout=240) as response:
112
+ payload = json.load(response)
113
+ except urllib.error.HTTPError as exc:
114
+ try:
115
+ detail = json.loads(exc.read().decode("utf-8")).get("error")
116
+ except (UnicodeError, ValueError, AttributeError):
117
+ detail = None
118
+ print(detail or f"Browser Use gateway refused the command (HTTP {exc.code})", file=sys.stderr)
119
+ return 2
120
+ except (OSError, UnicodeError, ValueError) as exc:
121
+ print(f"Browser Use gateway unavailable: {exc}", file=sys.stderr)
122
+ return 2
123
+
124
+ stdout = payload.get("stdout", "")
125
+ stderr = payload.get("stderr", "")
126
+ if local_screenshot is not None and shared_screenshot is not None:
127
+ # The shared file is moved to the caller's path below; report that path, not the
128
+ # transient gateway-owned one, so a later read of the printed path succeeds.
129
+ if isinstance(stdout, str):
130
+ stdout = stdout.replace(str(shared_screenshot), str(local_screenshot))
131
+ if isinstance(stderr, str):
132
+ stderr = stderr.replace(str(shared_screenshot), str(local_screenshot))
133
+ if isinstance(stdout, str) and stdout:
134
+ print(stdout, end="" if stdout.endswith("\n") else "\n")
135
+ if isinstance(stderr, str) and stderr:
136
+ print(stderr, end="" if stderr.endswith("\n") else "\n", file=sys.stderr)
137
+
138
+ if local_screenshot is not None and shared_screenshot is not None and shared_screenshot.exists():
139
+ try:
140
+ local_screenshot.parent.mkdir(parents=True, exist_ok=True)
141
+ shutil.copyfile(shared_screenshot, local_screenshot)
142
+ shared_screenshot.unlink(missing_ok=True)
143
+ except OSError as exc:
144
+ print(f"Browser file transfer failed: {exc}", file=sys.stderr)
145
+ return 2
146
+
147
+ exit_code = payload.get("exit_code", 2)
148
+ return exit_code if isinstance(exit_code, int) and 0 <= exit_code <= 255 else 2
149
+
150
+
151
+ if __name__ == "__main__":
152
+ raise SystemExit(main())
tasks/legalnature/environment/agent-browser/gateway.py ADDED
@@ -0,0 +1,524 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Constrained Browser Use command gateway for browser-only references.
3
+
4
+ The gateway is the only process that joins the reference network. It exposes
5
+ interactive browser actions, but deliberately excludes arbitrary Python,
6
+ JavaScript evaluation, DOM serialization, cloud/tunnel commands, and direct
7
+ CDP attachment. The Agent container can inspect the rendered site without
8
+ obtaining a general-purpose HTTP path to its source responses.
9
+
10
+ Static assets are the one exception to that boundary. ``assets`` lists the
11
+ reference-origin images, icons, fonts and media the current page uses, and
12
+ ``save-asset`` copies one of them into the Agent's repository. Stylesheets and
13
+ scripts are the reference's code: formal runs never hand them to the Agent, so
14
+ both commands refuse them, as they refuse documents and API responses.
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import json
20
+ import os
21
+ import re
22
+ import ssl
23
+ import subprocess
24
+ import threading
25
+ import urllib.error
26
+ import urllib.parse
27
+ import urllib.request
28
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
29
+ from pathlib import Path
30
+ from typing import Any
31
+
32
+
33
+ MAX_REQUEST_BYTES = 64 * 1024
34
+ MAX_OUTPUT_BYTES = 4 * 1024 * 1024
35
+ COMMAND_TIMEOUT_SEC = 180
36
+ SESSION_PATTERN = re.compile(r"[A-Za-z0-9][A-Za-z0-9_.-]{0,63}\Z")
37
+ SHARED_ROOT = Path("/browser-share").resolve()
38
+ ASSET_MAX_BYTES = 32 * 1024 * 1024
39
+ ASSET_TIMEOUT_SEC = 60
40
+ ASSET_LIST_LIMIT = 2000
41
+ ASSET_SHARED_NAME = re.compile(r"asset-[0-9a-f]{32}\Z")
42
+ # Static media only: a document, JSON or other API body is never an asset, and neither is
43
+ # a stylesheet or script (the agent must not receive the reference's CSS or JavaScript).
44
+ STATIC_CONTENT_PREFIXES = ("image/", "font/", "audio/", "video/")
45
+ STATIC_CONTENT_TYPES = frozenset(
46
+ {
47
+ "application/font-woff",
48
+ "application/font-woff2",
49
+ "application/x-font-woff",
50
+ "application/x-font-ttf",
51
+ "application/x-font-otf",
52
+ "application/font-sfnt",
53
+ "application/vnd.ms-fontobject",
54
+ }
55
+ )
56
+ # Servers often label fonts and media application/octet-stream; accept that
57
+ # label only when the path itself names a static file.
58
+ STATIC_EXTENSIONS = frozenset(
59
+ {
60
+ ".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif", ".svg", ".ico", ".bmp",
61
+ ".woff", ".woff2", ".ttf", ".otf", ".eot",
62
+ ".mp4", ".webm", ".ogv", ".mp3", ".ogg", ".wav", ".m4a",
63
+ }
64
+ )
65
+ # Reference code is refused whatever its declared type: a script served as octet-stream or a
66
+ # stylesheet under an image-like path must not pass.
67
+ CODE_CONTENT_TYPES = frozenset(
68
+ {
69
+ "text/css",
70
+ "text/javascript",
71
+ "text/ecmascript",
72
+ "application/javascript",
73
+ "application/x-javascript",
74
+ "application/ecmascript",
75
+ "application/wasm",
76
+ }
77
+ )
78
+ CODE_EXTENSIONS = frozenset({".css", ".scss", ".less", ".js", ".mjs", ".cjs", ".jsx", ".ts", ".tsx", ".map", ".wasm"})
79
+ # Gateway-owned inventory script: returns only URLs the page references or loaded.
80
+ ASSET_INVENTORY_JS = r"""JSON.stringify((() => {
81
+ const found = new Set();
82
+ const add = (value, base) => { try { if (value) found.add(new URL(value, base || location.href).href); } catch (e) {} };
83
+ const urls = (text, base) => { for (const m of String(text || '').matchAll(/url\(\s*["']?([^"')]+)["']?\s*\)/g)) add(m[1], base); };
84
+ for (const entry of performance.getEntriesByType('resource')) add(entry.name);
85
+ for (const image of document.images) { add(image.currentSrc); add(image.src); }
86
+ for (const node of document.querySelectorAll('link[href]')) add(node.href);
87
+ for (const node of document.querySelectorAll('script[src]')) add(node.src);
88
+ for (const node of document.querySelectorAll('source[src], source[srcset], video[src], video[poster], audio[src], img[srcset]')) {
89
+ add(node.src); add(node.poster);
90
+ for (const part of String(node.srcset || '').split(',')) add(part.trim().split(/\s+/)[0]);
91
+ }
92
+ let count = 0;
93
+ for (const element of document.querySelectorAll('*')) {
94
+ if (++count > 5000) break;
95
+ const style = getComputedStyle(element);
96
+ urls(style.backgroundImage); urls(style.listStyleImage); urls(style.content);
97
+ }
98
+ for (const sheet of document.styleSheets) {
99
+ try { for (const rule of sheet.cssRules) urls(rule.cssText, sheet.href || location.href); } catch (e) {}
100
+ }
101
+ return [...found];
102
+ })())"""
103
+ REAL_BROWSER_USE = os.environ.get(
104
+ "WEBSITEBENCH_BROWSER_USE_REAL",
105
+ "/usr/local/bin/browser-use-real",
106
+ )
107
+ SAFE_COMMANDS = frozenset(
108
+ {
109
+ "open",
110
+ "click",
111
+ "type",
112
+ "input",
113
+ "scroll",
114
+ "back",
115
+ "screenshot",
116
+ "state",
117
+ "switch",
118
+ "close-tab",
119
+ "keys",
120
+ "select",
121
+ "hover",
122
+ "dblclick",
123
+ "rightclick",
124
+ "cookies",
125
+ "close",
126
+ "sessions",
127
+ }
128
+ )
129
+ FORBIDDEN_COMMANDS = frozenset(
130
+ {
131
+ "install",
132
+ "init",
133
+ "setup",
134
+ "doctor",
135
+ "upload",
136
+ "eval",
137
+ "extract",
138
+ "get",
139
+ "python",
140
+ "tunnel",
141
+ "cloud",
142
+ "profile",
143
+ "wait",
144
+ }
145
+ )
146
+ FORBIDDEN_GLOBAL_OPTIONS = frozenset(
147
+ {"--headed", "--profile", "--cdp-url", "--connect", "--mcp", "--template"}
148
+ )
149
+
150
+
151
+ class CommandRejected(ValueError):
152
+ """Raised when an Agent command crosses the browser-only boundary."""
153
+
154
+
155
+ def _origin(value: str) -> tuple[str, str, int]:
156
+ parsed = urllib.parse.urlsplit(value)
157
+ if parsed.scheme not in {"http", "https"} or not parsed.hostname:
158
+ raise ValueError(f"invalid browser origin: {value!r}")
159
+ port = parsed.port or (443 if parsed.scheme == "https" else 80)
160
+ return parsed.scheme, parsed.hostname.lower(), port
161
+
162
+
163
+ def allowed_origins() -> frozenset[tuple[str, str, int]]:
164
+ values = (
165
+ os.environ.get(
166
+ "WEBSITEBENCH_BROWSER_REFERENCE_URL", "https://reference:8080"
167
+ ),
168
+ os.environ.get(
169
+ "WEBSITEBENCH_BROWSER_CANDIDATE_URL", "http://candidate:3000"
170
+ ),
171
+ os.environ.get(
172
+ "WEBSITEBENCH_BROWSER_MAILBOX_URL", "http://mailbox:8026"
173
+ ),
174
+ )
175
+ return frozenset(_origin(value) for value in values)
176
+
177
+
178
+ def reference_origin() -> tuple[str, str, int]:
179
+ return _origin(
180
+ os.environ.get("WEBSITEBENCH_BROWSER_REFERENCE_URL", "https://reference:8080")
181
+ )
182
+
183
+
184
+ def _reference_asset_url(value: str) -> str:
185
+ try:
186
+ requested = _origin(value)
187
+ except (TypeError, ValueError) as exc:
188
+ raise CommandRejected(str(exc)) from exc
189
+ if requested != reference_origin():
190
+ raise CommandRejected("static assets can only be saved from the reference origin")
191
+ parsed = urllib.parse.urlsplit(value)
192
+ if parsed.username is not None or parsed.password is not None:
193
+ raise CommandRejected("asset URL must not carry credentials")
194
+ return urllib.parse.urlunsplit(parsed._replace(fragment=""))
195
+
196
+
197
+ def is_reference_code(url: str, content_type: str = "") -> bool:
198
+ media = content_type.split(";", 1)[0].strip().lower()
199
+ suffix = Path(urllib.parse.urlsplit(url).path).suffix.lower()
200
+ return media in CODE_CONTENT_TYPES or suffix in CODE_EXTENSIONS
201
+
202
+
203
+ def is_static_asset(url: str, content_type: str) -> bool:
204
+ if is_reference_code(url, content_type):
205
+ return False
206
+ media = content_type.split(";", 1)[0].strip().lower()
207
+ if media.startswith(STATIC_CONTENT_PREFIXES) or media in STATIC_CONTENT_TYPES:
208
+ return True
209
+ suffix = Path(urllib.parse.urlsplit(url).path).suffix.lower()
210
+ return media in {"application/octet-stream", "binary/octet-stream", ""} and suffix in STATIC_EXTENSIONS
211
+
212
+
213
+ def _parse_global_options(arguments: list[str]) -> tuple[str, int]:
214
+ session = "default"
215
+ index = 0
216
+ while index < len(arguments):
217
+ value = arguments[index]
218
+ if value == "--session":
219
+ if index + 1 >= len(arguments):
220
+ raise CommandRejected("--session requires a value")
221
+ session = arguments[index + 1]
222
+ index += 2
223
+ continue
224
+ if value.startswith("--session="):
225
+ session = value.partition("=")[2]
226
+ index += 1
227
+ continue
228
+ if value == "--json":
229
+ index += 1
230
+ continue
231
+ if value in {"-h", "--help"}:
232
+ break
233
+ if value in FORBIDDEN_GLOBAL_OPTIONS or any(
234
+ value.startswith(option + "=") for option in FORBIDDEN_GLOBAL_OPTIONS
235
+ ):
236
+ raise CommandRejected(f"Browser Use option {value!r} is disabled")
237
+ if value.startswith("-"):
238
+ raise CommandRejected(f"unsupported Browser Use option {value!r}")
239
+ break
240
+ if not SESSION_PATTERN.fullmatch(session):
241
+ raise CommandRejected("invalid Browser Use session name")
242
+ return session, index
243
+
244
+
245
+ def validate_command(raw_arguments: Any) -> list[str]:
246
+ if not isinstance(raw_arguments, list) or not raw_arguments:
247
+ raise CommandRejected("argv must be a non-empty string array")
248
+ if len(raw_arguments) > 128:
249
+ raise CommandRejected("too many Browser Use arguments")
250
+ arguments: list[str] = []
251
+ for value in raw_arguments:
252
+ if not isinstance(value, str) or "\x00" in value or len(value) > 16_384:
253
+ raise CommandRejected("invalid Browser Use argument")
254
+ arguments.append(value)
255
+
256
+ for value in arguments:
257
+ if value in FORBIDDEN_GLOBAL_OPTIONS or any(
258
+ value.startswith(option + "=") for option in FORBIDDEN_GLOBAL_OPTIONS
259
+ ):
260
+ raise CommandRejected(f"Browser Use option {value!r} is disabled")
261
+
262
+ _session, command_index = _parse_global_options(arguments)
263
+ if (
264
+ command_index == len(arguments) - 1
265
+ and arguments[command_index] in {"-h", "--help"}
266
+ ):
267
+ return arguments
268
+ if command_index >= len(arguments):
269
+ raise CommandRejected("missing Browser Use command")
270
+ command = arguments[command_index]
271
+ if command == "assets":
272
+ if len(arguments) != command_index + 1:
273
+ raise CommandRejected("assets takes no arguments; it lists the current page")
274
+ return arguments
275
+ if command == "save-asset":
276
+ tail = arguments[command_index + 1 :]
277
+ if len(tail) != 2:
278
+ raise CommandRejected("save-asset requires a reference asset URL and a destination path")
279
+ url = _reference_asset_url(tail[0])
280
+ if is_reference_code(url):
281
+ raise CommandRejected("reference stylesheets and scripts are not available to the agent")
282
+ destination = Path(tail[1]).resolve()
283
+ if destination.parent != SHARED_ROOT or ASSET_SHARED_NAME.fullmatch(destination.name) is None:
284
+ raise CommandRejected("saved assets must use one gateway-owned path")
285
+ return arguments[: command_index + 1] + [url, str(destination)]
286
+ if command in FORBIDDEN_COMMANDS:
287
+ raise CommandRejected(
288
+ f"Browser Use command {command!r} is disabled for browser-only references"
289
+ )
290
+ if command not in SAFE_COMMANDS:
291
+ raise CommandRejected(f"unsupported Browser Use command {command!r}")
292
+
293
+ if command == "open":
294
+ urls = [
295
+ value
296
+ for value in arguments[command_index + 1 :]
297
+ if "://" in value
298
+ ]
299
+ if len(urls) != 1:
300
+ raise CommandRejected("open requires exactly one absolute URL")
301
+ try:
302
+ requested_origin = _origin(urls[0])
303
+ except (TypeError, ValueError) as exc:
304
+ raise CommandRejected(str(exc)) from exc
305
+ if requested_origin not in allowed_origins():
306
+ raise CommandRejected("browser navigation target is outside task origins")
307
+
308
+ if command == "screenshot":
309
+ # The bundled Browser Use CLI is `screenshot [--full] [path]`; accept the spellings
310
+ # agents reach for (`--full-page`, `--path X`, `--path=X`) and hand the CLI its own.
311
+ path_values: list[str] = []
312
+ options: list[str] = []
313
+ tail = arguments[command_index + 1 :]
314
+ index = 0
315
+ while index < len(tail):
316
+ value = tail[index]
317
+ if value == "--path":
318
+ if index + 1 >= len(tail):
319
+ raise CommandRejected("screenshot --path requires a value")
320
+ path_values.append(tail[index + 1])
321
+ index += 2
322
+ continue
323
+ if value.startswith("--path="):
324
+ path_values.append(value.partition("=")[2])
325
+ index += 1
326
+ continue
327
+ if value in {"--full", "--full-page"}:
328
+ if "--full" not in options:
329
+ options.append("--full")
330
+ index += 1
331
+ continue
332
+ if value in {"--json", "-h", "--help"}:
333
+ options.append(value)
334
+ index += 1
335
+ continue
336
+ if value.startswith("-"):
337
+ raise CommandRejected(f"unsupported screenshot option {value!r}")
338
+ path_values.append(value)
339
+ index += 1
340
+ paths = [Path(value).resolve() for value in path_values]
341
+ if (
342
+ len(paths) != 1
343
+ or paths[0].parent != SHARED_ROOT
344
+ or re.fullmatch(r"screenshot-[0-9a-f]{32}\.png", paths[0].name) is None
345
+ ):
346
+ raise CommandRejected("screenshots must use one gateway-owned PNG path")
347
+ return arguments[: command_index + 1] + options + [str(paths[0])]
348
+
349
+ return arguments
350
+
351
+
352
+ _COMMAND_LOCK = threading.Lock()
353
+
354
+
355
+ def execute(arguments: list[str]) -> dict[str, Any]:
356
+ with _COMMAND_LOCK:
357
+ try:
358
+ completed = subprocess.run(
359
+ [REAL_BROWSER_USE, *arguments],
360
+ stdin=subprocess.DEVNULL,
361
+ stdout=subprocess.PIPE,
362
+ stderr=subprocess.PIPE,
363
+ timeout=COMMAND_TIMEOUT_SEC,
364
+ check=False,
365
+ )
366
+ except subprocess.TimeoutExpired as exc:
367
+ raise CommandRejected("Browser Use command exceeded 180 seconds") from exc
368
+ except OSError as exc:
369
+ raise CommandRejected(f"Browser Use runtime unavailable: {exc}") from exc
370
+ stdout = completed.stdout[:MAX_OUTPUT_BYTES]
371
+ stderr = completed.stderr[:MAX_OUTPUT_BYTES]
372
+ if len(completed.stdout) > MAX_OUTPUT_BYTES or len(completed.stderr) > MAX_OUTPUT_BYTES:
373
+ raise CommandRejected("Browser Use output exceeded the interactive limit")
374
+ return {
375
+ "exit_code": completed.returncode,
376
+ "stdout": stdout.decode("utf-8", errors="replace"),
377
+ "stderr": stderr.decode("utf-8", errors="replace"),
378
+ }
379
+
380
+
381
+ GATEWAY_HELP = """
382
+ WebsiteBench gateway commands:
383
+ assets List the reference-origin images, icons, fonts and media that the
384
+ current page references or loaded.
385
+ save-asset URL PATH Save one of those assets to PATH (for example under /app/repo).
386
+ Stylesheets, scripts, HTML documents, JSON and other API responses are refused.
387
+ """
388
+
389
+
390
+ def _find_result(value: Any) -> Any:
391
+ if isinstance(value, dict):
392
+ if "result" in value:
393
+ return value["result"]
394
+ for nested in value.values():
395
+ found = _find_result(nested)
396
+ if found is not None:
397
+ return found
398
+ return None
399
+
400
+
401
+ def list_assets(arguments: list[str], command_index: int) -> dict[str, Any]:
402
+ inventory = execute(arguments[:command_index] + ["--json", "eval", ASSET_INVENTORY_JS])
403
+ if inventory["exit_code"] != 0:
404
+ return {"exit_code": inventory["exit_code"], "stdout": "", "stderr": "could not list assets: " + inventory["stderr"][-400:]}
405
+ try:
406
+ urls = json.loads(_find_result(json.loads(inventory["stdout"])) or "[]")
407
+ except (TypeError, ValueError):
408
+ return {"exit_code": 1, "stdout": "", "stderr": "could not list assets: no page is open"}
409
+ origin = reference_origin()
410
+ assets = []
411
+ for url in urls if isinstance(urls, list) else []:
412
+ try:
413
+ if not isinstance(url, str) or _origin(url) != origin:
414
+ continue
415
+ except ValueError:
416
+ continue
417
+ path = urllib.parse.urlsplit(url).path
418
+ if is_reference_code(url):
419
+ continue
420
+ if Path(path).suffix.lower() in STATIC_EXTENSIONS or "/static/" in path or "/assets/" in path:
421
+ assets.append(urllib.parse.urlunsplit(urllib.parse.urlsplit(url)._replace(fragment="")))
422
+ assets = sorted(set(assets))[:ASSET_LIST_LIMIT]
423
+ text = "\n".join(assets) + ("\n" if assets else "no reference static assets found on the current page\n")
424
+ return {"exit_code": 0, "stdout": text, "stderr": ""}
425
+
426
+
427
+ class _SameOriginRedirect(urllib.request.HTTPRedirectHandler):
428
+ def redirect_request(self, req, fp, code, msg, headers, newurl): # type: ignore[override]
429
+ _reference_asset_url(urllib.parse.urljoin(req.full_url, newurl))
430
+ return super().redirect_request(req, fp, code, msg, headers, newurl)
431
+
432
+
433
+ def save_asset(url: str, destination: Path) -> dict[str, Any]:
434
+ opener = urllib.request.build_opener(
435
+ urllib.request.HTTPSHandler(context=ssl.create_default_context()), _SameOriginRedirect()
436
+ )
437
+ request = urllib.request.Request(url, headers={"User-Agent": "WebsiteBenchAssetGateway/1", "Accept": "*/*"})
438
+ try:
439
+ with opener.open(request, timeout=ASSET_TIMEOUT_SEC) as response:
440
+ content_type = response.headers.get("Content-Type", "")
441
+ final_url = response.geturl()
442
+ if is_reference_code(final_url, content_type):
443
+ raise CommandRejected(f"refused stylesheet or script ({content_type or 'no content type'}): reference CSS and JavaScript are not available to the agent")
444
+ if not is_static_asset(final_url, content_type):
445
+ raise CommandRejected(f"refused non-static response ({content_type or 'no content type'})")
446
+ body = response.read(ASSET_MAX_BYTES + 1)
447
+ except urllib.error.HTTPError as exc:
448
+ raise CommandRejected(f"reference returned HTTP {exc.code} for {url}") from exc
449
+ except (urllib.error.URLError, OSError) as exc:
450
+ raise CommandRejected(f"asset download failed: {exc}") from exc
451
+ if len(body) > ASSET_MAX_BYTES:
452
+ raise CommandRejected("asset exceeds the 32 MiB limit")
453
+ temporary = destination.with_name(destination.name + ".partial")
454
+ temporary.write_bytes(body)
455
+ os.replace(temporary, destination)
456
+ return {
457
+ "exit_code": 0,
458
+ "stdout": f"saved {url} -> {destination} ({len(body)} bytes, {content_type.split(';', 1)[0].strip() or 'unknown type'})\n",
459
+ "stderr": "",
460
+ }
461
+
462
+
463
+ def run(arguments: list[str]) -> dict[str, Any]:
464
+ _session, command_index = _parse_global_options(arguments)
465
+ command = arguments[command_index] if command_index < len(arguments) else None
466
+ if command == "assets":
467
+ return list_assets(arguments, command_index)
468
+ if command == "save-asset":
469
+ return save_asset(arguments[command_index + 1], Path(arguments[command_index + 2]))
470
+ result = execute(arguments)
471
+ if command in {None, "-h", "--help"}:
472
+ result["stdout"] = result["stdout"] + GATEWAY_HELP
473
+ return result
474
+
475
+
476
+ class Handler(BaseHTTPRequestHandler):
477
+ server_version = "WebsiteBenchBrowserGateway/1"
478
+
479
+ def log_message(self, _format: str, *_arguments: object) -> None:
480
+ return
481
+
482
+ def _send(self, status: int, value: dict[str, Any]) -> None:
483
+ body = json.dumps(value, separators=(",", ":")).encode("utf-8")
484
+ self.send_response(status)
485
+ self.send_header("Content-Type", "application/json")
486
+ self.send_header("Content-Length", str(len(body)))
487
+ self.send_header("Cache-Control", "no-store")
488
+ self.end_headers()
489
+ self.wfile.write(body)
490
+
491
+ def do_GET(self) -> None:
492
+ if self.path == "/healthz":
493
+ self._send(200, {"status": "ok"})
494
+ else:
495
+ self._send(404, {"error": "not_found"})
496
+
497
+ def do_POST(self) -> None:
498
+ if self.path != "/v1/command":
499
+ self._send(404, {"error": "not_found"})
500
+ return
501
+ try:
502
+ length = int(self.headers.get("Content-Length", ""))
503
+ if length <= 0 or length > MAX_REQUEST_BYTES:
504
+ raise CommandRejected("invalid request size")
505
+ payload = json.loads(self.rfile.read(length))
506
+ if not isinstance(payload, dict) or set(payload) != {"argv"}:
507
+ raise CommandRejected("request must contain only argv")
508
+ result = run(validate_command(payload["argv"]))
509
+ except (CommandRejected, json.JSONDecodeError, UnicodeError, ValueError) as exc:
510
+ self._send(400, {"error": str(exc)})
511
+ return
512
+ self._send(200, result)
513
+
514
+
515
+ def main() -> None:
516
+ bind = os.environ.get("WEBSITEBENCH_BROWSER_GATEWAY_BIND", "0.0.0.0")
517
+ port = int(os.environ.get("WEBSITEBENCH_BROWSER_GATEWAY_PORT", "9224"))
518
+ server = ThreadingHTTPServer((bind, port), Handler)
519
+ server.daemon_threads = True
520
+ server.serve_forever()
521
+
522
+
523
+ if __name__ == "__main__":
524
+ main()
tasks/legalnature/environment/candidate-abi/websitebench-candidate-preflight ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -eu
3
+ PYTHONPATH=/opt/websitebench/candidate-abi
4
+ export PYTHONPATH
5
+ exec python3 -m websitebench.harbor.candidate_preflight "$@"
tasks/legalnature/environment/mailbox/Dockerfile ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ FROM python:3.12.11-slim-bookworm@sha256:519591d6871b7bc437060736b9f7456b8731f1499a57e22e6c285135ae657bf7
2
+ WORKDIR /srv/mailbox
3
+ COPY mailbox.py .
4
+ HEALTHCHECK --interval=2s --timeout=2s --retries=30 CMD python -c "import os,urllib.request as r;a=os.environ.get('WEBSITEBENCH_MAILBOX_API_BIND') or '127.0.0.1';i=os.environ.get('WEBSITEBENCH_MAILBOX_INBOX_BIND') or '127.0.0.1';r.urlopen(f'http://{a}:8025/healthz',timeout=1);r.urlopen(f'http://{i}:8026/healthz',timeout=1)"
5
+ CMD ["python", "mailbox.py", "--smtp-port", "1025", "--http-port", "8025", "--inbox-port", "8026"]
tasks/legalnature/environment/mailbox/mailbox.py ADDED
@@ -0,0 +1,2433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Local-only mail writers plus Inbox HTTP sidecar for deterministic tasks.
2
+
3
+ The sidecar serves two disjoint listeners so the agent and the evaluator never
4
+ share a surface:
5
+
6
+ ``api``
7
+ The Bearer-gated JSON API plus ``/internal/bootstrap``. The reference site
8
+ and the evaluator reach it; it is where every capability lives.
9
+ ``inbox``
10
+ An HTML-only inbox for exactly one namespace, reachable without a
11
+ credential because a browser has none to present. It exposes no JSON, no
12
+ capability, and no way to name a second namespace.
13
+
14
+ Formal candidates receive a separate per-case write listener. Its primary
15
+ surface is a text-only Resend-style ``POST /emails`` API; legacy SMTP and the
16
+ ``websitebench.site_backend`` bootstrap remain compatibility writers. None of
17
+ those surfaces exposes an inbox or a JSON read route.
18
+
19
+ This module is copied *alone* into the mailbox container build context, so it
20
+ must stay self-contained: no imports outside the standard library.
21
+ """
22
+
23
+ from __future__ import annotations
24
+
25
+ import email
26
+ import hashlib
27
+ import hmac
28
+ import html
29
+ import http.client
30
+ import json
31
+ import os
32
+ import re
33
+ import secrets
34
+ import shutil
35
+ import socket
36
+ import socketserver
37
+ import signal
38
+ import subprocess
39
+ import sys
40
+ import tempfile
41
+ import threading
42
+ import time
43
+ import urllib.parse
44
+ from collections.abc import Mapping
45
+ from dataclasses import dataclass, field, replace
46
+ from email.message import EmailMessage
47
+ from email.policy import default
48
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
49
+ from typing import Any
50
+
51
+
52
+ _NAMESPACE = re.compile(r"^[a-zA-Z0-9._-]{1,160}$")
53
+ _OTP = re.compile(r"(?<!\d)(\d{4,8})(?!\d)")
54
+ _MAX_MESSAGE_BYTES = 1024 * 1024
55
+ _MAX_MESSAGES_PER_NAMESPACE = 32
56
+ _MAX_STORED_BYTES_PER_NAMESPACE = 2 * 1024 * 1024
57
+ _MAX_RECIPIENTS = 16
58
+ _MAX_COMMANDS_PER_CONNECTION = 256
59
+ _CONNECTION_TIMEOUT_SECONDS = 10
60
+ _MAX_CONNECTION_LIFETIME_SECONDS = 30
61
+ _MAX_CONCURRENT_CONNECTIONS = 16
62
+ MAILPIT_IMAGE = (
63
+ "ghcr.io/axllent/mailpit:v1.30.6@"
64
+ "sha256:7f33095f80e901f6ad08028f06ca284aa58fe84942be5496008d041d3b9f4d4d"
65
+ )
66
+ #: The one variable that names the Mailpit a trial or capture must use. It is
67
+ #: read in exactly one place, :meth:`MailPlane.from_environment`.
68
+ MAILPIT_HTTP_SOCKET_ENV = "WEBSITEBENCH_MAILPIT_HTTP_SOCKET"
69
+ #: Where Mailpit's private sockets live inside the compose sidecar. A value
70
+ #: mentioning this path in a candidate environment is an evaluator-side leak.
71
+ MAILPIT_RUNTIME_DIR = "/run/websitebench-mailpit"
72
+ #: The envelope sender every benchmark mail writer presents. Some captured
73
+ #: runtimes pin this exact suffix before opening SMTP, so paired capture and a
74
+ #: scored candidate trial must agree on it to the byte.
75
+ CANDIDATE_MAIL_SENDER = "no-reply@candidate.websitebench.local"
76
+ #: The complete optional mail ABI a candidate runtime may be handed. Nothing
77
+ #: outside this set ever reaches a candidate process.
78
+ CANDIDATE_MAIL_ENVIRONMENT = frozenset(
79
+ {
80
+ "WEBSITEBENCH_MAIL_API_URL",
81
+ "WEBSITEBENCH_MAIL_API_TOKEN",
82
+ "WEBSITEBENCH_MAIL_FROM",
83
+ "WEBSITEBENCH_SMTP_HOST",
84
+ "WEBSITEBENCH_SMTP_PORT",
85
+ "WEBSITEBENCH_SMTP_FROM",
86
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL",
87
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN",
88
+ }
89
+ )
90
+ #: Every mail variable an authoring capture exports into its own process, so
91
+ #: capture can save and restore exactly this set around a shard.
92
+ AUTHORING_MAIL_ENVIRONMENT = (
93
+ "WEBSITEBENCH_MAIL_API_URL",
94
+ "WEBSITEBENCH_MAIL_API_TOKEN",
95
+ "WEBSITEBENCH_MAIL_FROM",
96
+ "WEBSITEBENCH_SMTP_FROM",
97
+ "WEBSITEBENCH_MAILBOX_URL",
98
+ "WEBSITEBENCH_MAILBOX_ALLOWLIST",
99
+ "WEBSITEBENCH_MAILBOX_NAMESPACE",
100
+ "WEBSITEBENCH_SMTP_HOST",
101
+ "WEBSITEBENCH_SMTP_PORT",
102
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL",
103
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN",
104
+ "WEBSITEBENCH_MAILBOX_CREDENTIAL",
105
+ )
106
+ _LOG_SECRET = re.compile(
107
+ r"(?i)(?:bearer\s+[^\s\"']+|"
108
+ r"(?:authorization|cookie|credential|password|secret|token|otp|"
109
+ r"verification[-_ ]?code|card[-_ ]?number)\s*[:=]\s*"
110
+ r"(?:bearer\s+)?[^\s,;]+)"
111
+ )
112
+
113
+
114
+ class MailpitInfrastructureError(RuntimeError):
115
+ """Mailpit is missing or unhealthy, as distinct from rejected candidate mail."""
116
+
117
+
118
+ class MailInfrastructureUnavailable(MailpitInfrastructureError):
119
+ """No Mailpit is configured for this process, or the configured one is down."""
120
+
121
+
122
+ class MailboxCapacityError(RuntimeError):
123
+ """A namespace exhausted its fixed message or submitted-byte quota."""
124
+
125
+
126
+ class _UnixHTTPConnection(http.client.HTTPConnection):
127
+ """A minimal HTTP/1.1 connection transported over one Unix socket."""
128
+
129
+ def __init__(self, socket_path: str, timeout: float) -> None:
130
+ super().__init__("localhost", timeout=timeout)
131
+ self._socket_path = socket_path
132
+
133
+ def connect(self) -> None:
134
+ connection = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
135
+ connection.settimeout(self.timeout)
136
+ connection.connect(self._socket_path)
137
+ self.sock = connection
138
+
139
+
140
+ class MailpitClient:
141
+ """Trusted Mailpit client: HTTP UDS reads and sibling SMTP UDS writes.
142
+
143
+ This is intentionally not a general Mailpit client. It never exposes the
144
+ UI, delete, release, tag-mutation, or remote-content endpoints. All
145
+ candidate-authored control headers are discarded and the SMTP writer adds
146
+ exactly one trusted tag.
147
+ """
148
+
149
+ _MAX_RESPONSE_BYTES = 8 * 1024 * 1024
150
+
151
+ def __init__(
152
+ self,
153
+ socket_path: str | os.PathLike[str],
154
+ *,
155
+ smtp_socket_path: str | os.PathLike[str] | None = None,
156
+ timeout: float = 5.0,
157
+ ) -> None:
158
+ self.socket_path = os.fspath(socket_path)
159
+ if not self.socket_path:
160
+ raise ValueError("Mailpit HTTP socket path must not be empty")
161
+ if timeout <= 0:
162
+ raise ValueError("Mailpit timeout must be positive")
163
+ self.smtp_socket_path = (
164
+ os.fspath(smtp_socket_path)
165
+ if smtp_socket_path is not None
166
+ else os.path.join(os.path.dirname(self.socket_path), "smtp.sock")
167
+ )
168
+ self.timeout = float(timeout)
169
+
170
+ def _request(
171
+ self, method: str, path: str, body: dict[str, Any] | None = None
172
+ ) -> tuple[int, bytes]:
173
+ encoded = None if body is None else json.dumps(body).encode("utf-8")
174
+ headers = {"Accept": "application/json", "Connection": "close"}
175
+ if encoded is not None:
176
+ headers["Content-Type"] = "application/json"
177
+ headers["Content-Length"] = str(len(encoded))
178
+ connection = _UnixHTTPConnection(self.socket_path, self.timeout)
179
+ try:
180
+ connection.request(method, path, body=encoded, headers=headers)
181
+ response = connection.getresponse()
182
+ length = response.getheader("Content-Length")
183
+ if length is not None and int(length) > self._MAX_RESPONSE_BYTES:
184
+ raise MailpitInfrastructureError("Mailpit response exceeded limit")
185
+ value = response.read(self._MAX_RESPONSE_BYTES + 1)
186
+ if len(value) > self._MAX_RESPONSE_BYTES:
187
+ raise MailpitInfrastructureError("Mailpit response exceeded limit")
188
+ return int(response.status), value
189
+ except (OSError, TimeoutError, http.client.HTTPException, ValueError) as error:
190
+ raise MailpitInfrastructureError(
191
+ f"Mailpit request failed: {redact_text(str(error))}"
192
+ ) from error
193
+ finally:
194
+ connection.close()
195
+
196
+ def _json(
197
+ self, method: str, path: str, body: dict[str, Any] | None = None
198
+ ) -> dict[str, Any]:
199
+ status, raw = self._request(method, path, body)
200
+ if not 200 <= status < 300:
201
+ raise MailpitInfrastructureError(f"Mailpit API returned HTTP {status}")
202
+ try:
203
+ value = json.loads(raw)
204
+ except (UnicodeDecodeError, json.JSONDecodeError) as error:
205
+ raise MailpitInfrastructureError("Mailpit returned invalid JSON") from error
206
+ if not isinstance(value, dict):
207
+ raise MailpitInfrastructureError("Mailpit returned an invalid response")
208
+ return value
209
+
210
+ def ready(self) -> bool:
211
+ """Return whether Mailpit's built-in readiness endpoint is healthy."""
212
+
213
+ try:
214
+ status, _body = self._request("GET", "/readyz")
215
+ except MailpitInfrastructureError:
216
+ return False
217
+ return status == 200
218
+
219
+ def send(
220
+ self,
221
+ raw: bytes,
222
+ envelope_from: str,
223
+ recipients: list[str],
224
+ *,
225
+ tag: str,
226
+ ) -> str:
227
+ """Store mail with one trusted tag, ignoring all untrusted X-headers."""
228
+
229
+ if any(
230
+ "\r" in value or "\n" in value for value in [envelope_from, *recipients]
231
+ ):
232
+ raise ValueError("invalid SMTP envelope")
233
+ message = email.message_from_bytes(raw, policy=default)
234
+ for part in message.walk():
235
+ for header in list(part.keys()):
236
+ lowered = header.lower()
237
+ if lowered == "x-tags" or lowered.startswith("x-websitebench-"):
238
+ del part[header]
239
+ for header in ("From", "To", "Cc", "Bcc"):
240
+ if message.get(header) is not None:
241
+ del message[header]
242
+ message["From"] = envelope_from
243
+ message["To"] = ", ".join(recipients)
244
+ message["X-Tags"] = tag
245
+ wire = message.as_bytes(policy=default.clone(linesep="\r\n"))
246
+
247
+ connection = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
248
+ connection.settimeout(self.timeout)
249
+ stream = None
250
+ try:
251
+ connection.connect(self.smtp_socket_path)
252
+ stream = connection.makefile("rb")
253
+
254
+ def response() -> tuple[int, str]:
255
+ lines: list[str] = []
256
+ while True:
257
+ line = stream.readline(65537)
258
+ if not line or len(line) > 65536:
259
+ raise MailpitInfrastructureError(
260
+ "invalid Mailpit SMTP response"
261
+ )
262
+ decoded = line.decode("utf-8", "replace").rstrip("\r\n")
263
+ lines.append(decoded)
264
+ if len(decoded) < 4 or decoded[3:4] != "-":
265
+ break
266
+ try:
267
+ return int(lines[-1][:3]), "\n".join(lines)
268
+ except ValueError as error:
269
+ raise MailpitInfrastructureError(
270
+ "invalid Mailpit SMTP status"
271
+ ) from error
272
+
273
+ def command(value: bytes, expected: set[int]) -> str:
274
+ connection.sendall(value + b"\r\n")
275
+ status, reply = response()
276
+ if status not in expected:
277
+ raise MailpitInfrastructureError(
278
+ f"Mailpit SMTP returned status {status}: "
279
+ f"{redact_text(reply)[:200]}"
280
+ )
281
+ return reply
282
+
283
+ status, _greeting = response()
284
+ if status != 220:
285
+ raise MailpitInfrastructureError(
286
+ "Mailpit SMTP did not greet the gateway"
287
+ )
288
+ command(b"EHLO websitebench.local", {250})
289
+ command(f"MAIL FROM:<{envelope_from}>".encode("utf-8"), {250})
290
+ for recipient in recipients:
291
+ command(f"RCPT TO:<{recipient}>".encode("utf-8"), {250})
292
+ command(b"DATA", {354})
293
+ stuffed = b"\r\n".join(
294
+ (b"." + line if line.startswith(b".") else line)
295
+ for line in wire.split(b"\r\n")
296
+ )
297
+ connection.sendall(stuffed + b"\r\n.\r\n")
298
+ status, reply = response()
299
+ if status != 250:
300
+ raise MailpitInfrastructureError(
301
+ f"Mailpit SMTP returned status {status}: {redact_text(reply)[:200]}"
302
+ )
303
+ match = re.search(r"queued as ([A-Za-z0-9_-]+)", reply)
304
+ return match.group(1) if match else hashlib.sha256(wire).hexdigest()[:24]
305
+ except (OSError, TimeoutError) as error:
306
+ raise MailpitInfrastructureError("Mailpit SMTP request failed") from error
307
+ finally:
308
+ if stream is not None:
309
+ stream.close()
310
+ connection.close()
311
+
312
+ @staticmethod
313
+ def _addresses(value: Any) -> list[str]:
314
+ if not isinstance(value, list):
315
+ return []
316
+ return [
317
+ str(item.get("Address", item.get("Email")))
318
+ for item in value
319
+ if isinstance(item, dict)
320
+ and isinstance(item.get("Address", item.get("Email")), str)
321
+ ]
322
+
323
+ def messages(self, *, tag: str, recipient: str) -> list[dict[str, Any]]:
324
+ """Read only exact-tag, exact-recipient messages, oldest first."""
325
+
326
+ query = urllib.parse.urlencode(
327
+ {"query": f"tag:{tag}", "start": "0", "limit": "512"}
328
+ )
329
+ listing = self._json("GET", f"/api/v1/search?{query}")
330
+ summaries = listing.get("messages", [])
331
+ if not isinstance(summaries, list):
332
+ raise MailpitInfrastructureError(
333
+ "Mailpit returned invalid message summaries"
334
+ )
335
+ values: list[dict[str, Any]] = []
336
+ for summary in reversed(summaries):
337
+ if not isinstance(summary, dict):
338
+ continue
339
+ tags = summary.get("Tags", [])
340
+ all_recipients = (
341
+ self._addresses(summary.get("To"))
342
+ + self._addresses(summary.get("Cc"))
343
+ + self._addresses(summary.get("Bcc"))
344
+ )
345
+ identifier = summary.get("ID")
346
+ if (
347
+ tag not in tags
348
+ or recipient not in all_recipients
349
+ or not isinstance(identifier, str)
350
+ ):
351
+ continue
352
+ detail = self._json(
353
+ "GET", "/api/v1/message/" + urllib.parse.quote(identifier, safe="")
354
+ )
355
+ # Recheck authorization against the detailed record. Search is an
356
+ # index, never an authorization decision.
357
+ detail_tags = detail.get("Tags", [])
358
+ detailed_recipients = (
359
+ self._addresses(detail.get("To"))
360
+ + self._addresses(detail.get("Cc"))
361
+ + self._addresses(detail.get("Bcc"))
362
+ )
363
+ if tag not in detail_tags or recipient not in detailed_recipients:
364
+ continue
365
+ sender = detail.get("From", {})
366
+ attachments = detail.get("Attachments", [])
367
+ inline = detail.get("Inline", [])
368
+ metadata = [
369
+ *(attachments if isinstance(attachments, list) else []),
370
+ *(inline if isinstance(inline, list) else []),
371
+ ]
372
+ values.append(
373
+ {
374
+ "mailpit_id": identifier,
375
+ "envelope_from": str(sender.get("Address", sender.get("Email", "")))
376
+ if isinstance(sender, dict)
377
+ else "",
378
+ "recipients": detailed_recipients,
379
+ "subject": str(detail.get("Subject", "")),
380
+ "text": str(detail.get("Text", "")),
381
+ "attachments": metadata,
382
+ "stored_bytes": int(detail.get("Size", 0)),
383
+ }
384
+ )
385
+ for index, item in enumerate(values, 1):
386
+ item["id"] = index
387
+ match = _OTP.search(str(item["text"]))
388
+ item["otp"] = match.group(1) if match else None
389
+ return values
390
+
391
+
392
+ @dataclass
393
+ class MailAccount:
394
+ """Internal ``websitebench.mail-account.v1`` logical account."""
395
+
396
+ account_id: str
397
+ tag: str
398
+ address: str
399
+ role: str
400
+ allowed_from: set[str]
401
+ allowed_to: set[str]
402
+ send_capability: str = field(repr=False)
403
+ read_capability: str = field(repr=False)
404
+ state: str = "active"
405
+ schema: str = field(default="websitebench.mail-account.v1", init=False)
406
+
407
+
408
+ class MailAccountBroker:
409
+ """Authorize logical accounts before calling the untrusted storage engine."""
410
+
411
+ _SEND_ROLES = frozenset(
412
+ {
413
+ "reference-backend",
414
+ "formal-candidate",
415
+ "capture-writer",
416
+ "gateway",
417
+ "selfhost-pair",
418
+ "formal-pair",
419
+ "capture-pair",
420
+ }
421
+ )
422
+ _READ_ROLES = frozenset(
423
+ {
424
+ "agent",
425
+ "formal-verifier",
426
+ "capture-reader",
427
+ "gateway",
428
+ "selfhost-pair",
429
+ "formal-pair",
430
+ "capture-pair",
431
+ }
432
+ )
433
+ _ROLES = _SEND_ROLES | _READ_ROLES
434
+
435
+ def __init__(self, client: MailpitClient) -> None:
436
+ self.client = client
437
+ self._accounts: dict[str, MailAccount] = {}
438
+ self._lock = threading.Lock()
439
+
440
+ def create_account(
441
+ self,
442
+ *,
443
+ address: str,
444
+ role: str,
445
+ allowed_from: Any = (),
446
+ allowed_to: Any = (),
447
+ ) -> MailAccount:
448
+ if address and ("@" not in address or "\r" in address or "\n" in address):
449
+ raise ValueError("invalid mail account address")
450
+ if role not in self._ROLES:
451
+ raise ValueError("invalid mail account role")
452
+ account = MailAccount(
453
+ account_id="acct_" + secrets.token_hex(24),
454
+ tag="wb-" + secrets.token_hex(24),
455
+ address=address,
456
+ role=role,
457
+ allowed_from=set(allowed_from),
458
+ allowed_to=set(allowed_to) | ({address} if address else set()),
459
+ send_capability="send_" + secrets.token_hex(32),
460
+ read_capability="read_" + secrets.token_hex(32),
461
+ )
462
+ with self._lock:
463
+ self._accounts[account.account_id] = account
464
+ return account
465
+
466
+ def _account(self, account_id: str) -> MailAccount:
467
+ with self._lock:
468
+ account = self._accounts.get(account_id)
469
+ if account is None or account.state == "destroyed":
470
+ raise PermissionError("mail account is unavailable")
471
+ return account
472
+
473
+ def send(
474
+ self,
475
+ account_id: str,
476
+ capability: str,
477
+ raw: bytes,
478
+ envelope_from: str,
479
+ recipients: list[str],
480
+ ) -> str:
481
+ account = self._account(account_id)
482
+ if (
483
+ account.role not in self._SEND_ROLES
484
+ or account.state != "active"
485
+ or not hmac.compare_digest(account.send_capability, capability)
486
+ ):
487
+ raise PermissionError("mail account cannot send")
488
+ if (
489
+ not envelope_from
490
+ or "@" not in envelope_from
491
+ or "\r" in envelope_from
492
+ or "\n" in envelope_from
493
+ or not 1 <= len(recipients) <= _MAX_RECIPIENTS
494
+ or len(raw) > _MAX_MESSAGE_BYTES
495
+ or any(
496
+ not recipient
497
+ or len(recipient) > 320
498
+ or "@" not in recipient
499
+ or "\r" in recipient
500
+ or "\n" in recipient
501
+ for recipient in recipients
502
+ )
503
+ ):
504
+ raise PermissionError("mail envelope is not allowed")
505
+ if account.allowed_from and envelope_from not in account.allowed_from:
506
+ raise PermissionError("mail sender is not allowed")
507
+ learn_recipients = account.role == "gateway" or not account.allowed_to
508
+ if account.role != "gateway" and account.allowed_to and any(
509
+ value not in account.allowed_to for value in recipients
510
+ ):
511
+ raise PermissionError("mail recipient is not allowed")
512
+ provider_id = self.client.send(raw, envelope_from, recipients, tag=account.tag)
513
+ if learn_recipients:
514
+ # A trial can legitimately exercise more than one authentication
515
+ # address. Namespace-scoped gateway accounts therefore learn every
516
+ # address from a Mailpit-accepted envelope; reads remain limited to
517
+ # those exact delivered addresses and still require the capability.
518
+ with self._lock:
519
+ account.allowed_to.update(recipients)
520
+ if not account.address and recipients:
521
+ account.address = recipients[0]
522
+ return provider_id
523
+
524
+ def messages(
525
+ self, account_id: str, capability: str, recipient: str | None = None
526
+ ) -> list[dict[str, Any]]:
527
+ account = self._account(account_id)
528
+ if account.role not in self._READ_ROLES or not hmac.compare_digest(
529
+ account.read_capability, capability
530
+ ):
531
+ raise PermissionError("mail account cannot read")
532
+ with self._lock:
533
+ allowed_to = set(account.allowed_to)
534
+ # SMTP delivery is asynchronous. A verifier can legitimately poll the
535
+ # exact recipient before the writer has learned its first envelope. An
536
+ # empty account therefore means "not delivered yet", not "forbidden".
537
+ # Once the first envelope arrives, the usual exact-recipient boundary
538
+ # applies and a different address is still rejected.
539
+ if recipient is not None and not allowed_to:
540
+ return []
541
+ targets = [recipient] if recipient is not None else sorted(allowed_to)
542
+ if any(target not in allowed_to for target in targets):
543
+ raise PermissionError("mail recipient is not allowed")
544
+ combined: dict[str, dict[str, Any]] = {}
545
+ for target in targets:
546
+ for message in self.client.messages(tag=account.tag, recipient=target):
547
+ combined[str(message["mailpit_id"])] = message
548
+ values = list(combined.values())
549
+ for index, item in enumerate(values, 1):
550
+ item["id"] = index
551
+ return values
552
+
553
+ def seal(self, account_id: str) -> None:
554
+ account = self._account(account_id)
555
+ with self._lock:
556
+ account.state = "sealed"
557
+
558
+ def destroy(self, account_id: str) -> None:
559
+ account = self._account(account_id)
560
+ with self._lock:
561
+ account.state = "destroyed"
562
+
563
+
564
+ class EphemeralMailpit:
565
+ """One pinned, networkless Mailpit container with a private UDS directory."""
566
+
567
+ def __init__(
568
+ self,
569
+ runtime_dir: str | os.PathLike[str] | None = None,
570
+ *,
571
+ docker_binary: str = "docker",
572
+ startup_timeout: float = 45.0,
573
+ ) -> None:
574
+ if startup_timeout <= 0:
575
+ raise ValueError("startup timeout must be positive")
576
+ self._owns_runtime_dir = runtime_dir is None
577
+ self.runtime_dir = (
578
+ tempfile.mkdtemp(prefix="websitebench-mailpit-")
579
+ if runtime_dir is None
580
+ else os.path.abspath(os.fspath(runtime_dir))
581
+ )
582
+ os.makedirs(self.runtime_dir, mode=0o700, exist_ok=True)
583
+ os.chmod(self.runtime_dir, 0o700)
584
+ self.docker_binary = docker_binary
585
+ self.startup_timeout = float(startup_timeout)
586
+ self.container_name = "websitebench-mailpit-" + secrets.token_hex(12)
587
+ self.client = MailpitClient(os.path.join(self.runtime_dir, "http.sock"))
588
+ self._process: subprocess.Popen[bytes] | None = None
589
+
590
+ def _uses_rootless_podman(self) -> bool:
591
+ """Detect the Podman Docker shim that needs the host uid preserved."""
592
+
593
+ try:
594
+ result = subprocess.run(
595
+ [self.docker_binary, "info"],
596
+ stdin=subprocess.DEVNULL,
597
+ stdout=subprocess.PIPE,
598
+ stderr=subprocess.STDOUT,
599
+ text=True,
600
+ timeout=5,
601
+ check=False,
602
+ )
603
+ except (OSError, subprocess.TimeoutExpired):
604
+ return False
605
+ output = result.stdout.casefold()
606
+ return result.returncode == 0 and "podman" in output and "rootless" in output
607
+
608
+ def start(self) -> "EphemeralMailpit":
609
+ if self._process is not None:
610
+ return self
611
+ command = [
612
+ self.docker_binary,
613
+ "run",
614
+ "--rm",
615
+ "--name",
616
+ self.container_name,
617
+ ]
618
+ if self._uses_rootless_podman():
619
+ command.append("--userns=keep-id")
620
+ command.extend(
621
+ [
622
+ "--user",
623
+ f"{os.getuid()}:{os.getgid()}",
624
+ "--network",
625
+ "none",
626
+ "--tmpfs",
627
+ "/tmp:rw,noexec,nosuid,nodev,size=64m",
628
+ "--mount",
629
+ f"type=bind,src={self.runtime_dir},dst=/run/websitebench-mailpit",
630
+ ]
631
+ )
632
+ settings = {
633
+ "MP_UI_BIND_ADDR": "unix:/run/websitebench-mailpit/http.sock:660",
634
+ "MP_SMTP_BIND_ADDR": "unix:/run/websitebench-mailpit/smtp.sock:660",
635
+ "MP_DATABASE": "/tmp/mailpit.db",
636
+ "MP_MAX_MESSAGES": "512",
637
+ "MP_MAX_MESSAGE_SIZE": "1",
638
+ "MP_SMTP_MAX_RECIPIENTS": "16",
639
+ "MP_POP3_BIND_ADDR": "",
640
+ "MP_POP3_AUTH_FILE": "",
641
+ "MP_SMTP_RELAY_CONFIG": "",
642
+ "MP_SMTP_RELAY_ALL": "false",
643
+ "MP_SMTP_FORWARD_CONFIG": "",
644
+ "MP_WEBHOOK_URL": "",
645
+ "MP_ENABLE_CHAOS": "false",
646
+ "MP_ENABLE_PROMETHEUS": "false",
647
+ "MP_DISABLE_VERSION_CHECK": "true",
648
+ "MP_BLOCK_REMOTE_CSS_AND_FONTS": "true",
649
+ "MP_ALLOW_INTERNAL_HTTP_REQUESTS": "false",
650
+ }
651
+ for key, value in settings.items():
652
+ command.extend(("--env", f"{key}={value}"))
653
+ command.append(MAILPIT_IMAGE)
654
+ try:
655
+ self._process = subprocess.Popen(
656
+ command,
657
+ stdin=subprocess.DEVNULL,
658
+ stdout=subprocess.DEVNULL,
659
+ stderr=subprocess.DEVNULL,
660
+ )
661
+ except OSError as error:
662
+ self.close()
663
+ raise MailpitInfrastructureError(
664
+ "Docker is unavailable for Mailpit"
665
+ ) from error
666
+ deadline = time.monotonic() + self.startup_timeout
667
+ while time.monotonic() < deadline:
668
+ if self._process.poll() is not None:
669
+ self.close()
670
+ raise MailpitInfrastructureError(
671
+ "Mailpit container exited during startup"
672
+ )
673
+ if self.client.ready():
674
+ return self
675
+ time.sleep(0.1)
676
+ self.close()
677
+ raise MailpitInfrastructureError("Mailpit did not become ready")
678
+
679
+ def close(self) -> None:
680
+ process, self._process = self._process, None
681
+ if process is not None and process.poll() is None:
682
+ try:
683
+ subprocess.run(
684
+ [self.docker_binary, "stop", "--time", "3", self.container_name],
685
+ stdin=subprocess.DEVNULL,
686
+ stdout=subprocess.DEVNULL,
687
+ stderr=subprocess.DEVNULL,
688
+ timeout=8,
689
+ check=False,
690
+ )
691
+ except (OSError, subprocess.TimeoutExpired):
692
+ process.terminate()
693
+ try:
694
+ process.wait(timeout=5)
695
+ except subprocess.TimeoutExpired:
696
+ process.kill()
697
+ process.wait(timeout=5)
698
+ if self._owns_runtime_dir:
699
+ shutil.rmtree(self.runtime_dir, ignore_errors=True)
700
+ else:
701
+ for name in ("http.sock", "smtp.sock"):
702
+ try:
703
+ os.unlink(os.path.join(self.runtime_dir, name))
704
+ except FileNotFoundError:
705
+ pass
706
+
707
+ def __enter__(self) -> "EphemeralMailpit":
708
+ return self.start()
709
+
710
+ def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
711
+ self.close()
712
+
713
+
714
+ def redact_text(value: str) -> str:
715
+ """Redact secret-like log fragments without retaining the matched value."""
716
+
717
+ return _LOG_SECRET.sub("[REDACTED]", value)
718
+
719
+
720
+ def redact_log_file(path: str) -> None:
721
+ """Sanitize one UTF-8 verifier log in place before it is published."""
722
+
723
+ from pathlib import Path
724
+
725
+ target = Path(path)
726
+ if not target.is_file():
727
+ return
728
+ value = target.read_text(encoding="utf-8", errors="replace")
729
+ target.write_text(redact_text(value), encoding="utf-8", newline="\n")
730
+
731
+
732
+ def redact_evidence(value: Any) -> Any:
733
+ """Remove credentials and sensitive form values from retained evidence."""
734
+
735
+ sensitive = re.compile(
736
+ r"(?:authorization|cookie|credential|password|secret|token|otp|code|payment|card)",
737
+ re.IGNORECASE,
738
+ )
739
+ if isinstance(value, dict):
740
+ return {
741
+ str(key): "[REDACTED]"
742
+ if sensitive.search(str(key))
743
+ else redact_evidence(child)
744
+ for key, child in value.items()
745
+ }
746
+ if isinstance(value, list):
747
+ return [redact_evidence(child) for child in value]
748
+ return value
749
+
750
+
751
+ @dataclass
752
+ class MailboxStore:
753
+ mailpit_client: MailpitClient
754
+ _capabilities: dict[str, str] = field(default_factory=dict)
755
+ _idempotency: dict[tuple[str, str], str] = field(default_factory=dict)
756
+ _namespace_message_counts: dict[str, int] = field(default_factory=dict)
757
+ _namespace_stored_bytes: dict[str, int] = field(default_factory=dict)
758
+ _lock: threading.Lock = field(default_factory=threading.Lock)
759
+ _broker: MailAccountBroker = field(init=False)
760
+ _accounts: dict[str, MailAccount] = field(default_factory=dict, init=False)
761
+
762
+ def __post_init__(self) -> None:
763
+ if not isinstance(self.mailpit_client, MailpitClient):
764
+ raise MailpitInfrastructureError("Mailpit client is required")
765
+ self._broker = MailAccountBroker(self.mailpit_client)
766
+
767
+ def healthy(self) -> bool:
768
+ return self.mailpit_client.ready()
769
+
770
+ def register(
771
+ self,
772
+ namespace: str,
773
+ capability: str,
774
+ *,
775
+ allowed_from: tuple[str, ...] = (),
776
+ ) -> None:
777
+ if not _NAMESPACE.fullmatch(namespace) or len(capability) < 32:
778
+ raise ValueError("invalid mailbox namespace capability")
779
+ if any(
780
+ not value or "@" not in value or "\r" in value or "\n" in value
781
+ for value in allowed_from
782
+ ):
783
+ raise ValueError("invalid allowed mail sender")
784
+ allowed_senders = set(allowed_from)
785
+ with self._lock:
786
+ existing = self._capabilities.get(namespace)
787
+ if existing is not None and existing != capability:
788
+ raise ValueError("mailbox namespace is already registered")
789
+ self._capabilities[namespace] = capability
790
+ account = self._accounts.get(namespace)
791
+ if account is None:
792
+ self._accounts[namespace] = self._broker.create_account(
793
+ address="", role="gateway", allowed_from=allowed_senders
794
+ )
795
+ elif account.allowed_from != allowed_senders:
796
+ raise ValueError("mailbox namespace sender policy is already registered")
797
+
798
+ def authorized(self, namespace: str, capability: str | None) -> bool:
799
+ with self._lock:
800
+ expected = self._capabilities.get(namespace)
801
+ return (
802
+ expected is not None
803
+ and capability is not None
804
+ and hmac.compare_digest(expected, capability)
805
+ )
806
+
807
+ def seal_namespace(self, namespace: str) -> None:
808
+ """Retire one writer while retaining trusted reads until teardown."""
809
+
810
+ with self._lock:
811
+ self._capabilities.pop(namespace, None)
812
+ account = self._accounts.get(namespace)
813
+ self._namespace_message_counts.pop(namespace, None)
814
+ self._namespace_stored_bytes.pop(namespace, None)
815
+ self._idempotency = {
816
+ identity: provider_id
817
+ for identity, provider_id in self._idempotency.items()
818
+ if identity[0] != namespace
819
+ }
820
+ if account is not None:
821
+ self._broker.seal(account.account_id)
822
+
823
+ def destroy_namespaces(self) -> None:
824
+ """Revoke every logical account without deleting Mailpit messages."""
825
+
826
+ with self._lock:
827
+ accounts = list(self._accounts.values())
828
+ self._capabilities.clear()
829
+ self._accounts.clear()
830
+ self._namespace_message_counts.clear()
831
+ self._namespace_stored_bytes.clear()
832
+ self._idempotency.clear()
833
+ for account in accounts:
834
+ if account.state != "destroyed":
835
+ self._broker.destroy(account.account_id)
836
+
837
+ def _store_message(
838
+ self,
839
+ message: Any,
840
+ envelope_from: str,
841
+ recipients: list[str],
842
+ *,
843
+ namespace: str,
844
+ idempotency_key: str | None = None,
845
+ raw: bytes | None = None,
846
+ ) -> tuple[bool, str | None]:
847
+ with self._lock:
848
+ idempotency_identity = (
849
+ (namespace, idempotency_key) if idempotency_key else None
850
+ )
851
+ if idempotency_identity is not None:
852
+ previous = self._idempotency.get(idempotency_identity)
853
+ if previous is not None:
854
+ return True, previous
855
+ account = self._accounts.get(namespace)
856
+ if account is None:
857
+ return False, None
858
+ wire = raw if raw is not None else message.as_bytes()
859
+ message_count = self._namespace_message_counts.get(namespace, 0)
860
+ stored_bytes = self._namespace_stored_bytes.get(namespace, 0)
861
+ if (
862
+ message_count >= _MAX_MESSAGES_PER_NAMESPACE
863
+ or stored_bytes + len(wire) > _MAX_STORED_BYTES_PER_NAMESPACE
864
+ ):
865
+ raise MailboxCapacityError("mailbox namespace capacity exceeded")
866
+ # Keep the lock across the final hop so concurrent requests with
867
+ # one idempotency key cannot manufacture two accepted messages.
868
+ # No message body or code is retained after Mailpit acknowledges
869
+ # the SMTP DATA command.
870
+ provider_id = self._broker.send(
871
+ account.account_id,
872
+ account.send_capability,
873
+ wire,
874
+ envelope_from,
875
+ recipients,
876
+ )
877
+ self._namespace_message_counts[namespace] = message_count + 1
878
+ self._namespace_stored_bytes[namespace] = stored_bytes + len(wire)
879
+ if idempotency_identity is not None:
880
+ self._idempotency[idempotency_identity] = provider_id
881
+ return True, provider_id
882
+
883
+ def deliver(self, raw: bytes, envelope_from: str, recipients: list[str]) -> bool:
884
+ message = email.message_from_bytes(raw, policy=default)
885
+ namespace = str(message.get("X-WebsiteBench-Namespace", "default"))
886
+ capability = str(message.get("X-WebsiteBench-Capability", ""))
887
+ if not _NAMESPACE.fullmatch(namespace) or not self.authorized(
888
+ namespace, capability
889
+ ):
890
+ return False
891
+ accepted, _provider_id = self._store_message(
892
+ message,
893
+ envelope_from,
894
+ recipients,
895
+ namespace=namespace,
896
+ raw=raw,
897
+ )
898
+ return accepted
899
+
900
+ def deliver_to(
901
+ self,
902
+ namespace: str,
903
+ raw: bytes,
904
+ envelope_from: str,
905
+ recipients: list[str],
906
+ ) -> bool:
907
+ """Store mail on a listener already fixed to one registered namespace.
908
+
909
+ Formal candidate runtimes receive access to that write-only listener,
910
+ not to the namespace-selecting SMTP or JSON API used by reference
911
+ capture. The routing decision therefore belongs to trusted verifier
912
+ infrastructure rather than to candidate-authored message headers.
913
+ """
914
+
915
+ if not _NAMESPACE.fullmatch(namespace):
916
+ return False
917
+ with self._lock:
918
+ registered = namespace in self._capabilities
919
+ if not registered:
920
+ return False
921
+ message = email.message_from_bytes(raw, policy=default)
922
+ accepted, _provider_id = self._store_message(
923
+ message,
924
+ envelope_from,
925
+ recipients,
926
+ namespace=namespace,
927
+ raw=raw,
928
+ )
929
+ return accepted
930
+
931
+ def deliver_resend_style_to(
932
+ self,
933
+ namespace: str,
934
+ *,
935
+ envelope_from: str,
936
+ recipients: list[str],
937
+ subject: str,
938
+ text: str,
939
+ idempotency_key: str | None,
940
+ ) -> tuple[bool, str | None]:
941
+ """Store one text-only Resend-style request in a fixed namespace."""
942
+
943
+ if not _NAMESPACE.fullmatch(namespace):
944
+ return False, None
945
+ with self._lock:
946
+ registered = namespace in self._capabilities
947
+ if not registered:
948
+ return False, None
949
+ message = EmailMessage()
950
+ message["From"] = envelope_from
951
+ message["To"] = ", ".join(recipients)
952
+ message["Subject"] = subject
953
+ message.set_content(text)
954
+ return self._store_message(
955
+ message,
956
+ envelope_from,
957
+ recipients,
958
+ namespace=namespace,
959
+ idempotency_key=idempotency_key,
960
+ raw=message.as_bytes(),
961
+ )
962
+
963
+ def messages(
964
+ self, namespace: str, recipient: str | None = None
965
+ ) -> list[dict[str, Any]]:
966
+ with self._lock:
967
+ account = self._accounts.get(namespace)
968
+ if account is None:
969
+ return []
970
+ values = self._broker.messages(
971
+ account.account_id, account.read_capability, recipient
972
+ )
973
+ for item in values:
974
+ item["namespace"] = namespace
975
+ item.pop("stored_bytes", None)
976
+ item.pop("mailpit_id", None)
977
+ return values
978
+
979
+
980
+ _INBOX_STYLE = (
981
+ "body{font:16px/1.5 system-ui,sans-serif;margin:0;background:#f6f7f9;"
982
+ "color:#1b1f24}"
983
+ "header{background:#fff;border-bottom:1px solid #d8dee4;padding:16px 24px}"
984
+ "h1{font-size:20px;margin:0}"
985
+ "main{max-width:52rem;margin:0 auto;padding:24px}"
986
+ "a{color:#0b62d0}"
987
+ ".msg{background:#fff;border:1px solid #d8dee4;border-radius:8px;"
988
+ "padding:12px 16px;margin-bottom:12px}"
989
+ ".msg h2{font-size:16px;margin:0 0 4px}"
990
+ ".meta{color:#57606a;font-size:13px;margin:0}"
991
+ ".empty{color:#57606a}"
992
+ "pre{white-space:pre-wrap;word-break:break-word;background:#f6f8fa;"
993
+ "border-radius:6px;padding:12px;margin:12px 0 0}"
994
+ )
995
+
996
+
997
+ def _document(title: str, body: str) -> bytes:
998
+ """One self-contained HTML page. Every interpolated value is escaped."""
999
+
1000
+ return (
1001
+ "<!doctype html><html lang=en><meta charset=utf-8>"
1002
+ '<meta name=viewport content="width=device-width,initial-scale=1">'
1003
+ f"<title>{html.escape(title)}</title>"
1004
+ f"<style>{_INBOX_STYLE}</style>"
1005
+ f"<header><h1>{html.escape(title)}</h1></header><main>{body}</main>"
1006
+ "</html>"
1007
+ ).encode("utf-8")
1008
+
1009
+
1010
+ def _recipients(message: dict[str, Any]) -> str:
1011
+ return ", ".join(str(item) for item in message.get("recipients", []))
1012
+
1013
+
1014
+ def render_inbox(messages: list[dict[str, Any]], *, base_path: str = "") -> bytes:
1015
+ """The message list an agent reads in a browser.
1016
+
1017
+ The extracted ``otp`` is deliberately absent: an agent should read the code
1018
+ out of the body the way a person would. That field stays an evaluator-side
1019
+ convenience on the JSON API.
1020
+ """
1021
+
1022
+ if not messages:
1023
+ body = (
1024
+ "<p class=empty id=inbox-empty>No messages yet. Mail sent to this "
1025
+ "mailbox appears here.</p>"
1026
+ )
1027
+ else:
1028
+ body = "".join(
1029
+ "<article class=msg>"
1030
+ f'<h2><a href="{html.escape(base_path)}/messages/{int(item["id"])}">'
1031
+ f"{html.escape(str(item.get('subject', '')))}</a></h2>"
1032
+ f"<p class=meta>From {html.escape(str(item.get('envelope_from', '')))}"
1033
+ f" &middot; To {html.escape(_recipients(item))}"
1034
+ f" &middot; Message {int(item['id'])}</p>"
1035
+ "</article>"
1036
+ for item in messages
1037
+ )
1038
+ refresh = f'<p><a href="{html.escape(base_path)}" id=inbox-refresh>Refresh</a></p>'
1039
+ return _document("Inbox", body + refresh)
1040
+
1041
+
1042
+ def render_message(message: dict[str, Any], *, base_path: str = "") -> bytes:
1043
+ """One message, body included, for the agent to read the code out of."""
1044
+
1045
+ body = (
1046
+ "<article class=msg>"
1047
+ f"<h2>{html.escape(str(message.get('subject', '')))}</h2>"
1048
+ f"<p class=meta>From {html.escape(str(message.get('envelope_from', '')))}"
1049
+ f" &middot; To {html.escape(_recipients(message))}</p>"
1050
+ f"<pre id=message-body>{html.escape(str(message.get('text', '')))}</pre>"
1051
+ "</article>"
1052
+ f'<p><a href="{html.escape(base_path)}" id=inbox-back>Back to inbox</a></p>'
1053
+ )
1054
+ return _document("Message", body)
1055
+
1056
+
1057
+ class _SmtpHandler(socketserver.StreamRequestHandler):
1058
+ def handle(self) -> None:
1059
+ timer = threading.Timer(
1060
+ _MAX_CONNECTION_LIFETIME_SECONDS, self._expire_connection
1061
+ )
1062
+ timer.daemon = True
1063
+ timer.start()
1064
+ try:
1065
+ self._handle_session()
1066
+ finally:
1067
+ timer.cancel()
1068
+
1069
+ def _expire_connection(self) -> None:
1070
+ try:
1071
+ self.connection.shutdown(socket.SHUT_RDWR)
1072
+ except OSError:
1073
+ pass
1074
+
1075
+ def _handle_session(self) -> None:
1076
+ store: MailboxStore = self.server.store # type: ignore[attr-defined]
1077
+ self.connection.settimeout(_CONNECTION_TIMEOUT_SECONDS)
1078
+ self.wfile.write(b"220 websitebench.local ESMTP\r\n")
1079
+ envelope_from = ""
1080
+ recipients: list[str] = []
1081
+ for _command_count in range(_MAX_COMMANDS_PER_CONNECTION):
1082
+ try:
1083
+ line = self.rfile.readline(65537)
1084
+ except (TimeoutError, socket.timeout):
1085
+ return
1086
+ if not line:
1087
+ return
1088
+ if len(line) > 65536:
1089
+ self.wfile.write(b"500 Command line too long\r\n")
1090
+ return
1091
+ command = line.decode("utf-8", "replace").rstrip("\r\n")
1092
+ upper = command.upper()
1093
+ if upper.startswith(("EHLO", "HELO")):
1094
+ self.wfile.write(b"250-websitebench.local\r\n250 SIZE 1048576\r\n")
1095
+ elif upper.startswith("MAIL FROM:"):
1096
+ path = command.split(":", 1)[1].strip()
1097
+ envelope_from = (
1098
+ path[1:].split(">", 1)[0]
1099
+ if path.startswith("<") and ">" in path
1100
+ else path.split(None, 1)[0].strip("<>")
1101
+ )
1102
+ recipients = []
1103
+ self.wfile.write(b"250 OK\r\n")
1104
+ elif upper.startswith("RCPT TO:"):
1105
+ if len(recipients) >= _MAX_RECIPIENTS:
1106
+ self.wfile.write(b"452 Too many recipients\r\n")
1107
+ continue
1108
+ path = command.split(":", 1)[1].strip()
1109
+ recipients.append(
1110
+ path[1:].split(">", 1)[0]
1111
+ if path.startswith("<") and ">" in path
1112
+ else path.split(None, 1)[0].strip("<>")
1113
+ )
1114
+ self.wfile.write(b"250 OK\r\n")
1115
+ elif upper == "DATA":
1116
+ self.wfile.write(b"354 End data with <CR><LF>.<CR><LF>\r\n")
1117
+ chunks = bytearray()
1118
+ oversized = False
1119
+ while True:
1120
+ try:
1121
+ data_line = self.rfile.readline(65537)
1122
+ except (TimeoutError, socket.timeout):
1123
+ return
1124
+ if data_line in {b".\r\n", b".\n", b""}:
1125
+ break
1126
+ if len(data_line) > 65536:
1127
+ oversized = True
1128
+ value = data_line[1:] if data_line.startswith(b"..") else data_line
1129
+ if len(chunks) + len(value) > _MAX_MESSAGE_BYTES:
1130
+ oversized = True
1131
+ elif not oversized:
1132
+ chunks.extend(value)
1133
+ if oversized:
1134
+ self.wfile.write(b"552 Message exceeds fixed local limit\r\n")
1135
+ continue
1136
+ fixed_namespace = getattr(self.server, "fixed_namespace", None)
1137
+ try:
1138
+ accepted = (
1139
+ store.deliver_to(
1140
+ fixed_namespace,
1141
+ bytes(chunks),
1142
+ envelope_from,
1143
+ recipients,
1144
+ )
1145
+ if isinstance(fixed_namespace, str)
1146
+ else store.deliver(bytes(chunks), envelope_from, recipients)
1147
+ )
1148
+ except MailboxCapacityError:
1149
+ self.wfile.write(b"452 Mailbox capacity exceeded\r\n")
1150
+ continue
1151
+ except PermissionError:
1152
+ self.wfile.write(b"550 Mail sender or recipient is not allowed\r\n")
1153
+ continue
1154
+ except MailpitInfrastructureError:
1155
+ self.wfile.write(b"451 Mailpit delivery unavailable\r\n")
1156
+ continue
1157
+ self.wfile.write(
1158
+ b"250 Accepted by Mailpit\r\n"
1159
+ if accepted
1160
+ else b"550 Invalid namespace capability\r\n"
1161
+ )
1162
+ elif upper == "RSET":
1163
+ envelope_from, recipients = "", []
1164
+ self.wfile.write(b"250 OK\r\n")
1165
+ elif upper == "NOOP":
1166
+ self.wfile.write(b"250 OK\r\n")
1167
+ elif upper == "QUIT":
1168
+ self.wfile.write(b"221 Bye\r\n")
1169
+ return
1170
+ else:
1171
+ self.wfile.write(b"502 Command not implemented\r\n")
1172
+ self.wfile.write(b"421 Command limit exceeded\r\n")
1173
+
1174
+
1175
+ class _SmtpServer(socketserver.ThreadingTCPServer):
1176
+ allow_reuse_address = True
1177
+ daemon_threads = True
1178
+
1179
+ def __init__(
1180
+ self,
1181
+ address: tuple[str, int],
1182
+ store: MailboxStore,
1183
+ *,
1184
+ fixed_namespace: str | None = None,
1185
+ ) -> None:
1186
+ self.store = store
1187
+ self.fixed_namespace = fixed_namespace
1188
+ self._connection_slots = threading.BoundedSemaphore(_MAX_CONCURRENT_CONNECTIONS)
1189
+ super().__init__(address, _SmtpHandler)
1190
+
1191
+ def process_request(self, request: Any, client_address: Any) -> None:
1192
+ if not self._connection_slots.acquire(blocking=False):
1193
+ request.close()
1194
+ return
1195
+ super().process_request(request, client_address)
1196
+
1197
+ def process_request_thread(self, request: Any, client_address: Any) -> None:
1198
+ try:
1199
+ super().process_request_thread(request, client_address)
1200
+ finally:
1201
+ self._connection_slots.release()
1202
+
1203
+
1204
+ class _HttpServer(ThreadingHTTPServer):
1205
+ daemon_threads = True
1206
+
1207
+ def __init__(self, address: tuple[str, int], handler: Any) -> None:
1208
+ self._connection_slots = threading.BoundedSemaphore(_MAX_CONCURRENT_CONNECTIONS)
1209
+ super().__init__(address, handler)
1210
+
1211
+ def process_request(self, request: Any, client_address: Any) -> None:
1212
+ if not self._connection_slots.acquire(blocking=False):
1213
+ request.close()
1214
+ return
1215
+ super().process_request(request, client_address)
1216
+
1217
+ def process_request_thread(self, request: Any, client_address: Any) -> None:
1218
+ def expire() -> None:
1219
+ try:
1220
+ request.shutdown(socket.SHUT_RDWR)
1221
+ except OSError:
1222
+ pass
1223
+
1224
+ timer = threading.Timer(_MAX_CONNECTION_LIFETIME_SECONDS, expire)
1225
+ timer.daemon = True
1226
+ timer.start()
1227
+ try:
1228
+ request.settimeout(_CONNECTION_TIMEOUT_SECONDS)
1229
+ super().process_request_thread(request, client_address)
1230
+ finally:
1231
+ timer.cancel()
1232
+ self._connection_slots.release()
1233
+
1234
+
1235
+ def _http_handler(
1236
+ store: MailboxStore,
1237
+ bootstrap: "_Bootstrap | _BootstrapSlot | None" = None,
1238
+ ) -> type[BaseHTTPRequestHandler]:
1239
+ """The evaluator- and site-facing listener: JSON, Bearer-gated throughout."""
1240
+
1241
+ slot = (
1242
+ bootstrap
1243
+ if isinstance(bootstrap, _BootstrapSlot)
1244
+ else _BootstrapSlot(bootstrap)
1245
+ )
1246
+
1247
+ class Handler(BaseHTTPRequestHandler):
1248
+ def _authorized(self, namespace: str) -> bool:
1249
+ prefix = "Bearer "
1250
+ header = self.headers.get("Authorization", "")
1251
+ capability = header[len(prefix) :] if header.startswith(prefix) else None
1252
+ if store.authorized(namespace, capability):
1253
+ return True
1254
+ self._json(403, {"error": "forbidden"})
1255
+ return False
1256
+
1257
+ def _json(self, status: int, value: Any) -> None:
1258
+ body = json.dumps(value, ensure_ascii=False, sort_keys=True).encode("utf-8")
1259
+ self.send_response(status)
1260
+ self.send_header("Content-Type", "application/json; charset=utf-8")
1261
+ self.send_header("Content-Length", str(len(body)))
1262
+ self.end_headers()
1263
+ self.wfile.write(body)
1264
+
1265
+ def _html(self, status: int, body: bytes) -> None:
1266
+ self.send_response(status)
1267
+ self.send_header("Content-Type", "text/html; charset=utf-8")
1268
+ self.send_header("Content-Length", str(len(body)))
1269
+ self.end_headers()
1270
+ self.wfile.write(body)
1271
+
1272
+ def do_GET(self) -> None: # noqa: N802
1273
+ parsed = urllib.parse.urlsplit(self.path)
1274
+ if parsed.path == "/healthz":
1275
+ if store.healthy():
1276
+ self._json(200, {"status": "ok"})
1277
+ else:
1278
+ self._json(503, {"status": "unavailable"})
1279
+ return
1280
+ if parsed.path == "/internal/bootstrap":
1281
+ # The site process learns this trial's namespace and capability
1282
+ # here. It is gated on its own token so the route stays closed
1283
+ # even if the internal network were misrouted.
1284
+ identity = slot.get()
1285
+ if identity is None:
1286
+ self._json(404, {"error": "not_found"})
1287
+ return
1288
+ prefix = "Bearer "
1289
+ header = self.headers.get("Authorization", "")
1290
+ presented = header[len(prefix) :] if header.startswith(prefix) else ""
1291
+ if not hmac.compare_digest(identity.token, presented):
1292
+ self._json(403, {"error": "forbidden"})
1293
+ return
1294
+ self._json(200, identity.payload())
1295
+ return
1296
+ parts = parsed.path.strip("/").split("/")
1297
+ if (
1298
+ len(parts) >= 4
1299
+ and parts[:2] == ["api", "namespaces"]
1300
+ and parts[3] == "messages"
1301
+ ):
1302
+ namespace = urllib.parse.unquote(parts[2])
1303
+ if not _NAMESPACE.fullmatch(namespace):
1304
+ self._json(400, {"error": "invalid_namespace"})
1305
+ return
1306
+ if not self._authorized(namespace):
1307
+ return
1308
+ recipient = urllib.parse.parse_qs(parsed.query).get(
1309
+ "recipient", [None]
1310
+ )[0]
1311
+ try:
1312
+ values = store.messages(namespace, recipient)
1313
+ except PermissionError:
1314
+ self._json(403, {"error": "recipient_forbidden"})
1315
+ return
1316
+ except MailpitInfrastructureError:
1317
+ self._json(503, {"error": "mailpit_unavailable"})
1318
+ return
1319
+ if len(parts) == 5 and parts[4] == "latest":
1320
+ if not values:
1321
+ self._json(404, {"error": "message_not_found"})
1322
+ else:
1323
+ self._json(200, values[-1])
1324
+ else:
1325
+ self._json(200, {"messages": values})
1326
+ return
1327
+ if len(parts) == 2 and parts[0] == "inbox":
1328
+ namespace = urllib.parse.unquote(parts[1])
1329
+ if not _NAMESPACE.fullmatch(namespace):
1330
+ self._json(400, {"error": "invalid_namespace"})
1331
+ return
1332
+ if not self._authorized(namespace):
1333
+ return
1334
+ try:
1335
+ messages = store.messages(namespace)
1336
+ except PermissionError:
1337
+ self._json(403, {"error": "forbidden"})
1338
+ return
1339
+ except MailpitInfrastructureError:
1340
+ self._json(503, {"error": "mailpit_unavailable"})
1341
+ return
1342
+ body = render_inbox(
1343
+ messages, base_path=f"/inbox/{urllib.parse.quote(namespace)}"
1344
+ )
1345
+ self._html(200, body)
1346
+ return
1347
+ self._json(404, {"error": "not_found"})
1348
+
1349
+ def do_POST(self) -> None: # noqa: N802
1350
+ """Accept reference mail through a bootstrap-token write-only API."""
1351
+
1352
+ parsed = urllib.parse.urlsplit(self.path)
1353
+ if parsed.path != "/emails" or parsed.query or parsed.fragment:
1354
+ self._json(404, {"error": "not_found"})
1355
+ return
1356
+ identity = slot.get()
1357
+ if identity is None:
1358
+ self._json(404, {"error": "not_found"})
1359
+ return
1360
+ prefix = "Bearer "
1361
+ header = self.headers.get("Authorization", "")
1362
+ presented = header[len(prefix) :] if header.startswith(prefix) else ""
1363
+ if not hmac.compare_digest(identity.token, presented):
1364
+ self._json(401, {"error": "unauthorized"})
1365
+ return
1366
+ if self.headers.get("Content-Type", "").split(";", 1)[0].strip().lower() != "application/json":
1367
+ self._json(415, {"error": "application_json_required"})
1368
+ return
1369
+ try:
1370
+ content_length = int(self.headers.get("Content-Length", ""))
1371
+ except ValueError:
1372
+ self._json(411, {"error": "content_length_required"})
1373
+ return
1374
+ if content_length < 0 or content_length > _MAX_MESSAGE_BYTES:
1375
+ self._json(413, {"error": "message_too_large"})
1376
+ return
1377
+ try:
1378
+ value = json.loads(self.rfile.read(content_length).decode("utf-8"))
1379
+ except (UnicodeDecodeError, json.JSONDecodeError):
1380
+ self._json(400, {"error": "invalid_json"})
1381
+ return
1382
+ if not isinstance(value, dict) or set(value) != {"from", "to", "subject", "text"}:
1383
+ self._json(400, {"error": "invalid_message_fields"})
1384
+ return
1385
+ envelope_from = value.get("from")
1386
+ recipients = value.get("to")
1387
+ subject = value.get("subject")
1388
+ message_text = value.get("text")
1389
+ recipients = [recipients] if isinstance(recipients, str) else recipients
1390
+ if (
1391
+ not isinstance(envelope_from, str)
1392
+ or not envelope_from
1393
+ or "@" not in envelope_from
1394
+ or "\r" in envelope_from
1395
+ or "\n" in envelope_from
1396
+ or not isinstance(recipients, list)
1397
+ or not 1 <= len(recipients) <= _MAX_RECIPIENTS
1398
+ or any(
1399
+ not isinstance(recipient, str)
1400
+ or not recipient
1401
+ or len(recipient) > 320
1402
+ or "@" not in recipient
1403
+ or "\r" in recipient
1404
+ or "\n" in recipient
1405
+ for recipient in recipients
1406
+ )
1407
+ or not isinstance(subject, str)
1408
+ or len(subject) > 998
1409
+ or "\r" in subject
1410
+ or "\n" in subject
1411
+ or not isinstance(message_text, str)
1412
+ or len(message_text.encode("utf-8")) > _MAX_MESSAGE_BYTES
1413
+ ):
1414
+ self._json(400, {"error": "invalid_message"})
1415
+ return
1416
+ idempotency_key = self.headers.get("Idempotency-Key")
1417
+ if idempotency_key is not None and (
1418
+ not idempotency_key
1419
+ or len(idempotency_key) > 256
1420
+ or "\r" in idempotency_key
1421
+ or "\n" in idempotency_key
1422
+ ):
1423
+ self._json(400, {"error": "invalid_idempotency_key"})
1424
+ return
1425
+ try:
1426
+ accepted, provider_id = store.deliver_resend_style_to(
1427
+ identity.namespace,
1428
+ envelope_from=envelope_from,
1429
+ recipients=recipients,
1430
+ subject=subject,
1431
+ text=message_text,
1432
+ idempotency_key=idempotency_key,
1433
+ )
1434
+ except MailboxCapacityError:
1435
+ self._json(429, {"error": "mailbox_capacity"})
1436
+ return
1437
+ except MailpitInfrastructureError:
1438
+ self._json(503, {"error": "mailpit_unavailable"})
1439
+ return
1440
+ if not accepted or provider_id is None:
1441
+ self._json(503, {"error": "delivery_failed"})
1442
+ return
1443
+ self._json(200, {"id": provider_id})
1444
+
1445
+ def log_message(self, format: str, *args: Any) -> None:
1446
+ return
1447
+
1448
+ return Handler
1449
+
1450
+
1451
+ def _candidate_bootstrap_handler(
1452
+ *,
1453
+ store: MailboxStore,
1454
+ bootstrap_token: str,
1455
+ mail_api_token: str,
1456
+ namespace: str,
1457
+ capability: str,
1458
+ smtp_host: str,
1459
+ smtp_port: int,
1460
+ sender: str,
1461
+ ) -> type[BaseHTTPRequestHandler]:
1462
+ """Expose write-only mail paths without exposing the mailbox read API.
1463
+
1464
+ ``POST /emails`` is deliberately a small Resend-style subset: one fixed
1465
+ sender, one or more recipients, a subject, and a plain-text body. The
1466
+ endpoint owns the trial namespace, so candidate input can never select a
1467
+ second mailbox. The legacy bootstrap and SMTP coordinates remain here for
1468
+ candidates using the vendored ``websitebench.site_backend`` transport.
1469
+ """
1470
+
1471
+ payload = {
1472
+ "namespace": namespace,
1473
+ "capability": capability,
1474
+ "smtp_host": smtp_host,
1475
+ "smtp_port": smtp_port,
1476
+ }
1477
+
1478
+ class CandidateBootstrapHandler(BaseHTTPRequestHandler):
1479
+ def _json(self, status: int, value: Any) -> None:
1480
+ body = json.dumps(value, ensure_ascii=False, sort_keys=True).encode("utf-8")
1481
+ self.send_response(status)
1482
+ self.send_header("Content-Type", "application/json; charset=utf-8")
1483
+ self.send_header("Content-Length", str(len(body)))
1484
+ self.send_header("Cache-Control", "no-store")
1485
+ self.end_headers()
1486
+ self.wfile.write(body)
1487
+
1488
+ def do_GET(self) -> None: # noqa: N802
1489
+ parsed = urllib.parse.urlsplit(self.path)
1490
+ if parsed.path == "/healthz":
1491
+ healthy = store.healthy()
1492
+ self._json(200 if healthy else 503, {"status": "ok" if healthy else "unavailable"})
1493
+ return
1494
+ if parsed.path != "/internal/bootstrap":
1495
+ self._json(404, {"error": "not_found"})
1496
+ return
1497
+ prefix = "Bearer "
1498
+ header = self.headers.get("Authorization", "")
1499
+ presented = header[len(prefix) :] if header.startswith(prefix) else ""
1500
+ if not hmac.compare_digest(bootstrap_token, presented):
1501
+ self._json(403, {"error": "forbidden"})
1502
+ return
1503
+ self._json(200, payload)
1504
+
1505
+ def do_POST(self) -> None: # noqa: N802
1506
+ parsed = urllib.parse.urlsplit(self.path)
1507
+ if parsed.path != "/emails" or parsed.query or parsed.fragment:
1508
+ self._json(404, {"error": "not_found"})
1509
+ return
1510
+ prefix = "Bearer "
1511
+ header = self.headers.get("Authorization", "")
1512
+ presented = header[len(prefix) :] if header.startswith(prefix) else ""
1513
+ if not hmac.compare_digest(mail_api_token, presented):
1514
+ self._json(401, {"error": "unauthorized"})
1515
+ return
1516
+ content_type = self.headers.get("Content-Type", "").split(";", 1)[0]
1517
+ if content_type.strip().lower() != "application/json":
1518
+ self._json(415, {"error": "application_json_required"})
1519
+ return
1520
+ try:
1521
+ content_length = int(self.headers.get("Content-Length", ""))
1522
+ except ValueError:
1523
+ self._json(411, {"error": "content_length_required"})
1524
+ return
1525
+ if content_length < 0 or content_length > _MAX_MESSAGE_BYTES:
1526
+ self._json(413, {"error": "message_too_large"})
1527
+ return
1528
+ raw = self.rfile.read(content_length)
1529
+ if len(raw) != content_length:
1530
+ self._json(400, {"error": "incomplete_request"})
1531
+ return
1532
+ try:
1533
+ value = json.loads(raw.decode("utf-8"))
1534
+ except (UnicodeDecodeError, json.JSONDecodeError):
1535
+ self._json(400, {"error": "invalid_json"})
1536
+ return
1537
+ if not isinstance(value, dict) or set(value) != {
1538
+ "from",
1539
+ "to",
1540
+ "subject",
1541
+ "text",
1542
+ }:
1543
+ self._json(400, {"error": "invalid_message_fields"})
1544
+ return
1545
+ envelope_from = value.get("from")
1546
+ subject = value.get("subject")
1547
+ text = value.get("text")
1548
+ raw_recipients = value.get("to")
1549
+ recipients = (
1550
+ [raw_recipients] if isinstance(raw_recipients, str) else raw_recipients
1551
+ )
1552
+ if (
1553
+ envelope_from != sender
1554
+ or not isinstance(subject, str)
1555
+ or not isinstance(text, str)
1556
+ or not isinstance(recipients, list)
1557
+ or not 1 <= len(recipients) <= _MAX_RECIPIENTS
1558
+ or any(
1559
+ not isinstance(recipient, str)
1560
+ or not recipient
1561
+ or len(recipient) > 320
1562
+ or "@" not in recipient
1563
+ or "\r" in recipient
1564
+ or "\n" in recipient
1565
+ for recipient in recipients
1566
+ )
1567
+ or len(subject) > 998
1568
+ or "\r" in subject
1569
+ or "\n" in subject
1570
+ ):
1571
+ self._json(400, {"error": "invalid_message"})
1572
+ return
1573
+ try:
1574
+ encoded_text = text.encode("utf-8")
1575
+ subject.encode("utf-8")
1576
+ for recipient in recipients:
1577
+ recipient.encode("utf-8")
1578
+ except UnicodeEncodeError:
1579
+ self._json(400, {"error": "invalid_message"})
1580
+ return
1581
+ if len(encoded_text) > _MAX_MESSAGE_BYTES:
1582
+ self._json(413, {"error": "message_too_large"})
1583
+ return
1584
+ idempotency_key = self.headers.get("Idempotency-Key")
1585
+ if idempotency_key is not None and (
1586
+ not idempotency_key
1587
+ or len(idempotency_key) > 256
1588
+ or "\r" in idempotency_key
1589
+ or "\n" in idempotency_key
1590
+ ):
1591
+ self._json(400, {"error": "invalid_idempotency_key"})
1592
+ return
1593
+ try:
1594
+ accepted, provider_id = store.deliver_resend_style_to(
1595
+ namespace,
1596
+ envelope_from=envelope_from,
1597
+ recipients=recipients,
1598
+ subject=subject,
1599
+ text=text,
1600
+ idempotency_key=idempotency_key,
1601
+ )
1602
+ except MailboxCapacityError:
1603
+ self._json(429, {"error": "mailbox_capacity"})
1604
+ return
1605
+ except MailpitInfrastructureError:
1606
+ self._json(503, {"error": "mailpit_unavailable"})
1607
+ return
1608
+ if not accepted or provider_id is None:
1609
+ self._json(429, {"error": "mailbox_capacity"})
1610
+ return
1611
+ self._json(200, {"id": provider_id})
1612
+
1613
+ def log_message(self, format: str, *args: Any) -> None:
1614
+ return
1615
+
1616
+ return CandidateBootstrapHandler
1617
+
1618
+
1619
+ @dataclass(frozen=True, repr=False)
1620
+ class _Bootstrap:
1621
+ """What the site process is allowed to learn, and the token that gates it."""
1622
+
1623
+ token: str
1624
+ namespace: str
1625
+ capability: str
1626
+ smtp_host: str
1627
+ smtp_port: int
1628
+
1629
+ def __repr__(self) -> str:
1630
+ return f"_Bootstrap(namespace={self.namespace!r}, token=<redacted>)"
1631
+
1632
+ def payload(self) -> dict[str, Any]:
1633
+ return {
1634
+ "namespace": self.namespace,
1635
+ "capability": self.capability,
1636
+ "smtp_host": self.smtp_host,
1637
+ "smtp_port": self.smtp_port,
1638
+ }
1639
+
1640
+
1641
+ class _BootstrapSlot:
1642
+ """The identity ``/internal/bootstrap`` is serving right now.
1643
+
1644
+ A trial's mailbox identity is minted once and never moves, so the slot is
1645
+ written once and read forever. Reference capture is the exception that
1646
+ makes it a slot at all: it relaunches the reference between tasks, and each
1647
+ relaunch has to be its own trial -- same bootstrap token, because that is
1648
+ the site process's own credential and the site is what stays the same, but
1649
+ a namespace and capability nothing before it could have seen. Rotating
1650
+ behind the slot lets the operator do that without tearing down the listener
1651
+ the site is about to call.
1652
+ """
1653
+
1654
+ def __init__(self, bootstrap: "_Bootstrap | None" = None) -> None:
1655
+ self._lock = threading.Lock()
1656
+ self._value = bootstrap
1657
+
1658
+ def __repr__(self) -> str:
1659
+ return f"_BootstrapSlot({self._value!r})"
1660
+
1661
+ def get(self) -> "_Bootstrap | None":
1662
+ with self._lock:
1663
+ return self._value
1664
+
1665
+ def rotate(self, *, namespace: str, capability: str) -> "_Bootstrap":
1666
+ """Swap in a fresh namespace and capability, keeping the token."""
1667
+
1668
+ with self._lock:
1669
+ current = self._value
1670
+ if current is None:
1671
+ raise RuntimeError("this mailbox serves no bootstrap identity")
1672
+ rotated = replace(current, namespace=namespace, capability=capability)
1673
+ self._value = rotated
1674
+ return rotated
1675
+
1676
+
1677
+ def _inbox_handler(
1678
+ store: MailboxStore, namespace: str, token: str
1679
+ ) -> type[BaseHTTPRequestHandler]:
1680
+ """The agent-facing listener: one namespace, HTML only, no capability.
1681
+
1682
+ The namespace is closed over at construction, so there is no request-time
1683
+ parameter an agent could vary to reach a second mailbox. Requirement 5
1684
+ holds by construction rather than by a check that could be bypassed.
1685
+ """
1686
+
1687
+ inbox_path = "/inbox/" + urllib.parse.quote(token, safe="")
1688
+
1689
+ class InboxHandler(BaseHTTPRequestHandler):
1690
+ def _send(self, status: int, body: bytes, content_type: str) -> None:
1691
+ self.send_response(status)
1692
+ self.send_header("Content-Type", content_type)
1693
+ self.send_header("Content-Length", str(len(body)))
1694
+ # The inbox is per-trial and mutates; never let it be cached.
1695
+ self.send_header("Cache-Control", "no-store")
1696
+ self.send_header("Referrer-Policy", "no-referrer")
1697
+ self.end_headers()
1698
+ self.wfile.write(body)
1699
+
1700
+ def _not_found(self) -> None:
1701
+ self._send(
1702
+ 404,
1703
+ _document("Not found", "<p>No such page.</p>"),
1704
+ "text/html; charset=utf-8",
1705
+ )
1706
+
1707
+ def do_GET(self) -> None: # noqa: N802
1708
+ parsed = urllib.parse.urlsplit(self.path)
1709
+ if parsed.path == "/healthz":
1710
+ healthy = store.healthy()
1711
+ body = json.dumps(
1712
+ {"status": "ok" if healthy else "unavailable"}
1713
+ ).encode("utf-8")
1714
+ self._send(
1715
+ 200 if healthy else 503,
1716
+ body,
1717
+ "application/json; charset=utf-8",
1718
+ )
1719
+ return
1720
+ if parsed.path in {"", "/"}:
1721
+ self.send_response(302)
1722
+ self.send_header("Location", inbox_path)
1723
+ self.send_header("Content-Length", "0")
1724
+ self.end_headers()
1725
+ return
1726
+ parts = [
1727
+ urllib.parse.unquote(part) for part in parsed.path.strip("/").split("/")
1728
+ ]
1729
+ # Defence in depth for the shared-origin topology, where the path is
1730
+ # the only thing separating one trial's inbox from another's.
1731
+ if len(parts) < 2 or parts[0] != "inbox":
1732
+ self._not_found()
1733
+ return
1734
+ if not hmac.compare_digest(token, parts[1]):
1735
+ self._not_found()
1736
+ return
1737
+ try:
1738
+ values = store.messages(namespace)
1739
+ except MailpitInfrastructureError:
1740
+ body = json.dumps({"status": "unavailable"}).encode("utf-8")
1741
+ self._send(503, body, "application/json; charset=utf-8")
1742
+ return
1743
+ if len(parts) == 2:
1744
+ self._send(
1745
+ 200,
1746
+ render_inbox(values, base_path=inbox_path),
1747
+ "text/html; charset=utf-8",
1748
+ )
1749
+ return
1750
+ if len(parts) == 4 and parts[2] == "messages":
1751
+ try:
1752
+ identifier = int(parts[3])
1753
+ except ValueError:
1754
+ self._not_found()
1755
+ return
1756
+ for item in values:
1757
+ if int(item["id"]) == identifier:
1758
+ self._send(
1759
+ 200,
1760
+ render_message(item, base_path=inbox_path),
1761
+ "text/html; charset=utf-8",
1762
+ )
1763
+ return
1764
+ self._not_found()
1765
+
1766
+ def log_message(self, format: str, *args: Any) -> None:
1767
+ return
1768
+
1769
+ return InboxHandler
1770
+
1771
+
1772
+ class LocalMailboxSidecar:
1773
+ """A loopback-only SMTP and Inbox API pair with namespace isolation."""
1774
+
1775
+ def __init__(
1776
+ self,
1777
+ *,
1778
+ smtp_port: int = 0,
1779
+ http_port: int = 0,
1780
+ bind_host: str = "127.0.0.1",
1781
+ inbox_port: int | None = None,
1782
+ inbox_bind_host: str | None = None,
1783
+ inbox_namespace: str | None = None,
1784
+ inbox_token: str | None = None,
1785
+ bootstrap: "_Bootstrap | None" = None,
1786
+ mailpit_client: MailpitClient,
1787
+ ) -> None:
1788
+ self.store = MailboxStore(mailpit_client=mailpit_client)
1789
+ self._bootstrap = _BootstrapSlot(bootstrap)
1790
+ self.smtp = _SmtpServer((bind_host, smtp_port), self.store)
1791
+ self.http = _HttpServer(
1792
+ (bind_host, http_port), _http_handler(self.store, self._bootstrap)
1793
+ )
1794
+ self.inbox: _HttpServer | None = None
1795
+ self._inbox_token = inbox_token
1796
+ if inbox_namespace is not None or inbox_token is not None:
1797
+ if not inbox_namespace or not inbox_token:
1798
+ raise ValueError("an inbox listener needs both namespace and token")
1799
+ self.inbox = _HttpServer(
1800
+ (inbox_bind_host or bind_host, inbox_port or 0),
1801
+ _inbox_handler(self.store, inbox_namespace, inbox_token),
1802
+ )
1803
+ self._threads: list[threading.Thread] = []
1804
+
1805
+ @property
1806
+ def smtp_port(self) -> int:
1807
+ return int(self.smtp.server_address[1])
1808
+
1809
+ @property
1810
+ def http_port(self) -> int:
1811
+ return int(self.http.server_address[1])
1812
+
1813
+ @property
1814
+ def inbox_port(self) -> int:
1815
+ if self.inbox is None:
1816
+ raise RuntimeError("this sidecar has no inbox listener")
1817
+ return int(self.inbox.server_address[1])
1818
+
1819
+ @property
1820
+ def url(self) -> str:
1821
+ return f"http://127.0.0.1:{self.http_port}"
1822
+
1823
+ @property
1824
+ def inbox_url(self) -> str:
1825
+ """The bare origin an agent is handed. It carries no secret."""
1826
+
1827
+ return f"http://127.0.0.1:{self.inbox_port}"
1828
+
1829
+ @property
1830
+ def _servers(self) -> tuple[Any, ...]:
1831
+ return (
1832
+ (self.smtp, self.http)
1833
+ if self.inbox is None
1834
+ else (
1835
+ self.smtp,
1836
+ self.http,
1837
+ self.inbox,
1838
+ )
1839
+ )
1840
+
1841
+ def register_namespace(self, namespace: str, capability: str) -> None:
1842
+ """Bind one opaque namespace to its unguessable per-worker capability."""
1843
+
1844
+ self.store.register(namespace, capability)
1845
+
1846
+ def rotate_bootstrap(self, namespace: str, capability: str) -> None:
1847
+ """Point ``/internal/bootstrap`` at a freshly minted namespace.
1848
+
1849
+ Registration happens first on purpose: a site that fetched the new
1850
+ identity and sent before the store knew it would have its message
1851
+ dropped at the SMTP door, which reads as a flaky mailbox rather than
1852
+ the ordering bug it is.
1853
+ """
1854
+
1855
+ previous = self._bootstrap.get()
1856
+ self.register_namespace(namespace, capability)
1857
+ # Candidate trials route direct SMTP into one fixed namespace. Mirror
1858
+ # that ABI during paired reference capture so runtimes using the direct
1859
+ # writer do not need the structured transport's namespace headers.
1860
+ self.smtp.fixed_namespace = namespace
1861
+ self._bootstrap.rotate(namespace=namespace, capability=capability)
1862
+ if previous is not None and previous.namespace != namespace:
1863
+ self.store.seal_namespace(previous.namespace)
1864
+
1865
+ def start(self) -> "LocalMailboxSidecar":
1866
+ if not self.store.healthy():
1867
+ raise MailpitInfrastructureError("Mailpit is not ready")
1868
+ for server in self._servers:
1869
+ thread = threading.Thread(target=server.serve_forever, daemon=True)
1870
+ thread.start()
1871
+ self._threads.append(thread)
1872
+ return self
1873
+
1874
+ def close(self) -> None:
1875
+ for server in self._servers:
1876
+ server.shutdown()
1877
+ server.server_close()
1878
+ for thread in self._threads:
1879
+ thread.join(timeout=5)
1880
+ self._threads.clear()
1881
+ self.store.destroy_namespaces()
1882
+
1883
+ def __enter__(self) -> "LocalMailboxSidecar":
1884
+ return self.start()
1885
+
1886
+ def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
1887
+ self.close()
1888
+
1889
+
1890
+ class CandidateMailboxTrial:
1891
+ """One formal case's write-only candidate mailbox and trusted reader.
1892
+
1893
+ Candidate code prefers the Resend-style ``POST /emails`` endpoint and may
1894
+ use ``smtp``/``bootstrap`` for compatibility. Both writers are fixed to
1895
+ this trial's namespace. The verifier API listens on a third, unadvertised
1896
+ port that the candidate sandbox does not permit, and it uses a distinct
1897
+ read credential that never enters the candidate environment.
1898
+ """
1899
+
1900
+ def __init__(
1901
+ self,
1902
+ *,
1903
+ bind_host: str = "127.0.0.1",
1904
+ mailpit_client: MailpitClient | None = None,
1905
+ ) -> None:
1906
+ self._runtime = None if mailpit_client is not None else EphemeralMailpit()
1907
+ storage_client = (
1908
+ mailpit_client
1909
+ if mailpit_client is not None
1910
+ else self._runtime.client
1911
+ if self._runtime is not None
1912
+ else None
1913
+ )
1914
+ namespace, read_credential, _inbox_token = _mint_identity()
1915
+ self.namespace = namespace
1916
+ self.read_credential = read_credential
1917
+ self._write_capability = secrets.token_hex(32)
1918
+ self._bootstrap_token = secrets.token_hex(32)
1919
+ self._mail_api_token = secrets.token_hex(32)
1920
+ self._sender = CANDIDATE_MAIL_SENDER
1921
+ self.store = MailboxStore(mailpit_client=storage_client)
1922
+ self.store.register(
1923
+ namespace,
1924
+ read_credential,
1925
+ allowed_from=(self._sender,),
1926
+ )
1927
+ self.smtp = _SmtpServer(
1928
+ (bind_host, 0),
1929
+ self.store,
1930
+ fixed_namespace=namespace,
1931
+ )
1932
+ self.http = _HttpServer(
1933
+ (bind_host, 0),
1934
+ _http_handler(self.store),
1935
+ )
1936
+ self.bootstrap = _HttpServer(
1937
+ (bind_host, 0),
1938
+ _candidate_bootstrap_handler(
1939
+ store=self.store,
1940
+ bootstrap_token=self._bootstrap_token,
1941
+ mail_api_token=self._mail_api_token,
1942
+ namespace=namespace,
1943
+ capability=self._write_capability,
1944
+ smtp_host=bind_host,
1945
+ smtp_port=self.smtp_port,
1946
+ sender=self._sender,
1947
+ ),
1948
+ )
1949
+ self._threads: list[threading.Thread] = []
1950
+
1951
+ @property
1952
+ def smtp_port(self) -> int:
1953
+ return int(self.smtp.server_address[1])
1954
+
1955
+ @property
1956
+ def http_port(self) -> int:
1957
+ return int(self.http.server_address[1])
1958
+
1959
+ @property
1960
+ def bootstrap_port(self) -> int:
1961
+ return int(self.bootstrap.server_address[1])
1962
+
1963
+ @property
1964
+ def url(self) -> str:
1965
+ return f"http://127.0.0.1:{self.http_port}"
1966
+
1967
+ @property
1968
+ def candidate_environment(self) -> dict[str, str]:
1969
+ """The complete optional mail ABI handed to the candidate runtime."""
1970
+
1971
+ return {
1972
+ "WEBSITEBENCH_MAIL_API_URL": (
1973
+ f"http://127.0.0.1:{self.bootstrap_port}/emails"
1974
+ ),
1975
+ "WEBSITEBENCH_MAIL_API_TOKEN": self._mail_api_token,
1976
+ "WEBSITEBENCH_MAIL_FROM": self._sender,
1977
+ "WEBSITEBENCH_SMTP_HOST": "127.0.0.1",
1978
+ "WEBSITEBENCH_SMTP_PORT": str(self.smtp_port),
1979
+ "WEBSITEBENCH_SMTP_FROM": self._sender,
1980
+ # Compatibility seam for candidates using websitebench.site_backend.
1981
+ # It serves write coordinates only and has no read routes.
1982
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL": (
1983
+ f"http://127.0.0.1:{self.bootstrap_port}/internal/bootstrap"
1984
+ ),
1985
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN": self._bootstrap_token,
1986
+ }
1987
+
1988
+ @property
1989
+ def candidate_connect_ports(self) -> frozenset[int]:
1990
+ return frozenset({self.smtp_port, self.bootstrap_port})
1991
+
1992
+ def start(self) -> "CandidateMailboxTrial":
1993
+ if self._runtime is not None:
1994
+ try:
1995
+ self._runtime.start()
1996
+ except BaseException:
1997
+ for server in (self.smtp, self.http, self.bootstrap):
1998
+ server.server_close()
1999
+ raise
2000
+ if not self.store.healthy():
2001
+ for server in (self.smtp, self.http, self.bootstrap):
2002
+ server.server_close()
2003
+ if self._runtime is not None:
2004
+ self._runtime.close()
2005
+ raise MailpitInfrastructureError("Mailpit is not ready")
2006
+ for server in (self.smtp, self.http, self.bootstrap):
2007
+ thread = threading.Thread(
2008
+ target=server.serve_forever,
2009
+ name=f"candidate-mailbox-{server.server_address[1]}",
2010
+ daemon=True,
2011
+ )
2012
+ thread.start()
2013
+ self._threads.append(thread)
2014
+ return self
2015
+
2016
+ def close(self) -> None:
2017
+ for server in (self.smtp, self.http, self.bootstrap):
2018
+ server.shutdown()
2019
+ server.server_close()
2020
+ for thread in self._threads:
2021
+ thread.join(timeout=5)
2022
+ self._threads.clear()
2023
+ self.store.destroy_namespaces()
2024
+ if self._runtime is not None:
2025
+ self._runtime.close()
2026
+
2027
+ def __enter__(self) -> "CandidateMailboxTrial":
2028
+ return self.start()
2029
+
2030
+ def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
2031
+ self.close()
2032
+
2033
+
2034
+ def _candidate_environment_problem(
2035
+ environment: Mapping[str, str], private_values: tuple[str, ...]
2036
+ ) -> str | None:
2037
+ """Return why ``environment`` may not be handed to a candidate, or ``None``.
2038
+
2039
+ The candidate mail ABI is a closed set of names carrying loopback
2040
+ coordinates only. A name outside the set, a Mailpit control variable, or
2041
+ any value naming the evaluator's own Mailpit socket would hand a candidate
2042
+ the trusted store instead of its write-only door.
2043
+ """
2044
+
2045
+ unknown = sorted(set(environment) - CANDIDATE_MAIL_ENVIRONMENT)
2046
+ if unknown:
2047
+ return f"candidate mailbox environment has unknown names: {unknown}"
2048
+ leaked = any(
2049
+ name.startswith("WEBSITEBENCH_MAILPIT_")
2050
+ or MAILPIT_RUNTIME_DIR in str(value)
2051
+ or any(private and private in str(value) for private in private_values)
2052
+ for name, value in environment.items()
2053
+ )
2054
+ if leaked:
2055
+ return "candidate mailbox environment exposed the Mailpit UDS"
2056
+ return None
2057
+
2058
+
2059
+ class MailTrial:
2060
+ """One case's candidate mailbox, as the rest of the evaluator sees it.
2061
+
2062
+ The candidate environment handed out here is already proved to be the
2063
+ closed mail ABI and free of evaluator-side coordinates, so no caller
2064
+ re-scans it. Reads stay on the trusted side: :meth:`deliveries` is the
2065
+ only way out of the store and it never leaves this trial's namespace.
2066
+ """
2067
+
2068
+ def __init__(
2069
+ self,
2070
+ trial: CandidateMailboxTrial,
2071
+ *,
2072
+ private_values: tuple[str, ...] = (),
2073
+ ) -> None:
2074
+ environment = dict(trial.candidate_environment)
2075
+ problem = _candidate_environment_problem(environment, private_values)
2076
+ if problem is not None:
2077
+ trial.close()
2078
+ raise MailpitInfrastructureError(problem)
2079
+ self._trial = trial
2080
+ self._environment = environment
2081
+
2082
+ @property
2083
+ def namespace(self) -> str:
2084
+ return self._trial.namespace
2085
+
2086
+ @property
2087
+ def read_credential(self) -> str:
2088
+ return self._trial.read_credential
2089
+
2090
+ @property
2091
+ def url(self) -> str:
2092
+ """The verifier-only reader origin; the candidate cannot reach it."""
2093
+
2094
+ return self._trial.url
2095
+
2096
+ @property
2097
+ def http_port(self) -> int:
2098
+ return self._trial.http_port
2099
+
2100
+ @property
2101
+ def store(self) -> MailboxStore:
2102
+ return self._trial.store
2103
+
2104
+ @property
2105
+ def candidate_environment(self) -> dict[str, str]:
2106
+ """The complete optional mail ABI this case's candidate receives."""
2107
+
2108
+ return dict(self._environment)
2109
+
2110
+ @property
2111
+ def candidate_connect_ports(self) -> frozenset[int]:
2112
+ """The loopback ports the candidate sandbox may connect out to."""
2113
+
2114
+ return self._trial.candidate_connect_ports
2115
+
2116
+ def healthy(self) -> bool:
2117
+ """Whether the backing store still answers, so an outage is not scored."""
2118
+
2119
+ return self._trial.store.healthy()
2120
+
2121
+ def deliveries(self) -> list[dict[str, Any]]:
2122
+ """Every message this trial's namespace received, newest first."""
2123
+
2124
+ return self._trial.store.messages(self._trial.namespace)
2125
+
2126
+ def close(self) -> None:
2127
+ self._trial.close()
2128
+
2129
+ def __enter__(self) -> "MailTrial":
2130
+ return self
2131
+
2132
+ def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
2133
+ self.close()
2134
+
2135
+
2136
+ class MailPlane:
2137
+ """The evaluator's single door to Mailpit.
2138
+
2139
+ Everything that knows a socket path, a container lifetime, a namespace or
2140
+ the candidate mail ABI lives behind this facade. ``formal``,
2141
+ ``trusted_check`` and ``capture`` ask the plane for a trial, a runner
2142
+ passthrough or an authoring gateway; they never build a Mailpit client,
2143
+ read a Mailpit variable, or inspect what they hand a candidate.
2144
+ """
2145
+
2146
+ def __init__(
2147
+ self, client: MailpitClient, *, runtime: EphemeralMailpit | None = None
2148
+ ) -> None:
2149
+ self.client = client
2150
+ self._runtime = runtime
2151
+
2152
+ @staticmethod
2153
+ def _configured_socket(env: Mapping[str, str]) -> str:
2154
+ """The evaluator's only read of :data:`MAILPIT_HTTP_SOCKET_ENV`."""
2155
+
2156
+ return str(env.get(MAILPIT_HTTP_SOCKET_ENV, "") or "").strip()
2157
+
2158
+ @classmethod
2159
+ def from_environment(cls, env: Mapping[str, str] = os.environ) -> "MailPlane":
2160
+ """Open the Mailpit the environment advertises.
2161
+
2162
+ A missing variable and an unhealthy Mailpit are the same answer to the
2163
+ caller: this process has no mail plane.
2164
+ """
2165
+
2166
+ socket_path = cls._configured_socket(env)
2167
+ if not socket_path:
2168
+ raise MailInfrastructureUnavailable(
2169
+ f"{MAILPIT_HTTP_SOCKET_ENV} is not configured"
2170
+ )
2171
+ client = MailpitClient(socket_path)
2172
+ if not client.ready():
2173
+ raise MailInfrastructureUnavailable(
2174
+ "Mailpit is not ready on its configured HTTP socket"
2175
+ )
2176
+ return cls(client)
2177
+
2178
+ @classmethod
2179
+ def ephemeral(
2180
+ cls, runtime_dir: str | os.PathLike[str] | None = None
2181
+ ) -> "MailPlane":
2182
+ """Start a private, networkless Mailpit this plane owns and will stop.
2183
+
2184
+ Host-side only: a Harbor trial has no Docker binary, so a scored run
2185
+ always goes through :meth:`from_environment` instead.
2186
+ """
2187
+
2188
+ runtime = EphemeralMailpit(runtime_dir=runtime_dir).start()
2189
+ return cls(runtime.client, runtime=runtime)
2190
+
2191
+ @classmethod
2192
+ def open(
2193
+ cls,
2194
+ *,
2195
+ runtime_dir: str | os.PathLike[str] | None = None,
2196
+ env: Mapping[str, str] = os.environ,
2197
+ ) -> "MailPlane":
2198
+ """Prefer the advertised Mailpit; start a private one when there is none."""
2199
+
2200
+ if cls._configured_socket(env):
2201
+ return cls.from_environment(env)
2202
+ return cls.ephemeral(runtime_dir=runtime_dir)
2203
+
2204
+ @property
2205
+ def socket_path(self) -> str:
2206
+ return self.client.socket_path
2207
+
2208
+ @property
2209
+ def owns_runtime(self) -> bool:
2210
+ """Whether closing this plane stops a Mailpit container."""
2211
+
2212
+ return self._runtime is not None
2213
+
2214
+ def healthy(self) -> bool:
2215
+ return self.client.ready()
2216
+
2217
+ def trial(self, *, bind_host: str = "127.0.0.1") -> MailTrial:
2218
+ """Start one case's write-only candidate mailbox on this plane.
2219
+
2220
+ The result is a context manager, so a caller that owns the mailbox for
2221
+ the length of a ``with`` block needs no other cleanup; a caller that
2222
+ owns it for the length of a case calls :meth:`MailTrial.close`.
2223
+ """
2224
+
2225
+ trial = CandidateMailboxTrial(
2226
+ bind_host=bind_host, mailpit_client=self.client
2227
+ ).start()
2228
+ return MailTrial(trial, private_values=(self.socket_path,))
2229
+
2230
+ def runner_environment(self, base: Mapping[str, str]) -> dict[str, str]:
2231
+ """Add to ``base`` exactly what a child verifier runner needs.
2232
+
2233
+ A trusted CI/CD runner is launched with a scrubbed environment and has
2234
+ to find the same Mailpit; that is one variable, and no other mail
2235
+ coordinate crosses the boundary.
2236
+ """
2237
+
2238
+ return {**dict(base), MAILPIT_HTTP_SOCKET_ENV: self.socket_path}
2239
+
2240
+ def authoring_gateway(
2241
+ self,
2242
+ *,
2243
+ namespace: str,
2244
+ capability: str,
2245
+ bootstrap_token: str,
2246
+ smtp_port: int,
2247
+ bind_host: str = "127.0.0.1",
2248
+ ) -> LocalMailboxSidecar:
2249
+ """Expose the stable loopback writer ABI over this plane, for authoring.
2250
+
2251
+ Capture hands a reference site the same SMTP/bootstrap door a scored
2252
+ candidate gets, so what capture exercises is what a trial will run.
2253
+ There is intentionally no in-memory fallback.
2254
+ """
2255
+
2256
+ if not self.client.ready():
2257
+ raise MailInfrastructureUnavailable("Mailpit is not ready for capture")
2258
+ sidecar = LocalMailboxSidecar(
2259
+ smtp_port=smtp_port,
2260
+ bind_host=bind_host,
2261
+ bootstrap=_Bootstrap(
2262
+ token=bootstrap_token,
2263
+ namespace=namespace,
2264
+ capability=capability,
2265
+ smtp_host=bind_host,
2266
+ smtp_port=smtp_port,
2267
+ ),
2268
+ mailpit_client=self.client,
2269
+ )
2270
+ sidecar.register_namespace(namespace, capability)
2271
+ sidecar.start()
2272
+ return sidecar
2273
+
2274
+ def close(self) -> None:
2275
+ runtime, self._runtime = self._runtime, None
2276
+ if runtime is not None:
2277
+ runtime.close()
2278
+
2279
+ def __enter__(self) -> "MailPlane":
2280
+ return self
2281
+
2282
+ def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
2283
+ self.close()
2284
+
2285
+
2286
+ def authoring_environment(
2287
+ sidecar: LocalMailboxSidecar,
2288
+ *,
2289
+ namespace: str,
2290
+ capability: str,
2291
+ bootstrap_token: str,
2292
+ smtp_port: int,
2293
+ smtp_host: str = "127.0.0.1",
2294
+ ) -> dict[str, str]:
2295
+ """The complete mail ABI an authoring capture exports around a reference site.
2296
+
2297
+ It is a superset of the candidate ABI: authoring also owns the read
2298
+ credential and the namespace, which a scored candidate never sees. The
2299
+ names are exactly :data:`AUTHORING_MAIL_ENVIRONMENT`.
2300
+ """
2301
+
2302
+ gateway = sidecar.url.rstrip("/")
2303
+ return {
2304
+ "WEBSITEBENCH_MAILBOX_URL": sidecar.url,
2305
+ "WEBSITEBENCH_MAILBOX_ALLOWLIST": "",
2306
+ "WEBSITEBENCH_MAILBOX_CREDENTIAL": capability,
2307
+ "WEBSITEBENCH_MAILBOX_NAMESPACE": namespace,
2308
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL": f"{gateway}/internal/bootstrap",
2309
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN": bootstrap_token,
2310
+ "WEBSITEBENCH_SMTP_HOST": smtp_host,
2311
+ "WEBSITEBENCH_SMTP_PORT": str(smtp_port),
2312
+ # Paired capture must present the same sender ABI as a formal candidate
2313
+ # trial: some runtimes pin this exact suffix before opening SMTP, so a
2314
+ # site-specific authoring sender would disable their only mail path.
2315
+ "WEBSITEBENCH_MAIL_API_URL": f"{gateway}/emails",
2316
+ "WEBSITEBENCH_MAIL_API_TOKEN": bootstrap_token,
2317
+ "WEBSITEBENCH_MAIL_FROM": CANDIDATE_MAIL_SENDER,
2318
+ "WEBSITEBENCH_SMTP_FROM": CANDIDATE_MAIL_SENDER,
2319
+ }
2320
+
2321
+
2322
+ def _mint_identity() -> tuple[str, str, str]:
2323
+ """Mint one trial's mailbox identity.
2324
+
2325
+ Minted from ``secrets``, never derived from the public ``seed-<seed>``
2326
+ trial ID, while the inbox token doubles as the browser's access token.
2327
+ Determinism is not lost, because scoring reads no mail.
2328
+ """
2329
+
2330
+ return (
2331
+ f"trial-{secrets.token_hex(16)}",
2332
+ secrets.token_hex(32),
2333
+ secrets.token_urlsafe(32),
2334
+ )
2335
+
2336
+
2337
+ def main(argv: list[str] | None = None) -> int:
2338
+ """Run one trial's mailbox, minting that trial's identity at boot.
2339
+
2340
+ ``materialize`` runs once per *bundle*; a trial is one *run* of that
2341
+ bundle, so a value written into ``docker-compose.yaml`` can never be
2342
+ per-trial. The identity is therefore minted here, by the one process that
2343
+ owns it, and each party learns only its own half over the listener it is
2344
+ allowed to reach: the site reads ``/internal/bootstrap`` on the API
2345
+ listener, the agent gets a bare inbox URL and no credential at all.
2346
+
2347
+ The values come from ``secrets`` rather than from the public
2348
+ ``seed-<seed>`` trial ID. Determinism is not lost, because formal scoring
2349
+ never reads mail.
2350
+ """
2351
+
2352
+ import argparse
2353
+
2354
+ parser = argparse.ArgumentParser(prog="websitebench-local-mailbox")
2355
+ parser.add_argument("--smtp-port", type=int, default=1025)
2356
+ parser.add_argument("--http-port", type=int, default=8025)
2357
+ parser.add_argument("--inbox-port", type=int, default=8026)
2358
+ parser.add_argument("--bind-host", default="127.0.0.1")
2359
+ parser.add_argument(
2360
+ "--api-bind-host",
2361
+ default=None,
2362
+ help="interface for the SMTP and JSON API listeners (defaults to --bind-host)",
2363
+ )
2364
+ parser.add_argument(
2365
+ "--inbox-bind-host",
2366
+ default=None,
2367
+ help="interface for the agent inbox listener (defaults to --bind-host)",
2368
+ )
2369
+ args = parser.parse_args(argv)
2370
+
2371
+ api_bind = (
2372
+ args.api_bind_host
2373
+ or os.environ.get("WEBSITEBENCH_MAILBOX_API_BIND")
2374
+ or args.bind_host
2375
+ )
2376
+ inbox_bind = (
2377
+ args.inbox_bind_host
2378
+ or os.environ.get("WEBSITEBENCH_MAILBOX_INBOX_BIND")
2379
+ or args.bind_host
2380
+ )
2381
+ smtp_advertise_host = (
2382
+ os.environ.get("WEBSITEBENCH_MAILBOX_SMTP_ADVERTISE_HOST", "").strip()
2383
+ or api_bind
2384
+ )
2385
+
2386
+ namespace, capability, inbox_token = _mint_identity()
2387
+ bootstrap_token = os.environ.get("WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN", "")
2388
+ if len(bootstrap_token) < 32:
2389
+ raise SystemExit(
2390
+ "WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN must be at least 32 characters"
2391
+ )
2392
+ try:
2393
+ mailpit_client = MailPlane.from_environment().client
2394
+ except MailInfrastructureUnavailable as error:
2395
+ # The sidecar discovers its store the same way the evaluator does, and
2396
+ # refuses to serve an in-memory production mailbox when there is none.
2397
+ raise SystemExit(f"{error}; refusing an in-memory production mailbox")
2398
+
2399
+ stopped = threading.Event()
2400
+ signal.signal(signal.SIGTERM, lambda _signum, _frame: stopped.set())
2401
+ signal.signal(signal.SIGINT, lambda _signum, _frame: stopped.set())
2402
+ sidecar = LocalMailboxSidecar(
2403
+ smtp_port=args.smtp_port,
2404
+ http_port=args.http_port,
2405
+ bind_host=api_bind,
2406
+ inbox_port=args.inbox_port,
2407
+ inbox_bind_host=inbox_bind,
2408
+ inbox_namespace=namespace,
2409
+ inbox_token=inbox_token,
2410
+ bootstrap=_Bootstrap(
2411
+ token=bootstrap_token,
2412
+ namespace=namespace,
2413
+ capability=capability,
2414
+ smtp_host=smtp_advertise_host,
2415
+ smtp_port=args.smtp_port,
2416
+ ),
2417
+ mailpit_client=mailpit_client,
2418
+ )
2419
+ sidecar.register_namespace(namespace, capability)
2420
+ sidecar.start()
2421
+ # The inbox path is the agent's entry point and holds no secret beyond the
2422
+ # token that scopes it to this trial; nothing else about the trial is
2423
+ # printed, and the capability never is.
2424
+ print(f"inbox listening on {inbox_bind}:{args.inbox_port}", flush=True)
2425
+ try:
2426
+ stopped.wait()
2427
+ finally:
2428
+ sidecar.close()
2429
+ return 0
2430
+
2431
+
2432
+ if __name__ == "__main__":
2433
+ raise SystemExit(main(sys.argv[1:]))
tasks/legalnature/environment/reference/.websitebench-reference-tls/ca.crt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDSzCCAjOgAwIBAgIJV1NCSEFSQk9SMA0GCSqGSIb3DQEBCwUAMDExLzAtBgNV
3
+ BAMMJldlYnNpdGVCZW5jaCBIYXJib3IgTG9jYWwgUmVmZXJlbmNlIENBMB4XDTI2
4
+ MDgyMjEzMDg1NloXDTQ2MDgyMjEzMDg1NlowMTEvMC0GA1UEAwwmV2Vic2l0ZUJl
5
+ bmNoIEhhcmJvciBMb2NhbCBSZWZlcmVuY2UgQ0EwggEiMA0GCSqGSIb3DQEBAQUA
6
+ A4IBDwAwggEKAoIBAQCnBZES7bXJo/hajL5T54GDV/FLmQxmk0dGN+aPwRrgpiN6
7
+ syddg/krh/dhiUzfxgJV+6ajnYuYyQ4BVo1rQGY0va95T8cjcHgC7EyEAaDUZF+i
8
+ qo3v/ucMmquZodezEkghWz6FDcGH3dDtz0bQyYgoGQKnioeYXsVlfvIzXJpE1VTW
9
+ iGUH83/APzvPInZ5jRRrCEnqj1WtSoi+Yycs/eaYueDomoZeT3xvK5MTz6tC6EvW
10
+ hAh8qyv2DjPZUSToiZH23X6qXYRkKkLDXHWHfhamRwlFoh9pp2s4D+Cq/Wke+o2f
11
+ /cj8KvAkTnMo4iMmZFpb/NRaGjhfy8UBPuM7SwMJAgMBAAGjZjBkMB0GA1UdDgQW
12
+ BBQn+U1eizvlvKbfavSxHoXFYQ/UfTAfBgNVHSMEGDAWgBQn+U1eizvlvKbfavSx
13
+ HoXFYQ/UfTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjANBgkq
14
+ hkiG9w0BAQsFAAOCAQEAoSC3zzZEAs2eigloiDkdeh98+2cPmcs44TG+TU6sq6SP
15
+ EBEgHg/c6yzh74UijEImksT9aZ+LxtTNM+nfNFzWku1T3R7gSimP5TSnC4rTEhfM
16
+ Ih8fMoUbcAe/uFwVE9UHn/QQNsqRg6hg2jdUlmwr206e62/eBQXDNeuLcapAxcdU
17
+ VYno4HNi5gAaakS2dM/IgiorRqM7SVT+s8B9Fl0mzMdRNCUeOOU4q8zGtQGp4IV+
18
+ x/LZIMsLogP2Rpks8ecyanRSXYpGbqpZ+14rcO5bdWQ7P8B/sFssT3b1mR3H/aVh
19
+ yZycwgzCbkbdMaxyz2Vm/c7PVb3so5Xb98jufp2L9A==
20
+ -----END CERTIFICATE-----
tasks/legalnature/environment/reference/.websitebench-reference-tls/reference.crt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDWjCCAkKgAwIBAgIIV1NCUkVGMDEwDQYJKoZIhvcNAQELBQAwMTEvMC0GA1UE
3
+ AwwmV2Vic2l0ZUJlbmNoIEhhcmJvciBMb2NhbCBSZWZlcmVuY2UgQ0EwHhcNMjYw
4
+ ODIyMTMwODU2WhcNNDYwODIyMTMwODU2WjAUMRIwEAYDVQQDDAlyZWZlcmVuY2Uw
5
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNJXc7onbK78RiLSAe3LjI
6
+ eko9xNumYRejoB+kKFGLBL4U7vY+02coiXpne4e1CMzUVzRiaQ9i9XHBe0Oq4CR1
7
+ HW7wzMRV8XVM5/dVq+j0vZVarZbITyHSWHwypa7yPL7o/kBekdwi8ncdUy/mhYqw
8
+ 7sOdM4Nq0ifj+lcJ/rwSqjvcML4//4THY9CP5iB2YT+U+Z7F/JfLOJFZ12l4Sglx
9
+ RDf1awDLJpGfpX0kRgW7jYuWf49C5VcPjggTRl1WYy1qrgaNIFu75sresXYkDgRx
10
+ uLiXfc/6wNwykh9fQo+GNFqBGy2lC8Ey425m4XEROraenAGMqVMfxJsJ5wjqRhlV
11
+ AgMBAAGjgZIwgY8wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0l
12
+ BAwwCgYIKwYBBQUHAwEwGgYDVR0RBBMwEYIJcmVmZXJlbmNlhwR/AAABMB0GA1Ud
13
+ DgQWBBQ0EtbLFU1HI9Wdikc8qRx8TdRT8TAfBgNVHSMEGDAWgBQn+U1eizvlvKbf
14
+ avSxHoXFYQ/UfTANBgkqhkiG9w0BAQsFAAOCAQEATXVQdAfuOvbbsBhNHCvfoYuM
15
+ rgnUOdAHevutvg/gPe6AcshAJMvvfL6J/TpimY+TKDqVBVs0qB6jXjgZURQ9EsFR
16
+ WDJywamDHAFNTTuq1A+78VAS3LK3z54JH2BRlvtjnEDkzDei0/brOentce73YwVR
17
+ XU6+y/yGlSYGdq63wzDxBOUwD/I/src9WpmYqrSwstlD1epemMUIsfDpfSRcGYM2
18
+ tB+zMBccmP/hrB3eJcrjiediwhSBNJjdKysK66GzFRqcyGwwvsz1YPbWcpcQXoVZ
19
+ nnNXEs5TrxTj67/DLuP/233oEoz2XQNh1O2ohq1o5JMu4hbotqkepCwcidNBmQ==
20
+ -----END CERTIFICATE-----
tasks/legalnature/environment/reference/.websitebench-reference-tls/reference.key ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN PRIVATE KEY-----
2
+ MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNJXc7onbK78Ri
3
+ LSAe3LjIeko9xNumYRejoB+kKFGLBL4U7vY+02coiXpne4e1CMzUVzRiaQ9i9XHB
4
+ e0Oq4CR1HW7wzMRV8XVM5/dVq+j0vZVarZbITyHSWHwypa7yPL7o/kBekdwi8ncd
5
+ Uy/mhYqw7sOdM4Nq0ifj+lcJ/rwSqjvcML4//4THY9CP5iB2YT+U+Z7F/JfLOJFZ
6
+ 12l4SglxRDf1awDLJpGfpX0kRgW7jYuWf49C5VcPjggTRl1WYy1qrgaNIFu75sre
7
+ sXYkDgRxuLiXfc/6wNwykh9fQo+GNFqBGy2lC8Ey425m4XEROraenAGMqVMfxJsJ
8
+ 5wjqRhlVAgMBAAECggEAIdiyWyGzKUjVVSBeWhEvII6CpL3Pwpvmz02KIuavC3l5
9
+ FhGWCagN71N9YUjxizYcO1V29FyimABoaBR7BdyMz1DPnsWeCBL6ODnWZilimkyU
10
+ MX2N8NcTfLWyKhYJbviERAM84g19LTvlWK6Cqu0yBH6kQhG/dzacs8G4LhM7+vUU
11
+ +43RFW4GFmYDXtfUEZuZ8IRzWxDdXQ9yVnKxKrhuYj4/UYgTTspOx87m++Ft6BJR
12
+ IQRw1dZ7dE2R8pZbYQdOXRXSjf59KisJSr9N2+mYZYNUWWv7zF8bmD17hxtsQk9C
13
+ wesyN3DqzoLHK3GfoG3ZuA+v3aEVKHRk8Tc1aosYyQKBgQD0ddALajm0XHictsG3
14
+ /JTC1RL0nj+SoVVgYdWccA7VUs68Cbpq1RYzUawDOhYlQjbJBJTQ9z5kwWP+50vH
15
+ VPjpU/cMFx4d63WwDEXcC2o09mh3OjkfujUdRroyn6rJgKXuSJeMAz0JrGCTIS91
16
+ 0t2cmoSqKSIaN2oU5IsONLg6SQKBgQDW1JBCiP1c6tYi9wKpEJLjlRqSIsLgLApg
17
+ h6o1sWFfUrbQ21ORS1jhLnCkJsyLWoyZkUgwaXbXoLoVw3kIdPLJ8TI1FJ+ZPYdt
18
+ EJcvvVjmJIrcq9um1qoKKpmiKuwRe4/OYdFQcdTRwob1wpoAi7T9CfiNgo53WHsR
19
+ mviPzSEGrQKBgQDnpL+YIXc+niU4MsFL6463NBq7Kz0IX9I7+1jj3RdhMw9tBTbd
20
+ Rr+7r1d001Tqx1yMjMfLX42DAfIUN+4Jm04mIwdFMJ68MUMap/aGtVZVi2ygFc7N
21
+ brAn5r5HfB7kw//31FeuN99dzDbTFC4Z0s9mNtEhQMrs1rexxoKx2mj76QKBgBi5
22
+ AZkGltG4nMgNURsPszfJkvM6WN7fcppFQotHTINhy3QhqW5RE3tmksPxSxzGYOPT
23
+ WlFn8atC7edPRYB5pO8keLivFObXs9wTSrLNwYtKrUhT5sU+cvcUi/WjpuMkKxp/
24
+ G018rBcvocRqjrp9WWi9WwM+ARMu9YrDINO7sY9JAoGBAJlTUtKVOOuaujK53Vnq
25
+ 2O5FrC/HcsUa1nTRO/WSDyUjGWeqAr75yi05UD6M2tTov1uGbtg47Q5n6eqjVyy3
26
+ FTYmG+lVbVXjVcOFuUhZxJhELsHulsJ1LRPAJccC0Uci8IZ8rfIZyREn7tKpBJI4
27
+ 4s+BQ5R45Cv3eUi2JU/xuAtK
28
+ -----END PRIVATE KEY-----
tasks/legalnature/environment/reference/.websitebench-reference-tls/tls_proxy.py ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Terminate trusted local TLS in front of a Harbor reference process.
2
+
3
+ The reference application's own launch contract remains HTTP on loopback. The
4
+ Agent-facing Docker service is HTTPS only, so Secure ``__Host-`` cookies have
5
+ the same browser semantics as the source site without changing clone code.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import asyncio
11
+ import contextlib
12
+ import os
13
+ import signal
14
+ import ssl
15
+ import subprocess
16
+ import sys
17
+ from pathlib import Path
18
+
19
+
20
+ BUFFER_SIZE = 64 * 1024
21
+ STARTUP_TIMEOUT_SECONDS = 30.0
22
+
23
+
24
+ async def _copy_stream(
25
+ reader: asyncio.StreamReader,
26
+ writer: asyncio.StreamWriter,
27
+ ) -> None:
28
+ while block := await reader.read(BUFFER_SIZE):
29
+ writer.write(block)
30
+ await writer.drain()
31
+
32
+
33
+ async def _forward(
34
+ client_reader: asyncio.StreamReader,
35
+ client_writer: asyncio.StreamWriter,
36
+ *,
37
+ upstream_port: int,
38
+ ) -> None:
39
+ try:
40
+ upstream_reader, upstream_writer = await asyncio.open_connection(
41
+ "127.0.0.1", upstream_port
42
+ )
43
+ except OSError:
44
+ client_writer.close()
45
+ await client_writer.wait_closed()
46
+ return
47
+
48
+ tasks = {
49
+ asyncio.create_task(_copy_stream(client_reader, upstream_writer)),
50
+ asyncio.create_task(_copy_stream(upstream_reader, client_writer)),
51
+ }
52
+ try:
53
+ _done, pending = await asyncio.wait(
54
+ tasks, return_when=asyncio.FIRST_COMPLETED
55
+ )
56
+ for task in pending:
57
+ task.cancel()
58
+ await asyncio.gather(*tasks, return_exceptions=True)
59
+ finally:
60
+ upstream_writer.close()
61
+ client_writer.close()
62
+ with contextlib.suppress(OSError):
63
+ await upstream_writer.wait_closed()
64
+ with contextlib.suppress(OSError):
65
+ await client_writer.wait_closed()
66
+
67
+
68
+ async def _wait_for_upstream(process: subprocess.Popen[bytes], port: int) -> None:
69
+ loop = asyncio.get_running_loop()
70
+ deadline = loop.time() + STARTUP_TIMEOUT_SECONDS
71
+ while loop.time() < deadline:
72
+ return_code = process.poll()
73
+ if return_code is not None:
74
+ raise RuntimeError(
75
+ f"reference process exited before readiness with {return_code}"
76
+ )
77
+ try:
78
+ _reader, writer = await asyncio.open_connection("127.0.0.1", port)
79
+ except OSError:
80
+ await asyncio.sleep(0.1)
81
+ continue
82
+ writer.close()
83
+ await writer.wait_closed()
84
+ return
85
+ raise TimeoutError("reference process did not open its loopback port")
86
+
87
+
88
+ async def _terminate(process: subprocess.Popen[bytes]) -> None:
89
+ if process.poll() is not None:
90
+ return
91
+ process.terminate()
92
+ try:
93
+ await asyncio.wait_for(asyncio.to_thread(process.wait), timeout=10.0)
94
+ except TimeoutError:
95
+ process.kill()
96
+ await asyncio.to_thread(process.wait)
97
+
98
+
99
+ async def _serve(command: list[str]) -> int:
100
+ external_port = int(os.environ.get("PORT", "8080"))
101
+ upstream_port = int(
102
+ os.environ.get("WEBSITEBENCH_REFERENCE_UPSTREAM_PORT", "18080")
103
+ )
104
+ if external_port == upstream_port:
105
+ raise ValueError("reference TLS and upstream ports must differ")
106
+
107
+ child_environment = dict(os.environ)
108
+ child_environment["HOST"] = "127.0.0.1"
109
+ child_environment["PORT"] = str(upstream_port)
110
+ process = subprocess.Popen(command, env=child_environment)
111
+ server: asyncio.AbstractServer | None = None
112
+ try:
113
+ await _wait_for_upstream(process, upstream_port)
114
+ tls_root = Path(__file__).resolve().parent
115
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
116
+ context.minimum_version = ssl.TLSVersion.TLSv1_2
117
+ context.load_cert_chain(
118
+ certfile=tls_root / "reference.crt",
119
+ keyfile=tls_root / "reference.key",
120
+ )
121
+ server = await asyncio.start_server(
122
+ lambda reader, writer: _forward(
123
+ reader, writer, upstream_port=upstream_port
124
+ ),
125
+ "0.0.0.0",
126
+ external_port,
127
+ ssl=context,
128
+ )
129
+ print(
130
+ "WebsiteBench reference HTTPS ready on "
131
+ f"0.0.0.0:{external_port}; upstream=127.0.0.1:{upstream_port}",
132
+ flush=True,
133
+ )
134
+
135
+ stop = asyncio.Event()
136
+ loop = asyncio.get_running_loop()
137
+ for signum in (signal.SIGINT, signal.SIGTERM):
138
+ loop.add_signal_handler(signum, stop.set)
139
+ process_wait = asyncio.create_task(asyncio.to_thread(process.wait))
140
+ stop_wait = asyncio.create_task(stop.wait())
141
+ done, pending = await asyncio.wait(
142
+ {process_wait, stop_wait}, return_when=asyncio.FIRST_COMPLETED
143
+ )
144
+ for task in pending:
145
+ task.cancel()
146
+ await asyncio.gather(*pending, return_exceptions=True)
147
+ if process_wait in done:
148
+ return process_wait.result()
149
+ return 0
150
+ finally:
151
+ if server is not None:
152
+ server.close()
153
+ await server.wait_closed()
154
+ await _terminate(process)
155
+
156
+
157
+ def main() -> int:
158
+ if len(sys.argv) < 2:
159
+ raise SystemExit("usage: tls_proxy.py COMMAND [ARG ...]")
160
+ return asyncio.run(_serve(sys.argv[1:]))
161
+
162
+
163
+ if __name__ == "__main__":
164
+ raise SystemExit(main())
tasks/legalnature/environment/reference/Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12.11-slim-bookworm@sha256:519591d6871b7bc437060736b9f7456b8731f1499a57e22e6c285135ae657bf7
2
+ WORKDIR /srv/reference
3
+ # BEGIN WebsiteBench runtime dependencies
4
+ COPY --from=ghcr.io/astral-sh/uv:0.12.8@sha256:d1cbaeadc234fe19c0d93daabcf5e98738cd93c6d1dd4918ef6aa30735feb23a /uv /usr/local/bin/uv
5
+ COPY vendor.requirements.lock vendor.requirements.lock
6
+ RUN uv pip install --python /usr/local/bin/python --no-cache --no-deps --require-hashes --only-binary :all: --link-mode copy --target vendor -r vendor.requirements.lock && rm -f vendor/.lock
7
+ # END WebsiteBench runtime dependencies
8
+ COPY . .
9
+ ENV HOST=0.0.0.0 PORT=8080 DATA_DIR=/tmp/websitebench-legalnature-reference-data SEED=0 TZ=UTC
10
+ RUN ./compile.sh
11
+ HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2)"
12
+ CMD ["./executable"]
13
+
14
+ # Added by the WebsiteBench Harbor materializer. The original app runs only on loopback; the Agent-facing reference is trusted HTTPS.
15
+ COPY .websitebench-reference-tls/ /opt/websitebench/reference-tls/
16
+ RUN chmod 600 /opt/websitebench/reference-tls/reference.key && chmod 755 /opt/websitebench/reference-tls/tls_proxy.py
17
+ ENV WEBSITEBENCH_REFERENCE_UPSTREAM_PORT=18080
18
+ HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import os,ssl,urllib.request as r;c=ssl.create_default_context(cafile='/opt/websitebench/reference-tls/ca.crt');u='https://127.0.0.1:'+os.environ.get('PORT','8080')+'/healthz';r.urlopen(u,context=c,timeout=2).close()"
19
+ CMD ["python3", "/opt/websitebench/reference-tls/tls_proxy.py", "./run.sh"]
tasks/legalnature/environment/reference/README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Direct reference adapter
2
+
3
+ The materializer overlays these ABI files on the frozen LegalNature clone and
4
+ backend. The same assembled bytes form the private oracle implementation; the
5
+ clone and backend are not duplicated in this authoring directory.
tasks/legalnature/environment/reference/backend/model.json ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": "offline-clone.backend-model.v1",
3
+ "site_id": "legalnature",
4
+ "status": "draft",
5
+ "profile": "offline-benchmark",
6
+ "database": {
7
+ "engine": "sqlite",
8
+ "location_policy": "runtime-data-outside-candidate",
9
+ "concurrency_model": "wal-transactional-single-writer",
10
+ "migration_strategy": "versioned-forward-migrations",
11
+ "deterministic_reset": true,
12
+ "restart_persistence": true,
13
+ "site_isolation": "one-database-per-site",
14
+ "proofs": [
15
+ {
16
+ "obligation": "data-location",
17
+ "status": "planned",
18
+ "evidence": []
19
+ },
20
+ {
21
+ "obligation": "schema-migration",
22
+ "status": "planned",
23
+ "evidence": []
24
+ },
25
+ {
26
+ "obligation": "deterministic-reset",
27
+ "status": "planned",
28
+ "evidence": []
29
+ },
30
+ {
31
+ "obligation": "restart-persistence",
32
+ "status": "planned",
33
+ "evidence": []
34
+ },
35
+ {
36
+ "obligation": "backup-restore",
37
+ "status": "planned",
38
+ "evidence": []
39
+ },
40
+ {
41
+ "obligation": "concurrency",
42
+ "status": "planned",
43
+ "evidence": []
44
+ }
45
+ ]
46
+ },
47
+ "auth_semantics": {
48
+ "account_database_scope": "site-isolated",
49
+ "credential_storage": "salted-scrypt-hash",
50
+ "session_storage": "opaque-cookie-digest-at-rest",
51
+ "registration_account_creation": "after-email-verification",
52
+ "verification_challenge_storage": "salted-hash",
53
+ "password_reset_enumeration": "indistinguishable-public-response",
54
+ "mail_default": "LOCAL_ONLY",
55
+ "mail_statuses": [
56
+ "LOCAL_ONLY",
57
+ "SMTP_PENDING",
58
+ "SMTP_SENT",
59
+ "SMTP_FAILED"
60
+ ],
61
+ "smtp_activation": "explicit-complete-config-only",
62
+ "smtp_delivery_ceiling": 3,
63
+ "rejected_secret_journaling": "forbidden",
64
+ "legacy_write_policy": "read-compatible-write-rejected"
65
+ },
66
+ "common_capabilities": {
67
+ "account_registration": "account-registration",
68
+ "account_sign_in": "account-sign-in",
69
+ "session_lifecycle": "session-lifecycle",
70
+ "password_recovery": "password-recovery",
71
+ "email_delivery": "email-delivery"
72
+ },
73
+ "capabilities": [
74
+ {
75
+ "id": "account-registration",
76
+ "label": "Verified local account registration",
77
+ "priority": "p0",
78
+ "category": "authentication",
79
+ "implementation_status": "planned",
80
+ "entities": [
81
+ {
82
+ "name": "pending-registration",
83
+ "identity": "opaque pending id bound to one browser session",
84
+ "owner_scope": "session",
85
+ "persistence": "durable"
86
+ },
87
+ {
88
+ "name": "local-account",
89
+ "identity": "site-local account id and unique normalized email",
90
+ "owner_scope": "account",
91
+ "persistence": "durable"
92
+ }
93
+ ],
94
+ "state_machine": {
95
+ "kind": "challenge-lifecycle",
96
+ "states": [
97
+ "collecting",
98
+ "pending-verification",
99
+ "verified",
100
+ "account-created",
101
+ "expired",
102
+ "locked"
103
+ ],
104
+ "transitions": [
105
+ {
106
+ "from": "collecting",
107
+ "to": "pending-verification",
108
+ "trigger": "validated registration request"
109
+ },
110
+ {
111
+ "from": "pending-verification",
112
+ "to": "verified",
113
+ "trigger": "correct unexpired code within attempt budget"
114
+ },
115
+ {
116
+ "from": "verified",
117
+ "to": "account-created",
118
+ "trigger": "transactional account creation and session rotation"
119
+ },
120
+ {
121
+ "from": "pending-verification",
122
+ "to": "expired",
123
+ "trigger": "challenge expiry"
124
+ },
125
+ {
126
+ "from": "pending-verification",
127
+ "to": "locked",
128
+ "trigger": "verification attempt budget exhausted"
129
+ }
130
+ ]
131
+ },
132
+ "server_authorities": [
133
+ "The server normalizes identity and hashes password and code.",
134
+ "An account is created only after successful verification.",
135
+ "Duplicate normalized email creation is rejected transactionally."
136
+ ],
137
+ "external_effect": "none",
138
+ "journey_ids": [],
139
+ "invariant_ids": [],
140
+ "proofs": {
141
+ "evidence": {},
142
+ "planned": [
143
+ "valid",
144
+ "invalid",
145
+ "duplicate",
146
+ "stale",
147
+ "foreign-owner",
148
+ "unauthorized-role",
149
+ "restart",
150
+ "migration",
151
+ "concurrency"
152
+ ],
153
+ "not_applicable": []
154
+ }
155
+ },
156
+ {
157
+ "id": "account-sign-in",
158
+ "label": "Password-based local account sign-in",
159
+ "priority": "p0",
160
+ "category": "authentication",
161
+ "implementation_status": "planned",
162
+ "entities": [
163
+ {
164
+ "name": "local-account",
165
+ "identity": "site-local account id and normalized email",
166
+ "owner_scope": "account",
167
+ "persistence": "durable"
168
+ }
169
+ ],
170
+ "state_machine": {
171
+ "kind": "entity-lifecycle",
172
+ "states": [
173
+ "signed-out",
174
+ "identified",
175
+ "authenticated",
176
+ "rejected"
177
+ ],
178
+ "transitions": [
179
+ {
180
+ "from": "signed-out",
181
+ "to": "identified",
182
+ "trigger": "normalized email submitted"
183
+ },
184
+ {
185
+ "from": "identified",
186
+ "to": "authenticated",
187
+ "trigger": "constant-time password verification succeeds"
188
+ },
189
+ {
190
+ "from": "identified",
191
+ "to": "rejected",
192
+ "trigger": "credentials are invalid"
193
+ }
194
+ ]
195
+ },
196
+ "server_authorities": [
197
+ "The server verifies salted password hashes.",
198
+ "The server rotates the authenticated session.",
199
+ "Client-selected fixture identity is not authentication."
200
+ ],
201
+ "external_effect": "none",
202
+ "journey_ids": [],
203
+ "invariant_ids": [],
204
+ "proofs": {
205
+ "evidence": {},
206
+ "planned": [
207
+ "valid",
208
+ "invalid",
209
+ "duplicate",
210
+ "stale",
211
+ "foreign-owner",
212
+ "unauthorized-role",
213
+ "restart",
214
+ "migration",
215
+ "concurrency"
216
+ ],
217
+ "not_applicable": []
218
+ }
219
+ },
220
+ {
221
+ "id": "session-lifecycle",
222
+ "label": "Anonymous and authenticated browser sessions",
223
+ "priority": "p0",
224
+ "category": "authentication",
225
+ "implementation_status": "planned",
226
+ "entities": [
227
+ {
228
+ "name": "browser-session",
229
+ "identity": "opaque cookie token with digest persisted at rest",
230
+ "owner_scope": "session",
231
+ "persistence": "durable"
232
+ }
233
+ ],
234
+ "state_machine": {
235
+ "kind": "session-lifecycle",
236
+ "states": [
237
+ "anonymous",
238
+ "authenticated",
239
+ "revoked",
240
+ "expired"
241
+ ],
242
+ "transitions": [
243
+ {
244
+ "from": "anonymous",
245
+ "to": "authenticated",
246
+ "trigger": "successful sign-in or registration rotates session"
247
+ },
248
+ {
249
+ "from": "authenticated",
250
+ "to": "revoked",
251
+ "trigger": "sign-out or security reset"
252
+ },
253
+ {
254
+ "from": "anonymous",
255
+ "to": "expired",
256
+ "trigger": "session expiry"
257
+ },
258
+ {
259
+ "from": "authenticated",
260
+ "to": "expired",
261
+ "trigger": "session expiry"
262
+ }
263
+ ]
264
+ },
265
+ "server_authorities": [
266
+ "Raw session tokens are never stored in the database.",
267
+ "Ownership is resolved from the server-side session record.",
268
+ "Sign-out revokes server-side authority before deleting the cookie."
269
+ ],
270
+ "external_effect": "none",
271
+ "journey_ids": [],
272
+ "invariant_ids": [],
273
+ "proofs": {
274
+ "evidence": {},
275
+ "planned": [
276
+ "valid",
277
+ "invalid",
278
+ "duplicate",
279
+ "stale",
280
+ "foreign-owner",
281
+ "unauthorized-role",
282
+ "restart",
283
+ "migration",
284
+ "concurrency"
285
+ ],
286
+ "not_applicable": []
287
+ }
288
+ },
289
+ {
290
+ "id": "password-recovery",
291
+ "label": "Enumeration-resistant local password recovery",
292
+ "priority": "p0",
293
+ "category": "authentication",
294
+ "implementation_status": "planned",
295
+ "entities": [
296
+ {
297
+ "name": "password-reset-challenge",
298
+ "identity": "opaque reset id bound to one browser session",
299
+ "owner_scope": "session",
300
+ "persistence": "durable"
301
+ },
302
+ {
303
+ "name": "local-account",
304
+ "identity": "nullable concealed account binding",
305
+ "owner_scope": "account",
306
+ "persistence": "durable"
307
+ }
308
+ ],
309
+ "state_machine": {
310
+ "kind": "challenge-lifecycle",
311
+ "states": [
312
+ "requested",
313
+ "verified",
314
+ "consumed",
315
+ "expired",
316
+ "locked"
317
+ ],
318
+ "transitions": [
319
+ {
320
+ "from": "requested",
321
+ "to": "verified",
322
+ "trigger": "correct unexpired code within attempt budget"
323
+ },
324
+ {
325
+ "from": "verified",
326
+ "to": "consumed",
327
+ "trigger": "password is replaced and sessions are revoked"
328
+ },
329
+ {
330
+ "from": "requested",
331
+ "to": "expired",
332
+ "trigger": "challenge expiry"
333
+ },
334
+ {
335
+ "from": "requested",
336
+ "to": "locked",
337
+ "trigger": "verification attempt budget exhausted"
338
+ }
339
+ ]
340
+ },
341
+ "server_authorities": [
342
+ "Known and unknown emails receive indistinguishable public responses.",
343
+ "Only the server binds a reset flow to an account.",
344
+ "Password replacement revokes prior authenticated sessions."
345
+ ],
346
+ "external_effect": "local-only",
347
+ "journey_ids": [],
348
+ "invariant_ids": [],
349
+ "proofs": {
350
+ "evidence": {},
351
+ "planned": [
352
+ "valid",
353
+ "invalid",
354
+ "duplicate",
355
+ "stale",
356
+ "foreign-owner",
357
+ "unauthorized-role",
358
+ "restart",
359
+ "migration",
360
+ "concurrency"
361
+ ],
362
+ "not_applicable": []
363
+ }
364
+ },
365
+ {
366
+ "id": "email-delivery",
367
+ "label": "Truthful local verification and recovery mail outbox",
368
+ "priority": "p0",
369
+ "category": "communication",
370
+ "implementation_status": "planned",
371
+ "entities": [
372
+ {
373
+ "name": "mail-outbox-entry",
374
+ "identity": "site-local outbox id and purpose-bound flow id",
375
+ "owner_scope": "system",
376
+ "persistence": "durable"
377
+ }
378
+ ],
379
+ "state_machine": {
380
+ "kind": "delivery-lifecycle",
381
+ "states": [
382
+ "local-only",
383
+ "smtp-pending",
384
+ "smtp-sent",
385
+ "smtp-failed"
386
+ ],
387
+ "transitions": [
388
+ {
389
+ "from": "local-only",
390
+ "to": "smtp-pending",
391
+ "trigger": "operator enables complete explicit SMTP configuration"
392
+ },
393
+ {
394
+ "from": "smtp-pending",
395
+ "to": "smtp-sent",
396
+ "trigger": "SMTP transport confirms delivery handoff"
397
+ },
398
+ {
399
+ "from": "smtp-pending",
400
+ "to": "smtp-failed",
401
+ "trigger": "delivery attempt fails or ceiling is reached"
402
+ },
403
+ {
404
+ "from": "smtp-failed",
405
+ "to": "smtp-pending",
406
+ "trigger": "bounded idempotent retry below the delivery ceiling"
407
+ }
408
+ ]
409
+ },
410
+ "server_authorities": [
411
+ "Offline mode records LOCAL_ONLY and never claims external delivery.",
412
+ "SMTP is disabled unless every required setting is present.",
413
+ "Claim, retry, and startup replay share one delivery ceiling."
414
+ ],
415
+ "external_effect": "local-only",
416
+ "journey_ids": [],
417
+ "invariant_ids": [],
418
+ "proofs": {
419
+ "evidence": {},
420
+ "planned": [
421
+ "valid",
422
+ "invalid",
423
+ "duplicate",
424
+ "stale",
425
+ "foreign-owner",
426
+ "unauthorized-role",
427
+ "restart",
428
+ "migration",
429
+ "concurrency"
430
+ ],
431
+ "not_applicable": []
432
+ }
433
+ }
434
+ ]
435
+ }
tasks/legalnature/environment/reference/backend/runtime.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "database": {
3
+ "data_dir": "data",
4
+ "engine": "sqlite",
5
+ "filename": "legalnature.sqlite3",
6
+ "legacy_unbound_migration": false,
7
+ "migration_hook": null,
8
+ "seed_hook": null
9
+ },
10
+ "deployment": {
11
+ "profiles": {
12
+ "cloudflare-review": {
13
+ "mail_adapter": "redis-resend",
14
+ "payment_adapter": "local-sandbox",
15
+ "persistence": "ephemeral-reset"
16
+ },
17
+ "docker-volume": {
18
+ "mail_adapter": "effects-gateway",
19
+ "payment_adapter": "local-sandbox",
20
+ "persistence": "persistent-volume"
21
+ },
22
+ "offline-harbor": {
23
+ "mail_adapter": "local-outbox",
24
+ "payment_adapter": "local-sandbox",
25
+ "persistence": "persistent"
26
+ }
27
+ }
28
+ },
29
+ "mail": {
30
+ "purposes": {
31
+ "password-reset": {
32
+ "body": "Your password reset code is ${code}.",
33
+ "expiry": "This code expires in ${minutes} minutes.",
34
+ "footer": "Ignore this message if you did not contact LegalNature.",
35
+ "lead": "A password reset was requested for LegalNature.",
36
+ "required_variables": [
37
+ "code",
38
+ "minutes"
39
+ ],
40
+ "secret_variables": [
41
+ "code"
42
+ ],
43
+ "subject": "Reset your LegalNature password",
44
+ "template_id": "legalnature.password-reset.v1"
45
+ },
46
+ "registration": {
47
+ "body": "Your verification code is ${code}.",
48
+ "expiry": "This code expires in ${minutes} minutes.",
49
+ "footer": "This code is only for LegalNature.",
50
+ "lead": "Finish creating your LegalNature account.",
51
+ "required_variables": [
52
+ "code",
53
+ "minutes"
54
+ ],
55
+ "secret_variables": [
56
+ "code"
57
+ ],
58
+ "subject": "Verify your LegalNature account",
59
+ "template_id": "legalnature.registration.v1"
60
+ }
61
+ },
62
+ "sender": {
63
+ "address_env": "RESEND_FROM_EMAIL",
64
+ "display_name": "LegalNature"
65
+ }
66
+ },
67
+ "payments": {
68
+ "currency": "USD",
69
+ "default_adapter": "local-sandbox",
70
+ "enabled": false,
71
+ "local_sandbox": {
72
+ "scenarios": [
73
+ {
74
+ "display_label": "Simulated approval",
75
+ "id": "sandbox-approved",
76
+ "outcome": "approved"
77
+ },
78
+ {
79
+ "display_label": "Simulated decline",
80
+ "id": "sandbox-declined",
81
+ "outcome": "declined"
82
+ },
83
+ {
84
+ "display_label": "Simulated retry",
85
+ "id": "sandbox-retry",
86
+ "outcome": "retryable"
87
+ }
88
+ ]
89
+ },
90
+ "stripe_test": null
91
+ },
92
+ "schema_version": "websitebench.site-backend-runtime.v1",
93
+ "session": {
94
+ "host_only": true,
95
+ "http_only": true,
96
+ "same_site": "Lax",
97
+ "secure": true
98
+ },
99
+ "site": {
100
+ "id": "legalnature",
101
+ "label": "LegalNature",
102
+ "public_origin": "https://legalnature.offline.invalid"
103
+ }
104
+ }
tasks/legalnature/environment/reference/clone/app.py ADDED
@@ -0,0 +1,1135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """LegalNature offline clone — FastAPI composition root.
2
+
3
+ Everything is server-rendered and same-origin:
4
+
5
+ * Marketing, catalog, pricing, product, LLC and resource pages come from
6
+ ``frontend/marketing.py``; the multi-step builder and preview come from
7
+ ``frontend/builder.py``; accounts, verification, checkout, the test-only
8
+ outbox and the dashboard come from ``frontend/accounts.py``.
9
+ * Every state change is an HTML form that POSTs to a local route and answers
10
+ with a redirect, so a refresh never re-submits and every draft survives one.
11
+ * Accounts, opaque sessions, one-time expiring verification codes, the
12
+ LOCAL_ONLY mail outbox and the payment ledger all come from the vendored
13
+ ``websitebench`` runtime through ``backend/site_backend_integration.py``.
14
+ Payments use the ``local-sandbox`` adapter only.
15
+ * ``GET /healthz`` answers exactly ``{"ok":true,"site_id":"legalnature"}``.
16
+ * ``POST /__admin/reset`` is guarded by a constant-time admin-token compare.
17
+ * A same-origin Content-Security-Policy is set on every response; no remote
18
+ origin is reachable at runtime.
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ import hmac
24
+ import json
25
+ import os
26
+ import re
27
+ import sys
28
+ from pathlib import Path
29
+ from string import Template
30
+ from typing import Any
31
+
32
+ ROOT = Path(__file__).resolve().parent
33
+ if str(ROOT) not in sys.path: # vendored websitebench + local packages
34
+ sys.path.insert(0, str(ROOT))
35
+
36
+ from fastapi import FastAPI, Request # noqa: E402
37
+ from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse, Response # noqa: E402
38
+ from starlette.staticfiles import StaticFiles # noqa: E402
39
+
40
+ from backend import store # noqa: E402
41
+ from backend.catalog import ( # noqa: E402
42
+ CATEGORY_BY_SLUG,
43
+ PLANS,
44
+ product_for,
45
+ paginate,
46
+ search_products,
47
+ source_state_id,
48
+ state_code_for,
49
+ state_name,
50
+ )
51
+ from backend.documents import ( # noqa: E402
52
+ prune_unreachable,
53
+ steps_for,
54
+ validate_step,
55
+ )
56
+ from frontend import accounts, builder, marketing # noqa: E402
57
+ from frontend.marketing import LEGAL_PAGES, RESOURCES # noqa: E402
58
+ from source_site import pages as site_pages # noqa: E402
59
+ from source_site import registry as site_registry # noqa: E402
60
+ from source_site import router as site_router # noqa: E402
61
+ from websitebench.local_clone_auth import ( # noqa: E402
62
+ AuthConflict,
63
+ AuthError,
64
+ AuthExpired,
65
+ AuthLocked,
66
+ AuthRateLimited,
67
+ AuthValidationError,
68
+ )
69
+
70
+ SITE_ID = "legalnature"
71
+ STATIC_DIR = ROOT / "static"
72
+ _HEALTH_BODY = json.dumps({"ok": True, "site_id": SITE_ID}, separators=(",", ":"))
73
+
74
+ ADMIN_TOKEN = os.environ.get("WEBSITEBENCH_LEGALNATURE_ADMIN_TOKEN", "legalnature-local-admin")
75
+ BUILD_ID = os.environ.get("DEPLOYMENT_BUILD_ID") or os.environ.get("WEBSITEBENCH_BUILD_ID")
76
+
77
+ CONTENT_SECURITY_POLICY = (
78
+ "default-src 'self'; "
79
+ "img-src 'self' data:; "
80
+ "style-src 'self' 'unsafe-inline'; "
81
+ "script-src 'self'; "
82
+ "font-src 'self' data:; "
83
+ "connect-src 'self'; "
84
+ "frame-ancestors 'none'; "
85
+ "base-uri 'self'; "
86
+ "form-action 'self'"
87
+ )
88
+
89
+ SAFE_NEXT = re.compile(r"^/[A-Za-z0-9/_.\-?=&]{0,200}$")
90
+ DRAFT_ID = re.compile(r"^draft_[0-9]{1,16}$")
91
+ SLUG = re.compile(r"^[a-z0-9-]{1,64}$")
92
+
93
+ app = FastAPI(
94
+ title="LegalNature offline clone",
95
+ docs_url=None,
96
+ redoc_url=None,
97
+ openapi_url=None,
98
+ )
99
+ app.mount("/static", StaticFiles(directory=str(STATIC_DIR)), name="static")
100
+
101
+
102
+ # ---------------------------------------------------------------------------
103
+ # request plumbing
104
+ # ---------------------------------------------------------------------------
105
+
106
+
107
+ def _cookie_name() -> str:
108
+ return store.site_backend().config.cookie_name
109
+
110
+
111
+ def _cookie_options() -> dict[str, Any]:
112
+ return dict(store.site_backend().config.cookie_options)
113
+
114
+
115
+ def _session_token(request: Request) -> str:
116
+ auth = store.auth_store()
117
+ token, _ = auth.ensure_session(request.cookies.get(_cookie_name()))
118
+ return token
119
+
120
+
121
+ def _attach(response: Response, token: str) -> Response:
122
+ response.set_cookie(_cookie_name(), token, max_age=30 * 24 * 3600, **_cookie_options())
123
+ return response
124
+
125
+
126
+ def _html(body: str, token: str, status: int = 200) -> Response:
127
+ return _attach(HTMLResponse(body, status_code=status), token)
128
+
129
+
130
+ def _redirect(url: str, token: str, status: int = 303) -> Response:
131
+ return _attach(RedirectResponse(url, status_code=status), token)
132
+
133
+
134
+ def _safe_next(value: str, fallback: str = "/dashboard") -> str:
135
+ value = (value or "").strip()
136
+ if value.startswith("//") or not SAFE_NEXT.fullmatch(value):
137
+ return fallback
138
+ return value
139
+
140
+
141
+ def _context(token: str, *, with_card: bool = True, search_value: str = "") -> dict[str, Any]:
142
+ owner = store.resolve_owner(token)
143
+ context: dict[str, Any] = {
144
+ "owner": owner,
145
+ "search_value": search_value,
146
+ "draft_card": None,
147
+ }
148
+ if with_card:
149
+ draft = store.latest_active_draft(owner)
150
+ if draft is not None:
151
+ draft = dict(draft)
152
+ draft["state_label"] = state_name(draft.get("state_code")) or ""
153
+ context["draft_card"] = draft
154
+ return context
155
+
156
+
157
+ async def _form(request: Request) -> dict[str, str]:
158
+ raw = await request.form()
159
+ return {str(key): str(value) for key, value in raw.multi_items() if isinstance(value, str)}
160
+
161
+
162
+ def _mail_message(token: str, purpose: str) -> dict[str, Any] | None:
163
+ """The current session's LOCAL_ONLY message, rendered from the contract."""
164
+
165
+ auth = store.auth_store()
166
+ message = auth.local_mail_for_session(token, purpose=purpose)
167
+ if message is None:
168
+ return None
169
+ template = store.site_backend().config.mail["purposes"].get(purpose, {})
170
+ rendered = dict(message)
171
+ rendered["subject"] = template.get("subject", "")
172
+ rendered["lead"] = template.get("lead", "")
173
+ rendered["body"] = Template(template.get("body", "")).safe_substitute(
174
+ code=message["verification_code"]
175
+ )
176
+ rendered["expiry"] = Template(template.get("expiry", "")).safe_substitute(minutes=10)
177
+ return rendered
178
+
179
+
180
+ def _claim_after_auth(new_token: str, account_id: str) -> None:
181
+ digest = store.auth_store().session_owner_digest(new_token)
182
+ store.claim_drafts(digest, account_id)
183
+
184
+
185
+ def _auth_message(error: AuthError) -> str:
186
+ if isinstance(error, AuthRateLimited):
187
+ return "Too many requests. Wait a moment and try again."
188
+ if isinstance(error, AuthLocked):
189
+ return "Too many incorrect codes. Start the flow again."
190
+ if isinstance(error, AuthExpired):
191
+ return "That code has expired. Start the flow again."
192
+ if isinstance(error, AuthConflict):
193
+ return "That email already belongs to a local account."
194
+ if isinstance(error, AuthValidationError):
195
+ return str(error)
196
+ return "That did not work. Check the details and try again."
197
+
198
+
199
+ @app.middleware("http")
200
+ async def runtime_headers(request: Request, call_next):
201
+ response = await call_next(request)
202
+ response.headers["Content-Security-Policy"] = CONTENT_SECURITY_POLICY
203
+ response.headers["Referrer-Policy"] = "no-referrer"
204
+ response.headers["X-Content-Type-Options"] = "nosniff"
205
+ response.headers["X-Frame-Options"] = "DENY"
206
+ response.headers["X-Robots-Tag"] = "noindex"
207
+ if BUILD_ID:
208
+ response.headers["X-WebsiteBench-Build-Id"] = BUILD_ID
209
+ return response
210
+
211
+
212
+ @app.exception_handler(404)
213
+ async def not_found_handler(request: Request, exc: Exception) -> Response:
214
+ token = _session_token(request)
215
+ return _html(
216
+ marketing.not_found(_context(token, with_card=False), request.url.path),
217
+ token,
218
+ status=404,
219
+ )
220
+
221
+
222
+ # ---------------------------------------------------------------------------
223
+ # operational endpoints
224
+ # ---------------------------------------------------------------------------
225
+
226
+
227
+ @app.get("/healthz", include_in_schema=False)
228
+ async def healthz() -> Response:
229
+ return Response(content=_HEALTH_BODY, media_type="application/json")
230
+
231
+
232
+ @app.post("/__admin/reset", include_in_schema=False)
233
+ async def admin_reset(request: Request) -> Response:
234
+ token = request.headers.get("X-WebsiteBench-Admin-Token", "")
235
+ if not hmac.compare_digest(token, ADMIN_TOKEN):
236
+ return JSONResponse({"error": "forbidden"}, status_code=403)
237
+ store.reset()
238
+ return JSONResponse({"reset": True, "site_id": SITE_ID})
239
+
240
+
241
+ # ---------------------------------------------------------------------------
242
+ # marketing
243
+ # ---------------------------------------------------------------------------
244
+
245
+
246
+ @app.get("/", include_in_schema=False)
247
+ async def home(request: Request) -> Response:
248
+ token = _session_token(request)
249
+ return _html(site_pages.render(_context(token), site_registry.PAGES["/"]), token)
250
+
251
+
252
+ @app.get("/products", include_in_schema=False)
253
+ async def products(request: Request) -> Response:
254
+ """The captured library index, narrowed when the visitor filters it."""
255
+
256
+ token = _session_token(request)
257
+ query = (request.query_params.get("q") or "").strip()[:120]
258
+ category = (request.query_params.get("category") or "").strip()
259
+ if category not in CATEGORY_BY_SLUG:
260
+ category = ""
261
+ try:
262
+ page_number = int(request.query_params.get("page", "1"))
263
+ except ValueError:
264
+ page_number = 1
265
+ result = paginate(search_products(query, category), page_number) if (query or category) else None
266
+ context = _context(token, search_value=query)
267
+ return _html(
268
+ site_pages.render_products(
269
+ context,
270
+ site_registry.PAGES["/products"],
271
+ query=query,
272
+ category=category,
273
+ result=result,
274
+ ),
275
+ token,
276
+ )
277
+
278
+
279
+ @app.get("/resources", include_in_schema=False)
280
+ async def resources_index(request: Request) -> Response:
281
+ token = _session_token(request)
282
+ return _html(marketing.resources_index(_context(token)), token)
283
+
284
+
285
+ @app.get("/resources/{slug}", include_in_schema=False)
286
+ async def resource_article(slug: str, request: Request) -> Response:
287
+ token = _session_token(request)
288
+ for candidate, title, blurb in RESOURCES:
289
+ if candidate == slug:
290
+ return _html(
291
+ marketing.resource_article(_context(token, with_card=False), slug, title, blurb),
292
+ token,
293
+ )
294
+ return _html(
295
+ marketing.not_found(_context(token, with_card=False), request.url.path),
296
+ token,
297
+ status=404,
298
+ )
299
+
300
+
301
+ @app.get("/support", include_in_schema=False)
302
+ async def support(request: Request) -> Response:
303
+ token = _session_token(request)
304
+ return _html(marketing.support(_context(token, with_card=False)), token)
305
+
306
+
307
+ @app.get("/legal/{slug}", include_in_schema=False)
308
+ async def legal(slug: str, request: Request) -> Response:
309
+ token = _session_token(request)
310
+ if slug not in LEGAL_PAGES:
311
+ return _html(
312
+ marketing.not_found(_context(token, with_card=False), request.url.path),
313
+ token,
314
+ status=404,
315
+ )
316
+ return _html(marketing.legal_page(_context(token, with_card=False), slug), token)
317
+
318
+
319
+ @app.get("/external/{slug}", include_in_schema=False)
320
+ async def external(slug: str, request: Request) -> Response:
321
+ token = _session_token(request)
322
+ return _html(
323
+ marketing.external_boundary(_context(token, with_card=False), slug[:60]), token
324
+ )
325
+
326
+
327
+ # ---------------------------------------------------------------------------
328
+ # business formation
329
+ # ---------------------------------------------------------------------------
330
+
331
+ # ``/business-formation/llc`` and its seven siblings are frozen source pages and
332
+ # come from the registry catch-all. Only the local POST entry point lives here.
333
+
334
+
335
+ @app.post("/business-formation/llc/start", include_in_schema=False)
336
+ async def llc_start(request: Request) -> Response:
337
+ """A preserved local entry point into the formation order preparation.
338
+
339
+ The captured LLC page sends visitors to ``/orders/create/formation?entity=LLC``;
340
+ this route keeps the clone's older POST contract working by writing the same
341
+ local order draft and opening the same builder. It never files anything.
342
+ """
343
+
344
+ token = _session_token(request)
345
+ form = await _form(request)
346
+ name = " ".join((form.get("business_name") or "").split())[:120]
347
+ state_id = source_state_id(form.get("state") or "")
348
+ if not name:
349
+ return _redirect(
350
+ "/business-formation/llc?error=Enter+the+business+name+you+want+to+use.",
351
+ token,
352
+ )
353
+ answers = {"company_name": name, "entity_type": "LLC"}
354
+ if state_id:
355
+ answers["state_of_formation"] = state_id
356
+ draft = site_router.upsert_order_draft(token, "formation", answers, state_id)
357
+ return _redirect(f"/documents/{draft['draft_id']}/step/1", token)
358
+
359
+
360
+ # ---------------------------------------------------------------------------
361
+ # document builder
362
+ # ---------------------------------------------------------------------------
363
+
364
+
365
+ @app.post("/documents/create", include_in_schema=False)
366
+ async def create_document(request: Request) -> Response:
367
+ """Start a local draft from a product page's state picker.
368
+
369
+ ``state`` accepts either the source's numeric state id (``5``) or the
370
+ two-letter code the clone's own dashboard shows (``CA``).
371
+ """
372
+
373
+ token = _session_token(request)
374
+ form = await _form(request)
375
+ owner = store.resolve_owner(token)
376
+ slug = (form.get("product_slug") or "").strip()
377
+ product = product_for(slug)
378
+ if product is None:
379
+ return _redirect("/products", token)
380
+ state_id = source_state_id(form.get("state") or "")
381
+ entry = builder.product_entry_path(product.slug)
382
+ if not state_id:
383
+ return _redirect(
384
+ f"{entry}?error=Choose+a+state+before+creating+this+document.", token
385
+ )
386
+ existing = store.find_draft_for_product(owner, product.slug)
387
+ if existing is not None:
388
+ return _redirect(f"/documents/{existing['draft_id']}", token)
389
+ answers: dict[str, str] = {}
390
+ if product.slug == "llc-formation":
391
+ answers["formation_state"] = state_id
392
+ elif product.slug.startswith("order:"):
393
+ answers["state_of_formation"] = state_id
394
+ else:
395
+ answers["governing_state"] = state_id
396
+ draft = store.create_draft(
397
+ owner,
398
+ product_slug=product.slug,
399
+ state_code=state_code_for(state_id) or None,
400
+ answers=answers,
401
+ )
402
+ return _redirect(f"/documents/{draft['draft_id']}/step/1", token)
403
+
404
+
405
+ @app.get("/documents", include_in_schema=False)
406
+ async def documents_index(request: Request) -> Response:
407
+ token = _session_token(request)
408
+ context = _context(token, with_card=False)
409
+ drafts = store.list_drafts(context["owner"])
410
+ return _html(builder.documents_index(context, drafts), token)
411
+
412
+
413
+ def _load_draft(token: str, draft_id: str) -> tuple[dict[str, Any], dict[str, Any]] | None:
414
+ if not DRAFT_ID.fullmatch(draft_id):
415
+ return None
416
+ context = _context(token, with_card=False)
417
+ draft = store.get_draft(context["owner"], draft_id)
418
+ if draft is None:
419
+ return None
420
+ return context, draft
421
+
422
+
423
+ @app.get("/documents/{draft_id}", include_in_schema=False)
424
+ async def resume_draft(draft_id: str, request: Request) -> Response:
425
+ token = _session_token(request)
426
+ loaded = _load_draft(token, draft_id)
427
+ if loaded is None:
428
+ return _html(
429
+ marketing.not_found(_context(token, with_card=False), request.url.path),
430
+ token,
431
+ status=404,
432
+ )
433
+ _, draft = loaded
434
+ steps = steps_for(draft["product_slug"])
435
+ index = min(int(draft["step_index"]), len(steps) - 1)
436
+ return _redirect(f"/documents/{draft_id}/step/{index + 1}", token)
437
+
438
+
439
+ @app.get("/documents/{draft_id}/step/{number}", include_in_schema=False)
440
+ async def draft_step(draft_id: str, number: int, request: Request) -> Response:
441
+ token = _session_token(request)
442
+ loaded = _load_draft(token, draft_id)
443
+ if loaded is None:
444
+ return _html(
445
+ marketing.not_found(_context(token, with_card=False), request.url.path),
446
+ token,
447
+ status=404,
448
+ )
449
+ context, draft = loaded
450
+ steps = steps_for(draft["product_slug"])
451
+ if not 1 <= number <= len(steps):
452
+ return _redirect(f"/documents/{draft_id}/step/1", token)
453
+ return _html(builder.builder_step(context, draft, number - 1), token)
454
+
455
+
456
+ @app.post("/documents/{draft_id}/step/{number}", include_in_schema=False)
457
+ async def submit_step(draft_id: str, number: int, request: Request) -> Response:
458
+ token = _session_token(request)
459
+ loaded = _load_draft(token, draft_id)
460
+ if loaded is None:
461
+ return _html(
462
+ marketing.not_found(_context(token, with_card=False), request.url.path),
463
+ token,
464
+ status=404,
465
+ )
466
+ context, draft = loaded
467
+ steps = steps_for(draft["product_slug"])
468
+ if not 1 <= number <= len(steps):
469
+ return _redirect(f"/documents/{draft_id}/step/1", token)
470
+ index = number - 1
471
+ submitted = await _form(request)
472
+ stored = dict(draft["answers"])
473
+ accepted, errors = validate_step(draft["product_slug"], index, stored, submitted)
474
+ merged = {**stored, **accepted}
475
+ if errors:
476
+ preview_draft = {**draft, "answers": merged}
477
+ return _html(
478
+ builder.builder_step(context, preview_draft, index, errors), token, status=200
479
+ )
480
+ merged = prune_unreachable(draft["product_slug"], merged)
481
+ last = index == len(steps) - 1
482
+ store.update_draft(
483
+ context["owner"],
484
+ draft_id,
485
+ answers=merged,
486
+ step_index=len(steps) - 1 if last else index + 1,
487
+ )
488
+ if last:
489
+ return _redirect(f"/documents/{draft_id}/preview", token)
490
+ return _redirect(f"/documents/{draft_id}/step/{number + 1}", token)
491
+
492
+
493
+ @app.get("/documents/{draft_id}/preview", include_in_schema=False)
494
+ async def draft_preview(draft_id: str, request: Request) -> Response:
495
+ token = _session_token(request)
496
+ loaded = _load_draft(token, draft_id)
497
+ if loaded is None:
498
+ return _html(
499
+ marketing.not_found(_context(token, with_card=False), request.url.path),
500
+ token,
501
+ status=404,
502
+ )
503
+ context, draft = loaded
504
+ return _html(builder.preview(context, draft), token)
505
+
506
+
507
+ @app.post("/documents/{draft_id}/complete", include_in_schema=False)
508
+ async def complete_draft(draft_id: str, request: Request) -> Response:
509
+ token = _session_token(request)
510
+ loaded = _load_draft(token, draft_id)
511
+ if loaded is None:
512
+ return _redirect("/documents", token)
513
+ context, _draft = loaded
514
+ store.update_draft(context["owner"], draft_id, status="complete", dismissed=True)
515
+ return _redirect("/documents", token)
516
+
517
+
518
+ @app.post("/documents/{draft_id}/dismiss", include_in_schema=False)
519
+ async def dismiss_draft(draft_id: str, request: Request) -> Response:
520
+ token = _session_token(request)
521
+ loaded = _load_draft(token, draft_id)
522
+ if loaded is not None:
523
+ store.update_draft(loaded[0]["owner"], draft_id, dismissed=True)
524
+ referer = request.headers.get("referer") or ""
525
+ target = "/"
526
+ if referer:
527
+ from urllib.parse import urlsplit
528
+
529
+ parts = urlsplit(referer)
530
+ if parts.path.startswith("/"):
531
+ target = _safe_next(parts.path, "/")
532
+ return _redirect(target, token)
533
+
534
+
535
+ @app.post("/documents/{draft_id}/delete", include_in_schema=False)
536
+ async def delete_draft(draft_id: str, request: Request) -> Response:
537
+ token = _session_token(request)
538
+ loaded = _load_draft(token, draft_id)
539
+ if loaded is not None:
540
+ store.delete_draft(loaded[0]["owner"], draft_id)
541
+ return _redirect("/documents", token)
542
+
543
+
544
+ # ---------------------------------------------------------------------------
545
+ # accounts
546
+ # ---------------------------------------------------------------------------
547
+
548
+
549
+ @app.get("/login", include_in_schema=False)
550
+ async def login_form(request: Request) -> Response:
551
+ token = _session_token(request)
552
+ context = _context(token, with_card=False)
553
+ if context["owner"].authenticated:
554
+ return _redirect("/dashboard", token)
555
+ return _html(
556
+ accounts.login(
557
+ context,
558
+ next_url=_safe_next(request.query_params.get("next", "")),
559
+ ),
560
+ token,
561
+ )
562
+
563
+
564
+ @app.post("/login", include_in_schema=False)
565
+ async def login_submit(request: Request) -> Response:
566
+ token = _session_token(request)
567
+ form = await _form(request)
568
+ context = _context(token, with_card=False)
569
+ email = (form.get("email") or "").strip()
570
+ password = form.get("password") or ""
571
+ next_url = _safe_next(form.get("next", ""))
572
+ errors: dict[str, str] = {}
573
+ if not email:
574
+ errors["email"] = "This field is required."
575
+ if not password:
576
+ errors["password"] = "This field is required."
577
+ if not errors:
578
+ try:
579
+ result = store.auth_store().sign_in(
580
+ token,
581
+ email=email,
582
+ password=password,
583
+ session_rotation_callback=store.rotation_callback,
584
+ )
585
+ except AuthError:
586
+ errors["__all__"] = "Email or password is incorrect."
587
+ else:
588
+ new_token = result["session_token"]
589
+ _claim_after_auth(new_token, str(result["account"]["account_id"]))
590
+ return _redirect(next_url, new_token)
591
+ return _html(
592
+ accounts.login(context, email=email, errors=errors, next_url=next_url),
593
+ token,
594
+ status=200,
595
+ )
596
+
597
+
598
+ @app.get("/register", include_in_schema=False)
599
+ async def register_form(request: Request) -> Response:
600
+ token = _session_token(request)
601
+ context = _context(token, with_card=False)
602
+ if context["owner"].authenticated:
603
+ return _redirect("/dashboard", token)
604
+ return _html(
605
+ accounts.register(
606
+ context, next_url=_safe_next(request.query_params.get("next", ""))
607
+ ),
608
+ token,
609
+ )
610
+
611
+
612
+ @app.post("/register", include_in_schema=False)
613
+ async def register_submit(request: Request) -> Response:
614
+ token = _session_token(request)
615
+ form = await _form(request)
616
+ context = _context(token, with_card=False)
617
+ email = (form.get("email") or "").strip()
618
+ display_name = " ".join((form.get("display_name") or "").split())
619
+ password = form.get("password") or ""
620
+ next_url = _safe_next(form.get("next", ""))
621
+ errors = _registration_errors(email, display_name, password, form.get("agree"))
622
+ if not errors:
623
+ try:
624
+ store.auth_store().start_registration(
625
+ token,
626
+ email=email,
627
+ display_name=display_name,
628
+ password=password,
629
+ restart_invalid_flow=True,
630
+ )
631
+ except AuthError as error:
632
+ errors["__all__"] = _auth_message(error)
633
+ else:
634
+ return _redirect(f"/verify?next={next_url}", token)
635
+ return _html(
636
+ accounts.register(
637
+ context,
638
+ email=email,
639
+ display_name=display_name,
640
+ errors=errors,
641
+ next_url=next_url,
642
+ ),
643
+ token,
644
+ )
645
+
646
+
647
+ def _display_name_from_email(email: str) -> str:
648
+ """A local display name for flows that do not ask for one."""
649
+
650
+ local = email.split("@", 1)[0].strip()
651
+ cleaned = " ".join(re.split(r"[._\-+]+", local)).strip()
652
+ return (cleaned or local)[:120]
653
+
654
+
655
+ def _registration_errors(
656
+ email: str, display_name: str, password: str, agree: str | None
657
+ ) -> dict[str, str]:
658
+ errors: dict[str, str] = {}
659
+ if not email:
660
+ errors["email"] = "This field is required."
661
+ if not display_name:
662
+ errors["display_name"] = "This field is required."
663
+ if not password:
664
+ errors["password"] = "This field is required."
665
+ elif len(password) < 8:
666
+ errors["password"] = "Use at least 8 characters."
667
+ if not agree:
668
+ errors["agree"] = "Please accept the Privacy Policy and Terms of Use."
669
+ return errors
670
+
671
+
672
+ @app.get("/verify", include_in_schema=False)
673
+ async def verify_form(request: Request) -> Response:
674
+ token = _session_token(request)
675
+ context = _context(token, with_card=False)
676
+ if context["owner"].authenticated:
677
+ return _redirect("/dashboard", token)
678
+ status = store.auth_store().session_flow_status(token, purpose="registration")
679
+ if status["state"] == "missing":
680
+ return _redirect("/register", token)
681
+ return _html(
682
+ accounts.verify_page(
683
+ context,
684
+ purpose="registration",
685
+ message=_mail_message(token, "registration"),
686
+ action="/verify",
687
+ next_url=_safe_next(request.query_params.get("next", "")),
688
+ ),
689
+ token,
690
+ )
691
+
692
+
693
+ @app.post("/verify", include_in_schema=False)
694
+ async def verify_submit(request: Request) -> Response:
695
+ token = _session_token(request)
696
+ form = await _form(request)
697
+ context = _context(token, with_card=False)
698
+ next_url = _safe_next(form.get("next", ""))
699
+ code = (form.get("code") or "").strip()
700
+ auth = store.auth_store()
701
+ errors: dict[str, str] = {}
702
+ try:
703
+ auth.verify_registration_code(token, code)
704
+ result = auth.complete_registration(
705
+ token, session_rotation_callback=store.rotation_callback
706
+ )
707
+ except AuthValidationError:
708
+ errors["code"] = "Enter the six digits from the test outbox."
709
+ except AuthError as error:
710
+ errors["code"] = _auth_message(error)
711
+ else:
712
+ new_token = result["session_token"]
713
+ _claim_after_auth(new_token, str(result["account"]["account_id"]))
714
+ return _redirect(next_url, new_token)
715
+ return _html(
716
+ accounts.verify_page(
717
+ context,
718
+ purpose="registration",
719
+ message=_mail_message(token, "registration"),
720
+ errors=errors,
721
+ action="/verify",
722
+ next_url=next_url,
723
+ ),
724
+ token,
725
+ )
726
+
727
+
728
+ @app.post("/logout", include_in_schema=False)
729
+ async def logout(request: Request) -> Response:
730
+ token = request.cookies.get(_cookie_name())
731
+ store.auth_store().sign_out(token)
732
+ fresh = store.auth_store().create_anonymous_session()
733
+ return _redirect("/", fresh)
734
+
735
+
736
+ @app.get("/forgot-password", include_in_schema=False)
737
+ async def forgot_form(request: Request) -> Response:
738
+ token = _session_token(request)
739
+ return _html(accounts.forgot_password(_context(token, with_card=False)), token)
740
+
741
+
742
+ @app.post("/forgot-password", include_in_schema=False)
743
+ async def forgot_submit(request: Request) -> Response:
744
+ token = _session_token(request)
745
+ form = await _form(request)
746
+ context = _context(token, with_card=False)
747
+ email = (form.get("email") or "").strip()
748
+ errors: dict[str, str] = {}
749
+ if not email:
750
+ errors["email"] = "This field is required."
751
+ else:
752
+ try:
753
+ store.auth_store().start_password_reset(
754
+ token, email=email, restart_invalid_flow=True
755
+ )
756
+ except AuthValidationError:
757
+ errors["email"] = "Enter a valid email address."
758
+ except AuthError as error:
759
+ errors["__all__"] = _auth_message(error)
760
+ else:
761
+ return _redirect("/reset-verify", token)
762
+ return _html(
763
+ accounts.forgot_password(context, email=email, errors=errors), token
764
+ )
765
+
766
+
767
+ @app.get("/reset-verify", include_in_schema=False)
768
+ async def reset_verify_form(request: Request) -> Response:
769
+ token = _session_token(request)
770
+ status = store.auth_store().session_flow_status(token, purpose="password-reset")
771
+ if status["state"] == "missing":
772
+ return _redirect("/forgot-password", token)
773
+ if status["state"] == "verified":
774
+ return _redirect("/reset-password", token)
775
+ return _html(
776
+ accounts.verify_page(
777
+ _context(token, with_card=False),
778
+ purpose="password-reset",
779
+ message=_mail_message(token, "password-reset"),
780
+ action="/reset-verify",
781
+ heading="Check the test outbox",
782
+ intro=(
783
+ "If that email belongs to a local account, a verification "
784
+ "message is available in the test-only outbox below."
785
+ ),
786
+ ),
787
+ token,
788
+ )
789
+
790
+
791
+ @app.post("/reset-verify", include_in_schema=False)
792
+ async def reset_verify_submit(request: Request) -> Response:
793
+ token = _session_token(request)
794
+ form = await _form(request)
795
+ code = (form.get("code") or "").strip()
796
+ errors: dict[str, str] = {}
797
+ try:
798
+ store.auth_store().verify_password_reset_code(token, code)
799
+ except AuthValidationError:
800
+ errors["code"] = "Enter the six digits from the test outbox."
801
+ except AuthError as error:
802
+ errors["code"] = _auth_message(error)
803
+ else:
804
+ return _redirect("/reset-password", token)
805
+ return _html(
806
+ accounts.verify_page(
807
+ _context(token, with_card=False),
808
+ purpose="password-reset",
809
+ message=_mail_message(token, "password-reset"),
810
+ errors=errors,
811
+ action="/reset-verify",
812
+ heading="Check the test outbox",
813
+ ),
814
+ token,
815
+ )
816
+
817
+
818
+ @app.get("/reset-password", include_in_schema=False)
819
+ async def reset_password_form(request: Request) -> Response:
820
+ token = _session_token(request)
821
+ status = store.auth_store().session_flow_status(token, purpose="password-reset")
822
+ if status["state"] != "verified":
823
+ return _redirect("/forgot-password", token)
824
+ return _html(accounts.new_password(_context(token, with_card=False)), token)
825
+
826
+
827
+ @app.post("/reset-password", include_in_schema=False)
828
+ async def reset_password_submit(request: Request) -> Response:
829
+ token = _session_token(request)
830
+ form = await _form(request)
831
+ password = form.get("password") or ""
832
+ errors: dict[str, str] = {}
833
+ if len(password) < 8:
834
+ errors["password"] = "Use at least 8 characters."
835
+ else:
836
+ try:
837
+ new_token = store.auth_store().complete_password_reset(
838
+ token,
839
+ new_password=password,
840
+ session_rotation_callback=store.rotation_callback,
841
+ )
842
+ except AuthError as error:
843
+ errors["__all__"] = _auth_message(error)
844
+ else:
845
+ owner = store.resolve_owner(new_token)
846
+ if owner.account_id:
847
+ _claim_after_auth(new_token, owner.account_id)
848
+ return _redirect("/dashboard", new_token)
849
+ return _html(
850
+ accounts.new_password(_context(token, with_card=False), errors=errors), token
851
+ )
852
+
853
+
854
+ @app.get("/test-outbox", include_in_schema=False)
855
+ async def test_outbox(request: Request) -> Response:
856
+ token = _session_token(request)
857
+ messages = [
858
+ message
859
+ for message in (
860
+ _mail_message(token, "registration"),
861
+ _mail_message(token, "password-reset"),
862
+ )
863
+ if message is not None
864
+ ]
865
+ return _html(
866
+ accounts.outbox_index(_context(token, with_card=False), messages), token
867
+ )
868
+
869
+
870
+ # ---------------------------------------------------------------------------
871
+ # dashboard / account
872
+ # ---------------------------------------------------------------------------
873
+
874
+
875
+ @app.get("/dashboard", include_in_schema=False)
876
+ async def dashboard(request: Request) -> Response:
877
+ token = _session_token(request)
878
+ context = _context(token)
879
+ owner = context["owner"]
880
+ if not owner.authenticated:
881
+ return _redirect("/login?next=/dashboard", token)
882
+ return _html(
883
+ accounts.dashboard(
884
+ context,
885
+ drafts=store.list_drafts(owner),
886
+ subscription=store.subscription_for(owner.account_id or ""),
887
+ payments=store.payment_history(owner.account_id or ""),
888
+ ),
889
+ token,
890
+ )
891
+
892
+
893
+ @app.get("/account", include_in_schema=False)
894
+ async def account(request: Request) -> Response:
895
+ token = _session_token(request)
896
+ context = _context(token)
897
+ owner = context["owner"]
898
+ if not owner.authenticated:
899
+ return _redirect("/login?next=/account", token)
900
+ return _html(
901
+ accounts.account_page(
902
+ context, subscription=store.subscription_for(owner.account_id or "")
903
+ ),
904
+ token,
905
+ )
906
+
907
+
908
+ @app.post("/account/subscription/cancel", include_in_schema=False)
909
+ async def cancel_subscription(request: Request) -> Response:
910
+ token = _session_token(request)
911
+ owner = store.resolve_owner(token)
912
+ if not owner.authenticated:
913
+ return _redirect("/login?next=/account", token)
914
+ store.cancel_subscription(owner.account_id or "")
915
+ return _redirect("/dashboard", token)
916
+
917
+
918
+ # ---------------------------------------------------------------------------
919
+ # checkout
920
+ # ---------------------------------------------------------------------------
921
+
922
+
923
+ def _plan_or_none(plan: str) -> str | None:
924
+ return plan if plan in PLANS else None
925
+
926
+
927
+ @app.get("/checkout/{plan}", include_in_schema=False)
928
+ async def checkout_start(plan: str, request: Request) -> Response:
929
+ token = _session_token(request)
930
+ if _plan_or_none(plan) is None:
931
+ return _redirect("/pricing", token)
932
+ context = _context(token, with_card=False)
933
+ owner = context["owner"]
934
+ if owner.authenticated:
935
+ subscription = store.subscription_for(owner.account_id or "")
936
+ if subscription and subscription["status"] == "active":
937
+ return _redirect(f"/checkout/{plan}/complete", token)
938
+ return _redirect(f"/checkout/{plan}/payment", token)
939
+ if not request.query_params.get("restart"):
940
+ status = store.auth_store().session_flow_status(token, purpose="registration")
941
+ if status["state"] == "challenge":
942
+ return _redirect(f"/checkout/{plan}/verify", token)
943
+ return _html(accounts.checkout_account(context, plan), token)
944
+
945
+
946
+ @app.post("/checkout/{plan}/account", include_in_schema=False)
947
+ async def checkout_account(plan: str, request: Request) -> Response:
948
+ token = _session_token(request)
949
+ if _plan_or_none(plan) is None:
950
+ return _redirect("/pricing", token)
951
+ form = await _form(request)
952
+ context = _context(token, with_card=False)
953
+ email = (form.get("email") or "").strip()
954
+ password = form.get("password") or ""
955
+ # The captured checkout state collects email, password and the agreement
956
+ # only, so the display name is derived from the address rather than asked
957
+ # for a second time.
958
+ display_name = _display_name_from_email(email)
959
+ errors = _registration_errors(email, display_name, password, form.get("agree"))
960
+ errors.pop("display_name", None)
961
+ if not errors:
962
+ try:
963
+ store.auth_store().start_registration(
964
+ token,
965
+ email=email,
966
+ display_name=display_name,
967
+ password=password,
968
+ restart_invalid_flow=True,
969
+ )
970
+ except AuthConflict:
971
+ errors["__all__"] = (
972
+ "That email already belongs to a local account. Log in instead."
973
+ )
974
+ except AuthError as error:
975
+ errors["__all__"] = _auth_message(error)
976
+ else:
977
+ return _redirect(f"/checkout/{plan}/verify", token)
978
+ return _html(
979
+ accounts.checkout_account(context, plan, email=email, errors=errors),
980
+ token,
981
+ )
982
+
983
+
984
+ @app.get("/checkout/{plan}/verify", include_in_schema=False)
985
+ async def checkout_verify_form(plan: str, request: Request) -> Response:
986
+ token = _session_token(request)
987
+ if _plan_or_none(plan) is None:
988
+ return _redirect("/pricing", token)
989
+ context = _context(token, with_card=False)
990
+ if context["owner"].authenticated:
991
+ return _redirect(f"/checkout/{plan}/payment", token)
992
+ status = store.auth_store().session_flow_status(token, purpose="registration")
993
+ if status["state"] == "missing":
994
+ return _redirect(f"/checkout/{plan}", token)
995
+ return _html(
996
+ accounts.checkout_verify(
997
+ context, plan, message=_mail_message(token, "registration")
998
+ ),
999
+ token,
1000
+ )
1001
+
1002
+
1003
+ @app.post("/checkout/{plan}/verify", include_in_schema=False)
1004
+ async def checkout_verify_submit(plan: str, request: Request) -> Response:
1005
+ token = _session_token(request)
1006
+ if _plan_or_none(plan) is None:
1007
+ return _redirect("/pricing", token)
1008
+ form = await _form(request)
1009
+ context = _context(token, with_card=False)
1010
+ code = (form.get("code") or "").strip()
1011
+ auth = store.auth_store()
1012
+ errors: dict[str, str] = {}
1013
+ try:
1014
+ auth.verify_registration_code(token, code)
1015
+ result = auth.complete_registration(
1016
+ token, session_rotation_callback=store.rotation_callback
1017
+ )
1018
+ except AuthValidationError:
1019
+ errors["code"] = "Enter the six digits from the test outbox."
1020
+ except AuthError as error:
1021
+ errors["code"] = _auth_message(error)
1022
+ else:
1023
+ new_token = result["session_token"]
1024
+ _claim_after_auth(new_token, str(result["account"]["account_id"]))
1025
+ return _redirect(f"/checkout/{plan}/payment", new_token)
1026
+ return _html(
1027
+ accounts.checkout_verify(
1028
+ context,
1029
+ plan,
1030
+ message=_mail_message(token, "registration"),
1031
+ errors=errors,
1032
+ ),
1033
+ token,
1034
+ )
1035
+
1036
+
1037
+ @app.get("/checkout/{plan}/payment", include_in_schema=False)
1038
+ async def checkout_payment_form(plan: str, request: Request) -> Response:
1039
+ token = _session_token(request)
1040
+ if _plan_or_none(plan) is None:
1041
+ return _redirect("/pricing", token)
1042
+ context = _context(token, with_card=False)
1043
+ owner = context["owner"]
1044
+ if not owner.authenticated:
1045
+ return _redirect(f"/checkout/{plan}", token)
1046
+ subscription = store.subscription_for(owner.account_id or "")
1047
+ if subscription and subscription["status"] == "active":
1048
+ return _redirect(f"/checkout/{plan}/complete", token)
1049
+ outcome = (request.query_params.get("result") or "").upper()
1050
+ result = {"status": outcome} if outcome in {"DECLINED", "RETRYABLE"} else None
1051
+ errors: dict[str, str] = {}
1052
+ if request.query_params.get("error"):
1053
+ errors["test_number"] = (request.query_params.get("error") or "")[:200]
1054
+ return _html(
1055
+ accounts.checkout_payment(context, plan, errors=errors, result=result), token
1056
+ )
1057
+
1058
+
1059
+ @app.post("/checkout/{plan}/pay", include_in_schema=False)
1060
+ async def checkout_pay(plan: str, request: Request) -> Response:
1061
+ token = _session_token(request)
1062
+ if _plan_or_none(plan) is None:
1063
+ return _redirect("/pricing", token)
1064
+ owner = store.resolve_owner(token)
1065
+ if not owner.authenticated:
1066
+ return _redirect(f"/checkout/{plan}", token)
1067
+ form = await _form(request)
1068
+ scenario = store.scenario_for_test_number(form.get("test_number", ""))
1069
+ if scenario is None:
1070
+ return _redirect(
1071
+ f"/checkout/{plan}/payment"
1072
+ "?error=Use+one+of+the+documented+local+test+numbers+below.",
1073
+ token,
1074
+ )
1075
+ try:
1076
+ result = store.pay_for_subscription(owner.account_id or "", plan, scenario)
1077
+ except store.CheckoutError as error:
1078
+ return _redirect(
1079
+ f"/checkout/{plan}/payment?error={str(error).replace(' ', '+')[:120]}", token
1080
+ )
1081
+ if result["status"] in {"APPROVED", "ALREADY_ACTIVE"}:
1082
+ return _redirect(f"/checkout/{plan}/complete", token)
1083
+ return _redirect(
1084
+ f"/checkout/{plan}/payment?result={result['status'].lower()}", token
1085
+ )
1086
+
1087
+
1088
+ @app.get("/checkout/{plan}/complete", include_in_schema=False)
1089
+ async def checkout_complete(plan: str, request: Request) -> Response:
1090
+ token = _session_token(request)
1091
+ if _plan_or_none(plan) is None:
1092
+ return _redirect("/pricing", token)
1093
+ context = _context(token, with_card=False)
1094
+ owner = context["owner"]
1095
+ if not owner.authenticated:
1096
+ return _redirect(f"/checkout/{plan}", token)
1097
+ subscription = store.subscription_for(owner.account_id or "")
1098
+ if subscription is None:
1099
+ return _redirect(f"/checkout/{plan}/payment", token)
1100
+ return _html(accounts.checkout_complete(context, plan, subscription), token)
1101
+
1102
+
1103
+ # ---------------------------------------------------------------------------
1104
+ # frozen source pathnames
1105
+ # ---------------------------------------------------------------------------
1106
+
1107
+ # Registered last so that every contract above keeps its own handler and the
1108
+ # registry catch-all only sees what nothing else claimed.
1109
+ site_router.configure(
1110
+ session_token=_session_token,
1111
+ context=_context,
1112
+ html=_html,
1113
+ redirect=_redirect,
1114
+ )
1115
+ app.include_router(site_router.router)
1116
+
1117
+
1118
+ # ---------------------------------------------------------------------------
1119
+ # local launcher
1120
+ # ---------------------------------------------------------------------------
1121
+
1122
+
1123
+ def main() -> None: # pragma: no cover - developer convenience
1124
+ import uvicorn
1125
+
1126
+ uvicorn.run(
1127
+ app,
1128
+ host=os.environ.get("HOST", "127.0.0.1"),
1129
+ port=int(os.environ.get("PORT", "8451")),
1130
+ log_level=os.environ.get("LOG_LEVEL", "warning"),
1131
+ )
1132
+
1133
+
1134
+ if __name__ == "__main__": # pragma: no cover - module entry point
1135
+ main()
tasks/legalnature/environment/reference/clone/backend/catalog.py ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """LegalNature offline clone — the document library and the pricing facts.
2
+
3
+ Pure data plus small pure helpers: no database, no I/O, no wall clock. The
4
+ catalog reproduces the observed shape of the source library (a searchable
5
+ document/service catalog grouped into category chips) at a size large enough
6
+ for the search, filter, paginate and open-a-detail-page journey to be real.
7
+
8
+ Every entry is locally navigable: ``/categories/<category>/<slug>`` renders a
9
+ product page and ``/documents/create/<slug>`` starts a local draft. Nothing
10
+ here is legal advice and no entry corresponds to a government filing.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from dataclasses import dataclass
16
+
17
+ from source_site import registry
18
+
19
+
20
+ PHONE = "888.881.1139"
21
+ PHONE_HOURS = "M-F: 6am - 7pm PST · Sat & Sun 9am - 1pm PST"
22
+
23
+ # Observed subscription prices (pricing page, 2026-08-21).
24
+ ANNUAL_PRICE_MINOR = 11900
25
+ MONTHLY_PRICE_MINOR = 3900
26
+ ANNUAL_EQUIVALENT_MONTHLY = "9.92"
27
+
28
+ PLANS: dict[str, dict[str, object]] = {
29
+ "annual": {
30
+ "id": "annual",
31
+ "name": "Annual Subscription",
32
+ "amount_minor": ANNUAL_PRICE_MINOR,
33
+ "price_label": "$119",
34
+ "period_label": "/year",
35
+ "summary": f"Only ${ANNUAL_EQUIVALENT_MONTHLY}/month, when paid annually.",
36
+ "renewal": "Renews once a year until cancelled.",
37
+ },
38
+ "monthly": {
39
+ "id": "monthly",
40
+ "name": "Monthly Subscription",
41
+ "amount_minor": MONTHLY_PRICE_MINOR,
42
+ "price_label": "$39",
43
+ "period_label": "/month",
44
+ "summary": "Cancel anytime, no hidden conditions",
45
+ "renewal": "Renews every month until cancelled.",
46
+ },
47
+ }
48
+
49
+ PLAN_BENEFITS = (
50
+ "Create unlimited versions of all documents",
51
+ "Access to the entire document library",
52
+ f"Only ${ANNUAL_EQUIVALENT_MONTHLY}/month when paid annually",
53
+ "Store, edit, and re-download every document you build",
54
+ "Step-by-step guidance for every document",
55
+ )
56
+
57
+
58
+ @dataclass(frozen=True)
59
+ class Category:
60
+ slug: str
61
+ label: str
62
+ blurb: str
63
+
64
+
65
+ @dataclass(frozen=True)
66
+ class Product:
67
+ slug: str
68
+ title: str
69
+ category: str
70
+ kind: str # "document" | "service"
71
+ blurb: str
72
+ icon: str
73
+ # Verbatim source ``<title>`` when the product page was captured; empty
74
+ # otherwise, in which case the shared title shape is used.
75
+ seo_title: str = ""
76
+
77
+
78
+ # Category labels exactly as the source prints them in the ``Categories:`` strip
79
+ # on ``/products``. ``real-estate`` never appears in that strip but owns seven
80
+ # frozen document pages, so it carries the label the Landlords menu uses.
81
+ CATEGORY_LABELS: dict[str, str] = {
82
+ "business": "Business",
83
+ "business-formation": "Business Formation",
84
+ "business-services": "Business Services",
85
+ "commercial-property": "Commercial Property",
86
+ "estate-planning": "Estate Planning",
87
+ "healthcare": "Healthcare",
88
+ "human-resources": "Human Resources",
89
+ "landlord-and-tenant": "Landlord and Tenant",
90
+ "marriage-and-divorce": "Marriage and Divorce",
91
+ "personal-affairs": "Personal Affairs",
92
+ "property": "Property",
93
+ "real-estate": "Real Estate",
94
+ }
95
+
96
+ CATEGORY_BLURBS: dict[str, str] = {
97
+ "business": "Agreements that keep day-to-day business relationships clear.",
98
+ "business-formation": "The organizing paperwork behind a new company.",
99
+ "business-services": "Ongoing filings and services for a company already running.",
100
+ "commercial-property": "Leases and amendments for commercial space.",
101
+ "estate-planning": "Wills, trusts and the documents that go with them.",
102
+ "healthcare": "Medical directives and healthcare authorizations.",
103
+ "human-resources": "Hiring, confidentiality and workplace policy documents.",
104
+ "landlord-and-tenant": "Residential leases, notices and tenancy paperwork.",
105
+ "marriage-and-divorce": "Documents for marriage, separation and divorce.",
106
+ "personal-affairs": "Everyday personal documents and authorizations.",
107
+ "property": "Deeds and agreements that transfer or secure real property.",
108
+ "real-estate": "Residential leases, notices and transfer documents.",
109
+ }
110
+
111
+ # Icons are the clone's own inline artwork (see ``frontend/layout.ICONS``); the
112
+ # source draws category glyphs from its sprite sheet, which the clone redraws.
113
+ CATEGORY_ICONS: dict[str, str] = {
114
+ "business": "briefcase",
115
+ "business-formation": "building",
116
+ "business-services": "bank",
117
+ "commercial-property": "building",
118
+ "estate-planning": "scale",
119
+ "healthcare": "heart",
120
+ "human-resources": "people",
121
+ "landlord-and-tenant": "home",
122
+ "marriage-and-divorce": "heart",
123
+ "personal-affairs": "document",
124
+ "property": "key",
125
+ "real-estate": "home",
126
+ }
127
+
128
+
129
+ def _category_label(slug: str) -> str:
130
+ if slug in CATEGORY_LABELS:
131
+ return CATEGORY_LABELS[slug]
132
+ return slug.replace("-", " ").replace("_", " ").title()
133
+
134
+
135
+ CATEGORIES: tuple[Category, ...] = tuple(
136
+ Category(
137
+ slug,
138
+ _category_label(slug),
139
+ CATEGORY_BLURBS.get(slug, f"{_category_label(slug)} documents prepared locally."),
140
+ )
141
+ for slug in registry.DOCUMENT_CATEGORIES
142
+ )
143
+
144
+ CATEGORY_BY_SLUG: dict[str, Category] = {item.slug: item for item in CATEGORIES}
145
+
146
+
147
+ # ---------------------------------------------------------------------------
148
+ # Products
149
+ # ---------------------------------------------------------------------------
150
+
151
+ # The document library is the source's own: one entry per ``/documents/create``
152
+ # slug the crawl reached, titled and described from its captured detail page.
153
+ # ``non-disclosure-agreement`` keeps the hand-written blurb and the branching
154
+ # builder that models the captured wizard; every other entry uses the generic
155
+ # preparation flow.
156
+ DETAILED_BLURBS: dict[str, str] = {
157
+ "non-disclosure-agreement": (
158
+ "Prohibit an individual or business from disclosing confidential "
159
+ "information or trade secrets to others."
160
+ ),
161
+ }
162
+
163
+
164
+ def _document_products() -> list[Product]:
165
+ products: list[Product] = []
166
+ for record in registry.CATALOGUE["documents"]:
167
+ slug = record["slug"]
168
+ category = record["category"] or "personal-affairs"
169
+ detail = registry.PAGES.get(record["detail_paths"][0]) if record["detail_paths"] else None
170
+ products.append(
171
+ Product(
172
+ slug=slug,
173
+ title=record["title"] or slug.replace("-", " ").title(),
174
+ category=category,
175
+ kind="document",
176
+ blurb=DETAILED_BLURBS.get(slug) or record["summary"][:280],
177
+ icon=CATEGORY_ICONS.get(category, "document"),
178
+ seo_title=detail.title if detail is not None else "",
179
+ )
180
+ )
181
+ return products
182
+
183
+
184
+ def _order_products() -> list[Product]:
185
+ products: list[Product] = []
186
+ for record in registry.CATALOGUE["orders"]:
187
+ slug = record["slug"]
188
+ products.append(
189
+ Product(
190
+ slug=f"order:{slug}",
191
+ title=slug.replace("-", " ").replace("_", " ").title(),
192
+ category="business-services",
193
+ kind="service",
194
+ blurb="A business filing prepared locally; nothing is ever filed or paid.",
195
+ icon="bank",
196
+ )
197
+ )
198
+ return products
199
+
200
+
201
+ # ``llc-formation`` is the local draft the LLC marketing page starts. It has no
202
+ # ``/categories`` page of its own in the frozen scope, so it never becomes a
203
+ # route; it exists so that "Start my LLC" has a real draft to write into.
204
+ LOCAL_ONLY_PRODUCTS: tuple[Product, ...] = (
205
+ Product(
206
+ slug="llc-formation",
207
+ title="LLC Formation",
208
+ category="business-formation",
209
+ kind="service",
210
+ blurb="Prepare the organizing paperwork for a new limited liability company.",
211
+ icon="building",
212
+ ),
213
+ )
214
+
215
+ PRODUCTS: tuple[Product, ...] = tuple(
216
+ [*_document_products(), *_order_products(), *LOCAL_ONLY_PRODUCTS]
217
+ )
218
+
219
+ PRODUCT_BY_SLUG: dict[str, Product] = {item.slug: item for item in PRODUCTS}
220
+
221
+ # The source links two documents with capitalised slugs from lower-cased menus.
222
+ PRODUCT_BY_FOLDED_SLUG: dict[str, Product] = {
223
+ item.slug.casefold(): item for item in PRODUCTS
224
+ }
225
+
226
+
227
+ def product_for(slug: str) -> Product | None:
228
+ exact = PRODUCT_BY_SLUG.get(slug)
229
+ if exact is not None:
230
+ return exact
231
+ return PRODUCT_BY_FOLDED_SLUG.get((slug or "").casefold())
232
+
233
+
234
+ TRUST_SCORE = "Excellent"
235
+ TRUST_RATING = 4.6
236
+ TRUST_COUNT = "2,184 reviews"
237
+
238
+ US_STATES: tuple[tuple[str, str], ...] = (
239
+ ("AL", "Alabama"), ("AK", "Alaska"), ("AZ", "Arizona"), ("AR", "Arkansas"),
240
+ ("CA", "California"), ("CO", "Colorado"), ("CT", "Connecticut"),
241
+ ("DE", "Delaware"), ("DC", "District of Columbia"), ("FL", "Florida"),
242
+ ("GA", "Georgia"), ("HI", "Hawaii"), ("ID", "Idaho"), ("IL", "Illinois"),
243
+ ("IN", "Indiana"), ("IA", "Iowa"), ("KS", "Kansas"), ("KY", "Kentucky"),
244
+ ("LA", "Louisiana"), ("ME", "Maine"), ("MD", "Maryland"),
245
+ ("MA", "Massachusetts"), ("MI", "Michigan"), ("MN", "Minnesota"),
246
+ ("MS", "Mississippi"), ("MO", "Missouri"), ("MT", "Montana"),
247
+ ("NE", "Nebraska"), ("NV", "Nevada"), ("NH", "New Hampshire"),
248
+ ("NJ", "New Jersey"), ("NM", "New Mexico"), ("NY", "New York"),
249
+ ("NC", "North Carolina"), ("ND", "North Dakota"), ("OH", "Ohio"),
250
+ ("OK", "Oklahoma"), ("OR", "Oregon"), ("PA", "Pennsylvania"),
251
+ ("RI", "Rhode Island"), ("SC", "South Carolina"), ("SD", "South Dakota"),
252
+ ("TN", "Tennessee"), ("TX", "Texas"), ("UT", "Utah"), ("VT", "Vermont"),
253
+ ("VA", "Virginia"), ("WA", "Washington"), ("WV", "West Virginia"),
254
+ ("WI", "Wisconsin"), ("WY", "Wyoming"),
255
+ )
256
+
257
+ STATE_BY_CODE: dict[str, str] = dict(US_STATES)
258
+
259
+
260
+
261
+ CODE_BY_STATE_NAME: dict[str, str] = {name: code for code, name in US_STATES}
262
+
263
+ # The source identifies a state by a small integer -- ``5`` is California, ``52``
264
+ # is the District of Columbia -- and every ``?state=`` query state in the frozen
265
+ # evidence uses those ids. The clone's document selects therefore offer the
266
+ # source's own option values, while drafts keep storing the two-letter code so
267
+ # the existing dashboard and preview contracts are unchanged.
268
+ SOURCE_STATE_OPTIONS: tuple[tuple[str, str], ...] = tuple(
269
+ (row["id"], row["name"]) for row in registry.STATES
270
+ )
271
+
272
+ STATE_NAME_BY_SOURCE_ID: dict[str, str] = dict(SOURCE_STATE_OPTIONS)
273
+ SOURCE_ID_BY_STATE_NAME: dict[str, str] = {
274
+ name: identifier for identifier, name in SOURCE_STATE_OPTIONS
275
+ }
276
+
277
+
278
+ def state_name(code: str | None) -> str | None:
279
+ if not code:
280
+ return None
281
+ return STATE_BY_CODE.get(code.upper())
282
+
283
+
284
+ def state_label(value: str | None) -> str:
285
+ """The state's name, whether ``value`` is a source id or a two-letter code."""
286
+
287
+ if not value:
288
+ return ""
289
+ text = str(value).strip()
290
+ if text in STATE_NAME_BY_SOURCE_ID:
291
+ return STATE_NAME_BY_SOURCE_ID[text]
292
+ return STATE_BY_CODE.get(text.upper(), "")
293
+
294
+
295
+ def state_code_for(value: str | None) -> str:
296
+ """The two-letter code, whether ``value`` is a source id or already a code."""
297
+
298
+ name = state_label(value)
299
+ return CODE_BY_STATE_NAME.get(name, "")
300
+
301
+
302
+ def source_state_id(value: str | None) -> str:
303
+ """The source's numeric id, whether ``value`` is an id or a code."""
304
+
305
+ name = state_label(value)
306
+ return SOURCE_ID_BY_STATE_NAME.get(name, "")
307
+
308
+
309
+ def category_products(slug: str) -> list[Product]:
310
+ return [item for item in PRODUCTS if item.category == slug and item.kind == "document"]
311
+
312
+
313
+ def search_products(query: str = "", category: str = "") -> list[Product]:
314
+ """Filter the library by free text and/or one category slug."""
315
+
316
+ needle = " ".join(query.split()).casefold()
317
+ results = [item for item in PRODUCTS if item.kind == "document"]
318
+ if category:
319
+ results = [item for item in results if item.category == category]
320
+ if needle:
321
+ results = [
322
+ item
323
+ for item in results
324
+ if needle in item.title.casefold()
325
+ or needle in item.blurb.casefold()
326
+ or needle in _category_label(item.category).casefold()
327
+ or needle in item.slug.replace("-", " ").casefold()
328
+ ]
329
+ return results
330
+
331
+
332
+ def paginate(items: list[Product], page: int, per_page: int = 12) -> dict[str, object]:
333
+ total = len(items)
334
+ pages = max(1, (total + per_page - 1) // per_page)
335
+ current = min(max(page, 1), pages)
336
+ start = (current - 1) * per_page
337
+ return {
338
+ "items": items[start : start + per_page],
339
+ "page": current,
340
+ "pages": pages,
341
+ "total": total,
342
+ "start": 0 if total == 0 else start + 1,
343
+ "end": min(start + per_page, total),
344
+ }
tasks/legalnature/environment/reference/clone/backend/documents.py ADDED
@@ -0,0 +1,1352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """LegalNature offline clone — local multi-step document builders.
2
+
3
+ Two builders are modelled in full because the frozen journeys exercise them:
4
+
5
+ * ``non-disclosure-agreement`` — the observed first step asks for a detail
6
+ level (Basic / Comprehensive) and a non-disclosure type (Standard / Mutual /
7
+ Employee / Independent contractor). Every later step branches off those two
8
+ answers, so the question graph is a function of the answers so far rather
9
+ than a fixed list.
10
+ * ``llc-formation`` — the local "start a business" draft flow reached from the
11
+ LLC marketing page.
12
+
13
+ Every other catalog entry gets a generic three-step builder so that "Create
14
+ Document" is a real local destination for the whole library.
15
+
16
+ This module is pure: it validates answers and renders preview text. It never
17
+ files anything with a government office, never sends a message, never signs
18
+ anything and never gives legal advice. ``DEMONSTRATION_NOTICE`` is rendered on
19
+ every preview and every generated document.
20
+ """
21
+
22
+ from __future__ import annotations
23
+
24
+ from dataclasses import dataclass, field
25
+ from functools import lru_cache
26
+ from typing import Callable
27
+
28
+ from backend.catalog import (
29
+ PRODUCT_BY_SLUG,
30
+ SOURCE_STATE_OPTIONS,
31
+ state_label,
32
+ )
33
+ from source_site.registry import FIRST_STEPS
34
+
35
+
36
+ DEMONSTRATION_NOTICE = (
37
+ "This is a local WebsiteBench demonstration document. It is generated "
38
+ "offline from the answers on this page, it is not legal advice, it is not "
39
+ "reviewed by an attorney, and it is never filed with, transmitted to, or "
40
+ "signed by anyone."
41
+ )
42
+
43
+ NO_FILING_NOTICE = (
44
+ "No government filing is made. This offline clone prepares a draft on your "
45
+ "screen only — it never contacts a Secretary of State, never pays a state "
46
+ "fee, and never submits anything on your behalf."
47
+ )
48
+
49
+
50
+ @dataclass(frozen=True)
51
+ class Field:
52
+ name: str
53
+ label: str
54
+ kind: str = "text"
55
+ options: tuple[tuple[str, str], ...] = ()
56
+ descriptions: dict[str, str] = field(default_factory=dict)
57
+ required: bool = True
58
+ help: str = ""
59
+ placeholder: str = ""
60
+ # ``(other_field, value)``: this field only exists when ``other_field``
61
+ # currently holds ``value``. Hidden fields are never validated or stored.
62
+ depends_on: tuple[str, str] | None = None
63
+
64
+
65
+ @dataclass(frozen=True)
66
+ class Group:
67
+ title: str
68
+ fields: tuple[Field, ...]
69
+
70
+
71
+ @dataclass(frozen=True)
72
+ class Step:
73
+ slug: str
74
+ title: str
75
+ description: str
76
+ build: Callable[[dict[str, str]], tuple[Group, ...]]
77
+ # The source's ``<h1>`` when it differs from the step name in its ``<title>``
78
+ # -- the formation order is headed "Let's get started with the most
79
+ # important company details:" but titled "Company Information".
80
+ heading: str = ""
81
+
82
+ def groups(self, answers: dict[str, str]) -> tuple[Group, ...]:
83
+ return self.build(answers)
84
+
85
+ def visible_fields(self, answers: dict[str, str]) -> list[Field]:
86
+ visible: list[Field] = []
87
+ for group in self.groups(answers):
88
+ for item in group.fields:
89
+ if item.depends_on is None:
90
+ visible.append(item)
91
+ continue
92
+ other, expected = item.depends_on
93
+ if answers.get(other, "") == expected:
94
+ visible.append(item)
95
+ return visible
96
+
97
+
98
+ # Option values are the source's numeric state ids so that a captured
99
+ # ``?state=5`` URL selects exactly the option the source selects.
100
+ STATE_OPTIONS: tuple[tuple[str, str], ...] = SOURCE_STATE_OPTIONS
101
+
102
+ YES_NO: tuple[tuple[str, str], ...] = (("yes", "Yes"), ("no", "No"))
103
+
104
+
105
+ # ---------------------------------------------------------------------------
106
+ # Non-disclosure agreement
107
+ # ---------------------------------------------------------------------------
108
+
109
+ NDA_DETAIL_OPTIONS = (("basic", "Basic"), ("comprehensive", "Comprehensive"))
110
+ NDA_DETAIL_DESCRIPTIONS = {
111
+ "basic": (
112
+ "Create a simple agreement with fewer questions, while still "
113
+ "containing everything needed for a standard legally binding agreement."
114
+ ),
115
+ "comprehensive": (
116
+ "Create a more detailed agreement with extra protections and options "
117
+ "for the parties."
118
+ ),
119
+ }
120
+
121
+ NDA_TYPE_OPTIONS = (
122
+ ("standard", "Standard NDA"),
123
+ ("mutual", "Mutual NDA"),
124
+ ("employee", "Employee NDA"),
125
+ ("contractor", "Independent contractor NDA"),
126
+ )
127
+ NDA_TYPE_DESCRIPTIONS = {
128
+ "standard": (
129
+ "Create an NDA where one party is disclosing confidential information "
130
+ "to another party, who is not an employee or independent contractor of "
131
+ "the disclosing party."
132
+ ),
133
+ "mutual": (
134
+ "Create an NDA where both parties are disclosing confidential "
135
+ "information to each other."
136
+ ),
137
+ "employee": (
138
+ "Create an NDA where an employer is disclosing confidential "
139
+ "information to its employee."
140
+ ),
141
+ "contractor": (
142
+ "Create an NDA where a company is disclosing confidential information "
143
+ "to an independent contractor it has engaged."
144
+ ),
145
+ }
146
+
147
+ NDA_PARTY_LABELS: dict[str, tuple[str, str]] = {
148
+ "standard": ("Disclosing party", "Receiving party"),
149
+ "mutual": ("First party", "Second party"),
150
+ "employee": ("Employer", "Employee"),
151
+ "contractor": ("Company", "Independent contractor"),
152
+ }
153
+
154
+ _INFORMATION_TYPES = (
155
+ ("technical", "Technical data, designs and source code"),
156
+ ("financial", "Financial and pricing information"),
157
+ ("customer", "Customer and supplier lists"),
158
+ ("marketing", "Marketing plans and unreleased products"),
159
+ ("personnel", "Personnel and compensation information"),
160
+ )
161
+
162
+
163
+ def _nda_step_type(_answers: dict[str, str]) -> tuple[Group, ...]:
164
+ return (
165
+ Group(
166
+ "Agreement Type",
167
+ (
168
+ Field(
169
+ "detail_level",
170
+ "Agreement Type",
171
+ kind="radio-cards",
172
+ options=NDA_DETAIL_OPTIONS,
173
+ descriptions=NDA_DETAIL_DESCRIPTIONS,
174
+ ),
175
+ ),
176
+ ),
177
+ Group(
178
+ "Type of Non-Disclosure",
179
+ (
180
+ Field(
181
+ "nda_type",
182
+ "Type of Non-Disclosure",
183
+ kind="radio-cards",
184
+ options=NDA_TYPE_OPTIONS,
185
+ descriptions=NDA_TYPE_DESCRIPTIONS,
186
+ ),
187
+ ),
188
+ ),
189
+ )
190
+
191
+
192
+ def _nda_step_parties(answers: dict[str, str]) -> tuple[Group, ...]:
193
+ kind = answers.get("nda_type", "standard")
194
+ first, second = NDA_PARTY_LABELS.get(kind, NDA_PARTY_LABELS["standard"])
195
+ first_fields = [
196
+ Field("party_one_name", f"{first} name", placeholder="Acme Holdings, LLC"),
197
+ Field(
198
+ "party_one_kind",
199
+ f"{first} is a",
200
+ kind="select",
201
+ options=(
202
+ ("company", "Company"),
203
+ ("individual", "Individual"),
204
+ ),
205
+ ),
206
+ Field("party_one_address", f"{first} address", kind="textarea"),
207
+ ]
208
+ second_fields = [
209
+ Field("party_two_name", f"{second} name", placeholder="Jordan Ellis"),
210
+ Field(
211
+ "party_two_kind",
212
+ f"{second} is a",
213
+ kind="select",
214
+ options=(
215
+ ("individual", "Individual"),
216
+ ("company", "Company"),
217
+ ),
218
+ ),
219
+ Field("party_two_address", f"{second} address", kind="textarea"),
220
+ ]
221
+ if kind == "employee":
222
+ second_fields.append(
223
+ Field("employee_job_title", "Employee job title", placeholder="Engineer")
224
+ )
225
+ if kind == "contractor":
226
+ second_fields.append(
227
+ Field(
228
+ "contractor_services",
229
+ "Services the contractor provides",
230
+ kind="textarea",
231
+ placeholder="Design and build the new customer portal.",
232
+ )
233
+ )
234
+ return (
235
+ Group(first, tuple(first_fields)),
236
+ Group(second, tuple(second_fields)),
237
+ )
238
+
239
+
240
+ def _nda_step_information(answers: dict[str, str]) -> tuple[Group, ...]:
241
+ fields = [
242
+ Field(
243
+ "purpose",
244
+ "Purpose of the disclosure",
245
+ kind="textarea",
246
+ placeholder="Evaluating a possible business relationship.",
247
+ ),
248
+ Field(
249
+ "information_types",
250
+ "Confidential information covered",
251
+ kind="checkbox-group",
252
+ options=_INFORMATION_TYPES,
253
+ help="Choose everything the agreement should protect.",
254
+ ),
255
+ ]
256
+ if answers.get("detail_level") == "comprehensive":
257
+ fields.extend(
258
+ [
259
+ Field(
260
+ "trade_secrets",
261
+ "Protect trade secrets for as long as they stay secret",
262
+ kind="radio",
263
+ options=YES_NO,
264
+ ),
265
+ Field(
266
+ "residual_knowledge",
267
+ "Allow residual knowledge held in unaided memory",
268
+ kind="radio",
269
+ options=YES_NO,
270
+ ),
271
+ Field(
272
+ "excluded_information",
273
+ "Information the agreement should not cover",
274
+ kind="textarea",
275
+ required=False,
276
+ ),
277
+ ]
278
+ )
279
+ return (Group("Confidential Information", tuple(fields)),)
280
+
281
+
282
+ def _nda_step_term(answers: dict[str, str]) -> tuple[Group, ...]:
283
+ fields = [
284
+ Field("effective_date", "Effective date", kind="date"),
285
+ Field(
286
+ "term_years",
287
+ "Length of the agreement",
288
+ kind="select",
289
+ options=(
290
+ ("1", "1 year"),
291
+ ("2", "2 years"),
292
+ ("3", "3 years"),
293
+ ("5", "5 years"),
294
+ ("indefinite", "Until terminated in writing"),
295
+ ),
296
+ ),
297
+ Field(
298
+ "survival_years",
299
+ "Confidentiality continues after the agreement ends for",
300
+ kind="select",
301
+ options=(
302
+ ("1", "1 year"),
303
+ ("2", "2 years"),
304
+ ("3", "3 years"),
305
+ ("5", "5 years"),
306
+ ),
307
+ ),
308
+ ]
309
+ if answers.get("detail_level") == "comprehensive":
310
+ fields.extend(
311
+ [
312
+ Field(
313
+ "non_solicitation",
314
+ "Include a non-solicitation clause",
315
+ kind="radio",
316
+ options=YES_NO,
317
+ ),
318
+ Field(
319
+ "non_solicitation_months",
320
+ "Non-solicitation period",
321
+ kind="select",
322
+ options=(
323
+ ("6", "6 months"),
324
+ ("12", "12 months"),
325
+ ("24", "24 months"),
326
+ ),
327
+ depends_on=("non_solicitation", "yes"),
328
+ ),
329
+ ]
330
+ )
331
+ return (Group("Term", tuple(fields)),)
332
+
333
+
334
+ def _nda_step_law(answers: dict[str, str]) -> tuple[Group, ...]:
335
+ fields = [
336
+ Field(
337
+ "governing_state",
338
+ "Governing state",
339
+ kind="select",
340
+ options=STATE_OPTIONS,
341
+ ),
342
+ Field("venue_county", "County for any dispute", placeholder="Santa Clara"),
343
+ Field(
344
+ "dispute_resolution",
345
+ "How disputes are resolved",
346
+ kind="radio",
347
+ options=(("courts", "State and federal courts"), ("arbitration", "Binding arbitration")),
348
+ ),
349
+ Field(
350
+ "arbitration_org",
351
+ "Arbitration organization",
352
+ kind="select",
353
+ options=(
354
+ ("aaa", "American Arbitration Association"),
355
+ ("jams", "JAMS"),
356
+ ("other", "Another organization the parties agree on"),
357
+ ),
358
+ depends_on=("dispute_resolution", "arbitration"),
359
+ ),
360
+ ]
361
+ if answers.get("detail_level") == "comprehensive":
362
+ fields.append(
363
+ Field(
364
+ "attorney_fees",
365
+ "Award attorney fees to the prevailing party",
366
+ kind="radio",
367
+ options=YES_NO,
368
+ )
369
+ )
370
+ return (Group("Governing Law", tuple(fields)),)
371
+
372
+
373
+ def _nda_step_signing(_answers: dict[str, str]) -> tuple[Group, ...]:
374
+ return (
375
+ Group(
376
+ "Signing",
377
+ (
378
+ Field(
379
+ "signature_method",
380
+ "How the parties will sign",
381
+ kind="radio",
382
+ options=(
383
+ ("print", "Print and sign on paper"),
384
+ ("separate", "Sign separate counterparts"),
385
+ ),
386
+ help=(
387
+ "This clone never collects or applies a signature. It "
388
+ "only records which method the finished draft describes."
389
+ ),
390
+ ),
391
+ Field(
392
+ "notarize",
393
+ "Leave room for a notary block",
394
+ kind="radio",
395
+ options=YES_NO,
396
+ ),
397
+ Field(
398
+ "document_title",
399
+ "Title on the finished document",
400
+ required=False,
401
+ placeholder="Non-Disclosure Agreement",
402
+ ),
403
+ ),
404
+ ),
405
+ )
406
+
407
+
408
+ NDA_STEPS: tuple[Step, ...] = (
409
+ Step(
410
+ "agreement-type",
411
+ "Agreement Type",
412
+ "Choose your non-disclosure agreement type.",
413
+ _nda_step_type,
414
+ ),
415
+ Step(
416
+ "parties",
417
+ "The Parties",
418
+ "Tell us who is exchanging confidential information.",
419
+ _nda_step_parties,
420
+ ),
421
+ Step(
422
+ "confidential-information",
423
+ "Confidential Information",
424
+ "Describe what the agreement protects and why it is shared.",
425
+ _nda_step_information,
426
+ ),
427
+ Step(
428
+ "term",
429
+ "Term",
430
+ "Decide how long the obligations last.",
431
+ _nda_step_term,
432
+ ),
433
+ Step(
434
+ "governing-law",
435
+ "Governing Law",
436
+ "Choose the law and the forum for any dispute.",
437
+ _nda_step_law,
438
+ ),
439
+ Step(
440
+ "signing",
441
+ "Signing",
442
+ "Finish the document and review your preview.",
443
+ _nda_step_signing,
444
+ ),
445
+ )
446
+
447
+
448
+ # ---------------------------------------------------------------------------
449
+ # LLC formation
450
+ # ---------------------------------------------------------------------------
451
+
452
+
453
+ def _llc_step_name(_answers: dict[str, str]) -> tuple[Group, ...]:
454
+ return (
455
+ Group(
456
+ "Business Name",
457
+ (
458
+ Field("business_name", "Business name", placeholder="Northline Studio"),
459
+ Field(
460
+ "name_suffix",
461
+ "Name ending",
462
+ kind="select",
463
+ options=(
464
+ ("LLC", "LLC"),
465
+ ("L.L.C.", "L.L.C."),
466
+ ("Limited Liability Company", "Limited Liability Company"),
467
+ ),
468
+ ),
469
+ Field(
470
+ "alternate_name",
471
+ "Alternate name if the first is taken",
472
+ required=False,
473
+ ),
474
+ Field(
475
+ "formation_state",
476
+ "State of formation",
477
+ kind="select",
478
+ options=STATE_OPTIONS,
479
+ ),
480
+ ),
481
+ ),
482
+ )
483
+
484
+
485
+ def _llc_step_agent(answers: dict[str, str]) -> tuple[Group, ...]:
486
+ fields = [
487
+ Field(
488
+ "agent_kind",
489
+ "Who will be the registered agent",
490
+ kind="radio-cards",
491
+ options=(
492
+ ("self", "I will be the registered agent"),
493
+ ("service", "Use a registered agent service"),
494
+ ),
495
+ descriptions={
496
+ "self": (
497
+ "You keep your own address on record for official notices."
498
+ ),
499
+ "service": (
500
+ "A designated service keeps an address on record instead. "
501
+ "This clone only records the choice; nothing is ordered."
502
+ ),
503
+ },
504
+ ),
505
+ Field(
506
+ "agent_name",
507
+ "Registered agent name",
508
+ depends_on=("agent_kind", "self"),
509
+ ),
510
+ Field(
511
+ "agent_address",
512
+ "Registered agent street address",
513
+ kind="textarea",
514
+ depends_on=("agent_kind", "self"),
515
+ ),
516
+ ]
517
+ if answers.get("agent_kind") == "service":
518
+ fields.append(
519
+ Field(
520
+ "agent_service_plan",
521
+ "Registered agent plan",
522
+ kind="select",
523
+ options=(
524
+ ("standard", "Standard — $99/year"),
525
+ ("multi", "Multi-state — $149/year"),
526
+ ),
527
+ )
528
+ )
529
+ return (Group("Registered Agent", tuple(fields)),)
530
+
531
+
532
+ def _llc_step_management(answers: dict[str, str]) -> tuple[Group, ...]:
533
+ fields = [
534
+ Field(
535
+ "management",
536
+ "How the company is managed",
537
+ kind="radio-cards",
538
+ options=(
539
+ ("member", "Member-managed"),
540
+ ("manager", "Manager-managed"),
541
+ ),
542
+ descriptions={
543
+ "member": "The owners run the company day to day.",
544
+ "manager": "One or more appointed managers run the company.",
545
+ },
546
+ ),
547
+ Field("member_one_name", "First member name"),
548
+ Field(
549
+ "member_one_share",
550
+ "First member ownership percentage",
551
+ kind="number",
552
+ placeholder="100",
553
+ ),
554
+ Field("member_two_name", "Second member name", required=False),
555
+ Field(
556
+ "member_two_share",
557
+ "Second member ownership percentage",
558
+ kind="number",
559
+ required=False,
560
+ ),
561
+ ]
562
+ if answers.get("management") == "manager":
563
+ fields.append(Field("manager_name", "Manager name"))
564
+ return (Group("Ownership and Management", tuple(fields)),)
565
+
566
+
567
+ def _llc_step_purpose(_answers: dict[str, str]) -> tuple[Group, ...]:
568
+ return (
569
+ Group(
570
+ "Business Purpose",
571
+ (
572
+ Field(
573
+ "business_purpose",
574
+ "What the business does",
575
+ kind="textarea",
576
+ placeholder="Design and sell handmade lighting.",
577
+ ),
578
+ Field(
579
+ "industry",
580
+ "Industry",
581
+ kind="select",
582
+ options=(
583
+ ("retail", "Retail"),
584
+ ("professional", "Professional services"),
585
+ ("technology", "Technology"),
586
+ ("construction", "Construction"),
587
+ ("hospitality", "Food and hospitality"),
588
+ ("other", "Other"),
589
+ ),
590
+ ),
591
+ Field(
592
+ "effective_date",
593
+ "Requested effective date",
594
+ kind="date",
595
+ required=False,
596
+ ),
597
+ Field(
598
+ "acknowledge_no_filing",
599
+ "I understand this draft is never filed with any government office",
600
+ kind="checkbox",
601
+ ),
602
+ ),
603
+ ),
604
+ )
605
+
606
+
607
+ LLC_STEPS: tuple[Step, ...] = (
608
+ Step("business-name", "Business Name", "Name the company you want to form.", _llc_step_name),
609
+ Step(
610
+ "registered-agent",
611
+ "Registered Agent",
612
+ "Choose who receives official notices for the company.",
613
+ _llc_step_agent,
614
+ ),
615
+ Step(
616
+ "management",
617
+ "Ownership and Management",
618
+ "Record who owns the company and who runs it.",
619
+ _llc_step_management,
620
+ ),
621
+ Step(
622
+ "purpose",
623
+ "Business Purpose",
624
+ "Describe the business and confirm the local-only boundary.",
625
+ _llc_step_purpose,
626
+ ),
627
+ )
628
+
629
+
630
+ # ---------------------------------------------------------------------------
631
+ # Generic builder for the rest of the library
632
+ # ---------------------------------------------------------------------------
633
+
634
+ # The captured builder opens on ``Governing State``: one select, the helper text
635
+ # "Select the state law that will govern this <document>." and a Next Step
636
+ # button (``documents-create-*-state-*`` query-state captures, and the
637
+ # ``builder-faq-open`` control state). Every generic document therefore starts
638
+ # where the source starts.
639
+
640
+
641
+ def _generic_governing_state(_answers: dict[str, str]) -> tuple[Group, ...]:
642
+ return (
643
+ Group(
644
+ "Governing State",
645
+ (
646
+ Field(
647
+ "governing_state",
648
+ "Governing State",
649
+ kind="select",
650
+ options=STATE_OPTIONS,
651
+ help="Select the state law that will govern this document.",
652
+ ),
653
+ ),
654
+ ),
655
+ )
656
+
657
+
658
+ def _generic_parties(_answers: dict[str, str]) -> tuple[Group, ...]:
659
+ return (
660
+ Group(
661
+ "The Parties",
662
+ (
663
+ Field("party_one_name", "First party name"),
664
+ Field("party_one_address", "First party address", kind="textarea"),
665
+ Field("party_two_name", "Second party name"),
666
+ Field("party_two_address", "Second party address", kind="textarea"),
667
+ ),
668
+ ),
669
+ )
670
+
671
+
672
+ def _generic_terms(_answers: dict[str, str]) -> tuple[Group, ...]:
673
+ return (
674
+ Group(
675
+ "Key Terms",
676
+ (
677
+ Field("effective_date", "Effective date", kind="date"),
678
+ Field(
679
+ "summary",
680
+ "What the parties are agreeing to",
681
+ kind="textarea",
682
+ ),
683
+ Field(
684
+ "consideration",
685
+ "What is exchanged",
686
+ required=False,
687
+ placeholder="$1,500 on completion",
688
+ ),
689
+ ),
690
+ ),
691
+ )
692
+
693
+
694
+ def _generic_signing(_answers: dict[str, str]) -> tuple[Group, ...]:
695
+ return (
696
+ Group(
697
+ "Signing",
698
+ (
699
+ Field(
700
+ "signature_method",
701
+ "How the parties will sign",
702
+ kind="radio",
703
+ options=(
704
+ ("print", "Print and sign on paper"),
705
+ ("separate", "Sign separate counterparts"),
706
+ ),
707
+ ),
708
+ ),
709
+ ),
710
+ )
711
+
712
+
713
+ GENERIC_STEPS: tuple[Step, ...] = (
714
+ Step(
715
+ "governing-state",
716
+ "Governing State",
717
+ "The state selected determines the law that applies to your document.",
718
+ _generic_governing_state,
719
+ ),
720
+ Step("parties", "The Parties", "Tell us who this document is between.", _generic_parties),
721
+ Step("terms", "Key Terms", "Record the terms this document should carry.", _generic_terms),
722
+ Step("signing", "Signing", "Choose how the parties will sign.", _generic_signing),
723
+ )
724
+
725
+
726
+ # ---------------------------------------------------------------------------
727
+ # Business-filing order preparation
728
+ # ---------------------------------------------------------------------------
729
+
730
+ # ``/orders/create/formation`` opens on "Let's get started with the most
731
+ # important company details:" with a company-name field, a state select that
732
+ # defaults to California and an entity select offering LLC, C Corp, S Corp and
733
+ # Nonprofit (``orders-create-formation-entity-*`` captures). The other filing
734
+ # services open on "Company Information" with the same company and state pair.
735
+ ENTITY_OPTIONS: tuple[tuple[str, str], ...] = (
736
+ ("LLC", "LLC"),
737
+ ("C Corp", "C Corp"),
738
+ ("S Corp", "S Corp"),
739
+ ("Nonprofit", "Nonprofit"),
740
+ )
741
+
742
+
743
+ def _order_company(_answers: dict[str, str]) -> tuple[Group, ...]:
744
+ return (
745
+ Group(
746
+ "Company Information",
747
+ (
748
+ Field("company_name", "Company Name", placeholder="Acme Holdings"),
749
+ Field("state_of_formation", "State", kind="select", options=STATE_OPTIONS),
750
+ Field("entity_type", "Entity", kind="select", options=ENTITY_OPTIONS),
751
+ Field(
752
+ "custom_designator",
753
+ "Do you want a custom entity designator?",
754
+ required=False,
755
+ help="Leave blank to use the standard designator for the entity type.",
756
+ ),
757
+ ),
758
+ ),
759
+ )
760
+
761
+
762
+ def _order_contact(_answers: dict[str, str]) -> tuple[Group, ...]:
763
+ return (
764
+ Group(
765
+ "Contact for this filing",
766
+ (
767
+ Field("contact_name", "Contact name"),
768
+ Field("contact_address", "Business address", kind="textarea"),
769
+ Field(
770
+ "contact_notes",
771
+ "Anything the preparer should know",
772
+ kind="textarea",
773
+ required=False,
774
+ ),
775
+ ),
776
+ ),
777
+ )
778
+
779
+
780
+ def _order_review(_answers: dict[str, str]) -> tuple[Group, ...]:
781
+ return (
782
+ Group(
783
+ "Confirm the local boundary",
784
+ (
785
+ Field(
786
+ "acknowledged_local_only",
787
+ "I understand this preparation is local only",
788
+ kind="checkbox",
789
+ help=NO_FILING_NOTICE,
790
+ ),
791
+ ),
792
+ ),
793
+ )
794
+
795
+
796
+ ORDER_STEPS: tuple[Step, ...] = (
797
+ Step(
798
+ "company",
799
+ "Company Information",
800
+ "Let's get started with the most important company details:",
801
+ _order_company,
802
+ ),
803
+ Step("contact", "Contact", "Who should the preparer reach about this filing?", _order_contact),
804
+ Step(
805
+ "review",
806
+ "Review",
807
+ "Check the details before the local draft is finished.",
808
+ _order_review,
809
+ ),
810
+ )
811
+
812
+
813
+ BUILDERS: dict[str, tuple[Step, ...]] = {
814
+ "non-disclosure-agreement": NDA_STEPS,
815
+ "llc-formation": LLC_STEPS,
816
+ }
817
+
818
+
819
+ # ---------------------------------------------------------------------------
820
+ # The source's own opening step
821
+ # ---------------------------------------------------------------------------
822
+
823
+ # ``catalogue.first_steps`` records, for 155 of the library's entries, the exact
824
+ # question the source's wizard opens with: its heading, its guidance and every
825
+ # field with its name, label, help, control kind and options. That step is
826
+ # rebuilt verbatim here so ``/documents/create/<slug>?state=5`` selects the
827
+ # option the source selected. The steps that follow it are the clone's own
828
+ # completion -- the capture is read-only and never advanced past step one, so
829
+ # there is no evidence for them and none is invented from the source.
830
+
831
+ _SPEC_KINDS = {
832
+ "select": "select",
833
+ "radio-cards": "radio-cards",
834
+ "checkbox-group": "checkbox-group",
835
+ "textarea": "textarea",
836
+ "date": "date",
837
+ "text": "text",
838
+ }
839
+
840
+
841
+ def _spec_field(spec: dict) -> Field:
842
+ return Field(
843
+ name=str(spec["name"]),
844
+ label=str(spec["label"]),
845
+ kind=_SPEC_KINDS.get(str(spec["kind"]), "text"),
846
+ options=tuple((str(value), str(label)) for value, label in spec["options"]),
847
+ required=True,
848
+ help=str(spec.get("help") or ""),
849
+ placeholder=str(spec.get("placeholder") or ""),
850
+ )
851
+
852
+
853
+ def _spec_step(spec: dict) -> Step:
854
+ fields = tuple(_spec_field(item) for item in spec["fields"])
855
+ title = str(spec.get("title") or spec.get("heading") or "Your document")
856
+ heading = str(spec.get("heading") or title)
857
+
858
+ def build(_answers: dict[str, str]) -> tuple[Group, ...]:
859
+ return (Group(heading, fields),)
860
+
861
+ return Step(
862
+ slug="opening",
863
+ title=title,
864
+ description=str(spec.get("description") or ""),
865
+ build=build,
866
+ heading=heading,
867
+ )
868
+
869
+
870
+ @lru_cache(maxsize=None)
871
+ def steps_for(slug: str) -> tuple[Step, ...]:
872
+ """The ordered steps of one draft's builder."""
873
+
874
+ hand_written = BUILDERS.get(slug)
875
+ if hand_written is not None:
876
+ return hand_written
877
+ spec = FIRST_STEPS.get(slug)
878
+ rest = ORDER_STEPS[1:] if slug.startswith("order:") else GENERIC_STEPS[1:]
879
+ if spec is None:
880
+ return ORDER_STEPS if slug.startswith("order:") else GENERIC_STEPS
881
+ return (_spec_step(spec), *rest)
882
+
883
+
884
+ def state_field_name(slug: str) -> str:
885
+ """The name of this builder's state question, as the source names it."""
886
+
887
+ for item in steps_for(slug)[0].build({})[0].fields:
888
+ if item.kind == "select" and len(item.options) >= 40:
889
+ return item.name
890
+ return "governing_state"
891
+
892
+
893
+ def entity_field_name(slug: str) -> str:
894
+ """The name of this builder's entity question, when it has one."""
895
+
896
+ for item in steps_for(slug)[0].build({})[0].fields:
897
+ values = {value for value, _label in item.options}
898
+ if item.kind in {"select", "radio-cards"} and "LLC" in values:
899
+ return item.name
900
+ return ""
901
+
902
+
903
+ def step_index(slug: str, step_slug: str) -> int | None:
904
+ for index, step in enumerate(steps_for(slug)):
905
+ if step.slug == step_slug:
906
+ return index
907
+ return None
908
+
909
+
910
+ # ---------------------------------------------------------------------------
911
+ # Validation
912
+ # ---------------------------------------------------------------------------
913
+
914
+
915
+ def validate_step(
916
+ slug: str,
917
+ index: int,
918
+ answers: dict[str, str],
919
+ submitted: dict[str, str],
920
+ ) -> tuple[dict[str, str], dict[str, str]]:
921
+ """Validate one step server-side.
922
+
923
+ ``answers`` is the stored draft; ``submitted`` is this request. Returns
924
+ ``(accepted, errors)``. A field whose ``depends_on`` condition is not met by
925
+ the merged answers is neither required nor stored.
926
+ """
927
+
928
+ steps = steps_for(slug)
929
+ if not 0 <= index < len(steps):
930
+ return {}, {"__step__": "That step does not exist."}
931
+ step = steps[index]
932
+ merged = {**answers, **submitted}
933
+ accepted: dict[str, str] = {}
934
+ errors: dict[str, str] = {}
935
+ for item in step.visible_fields(merged):
936
+ raw = submitted.get(item.name, "")
937
+ value = " ".join(raw.split()) if item.kind != "textarea" else raw.strip()
938
+ value = value[:2000]
939
+ if item.kind == "checkbox":
940
+ accepted[item.name] = "yes" if raw else ""
941
+ if item.required and not raw:
942
+ errors[item.name] = "Please confirm this to continue."
943
+ continue
944
+ if item.kind == "checkbox-group":
945
+ chosen = [
946
+ key
947
+ for key, _label in item.options
948
+ if submitted.get(f"{item.name}__{key}")
949
+ ]
950
+ accepted[item.name] = ",".join(chosen)
951
+ if item.required and not chosen:
952
+ errors[item.name] = "Choose at least one option."
953
+ continue
954
+ if item.options and value:
955
+ allowed = {key for key, _label in item.options}
956
+ if value not in allowed:
957
+ errors[item.name] = "Choose one of the listed options."
958
+ continue
959
+ if not value:
960
+ if item.required:
961
+ errors[item.name] = "This field is required."
962
+ accepted[item.name] = ""
963
+ continue
964
+ accepted[item.name] = value
965
+ return accepted, errors
966
+
967
+
968
+ def prune_unreachable(slug: str, answers: dict[str, str]) -> dict[str, str]:
969
+ """Drop stored answers whose branch is no longer taken.
970
+
971
+ Changing "Comprehensive" back to "Basic" must not leave the comprehensive
972
+ answers in the finished document.
973
+ """
974
+
975
+ reachable: set[str] = set()
976
+ for step in steps_for(slug):
977
+ for item in step.visible_fields(answers):
978
+ reachable.add(item.name)
979
+ return {key: value for key, value in answers.items() if key in reachable}
980
+
981
+
982
+ def completed_steps(slug: str, answers: dict[str, str]) -> int:
983
+ """How many leading steps are fully answered."""
984
+
985
+ steps = steps_for(slug)
986
+ for index, step in enumerate(steps):
987
+ for item in step.visible_fields(answers):
988
+ if item.required and not answers.get(item.name):
989
+ return index
990
+ return len(steps)
991
+
992
+
993
+ def progress_percent(slug: str, answers: dict[str, str]) -> int:
994
+ steps = steps_for(slug)
995
+ if not steps:
996
+ return 0
997
+ return int(round(100 * completed_steps(slug, answers) / len(steps)))
998
+
999
+
1000
+ # ---------------------------------------------------------------------------
1001
+ # Preview rendering
1002
+ # ---------------------------------------------------------------------------
1003
+
1004
+
1005
+ def _blank(value: str | None, placeholder: str) -> str:
1006
+ return value if value else f"[{placeholder}]"
1007
+
1008
+
1009
+ def _information_labels(answers: dict[str, str]) -> list[str]:
1010
+ chosen = {c for c in (answers.get("information_types") or "").split(",") if c}
1011
+ return [label for key, label in _INFORMATION_TYPES if key in chosen]
1012
+
1013
+
1014
+ def _nda_document(answers: dict[str, str], state_code: str | None) -> dict[str, object]:
1015
+ kind = answers.get("nda_type", "standard")
1016
+ first_label, second_label = NDA_PARTY_LABELS.get(kind, NDA_PARTY_LABELS["standard"])
1017
+ one = _blank(answers.get("party_one_name"), first_label)
1018
+ two = _blank(answers.get("party_two_name"), second_label)
1019
+ mutual = kind == "mutual"
1020
+ term = answers.get("term_years", "")
1021
+ term_text = (
1022
+ "until either party terminates it in writing"
1023
+ if term == "indefinite"
1024
+ else f"for {term} year(s) from the effective date" if term else "[term]"
1025
+ )
1026
+ survival = answers.get("survival_years") or "[survival period]"
1027
+ governing = state_label(answers.get("governing_state")) or state_label(state_code) or "[state]"
1028
+ sections: list[tuple[str, list[str]]] = [
1029
+ (
1030
+ "1. Parties",
1031
+ [
1032
+ f"This Non-Disclosure Agreement is entered into as of "
1033
+ f"{_blank(answers.get('effective_date'), 'effective date')} by and "
1034
+ f"between {one} ({first_label}), located at "
1035
+ f"{_blank(answers.get('party_one_address'), 'address')}, and {two} "
1036
+ f"({second_label}), located at "
1037
+ f"{_blank(answers.get('party_two_address'), 'address')}.",
1038
+ ],
1039
+ ),
1040
+ (
1041
+ "2. Purpose",
1042
+ [
1043
+ f"The parties wish to explore {_blank(answers.get('purpose'), 'purpose')}. "
1044
+ + (
1045
+ "Each party may disclose Confidential Information to the other."
1046
+ if mutual
1047
+ else f"{one} may disclose Confidential Information to {two}."
1048
+ ),
1049
+ ],
1050
+ ),
1051
+ (
1052
+ "3. Confidential Information",
1053
+ [
1054
+ "Confidential Information means information disclosed under this "
1055
+ "Agreement that is designated as confidential or that a reasonable "
1056
+ "person would understand to be confidential, including: "
1057
+ + (
1058
+ "; ".join(_information_labels(answers))
1059
+ or "[categories of information]"
1060
+ )
1061
+ + ".",
1062
+ ],
1063
+ ),
1064
+ (
1065
+ "4. Obligations",
1066
+ [
1067
+ f"{'Each party' if mutual else two} will use Confidential Information "
1068
+ "only for the stated purpose, will protect it with at least "
1069
+ "reasonable care, and will not disclose it to any third party "
1070
+ "without prior written consent.",
1071
+ ],
1072
+ ),
1073
+ (
1074
+ "5. Term",
1075
+ [
1076
+ f"This Agreement remains in effect {term_text}. The confidentiality "
1077
+ f"obligations continue for {survival} year(s) after this Agreement "
1078
+ "ends.",
1079
+ ],
1080
+ ),
1081
+ ]
1082
+ if kind == "employee":
1083
+ sections.insert(
1084
+ 2,
1085
+ (
1086
+ "2A. Employment",
1087
+ [
1088
+ f"{two} serves as "
1089
+ f"{_blank(answers.get('employee_job_title'), 'job title')} and "
1090
+ "will receive Confidential Information in the course of that "
1091
+ "employment.",
1092
+ ],
1093
+ ),
1094
+ )
1095
+ if kind == "contractor":
1096
+ sections.insert(
1097
+ 2,
1098
+ (
1099
+ "2A. Services",
1100
+ [
1101
+ f"{two} performs the following services for {one}: "
1102
+ f"{_blank(answers.get('contractor_services'), 'services')}.",
1103
+ ],
1104
+ ),
1105
+ )
1106
+ if answers.get("trade_secrets") == "yes":
1107
+ sections.append(
1108
+ (
1109
+ "6. Trade Secrets",
1110
+ [
1111
+ "Information that qualifies as a trade secret remains protected "
1112
+ "for as long as it continues to qualify as a trade secret under "
1113
+ "applicable law.",
1114
+ ],
1115
+ )
1116
+ )
1117
+ if answers.get("residual_knowledge") == "yes":
1118
+ sections.append(
1119
+ (
1120
+ "7. Residual Knowledge",
1121
+ [
1122
+ "Nothing in this Agreement restricts the use of general skill or "
1123
+ "knowledge retained in unaided memory.",
1124
+ ],
1125
+ )
1126
+ )
1127
+ if answers.get("excluded_information"):
1128
+ sections.append(
1129
+ (
1130
+ "8. Exclusions",
1131
+ [
1132
+ "The following is expressly excluded from Confidential "
1133
+ f"Information: {answers['excluded_information']}.",
1134
+ ],
1135
+ )
1136
+ )
1137
+ if answers.get("non_solicitation") == "yes":
1138
+ months = answers.get("non_solicitation_months") or "[period]"
1139
+ sections.append(
1140
+ (
1141
+ "9. Non-Solicitation",
1142
+ [
1143
+ f"For {months} month(s) after this Agreement ends, neither party "
1144
+ "will solicit the other party's employees for employment.",
1145
+ ],
1146
+ )
1147
+ )
1148
+ forum = (
1149
+ "binding arbitration administered by "
1150
+ + {
1151
+ "aaa": "the American Arbitration Association",
1152
+ "jams": "JAMS",
1153
+ "other": "an organization the parties agree on",
1154
+ }.get(answers.get("arbitration_org", ""), "[arbitration organization]")
1155
+ if answers.get("dispute_resolution") == "arbitration"
1156
+ else "the state and federal courts located in "
1157
+ f"{_blank(answers.get('venue_county'), 'county')} County"
1158
+ )
1159
+ law: list[str] = [
1160
+ f"This Agreement is governed by the laws of {governing}. Any dispute will "
1161
+ f"be resolved by {forum}.",
1162
+ ]
1163
+ if answers.get("attorney_fees") == "yes":
1164
+ law.append(
1165
+ "The prevailing party in any dispute is entitled to recover its "
1166
+ "reasonable attorney fees and costs."
1167
+ )
1168
+ sections.append(("10. Governing Law", law))
1169
+ signing = (
1170
+ "The parties may sign separate counterparts, each of which is an original."
1171
+ if answers.get("signature_method") == "separate"
1172
+ else "The parties will print and sign this Agreement."
1173
+ )
1174
+ if answers.get("notarize") == "yes":
1175
+ signing += " A notary block is included below the signature lines."
1176
+ sections.append(("11. Signatures", [signing, DEMONSTRATION_NOTICE]))
1177
+ return {
1178
+ "title": (answers.get("document_title") or "Non-Disclosure Agreement").upper(),
1179
+ "subtitle": f"{one} and {two}",
1180
+ "sections": sections,
1181
+ }
1182
+
1183
+
1184
+ def _llc_document(answers: dict[str, str], state_code: str | None) -> dict[str, object]:
1185
+ name = _blank(answers.get("business_name"), "business name")
1186
+ suffix = answers.get("name_suffix") or "LLC"
1187
+ full_name = f"{name} {suffix}" if answers.get("business_name") else name
1188
+ formation = state_label(answers.get("formation_state")) or state_label(state_code) or "[state]"
1189
+ agent = (
1190
+ f"{_blank(answers.get('agent_name'), 'registered agent name')}, "
1191
+ f"{_blank(answers.get('agent_address'), 'registered agent address')}"
1192
+ if answers.get("agent_kind") == "self"
1193
+ else "a registered agent service selected by the organizer"
1194
+ )
1195
+ management = (
1196
+ "the members" if answers.get("management") != "manager" else
1197
+ f"{_blank(answers.get('manager_name'), 'manager name')}, as manager"
1198
+ )
1199
+ members = [
1200
+ f"{answers.get('member_one_name') or '[first member]'} — "
1201
+ f"{answers.get('member_one_share') or '[percentage]'}%"
1202
+ ]
1203
+ if answers.get("member_two_name"):
1204
+ members.append(
1205
+ f"{answers['member_two_name']} — "
1206
+ f"{answers.get('member_two_share') or '[percentage]'}%"
1207
+ )
1208
+ return {
1209
+ "title": "ARTICLES OF ORGANIZATION (LOCAL DRAFT)",
1210
+ "subtitle": full_name,
1211
+ "sections": [
1212
+ ("Article I — Name", [f"The name of the limited liability company is {full_name}."]),
1213
+ (
1214
+ "Article II — State",
1215
+ [
1216
+ f"The company is organized under the laws of {formation}. "
1217
+ + NO_FILING_NOTICE,
1218
+ ],
1219
+ ),
1220
+ ("Article III — Registered Agent", [f"The registered agent is {agent}."]),
1221
+ ("Article IV — Management", [f"The company is managed by {management}."]),
1222
+ ("Article V — Members", members),
1223
+ (
1224
+ "Article VI — Purpose",
1225
+ [
1226
+ _blank(answers.get("business_purpose"), "business purpose")
1227
+ + f" (industry: {answers.get('industry') or '[industry]'})."
1228
+ ],
1229
+ ),
1230
+ (
1231
+ "Article VII — Effective Date",
1232
+ [
1233
+ "Requested effective date: "
1234
+ + (answers.get("effective_date") or "on preparation."),
1235
+ ],
1236
+ ),
1237
+ ("Notice", [DEMONSTRATION_NOTICE, NO_FILING_NOTICE]),
1238
+ ],
1239
+ }
1240
+
1241
+
1242
+ def _generic_document(
1243
+ slug: str, answers: dict[str, str], state_code: str | None
1244
+ ) -> dict[str, object]:
1245
+ product = PRODUCT_BY_SLUG.get(slug)
1246
+ title = product.title if product else slug.replace("-", " ").title()
1247
+ one = _blank(answers.get("party_one_name"), "first party")
1248
+ two = _blank(answers.get("party_two_name"), "second party")
1249
+ governing = state_label(answers.get("governing_state")) or state_label(state_code) or "[state]"
1250
+ return {
1251
+ "title": title.upper(),
1252
+ "subtitle": f"{one} and {two}",
1253
+ "sections": [
1254
+ (
1255
+ "1. Parties",
1256
+ [
1257
+ f"This {title} is entered into as of "
1258
+ f"{_blank(answers.get('effective_date'), 'effective date')} by "
1259
+ f"{one} of {_blank(answers.get('party_one_address'), 'address')} "
1260
+ f"and {two} of "
1261
+ f"{_blank(answers.get('party_two_address'), 'address')}.",
1262
+ ],
1263
+ ),
1264
+ (
1265
+ "2. Agreement",
1266
+ [_blank(answers.get("summary"), "what the parties agree to") + "."],
1267
+ ),
1268
+ (
1269
+ "3. Consideration",
1270
+ [
1271
+ "In exchange, the parties provide: "
1272
+ + (answers.get("consideration") or "[what is exchanged]")
1273
+ + ".",
1274
+ ],
1275
+ ),
1276
+ (
1277
+ "4. Governing Law",
1278
+ [f"This document is governed by the laws of {governing}."],
1279
+ ),
1280
+ (
1281
+ "5. Signatures",
1282
+ [
1283
+ "The parties may sign separate counterparts."
1284
+ if answers.get("signature_method") == "separate"
1285
+ else "The parties will print and sign this document.",
1286
+ DEMONSTRATION_NOTICE,
1287
+ ],
1288
+ ),
1289
+ ],
1290
+ }
1291
+
1292
+
1293
+ def render_document(
1294
+ slug: str, answers: dict[str, str], state_code: str | None = None
1295
+ ) -> dict[str, object]:
1296
+ """Render the preview body for one draft. Pure, offline, never filed."""
1297
+
1298
+ if slug == "non-disclosure-agreement":
1299
+ return _nda_document(answers, state_code)
1300
+ if slug == "llc-formation":
1301
+ return _llc_document(answers, state_code)
1302
+ if slug.startswith("order:"):
1303
+ return _order_document(slug, answers, state_code)
1304
+ return _generic_document(slug, answers, state_code)
1305
+
1306
+
1307
+ def _order_document(
1308
+ slug: str, answers: dict[str, str], state_code: str | None
1309
+ ) -> dict[str, object]:
1310
+ """The local preparation summary for a business filing service.
1311
+
1312
+ It is a worksheet, not a filing: no Secretary of State is contacted, no fee
1313
+ is paid and nothing is submitted anywhere.
1314
+ """
1315
+
1316
+ product = PRODUCT_BY_SLUG.get(slug)
1317
+ title = product.title if product else slug.split(":", 1)[-1].replace("-", " ").title()
1318
+ company = _blank(
1319
+ answers.get("company_name") or answers.get("name"), "company name"
1320
+ )
1321
+ formation = (
1322
+ state_label(answers.get(state_field_name(slug)))
1323
+ or state_label(answers.get("state_of_formation"))
1324
+ or state_label(state_code)
1325
+ or "[state]"
1326
+ )
1327
+ entity = answers.get("entity_type") or "[entity type]"
1328
+ designator = answers.get("custom_designator") or ""
1329
+ return {
1330
+ "title": f"{title.upper()} — LOCAL PREPARATION WORKSHEET",
1331
+ "subtitle": f"{company} · {entity} · {formation}",
1332
+ "sections": [
1333
+ (
1334
+ "1. Company",
1335
+ [
1336
+ f"Company name: {company}"
1337
+ + (f" (custom designator: {designator})" if designator else ""),
1338
+ f"Entity type: {entity}",
1339
+ f"State: {formation}",
1340
+ ],
1341
+ ),
1342
+ (
1343
+ "2. Contact",
1344
+ [
1345
+ f"Contact: {_blank(answers.get('contact_name'), 'contact name')}",
1346
+ f"Address: {_blank(answers.get('contact_address'), 'business address')}",
1347
+ answers.get("contact_notes") or "No additional notes.",
1348
+ ],
1349
+ ),
1350
+ ("3. Status", [NO_FILING_NOTICE, DEMONSTRATION_NOTICE]),
1351
+ ],
1352
+ }
tasks/legalnature/environment/reference/clone/backend/site_backend_integration.py ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generated, site-bound backend integration seam."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib
6
+ import json
7
+ import os
8
+ import sqlite3
9
+ from pathlib import Path
10
+ from typing import Any, Callable
11
+
12
+ from websitebench.local_clone_auth import LocalAuthStore
13
+ from websitebench.site_backend import (
14
+ SiteBackend,
15
+ load_runtime,
16
+ serve_jsonl,
17
+ validate_allowlist,
18
+ )
19
+
20
+
21
+ DEFAULT_RUNTIME_PATH = (
22
+ Path(__file__).resolve().parents[2] / "backend" / "runtime.json"
23
+ )
24
+ BRIDGE_DESCRIPTOR_PATH = (
25
+ Path(__file__).resolve().parents[2] / "backend" / "node-bridge.json"
26
+ )
27
+
28
+
29
+ def _declared_hook(
30
+ declaration: str | None,
31
+ ) -> Callable[[sqlite3.Connection], None] | None:
32
+ if declaration is None:
33
+ return None
34
+ module_name, function_name = declaration.split(":", 1)
35
+ module = importlib.import_module(module_name)
36
+ hook: Any = getattr(module, function_name, None)
37
+ if not callable(hook):
38
+ raise RuntimeError(f"declared backend hook is not callable: {declaration}")
39
+ actual = f"{hook.__module__}:{hook.__name__}"
40
+ if actual != declaration:
41
+ raise RuntimeError(
42
+ f"declared backend hook resolved as {actual!r}, expected {declaration!r}"
43
+ )
44
+ return hook
45
+
46
+
47
+ def open_site_services() -> tuple[SiteBackend, LocalAuthStore]:
48
+ """Open one bound database; never omit the site id for permanent auth."""
49
+
50
+ runtime_path = Path(
51
+ os.environ.get(
52
+ "WEBSITEBENCH_SITE_BACKEND_RUNTIME",
53
+ str(DEFAULT_RUNTIME_PATH),
54
+ )
55
+ ).resolve()
56
+ runtime = load_runtime(runtime_path)
57
+ migration_hook = _declared_hook(runtime.migration_hook)
58
+ seed_hook = _declared_hook(runtime.seed_hook)
59
+ deployed_database = os.environ.get(
60
+ "WEBSITEBENCH_SITE_BACKEND_DATABASE",
61
+ )
62
+ if deployed_database is None:
63
+ backend = SiteBackend.open(
64
+ runtime_path,
65
+ migration_hook=migration_hook,
66
+ seed_hook=seed_hook,
67
+ )
68
+ else:
69
+ database_path = Path(deployed_database).resolve()
70
+ if database_path.name != runtime.database_filename:
71
+ raise RuntimeError(
72
+ "deployed database filename does not match runtime contract"
73
+ )
74
+ backend = SiteBackend.open(
75
+ json.loads(runtime_path.read_text(encoding="utf-8")),
76
+ data_root=database_path.parent,
77
+ migration_hook=migration_hook,
78
+ seed_hook=seed_hook,
79
+ )
80
+ if backend.lifecycle.database_path != database_path:
81
+ raise RuntimeError(
82
+ "deployed database path does not match backend preflight"
83
+ )
84
+ backend.lifecycle.initialize()
85
+ auth = LocalAuthStore(
86
+ backend.lifecycle.database_path,
87
+ site_id=backend.config.site_id,
88
+ )
89
+ auth.ensure_schema()
90
+ return backend, auth
91
+
92
+
93
+ def run_stdio_bridge() -> None:
94
+ """Run only operations frozen in this site's descriptor."""
95
+
96
+ backend, auth = open_site_services()
97
+ descriptor = json.loads(BRIDGE_DESCRIPTOR_PATH.read_text(encoding="utf-8"))
98
+ allowed = validate_allowlist(
99
+ descriptor,
100
+ expected_site_id=backend.config.site_id,
101
+ )
102
+ serve_jsonl(backend, auth, allowed, sys.stdin, sys.stdout)
103
+
104
+
105
+ if __name__ == "__main__":
106
+ import argparse
107
+ import sys
108
+
109
+ parser = argparse.ArgumentParser(prog="websitebench-node-backend-bridge")
110
+ parser.add_argument("--stdio", action="store_true", required=True)
111
+ parser.parse_args()
112
+ run_stdio_bridge()
tasks/legalnature/environment/reference/clone/backend/store.py ADDED
@@ -0,0 +1,659 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """LegalNature offline clone — site persistence on the vendored backend.
2
+
3
+ Layering mirrors the repository's backend mandate:
4
+
5
+ * ``backend/runtime.json`` stays the only runtime contract (``migration_hook``
6
+ and ``seed_hook`` remain ``null``; this module owns and records the site's
7
+ own migrations in ``legalnature_schema_migrations``).
8
+ * ``websitebench.local_clone_auth.LocalAuthStore`` owns accounts, opaque
9
+ sessions, one-time verification challenges and the LOCAL_ONLY mail outbox.
10
+ Nothing here re-implements password hashing, code hashing or session
11
+ storage.
12
+ * ``websitebench.site_backend.SiteBackend`` owns the payment ledger. The
13
+ checkout adapter is ``local-sandbox`` only; the caller may choose a scenario
14
+ id, and every payment fact (owner, amount, currency, fingerprint) is derived
15
+ on the server.
16
+ * One bound SQLite file for ``site_id=legalnature`` holds all of it, and
17
+ :func:`reset` clears business plus library state in one transaction.
18
+
19
+ Ownership rule for drafts: a draft is owned by an account when one exists and
20
+ otherwise by the opaque browser session that created it. Session rotation
21
+ (sign-in, registration, password reset) re-keys anonymous drafts through the
22
+ store's rotation callback, and signing in claims them for the account. Every
23
+ read is filtered by the resolved owner, never by a client-supplied id.
24
+ """
25
+
26
+ from __future__ import annotations
27
+
28
+ import hashlib
29
+ import json
30
+ import re
31
+ import sqlite3
32
+ import threading
33
+ import time
34
+ from contextlib import closing
35
+ from pathlib import Path
36
+ from typing import Any
37
+
38
+ from websitebench.local_clone_auth import LocalAuthStore
39
+ from websitebench.site_backend import SiteBackend
40
+
41
+ from backend.catalog import PLANS, PRODUCT_BY_SLUG
42
+ from backend.site_backend_integration import open_site_services
43
+
44
+ SITE_ID = "legalnature"
45
+ CURRENCY = "USD"
46
+
47
+ # Synthetic local test numbers. They map to a sandbox scenario id and are
48
+ # discarded immediately: no card-like value is ever written to the database,
49
+ # to a log, or to a response.
50
+ SANDBOX_TEST_NUMBERS: tuple[tuple[str, str, str], ...] = (
51
+ ("4242424242424242", "sandbox-approved", "Approves the simulated payment"),
52
+ ("4000000000000002", "sandbox-declined", "Declines the simulated payment"),
53
+ ("4000000000009995", "sandbox-retry", "Returns a retryable simulated result"),
54
+ )
55
+ _NUMBER_TO_SCENARIO = {number: scenario for number, scenario, _ in SANDBOX_TEST_NUMBERS}
56
+ SCENARIO_IDS = frozenset(scenario for _, scenario, _ in SANDBOX_TEST_NUMBERS)
57
+
58
+ _PAYMENT_KEY_RE = re.compile(
59
+ r"(?i)(card|cc[-_]?(num|number|exp)|cvv|cvc|pan\b|iban|routing"
60
+ r"|account[-_]?number|expir|security[-_]?code|payment[-_]?(method|token)"
61
+ r"|stripe|bank)"
62
+ )
63
+
64
+
65
+ class PaymentFieldRejected(ValueError):
66
+ """A card/payment-like key reached a persistence path."""
67
+
68
+
69
+ def reject_payment_keys(payload: dict[str, Any]) -> None:
70
+ for key in payload:
71
+ if _PAYMENT_KEY_RE.search(str(key)):
72
+ raise PaymentFieldRejected(
73
+ f"payment-like field {key!r} is never persisted by this clone"
74
+ )
75
+
76
+
77
+ _MIGRATIONS: dict[str, str] = {
78
+ "0001_drafts": """
79
+ CREATE TABLE IF NOT EXISTS legalnature_drafts (
80
+ id INTEGER PRIMARY KEY,
81
+ draft_id TEXT NOT NULL UNIQUE,
82
+ session_digest TEXT NOT NULL,
83
+ account_id TEXT,
84
+ product_slug TEXT NOT NULL,
85
+ product_title TEXT NOT NULL,
86
+ kind TEXT NOT NULL CHECK (kind IN ('document', 'business')),
87
+ state_code TEXT,
88
+ status TEXT NOT NULL DEFAULT 'in-progress'
89
+ CHECK (status IN ('in-progress', 'complete')),
90
+ step_index INTEGER NOT NULL DEFAULT 0 CHECK (step_index >= 0),
91
+ answers_json TEXT NOT NULL DEFAULT '{}',
92
+ dismissed INTEGER NOT NULL DEFAULT 0 CHECK (dismissed IN (0, 1)),
93
+ created_at INTEGER NOT NULL,
94
+ updated_at INTEGER NOT NULL
95
+ );
96
+ CREATE INDEX IF NOT EXISTS idx_legalnature_drafts_session
97
+ ON legalnature_drafts (session_digest);
98
+ CREATE INDEX IF NOT EXISTS idx_legalnature_drafts_account
99
+ ON legalnature_drafts (account_id);
100
+ """,
101
+ "0002_subscriptions": """
102
+ CREATE TABLE IF NOT EXISTS legalnature_subscriptions (
103
+ id INTEGER PRIMARY KEY,
104
+ subscription_id TEXT NOT NULL UNIQUE,
105
+ account_id TEXT NOT NULL UNIQUE,
106
+ plan TEXT NOT NULL CHECK (plan IN ('annual', 'monthly')),
107
+ status TEXT NOT NULL DEFAULT 'active'
108
+ CHECK (status IN ('active', 'canceled')),
109
+ amount_minor INTEGER NOT NULL CHECK (amount_minor > 0),
110
+ currency TEXT NOT NULL,
111
+ payment_flow_id TEXT NOT NULL UNIQUE,
112
+ payment_attempt_id TEXT NOT NULL UNIQUE,
113
+ created_at INTEGER NOT NULL,
114
+ updated_at INTEGER NOT NULL
115
+ );
116
+ """,
117
+ }
118
+
119
+
120
+ _SERVICES_LOCK = threading.Lock()
121
+ _SERVICES: tuple[SiteBackend, LocalAuthStore] | None = None
122
+
123
+
124
+ def services() -> tuple[SiteBackend, LocalAuthStore]:
125
+ """Process-wide bound backend + auth pair, schema ensured."""
126
+
127
+ global _SERVICES
128
+ with _SERVICES_LOCK:
129
+ if _SERVICES is None:
130
+ backend, auth = open_site_services()
131
+ _ensure_business_schema(backend.lifecycle.database_path)
132
+ _SERVICES = (backend, auth)
133
+ return _SERVICES
134
+
135
+
136
+ def close_services() -> None:
137
+ global _SERVICES
138
+ with _SERVICES_LOCK:
139
+ _SERVICES = None
140
+
141
+
142
+ def auth_store() -> LocalAuthStore:
143
+ return services()[1]
144
+
145
+
146
+ def site_backend() -> SiteBackend:
147
+ return services()[0]
148
+
149
+
150
+ def database_path() -> Path:
151
+ return services()[0].lifecycle.database_path
152
+
153
+
154
+ def _connect(path: Path) -> sqlite3.Connection:
155
+ connection = sqlite3.connect(str(path), timeout=15)
156
+ connection.row_factory = sqlite3.Row
157
+ connection.execute("PRAGMA foreign_keys = ON")
158
+ connection.execute("PRAGMA busy_timeout = 5000")
159
+ return connection
160
+
161
+
162
+ def connect() -> sqlite3.Connection:
163
+ return _connect(database_path())
164
+
165
+
166
+ def _ensure_business_schema(path: Path) -> None:
167
+ with closing(_connect(path)) as connection, connection:
168
+ connection.execute(
169
+ """
170
+ CREATE TABLE IF NOT EXISTS legalnature_schema_migrations (
171
+ migration_id TEXT PRIMARY KEY,
172
+ applied_at INTEGER NOT NULL
173
+ )
174
+ """
175
+ )
176
+ applied = {
177
+ row["migration_id"]
178
+ for row in connection.execute(
179
+ "SELECT migration_id FROM legalnature_schema_migrations"
180
+ )
181
+ }
182
+ for migration_id, ddl in _MIGRATIONS.items():
183
+ if migration_id in applied:
184
+ continue
185
+ connection.executescript(ddl)
186
+ connection.execute(
187
+ "INSERT INTO legalnature_schema_migrations"
188
+ " (migration_id, applied_at) VALUES (?, ?)",
189
+ (migration_id, 0),
190
+ )
191
+
192
+
193
+ def applied_migrations() -> list[str]:
194
+ with closing(connect()) as connection:
195
+ return [
196
+ str(row["migration_id"])
197
+ for row in connection.execute(
198
+ "SELECT migration_id FROM legalnature_schema_migrations"
199
+ " ORDER BY migration_id"
200
+ )
201
+ ]
202
+
203
+
204
+ def reset() -> None:
205
+ """Delete every business, payment, mail and auth row atomically."""
206
+
207
+ backend, auth = services()
208
+
209
+ def _site_reset(connection: sqlite3.Connection) -> None:
210
+ connection.execute("DELETE FROM legalnature_subscriptions")
211
+ connection.execute("DELETE FROM legalnature_drafts")
212
+ backend.lifecycle.reset_embedded(connection, confirm_site_id=SITE_ID)
213
+
214
+ auth.reset_site_state(site_reset=_site_reset, seed_accounts=[])
215
+
216
+
217
+ def counts() -> dict[str, int]:
218
+ with closing(connect()) as connection:
219
+ return {
220
+ "drafts": int(
221
+ connection.execute(
222
+ "SELECT COUNT(*) FROM legalnature_drafts"
223
+ ).fetchone()[0]
224
+ ),
225
+ "subscriptions": int(
226
+ connection.execute(
227
+ "SELECT COUNT(*) FROM legalnature_subscriptions"
228
+ ).fetchone()[0]
229
+ ),
230
+ }
231
+
232
+
233
+ # ---------------------------------------------------------------------------
234
+ # ownership
235
+ # ---------------------------------------------------------------------------
236
+
237
+
238
+ class Owner:
239
+ """The resolved server-side owner for one request."""
240
+
241
+ __slots__ = ("session_digest", "account_id", "account")
242
+
243
+ def __init__(
244
+ self,
245
+ session_digest: str,
246
+ account_id: str | None,
247
+ account: dict[str, Any] | None,
248
+ ) -> None:
249
+ self.session_digest = session_digest
250
+ self.account_id = account_id
251
+ self.account = account
252
+
253
+ @property
254
+ def authenticated(self) -> bool:
255
+ return self.account_id is not None
256
+
257
+ @property
258
+ def display_name(self) -> str:
259
+ if self.account is None:
260
+ return ""
261
+ return str(self.account.get("display_name") or self.account.get("email_normalized"))
262
+
263
+ @property
264
+ def email(self) -> str:
265
+ return "" if self.account is None else str(self.account.get("email_normalized", ""))
266
+
267
+
268
+ def resolve_owner(session_token: str) -> Owner:
269
+ auth = auth_store()
270
+ digest = auth.session_owner_digest(session_token)
271
+ resolved = auth.resolve_session(session_token) or {}
272
+ account = resolved.get("account")
273
+ account_id = str(account["account_id"]) if account else None
274
+ return Owner(digest, account_id, account if isinstance(account, dict) else None)
275
+
276
+
277
+ def rotation_callback(
278
+ connection: sqlite3.Connection, old_digest: str, new_digest: str
279
+ ) -> None:
280
+ """Carry anonymous drafts across an auth session rotation."""
281
+
282
+ connection.execute(
283
+ "UPDATE legalnature_drafts SET session_digest = ? WHERE session_digest = ?",
284
+ (new_digest, old_digest),
285
+ )
286
+
287
+
288
+ def claim_drafts(session_digest: str, account_id: str) -> int:
289
+ """Bind drafts created before sign-in to the now-known account."""
290
+
291
+ with closing(connect()) as connection, connection:
292
+ cursor = connection.execute(
293
+ "UPDATE legalnature_drafts SET account_id = ?, updated_at = ?"
294
+ " WHERE session_digest = ? AND account_id IS NULL",
295
+ (account_id, _now(), session_digest),
296
+ )
297
+ return int(cursor.rowcount or 0)
298
+
299
+
300
+ def _now() -> int:
301
+ return int(time.time())
302
+
303
+
304
+ # ---------------------------------------------------------------------------
305
+ # drafts
306
+ # ---------------------------------------------------------------------------
307
+
308
+
309
+ def _draft_public(row: sqlite3.Row) -> dict[str, Any]:
310
+ return {
311
+ "draft_id": str(row["draft_id"]),
312
+ "product_slug": str(row["product_slug"]),
313
+ "product_title": str(row["product_title"]),
314
+ "kind": str(row["kind"]),
315
+ "state_code": row["state_code"],
316
+ "status": str(row["status"]),
317
+ "step_index": int(row["step_index"]),
318
+ "answers": json.loads(row["answers_json"]),
319
+ "dismissed": bool(row["dismissed"]),
320
+ "created_at": int(row["created_at"]),
321
+ "updated_at": int(row["updated_at"]),
322
+ "owned_by_account": row["account_id"] is not None,
323
+ }
324
+
325
+
326
+ def _owner_clause(owner: Owner) -> tuple[str, tuple[Any, ...]]:
327
+ if owner.account_id is not None:
328
+ return "account_id = ?", (owner.account_id,)
329
+ return "session_digest = ? AND account_id IS NULL", (owner.session_digest,)
330
+
331
+
332
+ def create_draft(
333
+ owner: Owner,
334
+ *,
335
+ product_slug: str,
336
+ state_code: str | None = None,
337
+ answers: dict[str, str] | None = None,
338
+ ) -> dict[str, Any]:
339
+ product = PRODUCT_BY_SLUG.get(product_slug)
340
+ if product is None:
341
+ raise KeyError(product_slug)
342
+ payload = dict(answers or {})
343
+ reject_payment_keys(payload)
344
+ now = _now()
345
+ kind = "business" if product.kind == "service" else "document"
346
+ with closing(connect()) as connection, connection:
347
+ cursor = connection.execute(
348
+ "INSERT INTO legalnature_drafts"
349
+ " (draft_id, session_digest, account_id, product_slug, product_title,"
350
+ " kind, state_code, status, step_index, answers_json, created_at,"
351
+ " updated_at)"
352
+ " VALUES ('', ?, ?, ?, ?, ?, ?, 'in-progress', 0, ?, ?, ?)",
353
+ (
354
+ owner.session_digest,
355
+ owner.account_id,
356
+ product.slug,
357
+ product.title,
358
+ kind,
359
+ state_code,
360
+ json.dumps(payload, sort_keys=True),
361
+ now,
362
+ now,
363
+ ),
364
+ )
365
+ row_id = int(cursor.lastrowid or 0)
366
+ draft_id = f"draft_{row_id:08d}"
367
+ connection.execute(
368
+ "UPDATE legalnature_drafts SET draft_id = ? WHERE id = ?",
369
+ (draft_id, row_id),
370
+ )
371
+ row = connection.execute(
372
+ "SELECT * FROM legalnature_drafts WHERE id = ?", (row_id,)
373
+ ).fetchone()
374
+ return _draft_public(row)
375
+
376
+
377
+ def get_draft(owner: Owner, draft_id: str) -> dict[str, Any] | None:
378
+ clause, params = _owner_clause(owner)
379
+ with closing(connect()) as connection:
380
+ row = connection.execute(
381
+ f"SELECT * FROM legalnature_drafts WHERE draft_id = ? AND {clause}",
382
+ (draft_id, *params),
383
+ ).fetchone()
384
+ return None if row is None else _draft_public(row)
385
+
386
+
387
+ def list_drafts(owner: Owner, *, include_complete: bool = True) -> list[dict[str, Any]]:
388
+ clause, params = _owner_clause(owner)
389
+ query = f"SELECT * FROM legalnature_drafts WHERE {clause}"
390
+ if not include_complete:
391
+ query += " AND status = 'in-progress'"
392
+ query += " ORDER BY updated_at DESC, id DESC"
393
+ with closing(connect()) as connection:
394
+ return [_draft_public(row) for row in connection.execute(query, params)]
395
+
396
+
397
+ def latest_active_draft(owner: Owner) -> dict[str, Any] | None:
398
+ clause, params = _owner_clause(owner)
399
+ with closing(connect()) as connection:
400
+ row = connection.execute(
401
+ f"SELECT * FROM legalnature_drafts WHERE {clause}"
402
+ " AND status = 'in-progress' AND dismissed = 0"
403
+ " ORDER BY updated_at DESC, id DESC LIMIT 1",
404
+ params,
405
+ ).fetchone()
406
+ return None if row is None else _draft_public(row)
407
+
408
+
409
+ def find_draft_for_product(
410
+ owner: Owner, product_slug: str
411
+ ) -> dict[str, Any] | None:
412
+ clause, params = _owner_clause(owner)
413
+ with closing(connect()) as connection:
414
+ row = connection.execute(
415
+ f"SELECT * FROM legalnature_drafts WHERE {clause}"
416
+ " AND product_slug = ? AND status = 'in-progress'"
417
+ " ORDER BY updated_at DESC, id DESC LIMIT 1",
418
+ (*params, product_slug),
419
+ ).fetchone()
420
+ return None if row is None else _draft_public(row)
421
+
422
+
423
+ def update_draft(
424
+ owner: Owner,
425
+ draft_id: str,
426
+ *,
427
+ answers: dict[str, str] | None = None,
428
+ step_index: int | None = None,
429
+ status: str | None = None,
430
+ state_code: str | None = None,
431
+ dismissed: bool | None = None,
432
+ ) -> dict[str, Any] | None:
433
+ if answers is not None:
434
+ reject_payment_keys(answers)
435
+ clause, params = _owner_clause(owner)
436
+ with closing(connect()) as connection, connection:
437
+ row = connection.execute(
438
+ f"SELECT * FROM legalnature_drafts WHERE draft_id = ? AND {clause}",
439
+ (draft_id, *params),
440
+ ).fetchone()
441
+ if row is None:
442
+ return None
443
+ assignments: list[str] = ["updated_at = ?"]
444
+ values: list[Any] = [_now()]
445
+ if answers is not None:
446
+ assignments.append("answers_json = ?")
447
+ values.append(json.dumps(answers, sort_keys=True))
448
+ if step_index is not None:
449
+ assignments.append("step_index = ?")
450
+ values.append(max(0, int(step_index)))
451
+ if status is not None:
452
+ if status not in {"in-progress", "complete"}:
453
+ raise ValueError("unknown draft status")
454
+ assignments.append("status = ?")
455
+ values.append(status)
456
+ if state_code is not None:
457
+ assignments.append("state_code = ?")
458
+ values.append(state_code)
459
+ if dismissed is not None:
460
+ assignments.append("dismissed = ?")
461
+ values.append(1 if dismissed else 0)
462
+ connection.execute(
463
+ f"UPDATE legalnature_drafts SET {', '.join(assignments)} WHERE id = ?",
464
+ (*values, int(row["id"])),
465
+ )
466
+ updated = connection.execute(
467
+ "SELECT * FROM legalnature_drafts WHERE id = ?", (int(row["id"]),)
468
+ ).fetchone()
469
+ return _draft_public(updated)
470
+
471
+
472
+ def delete_draft(owner: Owner, draft_id: str) -> bool:
473
+ clause, params = _owner_clause(owner)
474
+ with closing(connect()) as connection, connection:
475
+ cursor = connection.execute(
476
+ f"DELETE FROM legalnature_drafts WHERE draft_id = ? AND {clause}",
477
+ (draft_id, *params),
478
+ )
479
+ return bool(cursor.rowcount)
480
+
481
+
482
+ # ---------------------------------------------------------------------------
483
+ # subscription checkout — local-sandbox only
484
+ # ---------------------------------------------------------------------------
485
+
486
+
487
+ class CheckoutError(RuntimeError):
488
+ """The checkout request cannot be honoured as submitted."""
489
+
490
+
491
+ def scenario_for_test_number(raw: str) -> str | None:
492
+ """Map one documented synthetic number to a sandbox scenario id.
493
+
494
+ Anything else returns ``None`` so the caller can refuse it. Only the
495
+ scenario id continues; the submitted digits are never stored or logged.
496
+ """
497
+
498
+ digits = re.sub(r"[^0-9]", "", raw or "")
499
+ return _NUMBER_TO_SCENARIO.get(digits)
500
+
501
+
502
+ def _plan_facts(account_id: str, plan: str) -> dict[str, Any]:
503
+ spec = PLANS.get(plan)
504
+ if spec is None:
505
+ raise CheckoutError("unknown subscription plan")
506
+ amount_minor = int(spec["amount_minor"])
507
+ snapshot = {
508
+ "site_id": SITE_ID,
509
+ "plan": plan,
510
+ "account_id": account_id,
511
+ "amount_minor": amount_minor,
512
+ "currency": CURRENCY,
513
+ }
514
+ canonical = json.dumps(
515
+ snapshot, ensure_ascii=False, sort_keys=True, separators=(",", ":")
516
+ )
517
+ return {
518
+ "owner": f"account:{account_id}",
519
+ "amount_minor": amount_minor,
520
+ "currency": CURRENCY,
521
+ "fingerprint": hashlib.sha256(canonical.encode("utf-8")).hexdigest(),
522
+ }
523
+
524
+
525
+ def subscription_for(account_id: str) -> dict[str, Any] | None:
526
+ with closing(connect()) as connection:
527
+ row = connection.execute(
528
+ "SELECT * FROM legalnature_subscriptions WHERE account_id = ?",
529
+ (account_id,),
530
+ ).fetchone()
531
+ if row is None:
532
+ return None
533
+ return {
534
+ "subscription_id": str(row["subscription_id"]),
535
+ "plan": str(row["plan"]),
536
+ "status": str(row["status"]),
537
+ "amount_minor": int(row["amount_minor"]),
538
+ "currency": str(row["currency"]),
539
+ "created_at": int(row["created_at"]),
540
+ }
541
+
542
+
543
+ def pay_for_subscription(account_id: str, plan: str, scenario_id: str) -> dict[str, Any]:
544
+ """Run one local-sandbox attempt and, on approval, open the subscription.
545
+
546
+ The scenario id is the only client-chosen input. Owner, amount, currency
547
+ and fingerprint are derived here; a mismatch is rejected by the ledger.
548
+ """
549
+
550
+ if scenario_id not in SCENARIO_IDS:
551
+ raise CheckoutError("unknown local payment scenario")
552
+ existing = subscription_for(account_id)
553
+ if existing is not None and existing["status"] == "active":
554
+ return {"status": "ALREADY_ACTIVE", "subscription": existing}
555
+
556
+ backend = site_backend()
557
+ facts = _plan_facts(account_id, plan)
558
+ now = _now()
559
+ attempt_key = f"legalnature.attempt:{account_id}:{plan}:{scenario_id}:{now}"
560
+ with backend.lifecycle.connection(transaction=True) as connection:
561
+ flow = backend.payments.create_intent(
562
+ owner=facts["owner"],
563
+ amount_minor=facts["amount_minor"],
564
+ currency=facts["currency"],
565
+ fingerprint=facts["fingerprint"],
566
+ idempotency_key=f"legalnature.flow:{account_id}:{plan}",
567
+ connection=connection,
568
+ )
569
+ if flow["status"] == "CONSUMED":
570
+ raise CheckoutError("this subscription was already paid for")
571
+ attempt = backend.payments.attempt(
572
+ flow_id=flow["flow_id"],
573
+ owner=facts["owner"],
574
+ amount_minor=facts["amount_minor"],
575
+ currency=facts["currency"],
576
+ fingerprint=facts["fingerprint"],
577
+ scenario_id=scenario_id,
578
+ idempotency_key=attempt_key[:200],
579
+ connection=connection,
580
+ )
581
+ if attempt["status"] != "APPROVED":
582
+ return {
583
+ "status": attempt["status"],
584
+ "flow_id": flow["flow_id"],
585
+ "attempt_id": attempt["attempt_id"],
586
+ "amount_minor": facts["amount_minor"],
587
+ "currency": facts["currency"],
588
+ "is_simulation": True,
589
+ }
590
+ consumed = backend.payments.consume_approval(
591
+ connection,
592
+ flow_id=flow["flow_id"],
593
+ owner=facts["owner"],
594
+ amount_minor=facts["amount_minor"],
595
+ currency=facts["currency"],
596
+ fingerprint=facts["fingerprint"],
597
+ )
598
+ cursor = connection.execute(
599
+ "INSERT INTO legalnature_subscriptions"
600
+ " (subscription_id, account_id, plan, status, amount_minor, currency,"
601
+ " payment_flow_id, payment_attempt_id, created_at, updated_at)"
602
+ " VALUES ('', ?, ?, 'active', ?, ?, ?, ?, ?, ?)",
603
+ (
604
+ account_id,
605
+ plan,
606
+ facts["amount_minor"],
607
+ facts["currency"],
608
+ flow["flow_id"],
609
+ consumed["attempt_id"],
610
+ now,
611
+ now,
612
+ ),
613
+ )
614
+ row_id = int(cursor.lastrowid or 0)
615
+ connection.execute(
616
+ "UPDATE legalnature_subscriptions SET subscription_id = ? WHERE id = ?",
617
+ (f"sub_{row_id:08d}", row_id),
618
+ )
619
+ return {
620
+ "status": "APPROVED",
621
+ "flow_id": flow["flow_id"],
622
+ "attempt_id": consumed["attempt_id"],
623
+ "amount_minor": facts["amount_minor"],
624
+ "currency": facts["currency"],
625
+ "is_simulation": True,
626
+ "subscription": subscription_for(account_id),
627
+ }
628
+
629
+
630
+ def cancel_subscription(account_id: str) -> bool:
631
+ with closing(connect()) as connection, connection:
632
+ cursor = connection.execute(
633
+ "UPDATE legalnature_subscriptions SET status = 'canceled', updated_at = ?"
634
+ " WHERE account_id = ? AND status = 'active'",
635
+ (_now(), account_id),
636
+ )
637
+ return bool(cursor.rowcount)
638
+
639
+
640
+ def payment_history(account_id: str) -> list[dict[str, Any]]:
641
+ """Read-only ledger view for the dashboard. No card data exists to show."""
642
+
643
+ with closing(connect()) as connection:
644
+ rows = connection.execute(
645
+ "SELECT scenario_id, status, amount_minor, currency, created_at"
646
+ " FROM websitebench_payment_attempts"
647
+ " WHERE site_id = ? AND owner = ? ORDER BY created_at DESC, rowid DESC",
648
+ (SITE_ID, f"account:{account_id}"),
649
+ ).fetchall()
650
+ return [
651
+ {
652
+ "scenario_id": str(row["scenario_id"]),
653
+ "status": str(row["status"]),
654
+ "amount_minor": int(row["amount_minor"]),
655
+ "currency": str(row["currency"]),
656
+ "created_at": str(row["created_at"]),
657
+ }
658
+ for row in rows
659
+ ]
tasks/legalnature/environment/reference/clone/data/site/assets.json ADDED
@@ -0,0 +1,393 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "capture_id": "2026-08-21.legalnature-full-site-r1",
3
+ "map": {
4
+ "https://cdn.buttercms.com/0FMR3zYOR0ODxyLmYapM": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/0FMR3zYOR0ODxyLmYapM.svg",
5
+ "https://cdn.buttercms.com/0o3MrbKDRBqebRMXOleB": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/0o3MrbKDRBqebRMXOleB.webp",
6
+ "https://cdn.buttercms.com/0tnkccwzQwe8u9NUq54z": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/0tnkccwzQwe8u9NUq54z.svg",
7
+ "https://cdn.buttercms.com/1EPPn99dSQeUIw0v1GSl": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/1EPPn99dSQeUIw0v1GSl.webp",
8
+ "https://cdn.buttercms.com/1S2UAGWBRSungRTG633e": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/1S2UAGWBRSungRTG633e.webp",
9
+ "https://cdn.buttercms.com/22DPaEdARpep3tUlVkmb": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/22DPaEdARpep3tUlVkmb.webp",
10
+ "https://cdn.buttercms.com/36XNz0xiR7qmypj2GJDa": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/36XNz0xiR7qmypj2GJDa.png",
11
+ "https://cdn.buttercms.com/3dwQsitCSZSKTfE23GHF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/3dwQsitCSZSKTfE23GHF.webp",
12
+ "https://cdn.buttercms.com/4CybDQywTUCemf44bzmD": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/4CybDQywTUCemf44bzmD.webp",
13
+ "https://cdn.buttercms.com/4JhltRC3RYyZNMKZjTbV": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/4JhltRC3RYyZNMKZjTbV.svg",
14
+ "https://cdn.buttercms.com/4Qod3zyT9io0Nw88Fu7n": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/4Qod3zyT9io0Nw88Fu7n.webp",
15
+ "https://cdn.buttercms.com/4gTyYdHaQiCXc7gzUtp0": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/4gTyYdHaQiCXc7gzUtp0.webp",
16
+ "https://cdn.buttercms.com/5GjxrbUTgCVRzA65wXdI": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/5GjxrbUTgCVRzA65wXdI.jpg",
17
+ "https://cdn.buttercms.com/65of5Qc7TdW2r6IRkkMO": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/65of5Qc7TdW2r6IRkkMO.jpg",
18
+ "https://cdn.buttercms.com/6GtAMLPAQ5uv8szTnTgE": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/6GtAMLPAQ5uv8szTnTgE.webp",
19
+ "https://cdn.buttercms.com/6OuQZuyDT3i9fyfohFZA": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/6OuQZuyDT3i9fyfohFZA.webp",
20
+ "https://cdn.buttercms.com/6igwSFyT8ysoDMATIu1V": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/6igwSFyT8ysoDMATIu1V.webp",
21
+ "https://cdn.buttercms.com/7UE7YzcRzuOuY75weq90": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/7UE7YzcRzuOuY75weq90.webp",
22
+ "https://cdn.buttercms.com/7zhiTsK6Sx2GthS98h5O": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/7zhiTsK6Sx2GthS98h5O.webp",
23
+ "https://cdn.buttercms.com/8u8aAPWTie9XDbjZi9wG": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/8u8aAPWTie9XDbjZi9wG.svg",
24
+ "https://cdn.buttercms.com/9Tre9m8QcSAgnhg7DlTQ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/9Tre9m8QcSAgnhg7DlTQ.webp",
25
+ "https://cdn.buttercms.com/9XjrSCT3SqKbOVYYKZCI": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/9XjrSCT3SqKbOVYYKZCI.webp",
26
+ "https://cdn.buttercms.com/9acWLm0YSqm2zHepJK5w": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/9acWLm0YSqm2zHepJK5w.webp",
27
+ "https://cdn.buttercms.com/9cUsIxRT9yGZ5GOJJMQP": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/9cUsIxRT9yGZ5GOJJMQP.webp",
28
+ "https://cdn.buttercms.com/9l3cIaSRBKs0XVzOPVNs": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/9l3cIaSRBKs0XVzOPVNs.png",
29
+ "https://cdn.buttercms.com/AkV0RhCyQAmgT0d03jNo": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/AkV0RhCyQAmgT0d03jNo.webp",
30
+ "https://cdn.buttercms.com/AxgW4MKERrqlUMXqWfmH": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/AxgW4MKERrqlUMXqWfmH.svg",
31
+ "https://cdn.buttercms.com/BNol2pKATfqEH7RyvPw8": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/BNol2pKATfqEH7RyvPw8.webp",
32
+ "https://cdn.buttercms.com/BoL1uowZS86ImNtGAwG8": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/BoL1uowZS86ImNtGAwG8.webp",
33
+ "https://cdn.buttercms.com/C8HmatqfRfW7419oAziF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/C8HmatqfRfW7419oAziF.webp",
34
+ "https://cdn.buttercms.com/CJx8qsDOR16xXuUd0qh2": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/CJx8qsDOR16xXuUd0qh2.webp",
35
+ "https://cdn.buttercms.com/CM9UE9bRySKbDA0pie2a": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/CM9UE9bRySKbDA0pie2a.webp",
36
+ "https://cdn.buttercms.com/CqfY7MbxRmAwOCE6TmWt": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/CqfY7MbxRmAwOCE6TmWt.jpg",
37
+ "https://cdn.buttercms.com/CsWNQS9QPyzyP504ezCg": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/CsWNQS9QPyzyP504ezCg.webp",
38
+ "https://cdn.buttercms.com/D6YNv7YSu21Gsn3eqh2U": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/D6YNv7YSu21Gsn3eqh2U.webp",
39
+ "https://cdn.buttercms.com/DMoY7A92SPKaFY48sNo3": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/DMoY7A92SPKaFY48sNo3.png",
40
+ "https://cdn.buttercms.com/EvwtzTGHQIavRJTxDStR": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/EvwtzTGHQIavRJTxDStR.png",
41
+ "https://cdn.buttercms.com/FglpIlPS3SnhnP1h061k": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/FglpIlPS3SnhnP1h061k.webp",
42
+ "https://cdn.buttercms.com/Fp1oStlzSSiUFaW7bUsV": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Fp1oStlzSSiUFaW7bUsV.webp",
43
+ "https://cdn.buttercms.com/Fw3au8AS5SDCD0fZHtRw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Fw3au8AS5SDCD0fZHtRw.png",
44
+ "https://cdn.buttercms.com/GCDlIeEKTmSIVHM9x7IU": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/GCDlIeEKTmSIVHM9x7IU.webp",
45
+ "https://cdn.buttercms.com/GMleKvDtRJ2R6kBuKtXF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/GMleKvDtRJ2R6kBuKtXF.webp",
46
+ "https://cdn.buttercms.com/Gqu7Fs8ERnWKOmMC55er": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Gqu7Fs8ERnWKOmMC55er.webp",
47
+ "https://cdn.buttercms.com/H3X19crYRZ62ozqb2lb7": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/H3X19crYRZ62ozqb2lb7.webp",
48
+ "https://cdn.buttercms.com/HtxRFxJYRmy0n91l6bB6": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/HtxRFxJYRmy0n91l6bB6.webp",
49
+ "https://cdn.buttercms.com/I9gwW3NxQDK2GB0ytbTw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/I9gwW3NxQDK2GB0ytbTw.webp",
50
+ "https://cdn.buttercms.com/Ic9k5dDgQJOEVrioxFvY": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Ic9k5dDgQJOEVrioxFvY.webp",
51
+ "https://cdn.buttercms.com/JM9HVm2ESjyKoBSoiCHO": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/JM9HVm2ESjyKoBSoiCHO.webp",
52
+ "https://cdn.buttercms.com/KB1RDsLKQDSuoB3zepw2": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/KB1RDsLKQDSuoB3zepw2.webp",
53
+ "https://cdn.buttercms.com/KMhfSQiLQJKl7McSqn3W": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/KMhfSQiLQJKl7McSqn3W.webp",
54
+ "https://cdn.buttercms.com/KNNc9IASFCQ3afFwGrgf": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/KNNc9IASFCQ3afFwGrgf.webp",
55
+ "https://cdn.buttercms.com/LG0zYpgYSN6e16lNr0Bv": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/LG0zYpgYSN6e16lNr0Bv.svg",
56
+ "https://cdn.buttercms.com/LPCiWeGWTkadHDbsHzPt": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/LPCiWeGWTkadHDbsHzPt.webp",
57
+ "https://cdn.buttercms.com/LhrTU7fGSsQC3uiMj6by": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/LhrTU7fGSsQC3uiMj6by.png",
58
+ "https://cdn.buttercms.com/N9DmPbqeSCuc0NMxiJIu": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/N9DmPbqeSCuc0NMxiJIu.png",
59
+ "https://cdn.buttercms.com/OZGSloxSteZL1v3NTiEg": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/OZGSloxSteZL1v3NTiEg.webp",
60
+ "https://cdn.buttercms.com/OiW7KD59RvCPlujpi0xH": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/OiW7KD59RvCPlujpi0xH.webp",
61
+ "https://cdn.buttercms.com/OiwzgqgRGmFSitXOyFvQ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/OiwzgqgRGmFSitXOyFvQ.webp",
62
+ "https://cdn.buttercms.com/OkfoVjmKTDqajRwCMhXF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/OkfoVjmKTDqajRwCMhXF.webp",
63
+ "https://cdn.buttercms.com/OlwQGQM6RkSZkaUc6Yf2": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/OlwQGQM6RkSZkaUc6Yf2.webp",
64
+ "https://cdn.buttercms.com/P3EyUymMSwOw1UZ4bXhJ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/P3EyUymMSwOw1UZ4bXhJ.webp",
65
+ "https://cdn.buttercms.com/P58RVZFaQje5sgV2yR7o": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/P58RVZFaQje5sgV2yR7o.webp",
66
+ "https://cdn.buttercms.com/PCVo7cM9SaOndzViW9gQ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/PCVo7cM9SaOndzViW9gQ.jpg",
67
+ "https://cdn.buttercms.com/PnITQmS1QySaxhoFGRBu": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/PnITQmS1QySaxhoFGRBu.webp",
68
+ "https://cdn.buttercms.com/PsnvCjbIRraplygkQcRy": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/PsnvCjbIRraplygkQcRy.webp",
69
+ "https://cdn.buttercms.com/Q4ReNzUxSzCiLWCdQec8": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Q4ReNzUxSzCiLWCdQec8.webp",
70
+ "https://cdn.buttercms.com/QAytVSSYyYUdpUG9Jb4w": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/QAytVSSYyYUdpUG9Jb4w.webp",
71
+ "https://cdn.buttercms.com/QnRRCAuLR16oWev63Awa": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/QnRRCAuLR16oWev63Awa.webp",
72
+ "https://cdn.buttercms.com/R8WCIvImTeOdZDRoNS7F": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/R8WCIvImTeOdZDRoNS7F.webp",
73
+ "https://cdn.buttercms.com/RELQN4QlOLsqRAsVM6jg": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/RELQN4QlOLsqRAsVM6jg.webp",
74
+ "https://cdn.buttercms.com/RUqJSpSQpCv36HotnCXl": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/RUqJSpSQpCv36HotnCXl.png",
75
+ "https://cdn.buttercms.com/RWTmTCqQvKMz7w9KbzCn": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/RWTmTCqQvKMz7w9KbzCn.webp",
76
+ "https://cdn.buttercms.com/SRzpTIxHSpuvItZurEPF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/SRzpTIxHSpuvItZurEPF.webp",
77
+ "https://cdn.buttercms.com/T79WMnVRTmunAhZG2JOm": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/T79WMnVRTmunAhZG2JOm.webp",
78
+ "https://cdn.buttercms.com/T7axij2zRjR2dcnHShNe": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/T7axij2zRjR2dcnHShNe.webp",
79
+ "https://cdn.buttercms.com/T8K6NFjySKKgihk643Fu": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/T8K6NFjySKKgihk643Fu.webp",
80
+ "https://cdn.buttercms.com/TR3x4o34RYm24g3c1nyl": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/TR3x4o34RYm24g3c1nyl.webp",
81
+ "https://cdn.buttercms.com/U7wFEZ0zRkKjwz2EEy9F": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/U7wFEZ0zRkKjwz2EEy9F.webp",
82
+ "https://cdn.buttercms.com/URZCgFCdSxy44sCzQFt6": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/URZCgFCdSxy44sCzQFt6.webp",
83
+ "https://cdn.buttercms.com/URrNm2g2QGWt0duXJPke": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/URrNm2g2QGWt0duXJPke.webp",
84
+ "https://cdn.buttercms.com/UWOCk3v1T5C0WfFbHY1c": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/UWOCk3v1T5C0WfFbHY1c.webp",
85
+ "https://cdn.buttercms.com/UuLMexy7RAy3AHs1i9Si": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/UuLMexy7RAy3AHs1i9Si.webp",
86
+ "https://cdn.buttercms.com/V2ln32GwQUirZdFhJNCO": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/V2ln32GwQUirZdFhJNCO.png",
87
+ "https://cdn.buttercms.com/VDkrvUpeQueAS34HsHaz": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/VDkrvUpeQueAS34HsHaz.svg",
88
+ "https://cdn.buttercms.com/VYfGPpt8Rw6obLnnAkKX": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/VYfGPpt8Rw6obLnnAkKX.bmp",
89
+ "https://cdn.buttercms.com/W7lS0hUwRxKGP68Nkfme": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/W7lS0hUwRxKGP68Nkfme.webp",
90
+ "https://cdn.buttercms.com/WbTKe46dQbenMalFbg5K": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/WbTKe46dQbenMalFbg5K.webp",
91
+ "https://cdn.buttercms.com/WsR1UcrR6iptYDoPAhWQ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/WsR1UcrR6iptYDoPAhWQ.webp",
92
+ "https://cdn.buttercms.com/Wv1haPSStW3LoW4CdfcN": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Wv1haPSStW3LoW4CdfcN.webp",
93
+ "https://cdn.buttercms.com/XKFubZxZSlCoJfIL07nb": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/XKFubZxZSlCoJfIL07nb.webp",
94
+ "https://cdn.buttercms.com/XS1arXIxQLS7sjXCqd6N": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/XS1arXIxQLS7sjXCqd6N.webp",
95
+ "https://cdn.buttercms.com/YfzVl6ihQvuww28eH2Vg": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/YfzVl6ihQvuww28eH2Vg.webp",
96
+ "https://cdn.buttercms.com/Yp4gntG3QNqE1258h30A": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Yp4gntG3QNqE1258h30A.webp",
97
+ "https://cdn.buttercms.com/Yxpfj6pR4iZi2GCXtgGw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Yxpfj6pR4iZi2GCXtgGw.webp",
98
+ "https://cdn.buttercms.com/Z72mSCBfQTOeV0w1Qff3": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/Z72mSCBfQTOeV0w1Qff3.png",
99
+ "https://cdn.buttercms.com/ZDjGIae1TqyahTNnRnJP": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ZDjGIae1TqyahTNnRnJP.webp",
100
+ "https://cdn.buttercms.com/a1lNTqXsQmG67x3X6oHk": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/a1lNTqXsQmG67x3X6oHk.webp",
101
+ "https://cdn.buttercms.com/aOz8TGfwRgSnqlbe8XUr": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/aOz8TGfwRgSnqlbe8XUr.webp",
102
+ "https://cdn.buttercms.com/agkdeoVXS3mOKH4G6xpL": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/agkdeoVXS3mOKH4G6xpL.webp",
103
+ "https://cdn.buttercms.com/ao2pgog1SQ6GJ1S5HEan": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ao2pgog1SQ6GJ1S5HEan.webp",
104
+ "https://cdn.buttercms.com/bnZNBcwVQ9PAXrpm6NqY": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/bnZNBcwVQ9PAXrpm6NqY.webp",
105
+ "https://cdn.buttercms.com/c8Om4OEQoeZa3fdrteXw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/c8Om4OEQoeZa3fdrteXw.webp",
106
+ "https://cdn.buttercms.com/cSs7O2aQWelzuT5pwuIF": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/cSs7O2aQWelzuT5pwuIF.jpg",
107
+ "https://cdn.buttercms.com/dVSPP62S0SinjS1e5CS7": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/dVSPP62S0SinjS1e5CS7.webp",
108
+ "https://cdn.buttercms.com/dtYlZiwTxeFxRtkgzwJI": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/dtYlZiwTxeFxRtkgzwJI.webp",
109
+ "https://cdn.buttercms.com/eJPbzftxQJmbTSHnmDtQ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/eJPbzftxQJmbTSHnmDtQ.webp",
110
+ "https://cdn.buttercms.com/ePtOMJ7RqCQXmZ7j2Hlv": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ePtOMJ7RqCQXmZ7j2Hlv.webp",
111
+ "https://cdn.buttercms.com/eWxQO2Qeazye5V0L0T2g": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/eWxQO2Qeazye5V0L0T2g.webp",
112
+ "https://cdn.buttercms.com/gOJ28Hb0SJS1q37fy0pL": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/gOJ28Hb0SJS1q37fy0pL.webp",
113
+ "https://cdn.buttercms.com/hK8HbNzKRBKXf6Yh2pxO": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/hK8HbNzKRBKXf6Yh2pxO.jpg",
114
+ "https://cdn.buttercms.com/hv4MQ4WRC2ABRUtpWYnw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/hv4MQ4WRC2ABRUtpWYnw.webp",
115
+ "https://cdn.buttercms.com/iCkSdQABQJeFMeyoputI": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/iCkSdQABQJeFMeyoputI.webp",
116
+ "https://cdn.buttercms.com/iVvTx1uuSfmO9zaGkRRE": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/iVvTx1uuSfmO9zaGkRRE.webp",
117
+ "https://cdn.buttercms.com/ihfdsyofQ8CNRydNkgwD": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ihfdsyofQ8CNRydNkgwD.webp",
118
+ "https://cdn.buttercms.com/jLROIjTaRp29wdj98SVA": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/jLROIjTaRp29wdj98SVA.webp",
119
+ "https://cdn.buttercms.com/jS4ErI8fS9u4LmLALuhz": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/jS4ErI8fS9u4LmLALuhz.jpg",
120
+ "https://cdn.buttercms.com/jkDm745CSPWcFaiL97v8": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/jkDm745CSPWcFaiL97v8.webp",
121
+ "https://cdn.buttercms.com/jypXlTa3RM6DD8BLtcpA": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/jypXlTa3RM6DD8BLtcpA.webp",
122
+ "https://cdn.buttercms.com/kaGRzpN0S6qQMo7gul9X": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kaGRzpN0S6qQMo7gul9X.webp",
123
+ "https://cdn.buttercms.com/kd4JiUI6TI2l3xhBmWYk": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kd4JiUI6TI2l3xhBmWYk.webp",
124
+ "https://cdn.buttercms.com/kxT1kLvsSQq88tabM64B": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kxT1kLvsSQq88tabM64B.webp",
125
+ "https://cdn.buttercms.com/lhMk0wZFSqJ47gNMUgbf": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/lhMk0wZFSqJ47gNMUgbf.webp",
126
+ "https://cdn.buttercms.com/m56cWgQyQdOePh7HgAHw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/m56cWgQyQdOePh7HgAHw.webp",
127
+ "https://cdn.buttercms.com/mIZCgJYiTIqUMdIuh1tq": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/mIZCgJYiTIqUMdIuh1tq.webp",
128
+ "https://cdn.buttercms.com/mnyCTeEiTzWxyT7tqNvr": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/mnyCTeEiTzWxyT7tqNvr.webp",
129
+ "https://cdn.buttercms.com/nHWJkm0uTMRalYxbW7k5": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/nHWJkm0uTMRalYxbW7k5.webp",
130
+ "https://cdn.buttercms.com/nOWgU1KBQO2izxoC8gJg": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/nOWgU1KBQO2izxoC8gJg.webp",
131
+ "https://cdn.buttercms.com/nP9ko6K4Q9G7ky2Blw49": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/nP9ko6K4Q9G7ky2Blw49.webp",
132
+ "https://cdn.buttercms.com/nsk4CUAXRC2hDceOQ3Sf": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/nsk4CUAXRC2hDceOQ3Sf.webp",
133
+ "https://cdn.buttercms.com/oc4Fkd2tQumyGjEVWN1M": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/oc4Fkd2tQumyGjEVWN1M.png",
134
+ "https://cdn.buttercms.com/pU6YbKviRNCy5AWrPIuR": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/pU6YbKviRNCy5AWrPIuR.webp",
135
+ "https://cdn.buttercms.com/phF2nmuWTeGCpVV8DNTJ": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/phF2nmuWTeGCpVV8DNTJ.webp",
136
+ "https://cdn.buttercms.com/pyorXnubTxWwc2lMQCCu": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/pyorXnubTxWwc2lMQCCu.webp",
137
+ "https://cdn.buttercms.com/qNm1u3mlQzG20iVwOPig": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/qNm1u3mlQzG20iVwOPig.webp",
138
+ "https://cdn.buttercms.com/qP8Gw7zETKij8NV5I0uD": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/qP8Gw7zETKij8NV5I0uD.svg",
139
+ "https://cdn.buttercms.com/qdIioWVASs6NJ3Ds3BN8": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/qdIioWVASs6NJ3Ds3BN8.jpg",
140
+ "https://cdn.buttercms.com/qlZTgRjMR2utO0sOGGnC": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/qlZTgRjMR2utO0sOGGnC.webp",
141
+ "https://cdn.buttercms.com/rLkTHKSQS0GqtNYcGwVc": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/rLkTHKSQS0GqtNYcGwVc.webp",
142
+ "https://cdn.buttercms.com/rYUGL4RmuZSERUse3wSN": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/rYUGL4RmuZSERUse3wSN.svg",
143
+ "https://cdn.buttercms.com/tjPz8qtpS72TQBtUfGd4": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/tjPz8qtpS72TQBtUfGd4.webp",
144
+ "https://cdn.buttercms.com/tr8U2UvRGOJZpHezQ5cL": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/tr8U2UvRGOJZpHezQ5cL.webp",
145
+ "https://cdn.buttercms.com/trR4asSQSa6nHAIdm3qe": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/trR4asSQSa6nHAIdm3qe.webp",
146
+ "https://cdn.buttercms.com/tt3G90mR9CgiWEXm3I7w": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/tt3G90mR9CgiWEXm3I7w.webp",
147
+ "https://cdn.buttercms.com/u2Pzq1j9TrBVxRRtm2BA": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/u2Pzq1j9TrBVxRRtm2BA.webp",
148
+ "https://cdn.buttercms.com/ugslk7fvSZqyCPomhjha": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ugslk7fvSZqyCPomhjha.webp",
149
+ "https://cdn.buttercms.com/vCONdGcBSmqSKduQw7D0": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/vCONdGcBSmqSKduQw7D0.png",
150
+ "https://cdn.buttercms.com/vQexk31aT5SG5IzreIop": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/vQexk31aT5SG5IzreIop.webp",
151
+ "https://cdn.buttercms.com/vvY6nYrRDGmNquLRwpTw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/vvY6nYrRDGmNquLRwpTw.webp",
152
+ "https://cdn.buttercms.com/wS4R71LSjuvXJXbFNTSw": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/wS4R71LSjuvXJXbFNTSw.webp",
153
+ "https://cdn.buttercms.com/wjGQiSY9TDWhL85d4RAN": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/wjGQiSY9TDWhL85d4RAN.webp",
154
+ "https://cdn.buttercms.com/wvu1viERDKDVE38dPvhD": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/wvu1viERDKDVE38dPvhD.webp",
155
+ "https://cdn.buttercms.com/x8BKlcuXSXGQEiljbEPe": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/x8BKlcuXSXGQEiljbEPe.webp",
156
+ "https://cdn.buttercms.com/xDNrwfyISDKqPlqPsjfc": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/xDNrwfyISDKqPlqPsjfc.svg",
157
+ "https://cdn.buttercms.com/xWHaKSuVQeSFYlrKhMre": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/xWHaKSuVQeSFYlrKhMre.webp",
158
+ "https://cdn.buttercms.com/xorsJrDS4WXw8wn4Cyux": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/xorsJrDS4WXw8wn4Cyux.jpg",
159
+ "https://cdn.buttercms.com/yDpSBRk8Sv6MXWIdGX9W": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/yDpSBRk8Sv6MXWIdGX9W.webp",
160
+ "https://cdn.buttercms.com/ysvEJklSjKUm2KV0Rga1": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/ysvEJklSjKUm2KV0Rga1.webp",
161
+ "https://cdn.buttercms.com/zrOIbDubRLW1NfWey3qD": "/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/zrOIbDubRLW1NfWey3qD.webp",
162
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/3OCf5FGaSraEbMtdtMq4": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/3OCf5FGaSraEbMtdtMq4.webp",
163
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/9XjrSCT3SqKbOVYYKZCI": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/9XjrSCT3SqKbOVYYKZCI.webp",
164
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOA%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOA-Preview-Desktop.webp",
165
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-D.webp",
166
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-M.webp",
167
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI%20preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-preview-Desktop.webp",
168
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-Desktop.webp",
169
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-M.webp",
170
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Advance%20Healthcare%20Directive%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Advance-Healthcare-Directive-Preview-D.webp",
171
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff%20Heirship%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Heirship-Preview-Desktop.webp",
172
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff%20Marriage%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Marriage-Preview-D.webp",
173
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff%20Marriage%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Marriage-Preview-Desktop.webp",
174
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff%20Marriage%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Marriage-Preview-M.webp",
175
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Affidavit%20Domicile%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Affidavit-Domicile-Preview-Desktop.webp",
176
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Affidavit%20Domicile%20Preview%20Mobile": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Affidavit-Domicile-Preview-Mobile.webp",
177
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Articles%20Amend%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Articles-Amend-Preview-D.webp",
178
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Bill%20of%20Sale%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Bill-of-Sale-Preview-D.webp",
179
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Bill%20of%20Sale%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Bill-of-Sale-Preview-M.webp",
180
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/COGS%20Preview.webp": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/COGS-Preview.webp",
181
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert%20Form%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert-Form-Preview-D.webp",
182
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert%20Form%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert-Form-Preview-M.webp",
183
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert%20of%20Formation%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert-of-Formation-Preview-Desktop.webp",
184
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/CertOfOrg%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/CertOfOrg-Preview-Desktop.webp",
185
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Certificate%20Incorporation%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Certificate-Incorporation-Preview-D.webp",
186
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/CertofOrg%20Preview%20Mobile": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/CertofOrg-Preview-Mobile.webp",
187
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Commercial%20Lease%20Agreement%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Commercial-Lease-Agreement-Preview-D.webp",
188
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate%20Bylaws%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Bylaws-Preview-Desktop.webp",
189
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate%20Resolution%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Resolution-Preview-Desktop.webp",
190
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate%20Resolution%20preview%20Mobile": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Resolution-preview-Mobile.webp",
191
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DNR%20-%20Desktop.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DNR---Desktop.png",
192
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DNR%20mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DNR-mobile.png",
193
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DPOA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DPOA-Preview-D.webp",
194
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DPOA%20preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/DPOA-preview-M.webp",
195
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employee%20NDA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employee-NDA-Preview-D.webp",
196
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employee%20NDA%20Preview%20D-1.Employee%20NDA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employee-NDA-Preview-D-1.Employee-NDA-Preview-D.webp",
197
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employeer%20Handbook%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employeer-Handbook-Preview-M.webp",
198
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employment%20Contract%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Employment-Contract-Preview-D.webp",
199
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Eviction%20Notice%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Eviction-Notice-Preview-D.webp",
200
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Eviction%20Notice%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Eviction-Notice-Preview-M.webp",
201
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General%20Affidavit%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General-Affidavit-Preview-D.webp",
202
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General%20Affidavit%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General-Affidavit-Preview-M.webp",
203
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General%20Warranty%20Deed%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General-Warranty-Deed-Preview-D.webp",
204
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General%20Warranty%20Deed%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/General-Warranty-Deed-Preview-M.webp",
205
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/HPOA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/HPOA-Preview-D.webp",
206
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/HPOA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/HPOA-Preview-M.webp",
207
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Heirship%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Heirship-Preview-M.webp",
208
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/IOjRoCR0RMmZfZmcALMv": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/IOjRoCR0RMmZfZmcALMv.webp",
209
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Job%20Offer%20Letter%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Job-Offer-Letter-Preview-D.webp",
210
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA%20Preview%20Desktop": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA-Preview-Desktop.webp",
211
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA%20Preview%20Mobile": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA-Preview-Mobile.webp",
212
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT-Preview-D.webp",
213
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT%20Preview%20D-1.LWT%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT-Preview-D-1.LWT-Preview-D.webp",
214
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT%20and%20Trust%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT-and-Trust-Preview-D.webp",
215
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT%20and%20Trust%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT-and-Trust-Preview-M.webp",
216
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT%20preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LWT-preview-M.webp",
217
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady%20Bird%20Deed%20preview%20mobile-1.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady-Bird-Deed-preview-mobile-1.png",
218
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady%20Bird%20Deed%20preview%20mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady-Bird-Deed-preview-mobile.png",
219
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady%20Bird%20Deed%20preview.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady-Bird-Deed-preview.png",
220
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease%20Agreement%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease-Agreement-Preview-D.webp",
221
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease%20Agreement%20Preview%20D-1.Lease%20Agreement%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease-Agreement-Preview-D-1.Lease-Agreement-Preview-D.webp",
222
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease%20Agreement%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lease-Agreement-Preview-M.webp",
223
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Living%20Will%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Living-Will-Preview-D.webp",
224
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Living%20Will%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Living-Will-Preview-M.webp",
225
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/MPOA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/MPOA-Preview-D.webp",
226
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/MPOA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/MPOA-Preview-M.webp",
227
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage%20Agreement%20%20preview%20mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage-Agreement-preview-mobile.png",
228
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage%20Agreement%20preview-1.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage-Agreement-preview-1.png",
229
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage%20Agreement%20preview.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mortage-Agreement-preview.png",
230
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mutual%20NDA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Mutual-NDA-Preview-D.webp",
231
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NDA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NDA-Preview-D.webp",
232
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NDA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NDA-Preview-M.webp",
233
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NGeSKeFCQS3Gs5lmKPmw": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NGeSKeFCQS3Gs5lmKPmw.webp",
234
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NTQ%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/NTQ-Preview-D.webp",
235
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice%20Quit%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice-Quit-Preview-D.webp",
236
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice%20to%20Quit%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice-to-Quit-Preview-M.webp",
237
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice%20to%20Vacate%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice-to-Vacate-Preview-D.webp",
238
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice%20to%20Vacate%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Notice-to-Vacate-Preview-M.webp",
239
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/POA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/POA-Preview-D.webp",
240
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/POA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/POA-Preview-M.webp",
241
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Pour%20Over%20Will%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Pour-Over-Will-Preview-D.webp",
242
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Promissory%20Note%20preview.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Promissory-Note-preview.png",
243
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property%20Deed%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property-Deed-Preview-D.webp",
244
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property%20Deed%20Preview%20D-1.Property%20Deed%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property-Deed-Preview-D-1.Property-Deed-Preview-D.webp",
245
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property%20Deed%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Property-Deed-Preview-M.webp",
246
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Purchase%20Agreement%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Purchase-Agreement-Preview-D.webp",
247
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/QCD%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/QCD-Preview-D.webp",
248
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/QCD%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/QCD-Preview-M.webp",
249
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/REPA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/REPA-Preview-D.webp",
250
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/REPA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/REPA-Preview-M.webp",
251
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Residential%20Lease%20Agreement%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Residential-Lease-Agreement-Preview-D.webp",
252
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable%20Living%20Trust%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable-Living-Trust-Preview-D.webp",
253
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable%20Living%20Trust%20Preview%20D-1.Revocable%20Living%20Trust%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable-Living-Trust-Preview-D-1.Revocable-Living-Trust-Preview-D.webp",
254
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable%20Living%20Trust%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocable-Living-Trust-Preview-M.webp",
255
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocation%20POA%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocation-POA-Preview-M.webp",
256
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocation%20PPOA%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Revocation-PPOA-Preview-D.webp",
257
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Sales%20Contract%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Sales-Contract-Preview-D.webp",
258
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Special%20Deed%20Preview%20D": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Special-Deed-Preview-D.webp",
259
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Special%20Deed%20Preview%20M": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Special-Deed-Preview-M.webp",
260
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD%20preview%20mobile-1.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD-preview-mobile-1.png",
261
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD%20preview-1.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD-preview-1.png",
262
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD%20preview.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD-preview.png",
263
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why%20Choose": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp",
264
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/XI8L5GyzTDmBde1TGdmg": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/XI8L5GyzTDmBde1TGdmg.webp",
265
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/YVakVKcyTfNqMnTldpoQ": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/YVakVKcyTfNqMnTldpoQ.webp",
266
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/amendemnt%20hero.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/amendemnt-hero.png",
267
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/articles%20of%20dissolution.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/articles-of-dissolution.png",
268
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/blGQUfjSxKf38c3Qhq2A": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/blGQUfjSxKf38c3Qhq2A.webp",
269
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/cali-pc.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/cali-pc.png",
270
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/certified%20copy.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/certified-copy.png",
271
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/foreign%20entities%20image.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/foreign-entities-image.png",
272
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/gbmc7CvqQM2GkOv0JyO1": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/gbmc7CvqQM2GkOv0JyO1.webp",
273
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/gbmc7CvqQM2GkOv0JyO1-1.gbmc7CvqQM2GkOv0JyO1": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/gbmc7CvqQM2GkOv0JyO1-1.gbmc7CvqQM2GkOv0JyO1.webp",
274
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg",
275
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/license%20research-2.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/license-research-2.png",
276
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/money-back-png-1.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/money-back-png-1.png",
277
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/multi-state-grid.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/multi-state-grid.png",
278
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/scorp%20hero.png": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/scorp-hero.png",
279
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/smiling-man-sitting-office-pays-by-credit-card-with-his-laptop.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/smiling-man-sitting-office-pays-by-credit-card-with-his-laptop.jpg",
280
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/xorsJrDS4WXw8wn4Cyux": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/xorsJrDS4WXw8wn4Cyux.jpg",
281
+ "https://s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/xorsJrDS4WXw8wn4Cyux-1.xorsJrDS4WXw8wn4Cyux": "/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/xorsJrDS4WXw8wn4Cyux-1.xorsJrDS4WXw8wn4Cyux.jpg",
282
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_100&s_866x1252/_frontend/images/business-formation/hero-imgs-corp.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_100-s_866x1252/_frontend/images/business-formation/hero-imgs-corp.png.webp",
283
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_100&s_866x1252/_frontend/images/business-formation/hero-imgs-nonprofit.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_100-s_866x1252/_frontend/images/business-formation/hero-imgs-nonprofit.png.webp",
284
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_100&s_866x1252/_frontend/images/business-formation/hero-imgs.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_100-s_866x1252/_frontend/images/business-formation/hero-imgs.png.webp",
285
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-1.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-1.jpg.webp",
286
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-2.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-2.jpg.webp",
287
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-3.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-3.jpg.webp",
288
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-4.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-4.jpg.webp",
289
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-ep3.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-ep3.png.webp",
290
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_150x150/_frontend/images/homepage/reviews-ep4.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-ep4.png.webp",
291
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_313x188/_frontend/images/general/image-video-thumbnail.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_313x188/_frontend/images/general/image-video-thumbnail.jpg.webp",
292
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80&s_417x266/_frontend/images/homepage/business.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_417x266/_frontend/images/homepage/business.png.webp",
293
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/affiliate/impact-logo.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/affiliate/impact-logo.png.webp",
294
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/business/hero-new-mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/business/hero-new-mobile.png.webp",
295
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/business/hero-new.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/business/hero-new.png.webp",
296
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/estate/ep-form.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/estate/ep-form.png.webp",
297
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/estate/guide-img.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/estate/guide-img.jpg.webp",
298
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/estate/legal.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/estate/legal.png.webp",
299
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/general/all-prod-hero.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/general/all-prod-hero.png.webp",
300
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/general/biz-ui-mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/general/biz-ui-mobile.png.webp",
301
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/general/biz-ui.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/general/biz-ui.png.webp",
302
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/features/articles.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/features/articles.png.webp",
303
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/features/dashboard.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/features/dashboard.png.webp",
304
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/features/form.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/features/form.png.webp",
305
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/features/legal-docs.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/features/legal-docs.png.webp",
306
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/hero/business-formation.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/hero/business-formation.jpg.webp",
307
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/hero/healthcare.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/hero/healthcare.jpg.webp",
308
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/hero/landlord-and-tenant.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/hero/landlord-and-tenant.jpg.webp",
309
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/hero/other.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/hero/other.jpg.webp",
310
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/guides/hero/personal-affairs.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/guides/hero/personal-affairs.jpg.webp",
311
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-biz.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-biz.jpg.webp",
312
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-biz2.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-biz2.jpg.webp",
313
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-ep.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-ep.jpg.webp",
314
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-p.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-p.jpg.webp",
315
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-p2.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-p2.jpg.webp",
316
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-re.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-re.jpg.webp",
317
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-re2.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/homepage/hero-re2.jpg.webp",
318
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/personal-affairs/marriage.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/personal-affairs/marriage.jpg.webp",
319
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/personal-affairs/pa-hero.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/personal-affairs/pa-hero.png.webp",
320
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/real-estate/re-hero-mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/real-estate/re-hero-mobile.png.webp",
321
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/real-estate/re-hero.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/real-estate/re-hero.png.webp",
322
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/real-estate/tenants.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/real-estate/tenants.jpg.webp",
323
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/real-estate/transfers1.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/real-estate/transfers1.jpg.webp",
324
+ "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/real-estate/transfers2.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80/_frontend/images/real-estate/transfers2.jpg.webp",
325
+ "https://www.legalnature.com/_frontend/ep-guide-img.Bcjw3cBT.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/ep-guide-img.Bcjw3cBT.svg",
326
+ "https://www.legalnature.com/_frontend/ep-man-doc.DEbb5A3G.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/ep-man-doc.DEbb5A3G.svg",
327
+ "https://www.legalnature.com/_frontend/icon-help-guide-blue.BvSC_UpN.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/icon-help-guide-blue.BvSC_UpN.svg",
328
+ "https://www.legalnature.com/_frontend/images/base/logo-guarantee-blue.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/base/logo-guarantee-blue.svg",
329
+ "https://www.legalnature.com/_frontend/images/business-formation/llc-hero-3.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/business-formation/llc-hero-3.png",
330
+ "https://www.legalnature.com/_frontend/images/common-sections/platform.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png",
331
+ "https://www.legalnature.com/_frontend/images/contact/eu-flag.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/contact/eu-flag.png",
332
+ "https://www.legalnature.com/_frontend/images/contact/support.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/contact/support.png",
333
+ "https://www.legalnature.com/_frontend/images/contact/us-flag.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/contact/us-flag.png",
334
+ "https://www.legalnature.com/_frontend/images/estate/hero1.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/estate/hero1.svg",
335
+ "https://www.legalnature.com/_frontend/images/estate/hero2.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/estate/hero2.svg",
336
+ "https://www.legalnature.com/_frontend/images/general/illustration-docs-auth.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/general/illustration-docs-auth.svg",
337
+ "https://www.legalnature.com/_frontend/images/homepage/plus-illustration-mobile.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/homepage/plus-illustration-mobile.svg",
338
+ "https://www.legalnature.com/_frontend/images/homepage/plus-illustration.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/homepage/plus-illustration.svg",
339
+ "https://www.legalnature.com/_frontend/images/icons/home/icon1.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon1.svg",
340
+ "https://www.legalnature.com/_frontend/images/icons/home/icon2.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon2.svg",
341
+ "https://www.legalnature.com/_frontend/images/icons/home/icon3.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon3.svg",
342
+ "https://www.legalnature.com/_frontend/images/icons/home/icon4.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon4.svg",
343
+ "https://www.legalnature.com/_frontend/images/icons/home/icon5.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon5.svg",
344
+ "https://www.legalnature.com/_frontend/images/icons/home/icon6.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/home/icon6.svg",
345
+ "https://www.legalnature.com/_frontend/images/icons/icon-arrow-circle.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-arrow-circle.svg",
346
+ "https://www.legalnature.com/_frontend/images/icons/icon-arrow-right-blue.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-arrow-right-blue.svg",
347
+ "https://www.legalnature.com/_frontend/images/icons/icon-arrow-right-white.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-arrow-right-white.svg",
348
+ "https://www.legalnature.com/_frontend/images/icons/icon-certified.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-certified.svg",
349
+ "https://www.legalnature.com/_frontend/images/icons/icon-digital-mail.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-digital-mail.svg",
350
+ "https://www.legalnature.com/_frontend/images/icons/icon-document-white.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-document-white.svg",
351
+ "https://www.legalnature.com/_frontend/images/icons/icon-easy.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-easy.svg",
352
+ "https://www.legalnature.com/_frontend/images/icons/icon-ein.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-ein.svg",
353
+ "https://www.legalnature.com/_frontend/images/icons/icon-fast.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-fast.svg",
354
+ "https://www.legalnature.com/_frontend/images/icons/icon-quote.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-quote.svg",
355
+ "https://www.legalnature.com/_frontend/images/icons/icon-safe.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-safe.svg",
356
+ "https://www.legalnature.com/_frontend/images/icons/icon-service-boi.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/icon-service-boi.svg",
357
+ "https://www.legalnature.com/_frontend/images/icons/logo-compliance-icon.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/icons/logo-compliance-icon.svg",
358
+ "https://www.legalnature.com/_frontend/images/lander/purchase.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/lander/purchase.svg",
359
+ "https://www.legalnature.com/_frontend/images/logo-plus.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/logo-plus.svg",
360
+ "https://www.legalnature.com/_frontend/images/plus/ArticlePreview.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/ArticlePreview.svg",
361
+ "https://www.legalnature.com/_frontend/images/plus/DocBox.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/DocBox.svg",
362
+ "https://www.legalnature.com/_frontend/images/plus/PassportBox.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/PassportBox.svg",
363
+ "https://www.legalnature.com/_frontend/images/plus/ServiceBox.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/ServiceBox.svg",
364
+ "https://www.legalnature.com/_frontend/images/plus/dashboard.jpg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/dashboard.jpg",
365
+ "https://www.legalnature.com/_frontend/images/plus/pdf.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/pdf.svg",
366
+ "https://www.legalnature.com/_frontend/images/plus/word.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/plus/word.svg",
367
+ "https://www.legalnature.com/_frontend/images/pricing/business.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/pricing/business.svg",
368
+ "https://www.legalnature.com/_frontend/images/product/business-dashboard.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/product/business-dashboard.png",
369
+ "https://www.legalnature.com/_frontend/images/product/poa-hero-mobile.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/product/poa-hero-mobile.png",
370
+ "https://www.legalnature.com/_frontend/logo-estateplanner.CFqDlgtb.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/logo-estateplanner.CFqDlgtb.svg",
371
+ "https://www.legalnature.com/_frontend/logo-plus-white-blue.BZQmEmdD.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/logo-plus-white-blue.BZQmEmdD.svg",
372
+ "https://www.legalnature.com/_frontend/logo-plus.BJCaBd-s.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/logo-plus.BJCaBd-s.svg",
373
+ "https://www.legalnature.com/_frontend/plus-illustration-mobile.OK1e83sp.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/plus-illustration-mobile.OK1e83sp.svg",
374
+ "https://www.legalnature.com/_frontend/plus-illustration.Dq8xyFNF.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/plus-illustration.Dq8xyFNF.svg",
375
+ "https://www.legalnature.com/_frontend/poa-general.Iw2gL34C.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poa-general.Iw2gL34C.svg",
376
+ "https://www.legalnature.com/_frontend/poa-medical.CnIT1rqY.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poa-medical.CnIT1rqY.svg",
377
+ "https://www.legalnature.com/_frontend/poppins-v24-latin-500.C8OXljZJ.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poppins-v24-latin-500.C8OXljZJ.woff2",
378
+ "https://www.legalnature.com/_frontend/poppins-v24-latin-500italic.o28Otv0U.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poppins-v24-latin-500italic.o28Otv0U.woff2",
379
+ "https://www.legalnature.com/_frontend/poppins-v24-latin-600.zEkxB9Mr.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poppins-v24-latin-600.zEkxB9Mr.woff2",
380
+ "https://www.legalnature.com/_frontend/poppins-v24-latin-700.Qrb0O0WB.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poppins-v24-latin-700.Qrb0O0WB.woff2",
381
+ "https://www.legalnature.com/_frontend/poppins-v24-latin-regular.cpxAROuN.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/poppins-v24-latin-regular.cpxAROuN.woff2",
382
+ "https://www.legalnature.com/_frontend/work-sans-v24-latin-500.BKGnScDy.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/work-sans-v24-latin-500.BKGnScDy.woff2",
383
+ "https://www.legalnature.com/_frontend/work-sans-v24-latin-600.DB-2V89X.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/work-sans-v24-latin-600.DB-2V89X.woff2",
384
+ "https://www.legalnature.com/_frontend/work-sans-v24-latin-regular.jUejSri3.woff2": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/work-sans-v24-latin-regular.jUejSri3.woff2",
385
+ "https://www.legalnature.com/_ipx/f_webp,q_80/images/form/form-2553.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_ipx/f_webp-q_80/images/form/form-2553.png.webp",
386
+ "https://www.legalnature.com/_ipx/f_webp,q_80/images/form/open-biz.png": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_ipx/f_webp-q_80/images/form/open-biz.png.webp",
387
+ "https://www.legalnature.com/_nuxt/svg/illustration-address.953be78.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_nuxt/svg/illustration-address.953be78.svg",
388
+ "https://www.legalnature.com/_nuxt/svg/illustration-corporate-kit.5ca4c6b.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_nuxt/svg/illustration-corporate-kit.5ca4c6b.svg",
389
+ "https://www.legalnature.com/_nuxt/svg/illustration-estatePlanner.85c797b.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_nuxt/svg/illustration-estatePlanner.85c797b.svg",
390
+ "https://www.legalnature.com/_nuxt/svg/illustration-money.82f2fdb.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_nuxt/svg/illustration-money.82f2fdb.svg",
391
+ "https://www.legalnature.com/_nuxt/svg/illustration-team.0b73d95.svg": "/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_nuxt/svg/illustration-team.0b73d95.svg"
392
+ }
393
+ }
tasks/legalnature/environment/reference/clone/data/site/build-report.json ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "external_hosts": [
3
+ "1800accountant.com",
4
+ "app.impact.com",
5
+ "applepaynelaw.com",
6
+ "bench.co",
7
+ "bernsteinlaw.com",
8
+ "blogs.barrons.com",
9
+ "corp.delaware.gov",
10
+ "corpfiles.delaware.gov",
11
+ "ctb.ku.edu",
12
+ "curocomp.com",
13
+ "delcode.delaware.gov",
14
+ "dev-static-master.lnenv.com",
15
+ "edition.cnn.com",
16
+ "feld.com",
17
+ "fundbox.com",
18
+ "garylandau.com",
19
+ "hbr.org",
20
+ "homeguides.sfgate.com",
21
+ "hr.mit.edu",
22
+ "ismallbusiness.com",
23
+ "jobs.polymer.co",
24
+ "johnston-legal.com",
25
+ "lawshelf.com",
26
+ "legalbeagle.com",
27
+ "localhost:3001",
28
+ "matthewsarbitrations.com",
29
+ "mercury.com",
30
+ "money.cnn.com",
31
+ "nextinsurance.sjv.io",
32
+ "nonprofithub.org",
33
+ "pakaccountants.com",
34
+ "ppqty.com",
35
+ "quickbooks.intuit.com",
36
+ "refer.virtualpostmail.com",
37
+ "smallbusiness.chron.com",
38
+ "som.yale.edu",
39
+ "store.usps.com",
40
+ "tools.google.com",
41
+ "watttieder.com",
42
+ "wealthpilgrim.com",
43
+ "wix.pxf.io",
44
+ "www.501c3.org",
45
+ "www.aarp.org",
46
+ "www.acc.com",
47
+ "www.adr.org",
48
+ "www.allbusiness.com",
49
+ "www.amazon.com",
50
+ "www.americanbar.org",
51
+ "www.americanpetproducts.org",
52
+ "www.bankruptcyinbrief.com",
53
+ "www.bknlaw.com",
54
+ "www.bloomberg.com",
55
+ "www.boardeffect.com",
56
+ "www.bullseyeengagement.com",
57
+ "www.businessinsider.com",
58
+ "www.businessnewsdaily.com",
59
+ "www.calcpa.org",
60
+ "www.cdc.gov",
61
+ "www.councilofnonprofits.org",
62
+ "www.dol.gov",
63
+ "www.double-entry-bookkeeping.com",
64
+ "www.earthclassmail.com",
65
+ "www.ecfr.gov",
66
+ "www.entrepreneur.com",
67
+ "www.epa.gov",
68
+ "www.estateplanning.com",
69
+ "www.everplans.com",
70
+ "www.fema.gov",
71
+ "www.fool.com",
72
+ "www.forbes.com",
73
+ "www.freshbooks.com",
74
+ "www.ftc.gov",
75
+ "www.fullstory.com",
76
+ "www.govinfo.gov",
77
+ "www.groteconsulting.com",
78
+ "www.healthcare.gov",
79
+ "www.hg.org",
80
+ "www.hhs.gov",
81
+ "www.hrexaminer.com",
82
+ "www.huffpost.com",
83
+ "www.inc.com",
84
+ "www.incorporate.com",
85
+ "www.investopedia.com",
86
+ "www.irs.gov",
87
+ "www.jamesburnslaw.com",
88
+ "www.justia.com",
89
+ "www.justice.gov",
90
+ "www.kaplaw.com",
91
+ "www.kiplinger.com",
92
+ "www.lawdepot.com",
93
+ "www.leg.state.nv.us",
94
+ "www.legalzoom.com",
95
+ "www.mayoclinic.org",
96
+ "www.mckinsey.com",
97
+ "www.medicinenet.com",
98
+ "www.military.com",
99
+ "www.moneycrashers.com",
100
+ "www.nasdaq.com",
101
+ "www.ncsl.org",
102
+ "www.nerdwallet.com",
103
+ "www.nia.nih.gov",
104
+ "www.nvsilverflume.gov",
105
+ "www.nvsos.gov",
106
+ "www.nyse.com",
107
+ "www.nytimes.com",
108
+ "www.oregonlaws.org",
109
+ "www.perrymarshall.com",
110
+ "www.referenceforbusiness.com",
111
+ "www.reuters.com",
112
+ "www.sapling.com",
113
+ "www.sba.gov",
114
+ "www.sec.gov",
115
+ "www.ssa.gov",
116
+ "www.synnovatia.com",
117
+ "www.thebalance.com",
118
+ "www.thebalancesmb.com",
119
+ "www.thehartford.com",
120
+ "www.theupsstore.com",
121
+ "www.trakstar.com",
122
+ "www.uniformlaws.org",
123
+ "www.usa.gov",
124
+ "www.uscourts.gov",
125
+ "www.uspto.gov",
126
+ "www.ustrust.com",
127
+ "www.wisegeek.com",
128
+ "www.ycombinator.com",
129
+ "yourbusiness.azcentral.com"
130
+ ],
131
+ "generated_at": "2026-08-21T07:59:08Z",
132
+ "internal_targets_outside_registry": [
133
+ "/guides/how-to-create-a-strong-website-privacy-policy-and-what-to-include",
134
+ "/guides/how-to-use-contracts-to-protect-yourself",
135
+ "/guides/why-your-website-needs-a-strong-terms-of-use-agreement-and-what-to-include",
136
+ "/orders/create/annual-report/asosr-002",
137
+ "/orders/create/annual-report/asosr-003",
138
+ "/orders/create/annual-report/asosr-004"
139
+ ],
140
+ "rejected_assets": [
141
+ {
142
+ "reason": "not present in the asset manifest",
143
+ "url": "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-biz3.jpg"
144
+ },
145
+ {
146
+ "reason": "not present in the asset manifest",
147
+ "url": "https://www.legalnature.com/_frontend-ipx/f_webp&q_80/_frontend/images/homepage/hero-biz3.jpg"
148
+ },
149
+ {
150
+ "reason": "not present in the asset manifest",
151
+ "url": "https://shared-cms-main.legalnature.com/cms-api/media/file/woman-filings.jpg"
152
+ },
153
+ {
154
+ "reason": "not present in the asset manifest",
155
+ "url": "https://cdn.buttercms.com/blGQUfjSxKf38c3Qhq2A"
156
+ },
157
+ {
158
+ "reason": "not present in the asset manifest",
159
+ "url": "https://cdn.buttercms.com/blGQUfjSxKf38c3Qhq2A"
160
+ },
161
+ {
162
+ "reason": "not present in the asset manifest",
163
+ "url": "https://cdn.buttercms.com/B85QR0X8TOWZxKJTZX8y"
164
+ },
165
+ {
166
+ "reason": "not present in the asset manifest",
167
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip1.svg"
168
+ },
169
+ {
170
+ "reason": "not present in the asset manifest",
171
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat1.svg"
172
+ },
173
+ {
174
+ "reason": "not present in the asset manifest",
175
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat2.svg"
176
+ },
177
+ {
178
+ "reason": "not present in the asset manifest",
179
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat3.svg"
180
+ },
181
+ {
182
+ "reason": "not present in the asset manifest",
183
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat4.svg"
184
+ },
185
+ {
186
+ "reason": "not present in the asset manifest",
187
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat5.svg"
188
+ },
189
+ {
190
+ "reason": "not present in the asset manifest",
191
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat6.svg"
192
+ },
193
+ {
194
+ "reason": "not present in the asset manifest",
195
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip2.svg"
196
+ },
197
+ {
198
+ "reason": "not present in the asset manifest",
199
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip3.svg"
200
+ },
201
+ {
202
+ "reason": "not present in the asset manifest",
203
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip4.svg"
204
+ },
205
+ {
206
+ "reason": "not present in the asset manifest",
207
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat1.svg"
208
+ },
209
+ {
210
+ "reason": "not present in the asset manifest",
211
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat2.svg"
212
+ },
213
+ {
214
+ "reason": "not present in the asset manifest",
215
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat3.svg"
216
+ },
217
+ {
218
+ "reason": "not present in the asset manifest",
219
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip1.svg"
220
+ },
221
+ {
222
+ "reason": "not present in the asset manifest",
223
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip5.svg"
224
+ },
225
+ {
226
+ "reason": "not present in the asset manifest",
227
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip6.svg"
228
+ },
229
+ {
230
+ "reason": "not present in the asset manifest",
231
+ "url": "https://cdn.buttercms.com/R4bFUIp7QLm5M3iHxc1Q"
232
+ },
233
+ {
234
+ "reason": "not present in the asset manifest",
235
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip1.svg"
236
+ },
237
+ {
238
+ "reason": "not present in the asset manifest",
239
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat1.svg"
240
+ },
241
+ {
242
+ "reason": "not present in the asset manifest",
243
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat2.svg"
244
+ },
245
+ {
246
+ "reason": "not present in the asset manifest",
247
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat3.svg"
248
+ },
249
+ {
250
+ "reason": "not present in the asset manifest",
251
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat4.svg"
252
+ },
253
+ {
254
+ "reason": "not present in the asset manifest",
255
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat5.svg"
256
+ },
257
+ {
258
+ "reason": "not present in the asset manifest",
259
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat6.svg"
260
+ },
261
+ {
262
+ "reason": "not present in the asset manifest",
263
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip2.svg"
264
+ },
265
+ {
266
+ "reason": "not present in the asset manifest",
267
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip3.svg"
268
+ },
269
+ {
270
+ "reason": "not present in the asset manifest",
271
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip4.svg"
272
+ },
273
+ {
274
+ "reason": "not present in the asset manifest",
275
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat1.svg"
276
+ },
277
+ {
278
+ "reason": "not present in the asset manifest",
279
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat2.svg"
280
+ },
281
+ {
282
+ "reason": "not present in the asset manifest",
283
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/feat3.svg"
284
+ },
285
+ {
286
+ "reason": "not present in the asset manifest",
287
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip1.svg"
288
+ },
289
+ {
290
+ "reason": "not present in the asset manifest",
291
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip5.svg"
292
+ },
293
+ {
294
+ "reason": "not present in the asset manifest",
295
+ "url": "https://d1bb4amhptdeuq.cloudfront.net/guides/tip6.svg"
296
+ },
297
+ {
298
+ "reason": "not present in the asset manifest",
299
+ "url": "https://legalnature-creative.s3.us-west-1.amazonaws.com/guides/icon-fast.svg"
300
+ },
301
+ {
302
+ "reason": "not present in the asset manifest",
303
+ "url": "https://legalnature-creative.s3.us-west-1.amazonaws.com/guides/icon-fast.svg"
304
+ },
305
+ {
306
+ "reason": "content type not vended: image/vnd.microsoft.icon",
307
+ "url": "https://www.legalnature.com/favicon.ico"
308
+ }
309
+ ],
310
+ "summary": {
311
+ "aliases": 2,
312
+ "assets_rejected": 42,
313
+ "assets_vended": 388,
314
+ "external_hosts": 127,
315
+ "internal_link_targets": 596,
316
+ "pages": 667,
317
+ "query_states": 2052,
318
+ "redirects": 16,
319
+ "source_200": 635,
320
+ "source_404": 30
321
+ }
322
+ }
tasks/legalnature/environment/reference/clone/data/site/catalogue.json ADDED
The diff for this file is too large to render. See raw diff
 
tasks/legalnature/environment/reference/clone/data/site/content/business-formation--c2b469a188.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Create your business in minutes!"},{"t":"p","x":"Our team of business experts take care of forming your company so you can focus on growing your business."},{"t":"p","x":[{"x":"Starting at only $0","b":1},{"x":" + state fee"}]},{"t":"select","name":"","options":[["","Select an entity type"],["LLC","LLC"],["C Corp","C Corp"],["S Corp","S Corp"],["Nonprofit","Nonprofit"]]},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_100-s_866x1252/_frontend/images/business-formation/hero-imgs.png.webp","alt":"llc-formation","w":866,"h":1252},{"t":"h","l":2,"x":"Start strong with expert support"},{"t":"h","l":3,"x":"Your Own Dedicated Business Specialist"},{"t":"p","x":"When you form with LegalNature, you'll have a dedicated business specialist who will be available for support at every step of the way and communicate with the state on your behalf."},{"t":"h","l":3,"x":"Rush and Expedited Filing"},{"t":"p","x":"Most state processing times vary for filing your formation documents. You have the option to expedite your filing to meet your business needs."},{"t":"h","l":3,"x":"Registered Agent, Tax ID (EIN), and More"},{"t":"p","x":"LegalNature provides all the tools and resources businesses need at every stage—from getting started to managing ongoing operations."},{"t":"p","x":"How does it work?"},{"t":"h","l":2,"x":"In under 5 minutes you can make sure your business is formed correctly , state compliant , and has the right tools to grow."},{"t":"a","href":"/orders/create/formation","x":"Start Your Business Now"},{"t":"p","x":"Provide your business's information"},{"t":"p","x":"We file the paperwork with the Secretary of State (SOS)"},{"t":"p","x":"We obtain your EIN once your business is filed with the SOS"},{"t":"p","x":"We provide the documents and suggest next steps for your business, including a business bank account, company website, free tax consultation, and more!"},{"t":"h","l":2,"x":"What our customers are saying"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-1.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-2.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-4.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-3.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_313x188/_frontend/images/general/image-video-thumbnail.jpg.webp","alt":"about video thumbnail","w":313,"h":188},{"t":"p","x":"Our mission is to make the legal system easier to understand, less time consuming, and more affordable for individuals and businesses."},{"t":"h","l":2,"x":"Not sure which entity type to choose?"},{"t":"p","x":"Use our comparison chart to see the difference between entity types and figure out which one is the best for you."},{"t":"a","href":"/business-formation/llc","x":"Start now"},{"t":"a","href":"/business-formation/s-corporation","x":"Start now"},{"t":"a","href":"/business-formation/c-corporation","x":"Start now"},{"t":"a","href":"/business-formation/nonprofit","x":"Start now"},{"t":"h","l":3,"x":"Essential guide to starting a business"},{"t":"p","x":"Starting a business takes work. There’s no way around it. However, knowing what’s needed and being prepared can help you avoid a lot of the stress and hurdles that slow you down."},{"t":"ul","items":[[{"x":"Create a Business Plan","h":"/guides/essential-guide-to-starting-a-business#step-1-create-a-business-plan"}],[{"x":"Choose Your Entity Type","h":"/guides/essential-guide-to-starting-a-business#step-2-choose-your-entity-type"}],[{"x":"Register the Business","h":"/guides/essential-guide-to-starting-a-business#step-3-register-the-business"}],[{"x":"Comply with State and Federal Regulations","h":"/guides/essential-guide-to-starting-a-business#step-4-comply-with-state-and-federal-regulations"}]]},{"t":"a","href":"/guides/essential-guide-to-starting-a-business","x":"Read Our Guide"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/tt3G90mR9CgiWEXm3I7w.webp","alt":"llc owner"},{"t":"h","l":2,"x":"Introducing your business command center"},{"t":"p","x":"You'll get a secure personalized dashboard that stores all of your legal forms. Edit, download, and print your documents at any time from any device."},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/BoL1uowZS86ImNtGAwG8.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Ready to get started?"},{"t":"p","x":"Create your business in minutes. Let us handle your filing so you can focus on running your business."},{"t":"a","href":"/orders/create/formation","x":"Start a Business"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/a1lNTqXsQmG67x3X6oHk.webp","alt":"llc owner"}]}
tasks/legalnature/environment/reference/clone/data/site/content/business-formation-nonprofit--f78d346155.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Create your nonprofit"},{"t":"p","x":[{"x":"With plans that start at only "},{"x":"$0 + state fees","b":1},{"x":", see why LegalNature is the"},{"x":" best site for entrepreneurs to choose","b":1},{"x":" to form, file, and launch their dream business."}]},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_100-s_866x1252/_frontend/images/business-formation/hero-imgs-nonprofit.png.webp","alt":"nonprofit-formation","w":866,"h":1252},{"t":"h","l":2,"x":"How to start your nonprofit"},{"t":"h","l":3,"x":"Let us know your business details and needs."},{"t":"p","x":"Our form will walk you through all the important decisions and information."},{"t":"a","href":"/orders/create/formation?entity=Nonprofit","x":"Start Your Nonprofit Today"},{"t":"h","l":3,"x":"Relax as we handle your nonprofit formation."},{"t":"p","x":"We make the paperwork and file it with the secretary of state (SOS)."},{"t":"h","l":3,"x":"Start doing business!"},{"t":"p","x":"We provide the documents, resources, and next steps for your business bank account, free tax consultation, and more!"},{"t":"h","l":2,"x":"The benefits of forming a nonprofit"},{"t":"h","l":3,"x":"Tax Exemption"},{"t":"p","x":"Nonprofits approved by the IRS are exempt from paying federal income taxes."},{"t":"h","l":3,"x":"Liability Protection"},{"t":"p","x":"Directors and employees are shielded from becoming personally responsible for the corporation's debts and obligations."},{"t":"h","l":3,"x":"Fundraising"},{"t":"p","x":"Nonprofits are eligible to receive grants and tax-deductible donations, making them ideal for fundraising."},{"t":"h","l":2,"x":"See what our users have to say."},{"t":"p","x":"Join thousands of businesses who are choosing LegalNature every month to achieve their potential"},{"t":"p","x":"- Lorrie R"},{"t":"h","l":2,"x":"Create a nonprofit in your state"},{"t":"ul","items":[[{"x":"Alabama","h":"/orders/create/formation?entity=Nonprofit?state=1"}],[{"x":"Alaska","h":"/orders/create/formation?entity=Nonprofit?state=2"}],[{"x":"Arizona","h":"/orders/create/formation?entity=Nonprofit?state=3"}],[{"x":"Arkansas","h":"/orders/create/formation?entity=Nonprofit?state=4"}],[{"x":"California","h":"/orders/create/formation?entity=Nonprofit?state=5"}],[{"x":"Colorado","h":"/orders/create/formation?entity=Nonprofit?state=6"}],[{"x":"Connecticut","h":"/orders/create/formation?entity=Nonprofit?state=7"}],[{"x":"Delaware","h":"/orders/create/formation?entity=Nonprofit?state=8"}],[{"x":"District of Columbia","h":"/orders/create/formation?entity=Nonprofit?state=52"}],[{"x":"Florida","h":"/orders/create/formation?entity=Nonprofit?state=9"}],[{"x":"Georgia","h":"/orders/create/formation?entity=Nonprofit?state=10"}],[{"x":"Hawaii","h":"/orders/create/formation?entity=Nonprofit?state=11"}],[{"x":"Idaho","h":"/orders/create/formation?entity=Nonprofit?state=12"}],[{"x":"Illinois","h":"/orders/create/formation?entity=Nonprofit?state=13"}],[{"x":"Indiana","h":"/orders/create/formation?entity=Nonprofit?state=14"}],[{"x":"Iowa","h":"/orders/create/formation?entity=Nonprofit?state=15"}],[{"x":"Kansas","h":"/orders/create/formation?entity=Nonprofit?state=16"}],[{"x":"Kentucky","h":"/orders/create/formation?entity=Nonprofit?state=17"}],[{"x":"Louisiana","h":"/orders/create/formation?entity=Nonprofit?state=18"}],[{"x":"Maine","h":"/orders/create/formation?entity=Nonprofit?state=19"}],[{"x":"Maryland","h":"/orders/create/formation?entity=Nonprofit?state=20"}],[{"x":"Massachusetts","h":"/orders/create/formation?entity=Nonprofit?state=21"}],[{"x":"Michigan","h":"/orders/create/formation?entity=Nonprofit?state=22"}],[{"x":"Minnesota","h":"/orders/create/formation?entity=Nonprofit?state=23"}],[{"x":"Mississippi","h":"/orders/create/formation?entity=Nonprofit?state=24"}],[{"x":"Missouri","h":"/orders/create/formation?entity=Nonprofit?state=25"}],[{"x":"Montana","h":"/orders/create/formation?entity=Nonprofit?state=26"}],[{"x":"Nebraska","h":"/orders/create/formation?entity=Nonprofit?state=27"}],[{"x":"Nevada","h":"/orders/create/formation?entity=Nonprofit?state=28"}],[{"x":"New Hampshire","h":"/orders/create/formation?entity=Nonprofit?state=29"}],[{"x":"New Jersey","h":"/orders/create/formation?entity=Nonprofit?state=30"}],[{"x":"New Mexico","h":"/orders/create/formation?entity=Nonprofit?state=31"}],[{"x":"New York","h":"/orders/create/formation?entity=Nonprofit?state=32"}],[{"x":"North Carolina","h":"/orders/create/formation?entity=Nonprofit?state=33"}],[{"x":"North Dakota","h":"/orders/create/formation?entity=Nonprofit?state=34"}],[{"x":"Ohio","h":"/orders/create/formation?entity=Nonprofit?state=35"}],[{"x":"Oklahoma","h":"/orders/create/formation?entity=Nonprofit?state=36"}],[{"x":"Oregon","h":"/orders/create/formation?entity=Nonprofit?state=37"}],[{"x":"Pennsylvania","h":"/orders/create/formation?entity=Nonprofit?state=38"}],[{"x":"Rhode Island","h":"/orders/create/formation?entity=Nonprofit?state=39"}],[{"x":"South Carolina","h":"/orders/create/formation?entity=Nonprofit?state=40"}],[{"x":"South Dakota","h":"/orders/create/formation?entity=Nonprofit?state=41"}],[{"x":"Tennessee","h":"/orders/create/formation?entity=Nonprofit?state=42"}],[{"x":"Texas","h":"/orders/create/formation?entity=Nonprofit?state=43"}],[{"x":"Utah","h":"/orders/create/formation?entity=Nonprofit?state=44"}],[{"x":"Vermont","h":"/orders/create/formation?entity=Nonprofit?state=45"}],[{"x":"Virginia","h":"/orders/create/formation?entity=Nonprofit?state=46"}],[{"x":"Washington","h":"/orders/create/formation?entity=Nonprofit?state=47"}],[{"x":"West Virginia","h":"/orders/create/formation?entity=Nonprofit?state=48"}],[{"x":"Wisconsin","h":"/orders/create/formation?entity=Nonprofit?state=49"}],[{"x":"Wyoming","h":"/orders/create/formation?entity=Nonprofit?state=50"}]]},{"t":"h","l":2,"x":"Everything you need to know about nonprofits"},{"t":"h","l":3,"x":"What is a nonprofit corporation?"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/u2Pzq1j9TrBVxRRtm2BA.webp","alt":"llc owner"},{"t":"h","l":3,"x":"How do I form a nonprofit corporation?"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/H3X19crYRZ62ozqb2lb7.webp","alt":"llc owner"},{"t":"h","l":3,"x":"What are Articles of Incorporation?"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/rLkTHKSQS0GqtNYcGwVc.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Do I need bylaws for a nonprofit corporation?"},{"t":"a","href":"/categories/business-formation/corporate-bylaws","x":"Learn more about Corporate Bylaws"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/nOWgU1KBQO2izxoC8gJg.webp","alt":"llc owner"},{"t":"h","l":3,"x":"How does a nonprofit corporation limit liability?"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/D6YNv7YSu21Gsn3eqh2U.webp","alt":"llc owner"},{"t":"h","l":3,"x":"What does it mean for a nonprofit to be tax-exempt?"},{"t":"h","l":3,"x":"Launch your business with the support you need!"},{"t":"a","href":"/startup-resources","x":"Startup Resource Center"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/smiling-man-sitting-office-pays-by-credit-card-with-his-laptop.jpg","alt":"llc owner"},{"t":"h","l":2,"x":"What our customers are saying about us"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-1.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-2.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-4.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-3.jpg.webp","alt":"","w":150,"h":150},{"t":"h","l":2,"x":"Frequently asked questions"},{"t":"faq","items":[{"q":"Are donations to a nonprofit always tax-deductible for donors?","a":[{"t":"p","x":"Donations are generally tax-deductible only if the nonprofit has been recognized as a 501(c)(3) organization by the IRS. Donors should confirm an organization's exempt status, since contributions to a nonprofit corporation that hasn't yet received (or has lost) its determination letter typically aren't deductible."}]},{"q":"What is a 501(c)(3) organization?","a":[{"t":"p","x":"A 501(c)(3) organization is a nonprofit that has received IRS recognition as exempt from federal income tax because it operates exclusively for religious, charitable, scientific, literary, or educational purposes. This status also allows donors to deduct qualifying contributions on their own tax returns. Not every nonprofit corporation is a 501(c)(3); the designation only applies once the IRS has approved the organization's exemption application."}]},{"q":"Can a nonprofit lose its tax-exempt status?","a":[{"t":"p","x":"Yes. A nonprofit can lose its 501(c)(3) status by failing to file required annual returns, engaging in excessive lobbying or political campaign activity, or operating for the private benefit of individuals rather than its stated exempt purpose. Reinstatement after revocation generally requires reapplying to the IRS and, in some cases, paying a fee."}]},{"q":"What's the difference between a nonprofit corporation and an LLC?","a":[{"t":"p","x":"A nonprofit corporation is organized around a charitable or public-benefit purpose and is governed by a board of directors rather than owners. An LLC, by contrast, is a for-profit structure owned by members who can share in the company's profits. Most organizations seeking donations, grants, or federal tax-exempt status form as nonprofit corporations rather than LLCs, since the corporate structure aligns directly with IRS requirements."}]},{"q":"Does forming a nonprofit corporation automatically make it tax-exempt?","a":[{"t":"p","x":"No. Incorporating as a nonprofit at the state level and obtaining federal tax-exempt status are two separate steps. After filing Articles of Incorporation, an organization must still apply to the IRS for 501(c)(3) status, and it may need to apply separately for state-level tax exemptions as well. Until that federal approval comes through, the organization is a nonprofit corporation but not yet a tax-exempt one."}]}]}]}
tasks/legalnature/environment/reference/clone/data/site/content/careers--4cd7bb4519.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Careers"},{"t":"p","x":"At LegalNature, we are in the business of automating legal documents and processes. Our mission is to make the legal system easier to understand, less time consuming, and more affordable for individuals and businesses."},{"t":"h","l":2,"x":"Open positions"},{"t":"p","x":[{"x":"View our open jobs","h":"https://jobs.polymer.co/null"}]},{"t":"h","l":2,"x":"Our culture"},{"t":"p","x":"We are a team of dynamic and ambitious professionals committed to providing high-quality and dependable legal products for our customers. The emphasis we place on excellent customer service along with our team's collective professional experience in law, business, and technology allows us to create easy-to-use legal products for everyone."},{"t":"h","l":3,"x":"Collaboration above all"},{"t":"p","x":"We utilize the latest technology and tools to create a fully collaborative and effective workplace."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/UWOCk3v1T5C0WfFbHY1c.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Fully remote"},{"t":"p","x":"We are a fully remote company spread across the United States and Europe. We love to travel and experience culture so instead of offices, we schedule team trips in different countries to reflect and recharge."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/R8WCIvImTeOdZDRoNS7F.webp","alt":"llc owner"},{"t":"h","l":3,"x":"A place you can grow"},{"t":"p","x":"Whether it is legal, technology, or marketing, we have years of experience to help push your career further."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/3dwQsitCSZSKTfE23GHF.webp","alt":"llc owner"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-arbitration-agreement--f8d4a3f590.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Arbitration Agreement"},{"t":"p","x":"Use our arbitration agreement form to set up a dispute resolution process for existing or future disputes between two parties."},{"t":"p","x":"Our arbitration agreement template applies the most relevant procedures depending on the dispute type, including options for commercial, consumer, employment, labor union, and construction disputes."},{"t":"a","href":"/documents/create/arbitration-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our arbitration agreement"},{"t":"ul","items":["Minimizes the time and expense associated with the formal court system","Ensures that each party's interests remain well protected","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance to easily construct your agreement"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Complete your arbitration agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your arbitration agreement, you will need to provide certain relevant information. This includes party names and addresses and details regarding the nature of the dispute."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete the arbitration agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. If no changes are needed, you can simply download your document and sign."},{"t":"a","href":"/documents/create/arbitration-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Whether the parties are already in dispute or they simply want to lay the ground rules in advance, a strong arbitration agreement should provide them with a dispute resolution process that minimizes time and expense while ensuring each party's interests remain well protected. The following information provides additional details on some of the key aspects of the agreement."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/arbitration-agreement","x":"Get Started"},{"t":"h","l":3,"x":"Related Documents"},{"t":"p","x":"View additional documents that our customers are creating. Whether you are an individual or small business, we have you covered."},{"t":"h","l":5,"x":"Independent Contractor Agreement"},{"t":"p","x":"Set forth the essential terms of the business relationship between a contractor and a hiring party."},{"t":"a","href":"/categories/human-resources/Independent-Contractor-Agreement","x":"View more"},{"t":"h","l":5,"x":"Waiver and Release of Liability"},{"t":"p","x":"Release one or both parties involved in an event, dispute, contract, or other legal matter from liability."},{"t":"a","href":"/categories/business/waiver-and-release-of-liability","x":"View more"},{"t":"h","l":5,"x":"Non-Disclosure Agreement"},{"t":"p","x":"Prevent individuals or businesses from disclosing confidential information or trade secrets to others."},{"t":"a","href":"/categories/human-resources/non-disclosure-agreement","x":"View more"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What are arbitration agreements?","a":[{"t":"p","x":"Arbitration agreements are legal documents used to specify how disputes between two parties will be handled, protecting the best interests of each party. Parties signing an arbitration agreement agree to settle disputes through an arbitration proceeding rather than litigating the matter in court."}]},{"q":"Why use an arbitration agreement?","a":[{"t":"p","x":"Arbitration agreements are legal documents used to specify how disputes between two parties will be handled, protecting the best interests of each party. Parties signing an arbitration agreement agree to settle disputes through an arbitration proceeding rather than litigating the matter in court."}]},{"q":"Who should use an arbitration agreement?","a":[{"t":"p","x":"An arbitration agreement is a written legal document in which the people or companies signing the agreement specifically state how disputes or disagreements will be resolved. Generally speaking, arbitration agreements are used to limit, or eliminate, the chances of having to go to court to resolve a dispute."}]},{"q":"What is arbitration?","a":[{"t":"p","x":"Arbitration is simply an alternative means of settling disputes outside of a courtroom. When parties sign an arbitration agreement, they are agreeing that any legal claims that arise out of a relationship or transaction will be handled through arbitration rather than through lawsuits in court."},{"t":"p","x":"The process of arbitration is similar to a trial proceeding in court. The parties often have attorneys representing them, and they exchange information, question witnesses, and present each side of the story. However, arbitration proceedings are generally less formal than courtroom litigation. Instead of being heard by a judge and a jury, a case that goes to arbitration is heard by an arbitrator (or a panel of arbitrators)."},{"t":"p","x":"Arbitration is also usually \"binding,\" which means the decision of the arbitrator(s) is final and cannot be appealed."}]},{"q":"What are the benefits of using an arbitration agreement?","a":[{"t":"p","x":"Arbitration agreements can help both parties by removing the potential need for costly lawsuits in the future if a dispute arises. The parties to an arbitration agreement agree to handle the dispute in a more cost-effective and timely manner than would likely be the case in a court battle."},{"t":"p","x":"When a dispute goes to court, it is a matter of public record. That is not the case when a matter is arbitrated. Testimony in an arbitration matter is not public, nor are the specific details about the dispute made public."}]},{"q":"What should be included in an arbitration agreement?","a":[{"t":"p","x":"Arbitration agreements do not have to be long, but they should include the following key details:"},{"t":"ul","items":["The date of the agreement","The parties to the agreement","Whether the agreement covers a current dispute or is instead designed to govern how future disputes will be decided","A statement that disputes will be decided through binding arbitration rather than being litigated in court","How arbitrators will be chosen and how many arbitrators will hear disputes",[{"x":"Whether there are certain rules that will be used, such as those promulgated by the "},{"x":"American Arbitration Association","h":"https://www.adr.org"},{"x":" (AAA). Alternatively, an arbitration agreement might state that the arbitrator can decide which rules should be applied when hearing and deciding an arbitration dispute."}]]},{"t":"p","x":"Both parties need to sign the agreement to make it legal, and both parties should maintain copies of the signed agreement for their records."}]},{"q":"How are arbitrators chosen and who chooses them?","a":[{"t":"p","x":"Depending on the state you are in, the court may choose an arbitrator for you or the attorneys will work together to choose an arbitrator from a list of court-approved arbitrators. In some cases, the parties may state the method of selection and the number of arbitrators in an arbitration agreement or clause. A common selection method for when the parties cannot agree on an arbitrator dictates that both sides choose one arbitrator and then the two chosen arbitrators choose a third arbitrator. Often, either party may unilaterally decide to use this method in order to ensure that the arbitrator has no interest in the matter."},{"t":"p","x":"Normally, the parties have no need to speak directly to the arbitrators. If the opposing party has an attorney and you do not, be sure to advise opposing counsel that you wish to see the list of arbitrators. You may be able to research the arbitrator online through his or her website in order to determine if the arbitrator has experience in cases like yours and to learn more about the arbitrator's work. You cannot choose someone that you personally know to arbitrate your case. In many cases, the court must agree to the arbitrator that you and the opposing party choose."},{"t":"p","x":"If you do happen to know the arbitrator personally, it is up to the arbitrator to decline the job, but it may be in your best interest to ensure that a different arbitrator is selected. If a court learns that you had a conflict of interest because you and the arbitrator know each other, it could render the decision invalid and could be vacated by the court. This would cost more money and attorney’s fees. Additionally, sanctions may be imposed upon you. The court could even impose sanctions on the arbitrator should he or she knowingly enter into the contract to arbitrate between you and the opposing party."}]},{"q":"What happens if a party fails to pay as required in the decision? How are arbitration awards enforced?","a":[{"t":"p","x":"Once the arbitration award has been entered by the court, it is enforceable the same as any other court order, whether in federal or state court. If the opposing party is not complying with the arbitration agreement and subsequent order, you will need to file a motion to ask the court to enforce the terms of the agreement."},{"t":"p","x":"If, after the court enters an order to enforce the agreement, the opposing party is still in non-compliance, you may file contempt motions. Depending on the court and state in which you are filing, the contempt motion may be for civil contempt or criminal contempt. In some cases, criminal contempt motions may be filed in civil cases. Depending on the type of contempt filed, the court could order the party who is not in compliance to pay fines or receive severe sanctions."}]},{"q":"What is the difference between mediation and arbitration?","a":[{"t":"p","x":"Mediation and arbitration may or may not be binding, depending on the dispute resolution clause or contract agreed upon between the parties. In most cases, mediation is not binding. Both must use a neutral third party who has no personal interest in the case."},{"t":"p","x":"Furthermore, in mediation, the mediator does not judge the case. Instead, the mediator helps the parties negotiate a solution to the issue and eventually come to an agreement. Often, the parties or their lawyers will then put their agreement down in writing that both parties sign."},{"t":"p","x":"On the other hand, with arbitration, the arbitrator may act as the judge by making decisions about evidence and giving written opinions. Those opinions may or may not be binding. Other differences include the following:"},{"t":"ul","items":["Arbitration may be decided by a panel of arbitrators or a single arbitrator. If a case goes to mediation, there is generally just one mediator.","An arbitrator may render a decision on the matter, while a mediator facilitates a negotiation.","Arbitration ends when the arbitrator hands down a decision. Mediation ends when the parties reach a settlement or an impasse.","A court trial and judgment may be substituted by binding arbitration. Generally, with mediation, the trial is stayed pending the outcome of the mediation."]}]},{"q":"How long does it take to arbitrate a claim from start to finish?","a":[{"t":"p","x":"A case could take a few months to over a year. It is not unheard of for cases to take a couple of years, especially if a lot of evidence needs to be presented. If the parties agree to arbitrate or have signed a mandatory arbitration agreement or clause within a contract, that time could be significantly shortened."},{"t":"p","x":"Another factor that could move arbitration out is if a party files emergency motions or administrative motions with the court. If the court wants to hear a motion, you will not be able to arbitrate until all such motions are heard and decided upon."},{"t":"p","x":"Just as with a court hearing, arbitration cannot be held without first completing all of the discovery. Once the discovery phase is complete, all discovery should be forwarded to the arbitrator to review so that he or she may use it in making an informed decision on your matter."},{"t":"p","x":"As for the arbitration hearing itself, the length depends on the complexity of the case, including the amount of discovery. An arbitration could take as little as an hour or two or it could last for several days."},{"t":"p","x":[{"x":"The time frame can also change depending on the particular set of arbitration rules that the parties choose to follow. For instance, if the parties are using the American Arbitration Association’s "},{"x":"Commercial Arbitration Rules and Mediation Procedures","h":"https://www.adr.org/Rules"},{"x":", then their case may be eligible for arbitration under the Expedited Procedures section if no claim or counterclaim exceeds $75,000."}]}]},{"q":"Is there any appeal process?","a":[{"t":"p","x":"Arbitration does not have an appeal process but does have a procedure to overturn a decision. Although rarely used, appeals can occur for the following common reasons:"},{"t":"ul","items":["The award was obtained by fraud, corruption, or some other undue means.","The arbitrators were partial to one of the parties or were corrupt.","The arbitrators refused to postpone the arbitration hearing when one or both parties or their attorneys gave sufficient cause, or the arbitrators refused to hear evidence that was material to the matter at hand. The award may also be vacated if the actions or inactions of the arbitrators caused prejudice to the rights of either party.","If the arbitrators went above their powers or “imperfectly executed” the powers so that the award could not be mutual, definite, or final."]}]},{"q":"Is arbitration binding?","a":[{"t":"p","x":"Whether arbitration is binding or not depends on the agreement signed prior to arbitration—usually a contract—or whether you and the other party agree to binding arbitration prior to the start of the hearing. If you agree to binding arbitration, then the decision is final and it may only be overturned or reviewed by the court if an appeal is properly filed."},{"t":"p","x":"If you choose non-binding arbitration, you have the option to reject the award and ask for a trial. Sometimes, the parties agree to non-binding arbitration to better assess the strengths of their cases in a potential lawsuit. In this case, if the parties do agree to the award, it may become binding. If the parties do not ask for a trial in the required time, the non-binding arbitration award becomes binding."}]},{"q":"What is the difference between arbitration hearings and jury trials?","a":[{"t":"p","x":"Several factors differentiate an arbitration hearing and a jury trial:"},{"t":"ul","items":["An arbitrator does not have to go by the strict rules of evidence that the parties and their attorneys must abide by during a bench trial or jury trial.","Hearsay and other evidence that would not be allowed in a jury or bench trial may be allowed in an arbitration hearing.","The arbitrator's decision in binding arbitration must be followed, just as a court order. However, the arbitrator's decision does not have to be based on law, which it would be if issued by a judge.","Any decision made by the court, whether in a jury trial or bench trial, may be appealed. A decision reached through arbitration is usually not subject to appeal except in rare circumstances."]}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/arbitration-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Arbitration Agreement"},{"t":"p","x":"Complete your arbitration agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/arbitration-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Arbitration Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-certificate-of-incorporation--ba592f1039.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Certificate of Incorporation"},{"t":"p","x":"This important document registers your company's name and intent to conduct business within the state as a domestic corporation. After you receive approval from the state, your new business will officially be ready to hold its first board meeting and begin operations."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/certificate-of-incorporation","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/iVvTx1uuSfmO9zaGkRRE.webp","alt":"Certificate of Incorporation document preview"},{"t":"h","l":3,"x":"What is a certificate of incorporation?"},{"t":"p","x":"The term \"certificate of incorporation\" refers to a legal document filed with a state to establish a new business corporation. Some states refer to certificates of incorporation as \"articles of incorporation.\" These public records outline the fundamental aspects of a corporation, including the following basic information:"},{"t":"ul","items":["Corporate name","Principal office address","Registered agent information","Directors or officers","Stock information"]},{"t":"h","l":3,"x":"Use the business formation document which best suits your needs"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kaGRzpN0S6qQMo7gul9X.webp","alt":"Articles of Organization document preview"},{"t":"p","x":[{"x":"Articles of Organization","h":"/categories/business-formation/articles-of-organization"},{"x":" Articles of organization are filed with a state to establish a limited liability company, or \"LLC.\" LLCs offer liability and tax protections similar to that of a corporation, but with a different ownership and management structure."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kxT1kLvsSQq88tabM64B.webp","alt":"Articles of Incorporation document preview"},{"t":"p","x":[{"x":"Articles of Incorporation","h":"/categories/business-formation/articles-of-incorporation"},{"x":" Some states refer to certificates of incorporation as articles of incorporation. LegalNature's intuitive forms will create the correct document based upon your chosen state's requirements."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/kxT1kLvsSQq88tabM64B.webp","alt":"Articles of Amendment document preview"},{"t":"p","x":[{"x":"Articles of Amendment","h":"/categories/business-formation/articles-of-amendment"},{"x":" Sometimes information on a certificate of incorporation needs to be changed (e.g. change of company name or address). Articles of amendment are filed with the corporation's state in order to submit amendments to a certificate of incorporation."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"Create a certificate of incorporation in your state"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=5","x":"California"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=9","x":"Florida"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=19","x":"Maine"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=26","x":"Montana"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=32","x":"New York"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=43","x":"Texas"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=44","x":"Utah"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=47","x":"Washington"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/certificate-of-incorporation?state=50","x":"Wyoming"},{"t":"h","l":3,"x":"When to use a certificate of incorporation"},{"t":"p","x":"Certificates of incorporation are essential legal documents used to establish a corporation at the state level. You should use a certificate of incorporation to do the following:"},{"t":"ul","items":[[{"x":"Form a new corporation","b":1},{"x":": This document officially creates your company as a distinct legal entity"}],[{"x":"Register with the state","b":1},{"x":": A certificate of incorporation is required to register your corporation with the state government"}],[{"x":"Define company structure","b":1},{"x":": The certificate outlines the basic structure and purpose of your corporation"}],[{"x":"Protect personal assets","b":1},{"x":": By establishing a corporation, you can shield personal assets from business liabilities"}],[{"x":"Seek tax advantages","b":1},{"x":": Corporations offer potential tax benefits, which begin with proper formation"}],[{"x":"Comply with state laws","b":1},{"x":": Each state has specific requirements for corporation formation, which the certificate of incorporation helps to fulfill"}],[{"x":"Prepare for future growth","b":1},{"x":": A well-crafted certificate of incorporation can provide flexibility for business expansion"}]]},{"t":"h","l":2,"x":"How to create your certificate of incorporation"},{"t":"ol","items":["Select the state where the corporation will be registeredOur certificate of incorporation template dynamically changes according to the selected state's requirements. Since each state decides what details will be necessary to form a corporation, the required information can vary from one state to another.","Provide the corporation's name, company address, and other detailsWhen choosing your business name, it is important to consider your state's naming requirements. As for your corporation's company address, keep in mind that it will function as an official business address. For this reason, a street address will most likely be required.","Set forth the corporation's board of directors and officersThe names and addresses of the initial directors and officers of the corporation should be named, thereby establishing the governance structure of the corporation.","Describe the corporation's stock informationOutline the types and number of shares the corporation is authorized to issue. This is crucial for capital structure and investment strategies. Corporate stock represents an ownership interest in a corporation, typically divided into shares that signify a proportionate ownership stake in the business."]},{"t":"h","l":3,"x":"Why create a certificate of incorporation and a corporation?"},{"t":"p","x":"A corporation is a business entity formed separately from the owner that can be used to incur business debts, expenses, and tax liabilities related to the business."},{"t":"p","x":"The corporate structure creates a legal separation between the business entity and its directors, owners, or officers, shielding them from personal liability if the business faces financial or legal troubles."},{"t":"p","x":"It is important to note that this limited liability protection is not absolute and can be compromised if owners fail to maintain proper business practices or engage in fraudulent activities."},{"t":"a","href":"/documents/create/certificate-of-incorporation","x":"Create Your Certificate of Incorporation Today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/YfzVl6ihQvuww28eH2Vg.webp","alt":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Certificate of incorporation guide"},{"t":"p","x":"A certificate of incorporation is a formal document used to establish a corporation and define the fundamental aspects of a corporation's structure. Sometimes also referred to as articles of incorporation, a certificate of incorporation must be filed with a state in order to create and register a corporation as a valid business organization within that state."},{"t":"p","x":"Certificates of incorporation include the essential details of a corporation, including the following:"},{"t":"ul","items":[[{"x":"The Corporation's Name:","b":1},{"x":" Each state requires that companies have a distinct name, often including the entity designator \"Inc.\" or \"Corporation.\""}],[{"x":"Business Purpose:","b":1},{"x":" Some states require that a business purpose be outlined in its certificate of incorporation. This is commonly a general statement, such as \"accounting services\" or \"any lawful act or activity.\""}],[{"x":"Business Address:","b":1},{"x":" The physical address of the business is often required to be reported in lieu of a P.O. Box."}],[{"x":"Registered Agent:","b":1},{"x":" This is the person or entity designated to receive legal paperwork, such as service of process or other government correspondence, on behalf of the corporation. The agent's name and physical street address are required to be reported."}],[{"x":"Directors or Officers:","b":1},{"x":" The initial board of directors and managing officers of the corporation are often required to be listed on the certificate of incorporation. These titles can be held concurrently by the same person depending on the size of the corporation."}],[{"x":"The Effective Date of the Corporation's Formation:","b":1},{"x":" The date that the corporation's formation takes effect defaults to the day that the certificate of incorporation is filed with the state; however, a specific date may be set forth as the owner wishes."}]]},{"t":"p","x":"These requirements are general, common information, and some states may require additional information."},{"t":"h","l":3,"x":"Certificate of incorporation or certificate of organization?"},{"t":"p","x":"The terms \"certificate of organization\" and \"certificate of incorporation\" are often mistakenly used interchangeably. Both documents are used for the purpose of registering a business entity with a state, but certificates of organization are used to create LLCs while certificates of incorporation are used to form corporations. Both business entities provide similar liability protections to the business's owner, but are owned and operated through different structures."},{"t":"h","l":3,"x":"Do I need an attorney to create a certificate of incorporation?"},{"t":"p","x":"Any business owner may file their own certificate of incorporation and an attorney is not required for their creation. However, it is highly recommended to consult with an attorney or other legal service providers when creating this legal document since each state has its own specific requirements for filing that may be difficult or confusing to navigate."},{"t":"h","l":3,"x":"What if I need to make changes to my certificate of incorporation?"},{"t":"p","x":"Articles of amendment should be filed when changes to a company's certificate of incorporation need to be made. Certificates of incorporation may require changing if they contain errors when they are first filed, or there are changes in the business over time. These changes, or amendments, may include reporting a new registered agent, updating the company's business address, or changing the company's board of directors and officers."},{"t":"h","l":3,"x":"What is the difference between a for-profit and a not-for-profit corporation?"},{"t":"p","x":"For-profit corporations are owned by shareholders who receive stock in exchange for investments which pay out to the shareholders in dividends. Not-for-profit, or nonprofit, corporations cannot issue shares or stock and have members, but no shareholders. The dividends and profits of for-profit corporations are taxed, while nonprofit corporations are often tax-exempt, falling under Section 501(c)(3) of the Internal Revenue Code."},{"t":"h","l":3,"x":"What should I do after filing a certificate of incorporation?"},{"t":"p","x":"After filing a certificate of incorporation and paying the filing fee, there is typically a short waiting period for the certificate of incorporation to be reviewed and approved by the state, though many states offer expedited processing for faster service. Once the certificate is approved and the corporation is a registered business entity, there are several actions that should be taken in order to ensure that the newly formed company remains compliant with the department of state:"},{"t":"ol","items":[[{"x":"Retrieve an EIN from the IRS","b":1},{"x":": An employer identification number, or EIN, is an essential nine-digit number required for federal tax purposes. Having a valid EIN is often required to apply for other business necessities, such as a license or financial accounts."}],[{"x":"Choose your corporate tax structure","b":1},{"x":": For-profit corporations are taxed under two different structures: C corp or S corp. C corps pay taxes on their profits and shareholders pay taxes on their dividends, while S corps offer pass-through taxation where profits and losses are reported on shareholders' personal tax returns. Choosing a tax structure is as easy as filing the correct form with the IRS. This choice is integrated into our intuitive online form."}],[{"x":"Create corporate bylaws","b":1},{"x":": While the certificate of incorporation outlines the general purpose of the corporation, a corporation's bylaws describe the specific functions, regulations, responsibilities, and rules for the business, including protocols for dealing with personal or financial liabilities or internal conflicts of interest."}],[{"x":"Open a business bank account","b":1},{"x":": Establishing a separate business bank account for your business is crucial for maintaining and managing your business assets and business finances, while protecting yourself from personal liability."}],[{"x":"Apply for any required business licenses","b":1},{"x":": Some business types are monitored and regulated more heavily by the states and require certification and licensure to operate legally."}],[{"x":"File annual reports","b":1},{"x":": Most states require corporations to file an annual report with the state's division of corporations to remain in good standing and preserve the liability protections offered by the corporate business structure."}]]},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"Why do I need to file a certificate of incorporation for my corporation?","a":[{"t":"p","x":"Certificates of incorporation are designed to give your state's Secretary of State or Company Registrar the information required to determine whether or not to approve a new company. State laws governing businesses are designed to protect consumers and state residents, so every state has laws and requirements that businesses must comply with if they want the benefits of a corporate structure."}]},{"q":"In what state should I register my corporation?","a":[{"t":"p","x":"Although businesses can register to conduct business in any state, most businesses choose to organize their corporations in the state where their principal office is located. Although it may make sense to choose a different state for a corporation because of that state’s tax treatment, some states impose additional taxes, making it cheaper to organize under a neighboring state’s laws. If you are considering establishing your corporation in a state other than your own, it is important that you investigate whether that state requires additional paperwork."}]},{"q":"Will I need a registered agent?","a":[{"t":"p","x":"A registered agent is an individual or business entity residing within the company's state. All registered agents must maintain normal business hours at a physical address that is open to the public. The registered agent’s main function is to ensure reliable communication between the company and any third party, by receiving and forwarding legal documents, notices, or other requests to the company. It is mandatory that every company provides the registered agent's full name. If the registered agent is a business entity, then you should include the entity designation of the business such as Inc. or Co. It is also mandatory that every company provides the address where the registered agent is required to receive any legal correspondence. Check with your state regarding any specific requirements for listing the registered agent's address. LegalNature provides access to a registered agent with the option to use the company's physical address, the company's mailing address, or any other address where the registered agent is willing and able to receive mail. It is important to point out that some states require the registered agent’s consent in order to be named as such."}]},{"q":"How do I file my certificate of incorporation?","a":[{"t":"p","x":"Most states allow certificates of incorporation to be filed electronically online through the Secretary of State or Division of Corporations website. Certificates can also be submitted through the mail; though, this typically results in an extended wait-period for processing. After receiving the certificate and any required filing fees, there is typically a short processing period; unless the state offers expedited processing for an additional fee."}]}]},{"t":"h","l":4,"x":"Create your certificate of incorporation in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview & download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/xWHaKSuVQeSFYlrKhMre.webp","alt":"Create your certificate of incorporation in minutes"},{"t":"a","href":"/documents/create/certificate-of-incorporation","x":"Create Document"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-corporate-resolution--8efee1f955.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Corporate Resolution"},{"t":"p","x":"A corporate resolution formally records any major decision made by a corporation, LLC, or nonprofit."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/corporate-resolution","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Resolution-Preview-Desktop.webp","alt":"Corporate Resolution document preview"},{"t":"h","l":3,"x":"What is a corporate resolution?"},{"t":"p","x":"A corporate resolution, sometimes referred to as a “company resolution,” is a formal written document created by a company’s board of directors, officers, managers, shareholders, or owners that records specific decisions, authorizations, or actions taken on behalf of the corporation. The definition of a corporate resolution is a written document created to formally record and authorize binding decisions made by the board."},{"t":"p","x":"A corporate resolution acts as a binding declaration of intent or decision made by a corporation’s directors. These binding decisions are adopted and recorded by board members and corporate officers, who are responsible for making and executing resolutions. Companies and corporations use resolutions to formalize major decisions and ensure proper governance. Executives and the company's management play a key role in implementing these resolutions."},{"t":"h","l":3,"x":"Use the corporate document that best suits your needs"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-preview-Desktop.webp","alt":"Articles of Incorporation document preview"},{"t":"p","x":[{"x":"Articles of Incorporation","h":"/categories/business-services/articles-of-incorporation"},{"x":" Register your corporation in your state. LegalNature's intuitive forms are easy to use and compliant in all fifty states and the District of Columbia."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Bylaws-Preview-Desktop.webp","alt":"Corporate Bylaws document preview"},{"t":"p","x":[{"x":"Corporate Bylaws","h":"/categories/business-formation/corporate-bylaws"},{"x":" Corporate bylaws are a set of rules and procedures used to determine how a C corp, S corp, or nonprofit will be run."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"Create a corporate resolution in your state"},{"t":"a","href":"/documents/create/corporate-resolution?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/corporate-resolution?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/corporate-resolution?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/corporate-resolution?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/corporate-resolution?state=5","x":"California"},{"t":"a","href":"/documents/create/corporate-resolution?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/corporate-resolution?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/corporate-resolution?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/corporate-resolution?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/corporate-resolution?state=9","x":"Florida"},{"t":"a","href":"/documents/create/corporate-resolution?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/corporate-resolution?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/corporate-resolution?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/corporate-resolution?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/corporate-resolution?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/corporate-resolution?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/corporate-resolution?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/corporate-resolution?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/corporate-resolution?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/corporate-resolution?state=19","x":"Maine"},{"t":"a","href":"/documents/create/corporate-resolution?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/corporate-resolution?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/corporate-resolution?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/corporate-resolution?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/corporate-resolution?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/corporate-resolution?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/corporate-resolution?state=26","x":"Montana"},{"t":"a","href":"/documents/create/corporate-resolution?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/corporate-resolution?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/corporate-resolution?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/corporate-resolution?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/corporate-resolution?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/corporate-resolution?state=32","x":"New York"},{"t":"a","href":"/documents/create/corporate-resolution?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/corporate-resolution?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/corporate-resolution?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/corporate-resolution?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/corporate-resolution?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/corporate-resolution?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/corporate-resolution?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/corporate-resolution?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/corporate-resolution?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/corporate-resolution?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/corporate-resolution?state=43","x":"Texas"},{"t":"a","href":"/documents/create/corporate-resolution?state=44","x":"Utah"},{"t":"a","href":"/documents/create/corporate-resolution?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/corporate-resolution?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/corporate-resolution?state=47","x":"Washington"},{"t":"a","href":"/documents/create/corporate-resolution?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/corporate-resolution?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/corporate-resolution?state=50","x":"Wyoming"},{"t":"h","l":3,"x":"When to use a corporate resolution"},{"t":"p","x":"Generally, most routine actions do not require a formal resolution, but a corporate resolution should be used whenever a corporation or its board of directors needs to formally document and authorize significant business decisions or actions, especially in various circumstances where proper documentation is essential. This is particularly important for companies with multiple shareholders or those organized as a limited liability company (LLC), as resolutions help clarify decision-making authority and protect personal assets."},{"t":"ul","items":[[{"x":"Major Decisions:","b":1},{"x":" Examples include amending bylaws, adopting new bylaws, issuing company shares, authorizing debt or securities transactions, mergers, acquisitions, real estate purchases, and executive appointments."}],[{"x":"Delegating Authority:","b":1},{"x":" Authorizing officers to open bank accounts, withdraw money, write checks, sign contracts, or acquire loans on the company’s behalf."}],[{"x":"Voting and Meetings:","b":1},{"x":" Approving resolutions through voting by the board or shareholders during meetings and board meetings, ensuring that all major actions are properly authorized and recorded."}],[{"x":"Record Keeping:","b":1},{"x":" These resolutions are included in board meeting minutes, offering a paper trail for legal and audit purposes."}]]},{"t":"h","l":2,"x":"How to create your corporate resolution"},{"t":"ol","items":["Gather InformationCollect the business's information and the matter that is to be addressed by the corporate resolution, including the date the resolution was adopted and the specific means of adoption.","Answer Questions in Our Online FormOur intuitive online form will ask you questions regarding your corporate resolution and fill out your document for you.","Review and SignIt is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes to your document by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version and sign. All required parties should review and sign the document in compliance with any specific company bylaws.","Distribute and Store CopiesAt a minimum, all parties who sign the document should receive a copy once it is fully executed (everyone has signed). Other interested parties may need or want copies as well. Be sure to store your copy in a safe location. It is a good idea to keep both a physical and electronic copy."]},{"t":"h","l":3,"x":"Why create a corporate resolution?"},{"t":"p","x":"Corporate resolutions help ensure compliance with corporate policies, rules, regulations, and tax laws. Maintaining corporate records and keeping them separate from personal records is essential for legal protection and operational clarity. Access to corporate records is controlled, and these records may be reviewed by regulators or shareholders. Resolutions must be in writing, include proper signatures, and are often documented using a standardized form. For example, a corporate resolution may authorize opening a new bank account or approving a loan, depending on the circumstances and after determining the best course of action in the interest of the company."},{"t":"ul","items":[[{"x":"Legal protection:","b":1},{"x":" Resolutions offer evidence that an action was properly approved, helping maintain the corporate veil and liability protections."}],[{"x":"Compliance and record-keeping:","b":1},{"x":" Regulatory agencies, courts, and auditors may request proof of corporate decisions; resolutions provide this documentation."}],[{"x":"Transparency and accountability:","b":1},{"x":" Shareholders and stakeholders benefit from a clear trail of board actions."}]]},{"t":"p","x":"Corporate resolutions are essential for any major or atypical decision affecting a company, ensuring legality, organization, and proper documentation for future review or compliance."},{"t":"a","href":"/documents/create/corporate-resolution","x":"Create Your Corporate Resolution Today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp","alt":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Corporate Resolution Help Guide"},{"t":"p","x":"Use a corporate resolution (called a \"company resolution\" for an LLC) to formally record the important binding decisions of a corporation's directors, officers, managers, or owners. A good corporate resolution is customizable to anticipate any resolutions the business's decision-makers may pass. The following guide provides helpful explanations of the more common resolutions your business may encounter in its lifespan."},{"t":"h","l":3,"x":"Entity Types"},{"t":"p","x":"For-profit and nonprofit corporations must regularly use corporate resolutions in order to meet required formalities required by state law. Although LLCs are not required to use corporate resolutions, they are still recommended to do so to document actions taken and votes decided at member meetings. Banks, investors, and other parties that work with the company will often request or require that they see company resolutions to gain a transparent view of company decisions."},{"t":"h","l":3,"x":"Business Information"},{"t":"p","x":"Enter the business's name exactly as it appears on your articles of incorporation or articles of organization filed, or to be filed, with the state."},{"t":"h","l":3,"x":"Resolution Maker"},{"t":"p","x":"Depending on the type of entity, resolutions are created by the shareholders, board of directors, members, or board of managers. Indicate which type of party will be creating this resolution."},{"t":"h","l":3,"x":"Resolution Adoption"},{"t":"p","x":[{"x":"Based on the rules contained in your company’s "},{"x":"articles of incorporation","h":"/categories/business-formation/articles-of-incorporation"},{"x":", "},{"x":"shareholder agreement","h":"/categories/business-formation/shareholder-agreement"},{"x":", "},{"x":"corporate bylaws","h":"/categories/business-formation/corporate-bylaws"},{"x":", or "},{"x":"LLC operating agreement","h":"/categories/business-formation/llc-operating-agreement"},{"x":", you will select how the resolution is being passed."}]},{"t":"ul","items":[[{"x":"The resolution could be passed "},{"x":"at a meeting that meets quorum","b":1},{"x":". This is where the minimum number of decision-makers that must be present for the meeting to go forward are present, and a sufficient number of the decision-makers voted in favor of the resolutions."}],[{"x":"The resolution could be passed "},{"x":"by necessary written consent","b":1},{"x":". This is where a meeting is not necessary because a sufficient number of decision-makers consented in writing to approve the resolution."}],[{"x":"The resolution could be passed "},{"x":"by unanimous written consent","b":1},{"x":". This is where a meeting is not necessary because every decision-maker consented in writing to approve the resolution."}]]},{"t":"h","l":3,"x":"Adoption Date"},{"t":"p","x":"Next, include the date that the resolution is being adopted by the company. Normally, this is the date that the meeting occurs. When a resolution is being passed by written consent, then the adoption date will be the date that the decision-makers finish providing their votes."},{"t":"h","l":3,"x":"Resolution: Open a Bank Account"},{"t":"p","x":"Nearly every business will need a bank account, and this resolution concisely enables the chief financial officer to authorize opening a bank account with a reputable bank for the company's sole use and benefit."},{"t":"h","l":3,"x":"Resolution: Borrow Capital"},{"t":"p","x":"When borrowing capital, banks frequently require proof that the company authorizes the loan. A resolution from the company stating consent to borrow capital with certain dollar and collateral limits will satisfy the bank that the company and their officers or representatives have the authority to engage the bank and seek out a loan."},{"t":"h","l":3,"x":"Resolution: Amend Documents"},{"t":"p","x":"A company's foundational documents often require a high standard of approval by the company's ultimate decision-makers before these documents can be changed or amended. To make changes to the bylaws, charter, shareholder agreement, or operating agreement, select the appropriate document to be amended and write out the specific section to be changed, replaced, or eliminated."},{"t":"h","l":3,"x":"Resolution: Approve Annual Budget"},{"t":"p","x":"It is best practice for a company's annual budget to be approved through a corporate resolution. Here, the decision-makers review the company financials from the previous year and approve the estimated budget for the coming year. To complete this section, insert the start and end date of your company's fiscal year."},{"t":"p","x":"Additionally, it is important to remember that the approved budget plan should be attached to the resolution and filed with the company records."},{"t":"h","l":3,"x":"Resolution: Commence or Defend Lawsuit"},{"t":"p","x":"This resolution authorizes the company's officers to either 1) start a new lawsuit against a third party that has wronged the company, or 2) defend an existing lawsuit from a third party alleging that the company committed certain wrongdoings. The resolution should include some general terms to reference the nature of the legal dispute and the parties involved. The resolution also gives the president or chief executive officer the authority to reasonably settle the dispute."},{"t":"h","l":3,"x":"Resolution: Declare Dividend Distribution"},{"t":"p","x":[{"x":"(For-Profit Corporations Only)","i":1}]},{"t":"p","x":"To declare a dividend distribution to its shareholders, the corporation only needs to provide the distribution type, the dollar amount per share, and the classes of shares affected by this resolution. The corporation should also establish a \"record date,\" which is the cut-off date to determine the shareholders eligible to receive the dividend distribution."},{"t":"h","l":3,"x":"Resolution: Appointment of Directors/Officers/Managers"},{"t":"p","x":"Use this resolution to appoint directors, officers, and managers to their respective positions within the company. These new appointments will begin immediately until their successors are elected, they resign voluntarily, or they are removed from the position by the company."},{"t":"h","l":3,"x":"Resolution: Hire an Employee"},{"t":"p","x":[{"x":"This resolution allows the company officers to engage in the hiring of a specific employee and sets the parameters of the "},{"x":"employment offer","h":"/categories/human-resources/employment-offer-letter"},{"x":". The officers cannot hire an employee for more than the resolution's maximum dollar limit. The employee will receive whatever standard benefits are offered to other employees unless otherwise noted in this section."}]},{"t":"h","l":3,"x":"Resolution: Lease or Purchase Certain Assets"},{"t":"p","x":[{"x":"For larger ticket items, a company and its financiers will often require the decision-makers to authorize the expenditure before the lease or purchase is made. This section identifies these leases or purchases in order to specifically authorize the officers to procure these items. Additionally, it is important to remember that the lease or "},{"x":"purchase agreement","h":"/categories/business/purchase-agreement"},{"x":", if available, should be attached to the resolution and filed with the company records."}]},{"t":"h","l":3,"x":"Resolution: Negotiate a Contract"},{"t":"p","x":"This resolution authorizes the company officers to enter into negotiations with a third party. A resolution is usually reserved for large or long-term contracts. It is not necessary for the officers to gain approval from the company decision-makers for smaller negotiations that the company may encounter on a daily basis."},{"t":"h","l":3,"x":"Resolution: Obtain License or Government Approval"},{"t":"p","x":"This resolution authorizes the company officers to pursue all licenses or government approvals that are specified here. This can also serve as verification to third parties that the company authorizes all actions relating to the procurement of these licenses and approvals."},{"t":"h","l":3,"x":"Resolution: Ratify Prior Acts"},{"t":"p","x":"This resolution allows the decision-makers to authorize any prior acts or decisions made by people who report to the decision-makers. For example, this resolution allows the shareholders to ratify acts done by the board of directors and any officers after careful consideration of the directors' and officers' actions and decisions."},{"t":"h","l":3,"x":"Resolution: Retain a Specialist"},{"t":"p","x":"This resolution authorizes the company to hire a specialist at a reasonable market rate as approved by the chief financial officer. These specialists may include accountants, brokers, attorneys, consultants, and more."},{"t":"h","l":3,"x":"Resolution: Sell Business Equipment, a Vehicle, or Other Assets"},{"t":"p","x":"This resolution identifies assets the company wishes to sell and the intended buyer. It is important to remember that the sales agreement, if available, should be attached to the resolution and filed with the company records."},{"t":"h","l":3,"x":"Resolution: Terminate a Specific Contract/Employee/Officer/Director/Lease"},{"t":"p","x":"This resolution formally approves the termination of a specific contract, employee, officer, director, or lease. The termination may occur immediately or on a specified date."},{"t":"h","l":3,"x":"Resolution: Other"},{"t":"p","x":"This resolution allows you to add any additional resolution passed by the company, if applicable."},{"t":"h","l":3,"x":"Certification"},{"t":"p","x":"When a company certifies a resolution, it means that an officer has affirmed that the resolution is correct as written and was validly adopted. Banks and other organizations often require certification in order to open accounts or transact business. Resolutions are commonly certified by the company secretary or chief executive officer."},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a corporate resolution?","a":[{"t":"p","x":"A corporate resolution is a corporate action that will be voted on or has been voted on at a meeting of the board of directors or shareholders for a corporation. A corporate resolution can also be used by LLCs and nonprofits."}]},{"q":"What is a certified corporate resolution?","a":[{"t":"p","x":"A certified corporate resolution is a resolution made at a directors' or shareholders' meeting that has been approved by the secretary and president of the corporation. This type of resolution is useful if a bank or other external organization requires authentication to permit specific actions or powers, such as the authority to sign documents on behalf of the corporation."}]},{"q":"What are the common types of corporate resolutions?","a":[{"t":"p","x":"The common types of corporate resolutions include the following:"},{"t":"ul","items":["Resolution to amend documents","Resolution to approve annual budget","Resolution to borrow capital","Resolution to commence or defend lawsuits","Resolution to declare dividend distribution","Resolution to appoint or hire employees and officers","Resolution to lease or purchase assets","Resolution to negotiate contracts","Resolution to open a bank account"]}]},{"q":"What is the difference between corporate resolutions and corporate minutes?","a":[{"t":"p","x":"A resolution is written documentation describing an action authorized by the board of directors or shareholders of a company. The minutes are a written document that describes items discussed by the directors or shareholders during a meeting, including actions taken and resolutions passed."}]},{"q":"What is the difference between a directors' resolution and shareholders' resolution?","a":[{"t":"p","x":"A directors' resolution is used by the board of directors in a corporation to document decisions and actions (typically) in place of a directors' meeting, while a shareholder's resolution is used by shareholders in a corporation to propose amendments, decisions, or changes to the corporation at a shareholder meeting."}]}]},{"t":"h","l":4,"x":"Create your corporate resolution in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview and download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Resolution-preview-Mobile.webp","alt":"Create your corporate resolution in minutes"},{"t":"a","href":"/documents/create/corporate-resolution","x":"Create Document"},{"t":"h","l":2,"x":"Start Your Corporate Resolution"},{"t":"p","x":"Complete your corporate resolution in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/corporate-resolution","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Corporate-Resolution-Preview-Desktop.webp","alt":"Start Your Corporate Resolution"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-llc-operating-agreement--28504c414c.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"LLC Operating Agreement"},{"t":"p","x":"Set the important rules for your LLC with our operating agreement template."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/llc-operating-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA-Preview-Desktop.webp","alt":"LLC Operating Agreement document preview"},{"t":"h","l":3,"x":"What is an LLC operating agreement?"},{"t":"p","x":"An LLC operating agreement is a legal document which defines the rights and duties of a limited liability company’s, or LLC’s, members; and outlines how the LLC will be owned and operated. An operating agreement formalizes the business arrangement among LLC members, clarifying roles, responsibilities, and profit-sharing. It is an essential document that all LLCs should create and keep updated. Sometimes referred to as an LLC agreement, a written operating agreement is a key part of the LLC's business structure, providing legal protection and clarity for members. Unlike verbal agreements, which are often unenforceable and can lead to disputes, a written operating agreement is legally enforceable and helps prevent misunderstandings. An LLC’s operating agreement governs the internal affairs and business affairs of the company, setting out management and operational responsibilities. It describes the specific functions, regulations, responsibilities, business purpose, and rules for the business, including protocols for dealing with personal or financial liabilities or internal conflicts of interest."},{"t":"h","l":3,"x":"Create an LLC to go with your operating agreement"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-Desktop.webp","alt":"Articles of Organization document preview"},{"t":"p","x":[{"x":"Articles of Organization","h":"/documents/create/articles-of-organization"},{"x":" Articles of Organization are filed with a State to establish an LLC. An LLC is a business entity that offers liability and tax protections to its owner."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"LLC operating agreement requirements and enforecement vary by state. Select your state below to create a legally compliant document."},{"t":"a","href":"/documents/create/llc-operating-agreement?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=5","x":"California"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=9","x":"Florida"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=19","x":"Maine"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=26","x":"Montana"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=32","x":"New York"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=43","x":"Texas"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=44","x":"Utah"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=47","x":"Washington"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/llc-operating-agreement?state=50","x":"Wyoming"},{"t":"h","l":3,"x":"When to use an LLC operating agreement"},{"t":"p","x":"While LLC operating agreements are not required by all states, they are used shortly before or after registering an LLC with a state to establish specific guidelines and operational benefits, such as:"},{"t":"ol","items":[[{"x":"Asset Protection","b":1},{"x":": It establishes a clear separation between the LLC and the business owners, protecting personal assets from business liabilities and distinguishing company assets. A written operating agreement also provides personal protection by helping shield personal assets from business related legal challenges."}],[{"x":"Customized Rules","b":1},{"x":": It allows you to set specific guidelines for your business, overriding default state regulations."}],[{"x":"Clarity and Structure","b":1},{"x":": It defines ownership percentages, profit distribution, and decision-making processes, reducing potential disputes."}],[{"x":"Credibility","b":1},{"x":": It lends credibility to your LLC, especially important for single-member LLCs."}],[{"x":"Financial Flexibility","b":1},{"x":": Some lenders may require an operating agreement before approving loans."}],[{"x":"Legal Protection","b":1},{"x":": It helps maintain your LLC's limited liability status and can prevent the corporate veil from being pierced."}]]},{"t":"p","x":"For LLCs with two or more members, an operating agreement is essential for outlining management rules and handling the addition of new members. Some states require operating agreements by law, and it is recommended to create your own operating agreement even if not required."},{"t":"p","x":"Even for single-member LLCs, an operating agreement is valuable in establishing the business as a separate entity. While you can create an operating agreement at any time, it’s best to do so when forming your LLC to ensure clear guidelines from the start."},{"t":"h","l":2,"x":"How to create your LLC operating agreement"},{"t":"ol","items":["Gather InformationGather all relevant information, including the LLC’s address, main business activity, member capital contributions, and agreed distribution of profits.","Answer Key QuestionsUse the information you collected to complete the operating agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected.","Review and SignIt is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes to your document by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version and sign.","Distribute and Store CopiesAt a minimum, all parties that sign the document should receive a copy once it is fully executed (everyone has signed). Other interested parties may need or want copies as well. Be sure to store your copy in a safe location. It is a good idea to keep both a physical and electronic copy."]},{"t":"h","l":3,"x":"Why create an LLC operating agreement?"},{"t":"p","x":"An LLC operating agreement outlines the internal regulations and specific guidelines for the operation of an LLC. Without an operating agreement a limited liability company may face several obstacles in its management and internal workings, including:"},{"t":"ul","items":[[{"x":"Loss of Business Control","b":1},{"x":": Without an operating agreement, your company will be governed by the state's default rules or state default rules, which may not align with the intentions of the LLC's members. A well-crafted agreement allows you to maintain control by establishing your own operational guidelines."}],[{"x":"Ambiguous Ownership","b":1},{"x":": Lack of clear documentation can lead to confusion about each LLC member's ownership interest and member's percentage, especially during transitions like member deaths. An operating agreement provides explicit instructions for handling ownership changes, preventing potential legal disputes."}],[{"x":"Challenges with Member Transitions","b":1},{"x":": Without defined terms, disagreements may arise when members leave the LLC. An operating agreement should detail initial contributions, ownership stakes, and document a withdrawing member's contributions, as well as the procedures for transferring a member's interest or membership interest. When a member leaves, the agreement should outline how the fair market value of their interest is determined and how it is distributed among remaining members."}],[{"x":"Gaps in Dispute Resolution","b":1},{"x":": Multi-member LLCs often face internal conflicts. An operating agreement outlines dispute resolution procedures, potentially avoiding costly legal battles"}],[{"x":"Vulnerability to Legal Action","b":1},{"x":": The absence of an operating agreement, particularly in states requiring one, may weaken your LLC's liability protection. This could expose owners to personal liability if the business faces legal action"}]]},{"t":"p","x":"A well-developed LLC operating agreement serves as a crucial tool for maintaining control, clarity, and protection in your business operations."},{"t":"a","href":"/documents/create/llc-operating-agreement","x":"Create your LLC operating agreement today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp","alt":"Why choose LegalNature"},{"t":"h","l":2,"x":"Why choose LegalNature"},{"t":"h","l":2,"x":"LLC Operating Agreement Guide"},{"t":"p","x":[{"x":"This page explains the fundamentals of LLC operating agreements, including their purpose, key components, and general legal principles—for state-specific information about enforceability, statutory default rules, and formation requirements, refer to your state's dedicated page.","b":1}]},{"t":"p","x":"An LLC operating agreement is a business plan that defines the operational and management structure of a limited liability company. For a new business, an operating agreement is essential to clarify the business arrangement and business structure among members, ensuring everyone understands their roles, responsibilities, and how profits are distributed. Although an operating agreement is not legally required in most states, it is a good and prudent business practice to implement an operating agreement to serve as a roadmap for business operations and member relations."},{"t":"p","x":"LLC operating agreements may be developed before or after registering a company with the state and often contain the following key components:"},{"t":"p","x":[{"x":"Basic Company Information","b":1}]},{"t":"ul","items":["LLC name and address","Registered agent details","Statement of purpose","Duration of the LLC"]},{"t":"p","x":[{"x":"Membership Information","b":1}]},{"t":"ul","items":["Names and addresses of members","Ownership percentages","Capital contributions","Voting rights and procedures"]},{"t":"p","x":[{"x":"Management Structure","b":1}]},{"t":"ul","items":["Member managed LLC or manager managed LLC","Roles and responsibilities of managers/members","Decision-making processes"]},{"t":"p","x":[{"x":"Financial Matters","b":1}]},{"t":"ul","items":["Distribution of profits and losses","Tax treatment","Accounting methods and fiscal year"]},{"t":"p","x":[{"x":"Operational Procedures","b":1}]},{"t":"ul","items":["Meeting schedules and protocols","Record-keeping requirements","Dispute resolution methods","Internal operations"]},{"t":"p","x":[{"x":"Membership Changes","b":1}]},{"t":"ul","items":["Procedures for admitting new members","Rules for transferring ownership interests","Buy-sell provisions"]},{"t":"p","x":[{"x":"Dissolution Procedures","b":1}]},{"t":"ul","items":["Circumstances triggering dissolution","Asset distribution upon dissolution"]},{"t":"p","x":"It is important to maintain your limited liability company's operating agreement to make sure it is current and remains in line with the status of your company. We recommend making changes and updates under the following circumstances:"},{"t":"ul","items":[[{"x":"Update as needed","b":1},{"x":" when significant changes occur in your business"}],[{"x":"Obtain member approval","b":1},{"x":" for any amendments"}],[{"x":"Keep all versions","b":1},{"x":" of the agreement on file for reference"}]]},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"Why do I need an LLC operating agreement?","a":[{"t":"p","x":"Every LLC needs to have an operating agreement. By laying the ground rules upfront, operating agreements go a long way to helping avoid disputes and conflict between the members later on. They help ensure that the LLC is abiding by any formal requirements under state law for operating an LLC, and they help the owners avoid taking on personal liability for the company’s debts."}]},{"q":"What if I do not have an LLC operating agreement?","a":[{"t":"p","x":"Regardless of whether they require an operating agreement, states have a set of default rules for the operation and management of businesses. Failing to create an LLC operating agreement puts your LLC at the mercy of your state’s default rules. Creating and implementing an operating agreement gives you more power and control in regard to the management of your business."}]},{"q":"Do I need to register my LLC with the state before creating this agreement?","a":[{"t":"p","x":"No. You may create and sign your operating agreement even if you have not yet officially formed it with your state. In fact, it’s often a good idea to move forward with your operating agreement ahead of time in order to finalize this important step. Our dedicated business specialists can help you quickly register your company with the state so that you can officially do business as an LLC."}]},{"q":"LLC Operating Agreement or Articles of Organization?","a":[{"t":"p","x":"These documents go hand-in-hand in the formation of a limited liability company, however there is akey distinction between the two. Articles of Organization are a document filed with a state to register and establish an LLC, while an operating agreement is the internal document defining how the business will be run."}]}]},{"t":"h","l":4,"x":"Create your LLC operating agreement in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview and download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA-Preview-Mobile.webp","alt":"Create your LLC operating agreement in minutes"},{"t":"a","href":"/documents/create/llc-operating-agreement","x":"Create Document"},{"t":"h","l":2,"x":"Start Your LLC Operating Agreement"},{"t":"p","x":"Complete your LLC operating agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/llc-operating-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/LLCOA-Preview-Desktop.webp","alt":"Start Your LLC Operating Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-meeting_minutes--e0b18f29c8.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Meeting Minutes"},{"t":"p","x":"Meeting minutes serve as official records of an organization and are legally required for corporate meetings."},{"t":"p","x":"Easily document details of your corporate meetings, including participants, topics discussed, resolutions passed, objections raised, and much more."},{"t":"a","href":"/documents/create/meeting_minutes","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our meeting minutes"},{"t":"ul","items":["Includes standardized language for the most common resolutions to save you time","Helps settle disputes about why decisions were made and by whom","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance to easily construct your minutes"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Create your meeting minutes in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your meeting minutes, you will need to provide certain relevant information. This includes the names of meeting officers and participants, the meeting location, and the resolutions passed. You may also include any objections raised, the details regarding the next meeting, and any other announcements."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete your meeting minutes. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. After review, the Secretary should distribute copies to the meeting participants for their review and feedback. If no revisions are needed, the meeting Secretary should sign the document and store a copy in the company's record book. The finalized meeting minutes can then be distributed to participants."},{"t":"a","href":"/documents/create/meeting_minutes","x":"Get Started"},{"t":"h","l":3,"x":"Related documents"},{"t":"p","x":"View other related documents that our customers are creating. Whether you are a small business or a large corporation, we have you covered."},{"t":"h","l":5,"x":"Notice of Meeting"},{"t":"p","x":"Notify company owners, shareholders, officers, or employees of an upcoming company meeting."},{"t":"a","href":"/categories/business-formation/notice-of-meeting","x":"View more"},{"t":"h","l":5,"x":"Waiver of Notice"},{"t":"p","x":"Create a voluntary statement used to waive the right to a formal meeting notice."},{"t":"a","href":"/categories/business-formation/waiver-of-notice","x":"View more"},{"t":"h","l":5,"x":"Stock Transfer Ledger"},{"t":"p","x":"Record stock transfers and the issuance of company stock."},{"t":"a","href":"/categories/business-formation/stock-transfer-ledger","x":"View more"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Meeting minutes capture the important details of what occurs at company meetings, including the participants, resolutions passed, and any objections. Here are some helpful tips to guide you through completing your meeting minutes."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/meeting_minutes","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What are meeting minutes?","a":[{"t":"p","x":"Meeting minutes are written records that contain notes of discussions and decisions made during company meetings. Meeting minutes will usually highlight the main issues discussed during the meeting and document the motions they were proposed or voted on. The main task of meeting minutes is to provide an accurate record of what occurred during the meeting."}]},{"q":"What should be included in the meeting minutes?","a":[{"t":"p","x":"The minutes should include the name of the company and title of the group that is meeting, the date, time, and venue, the names of the meeting participants, the agenda, and any official actions or decisions taken at the meeting."}]},{"q":"Are meeting minutes legally required?","a":[{"t":"p","x":"Yes. Most states require companies to keep adequate written minutes of the proceedings of its shareholders, board, and committees of the board. In addition, meeting minutes can help confirm separate corporate existence for the purpose of shielding the owners from personal liability."}]},{"q":"What do I do with the meeting minutes after they are signed?","a":[{"t":"p","x":"Your original executed copy of the meeting minutes should be kept in a safe place along with your other corporate records. You do not need to file the minutes with any state or governmental agency."}]},{"q":"Who should record the minutes?","a":[{"t":"p","x":"The company clerk or secretary usually records and maintains custody of meeting minutes. However, this responsibility can be delegated to any member, officer, or employee of the company."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/meeting_minutes","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Meeting Minutes"},{"t":"p","x":"Easily complete your meeting minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/meeting_minutes","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Meeting Minutes"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-partnership-agreement--c2ded7cef7.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Partnership Agreement"},{"t":"p","x":"A partnership agreement defines how a partnership will function, how decisions will be made, and each partner's role in the business."},{"t":"p","x":"Our partnership agreement is state specific and provides the strongest level of partnership protection available while still allowing you to fully customize it according to the goals of the partnership."},{"t":"a","href":"/documents/create/partnership-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our partnership agreement"},{"t":"ul","items":["Defines the relationships, duties, contributions, and responsibilities of partners","Specifies how capital, profits, and losses will be divided","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance to easily construct your partnership agreement"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"Complete your partnership agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your partnership agreement, you will need to provide certain relevant information. This includes the partnership address, partner capital contributions, ownership percentages, and management roles."},{"t":"h","l":3,"x":"Complete Our Short Questionnaire"},{"t":"p","x":"Use the information you collected to complete the partnership agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is important to read your agreement thoroughly to ensure the document is free of errors and omissions. After completing your agreement, all partners are required to sign the agreement to make it legally binding."},{"t":"a","href":"/documents/create/partnership-agreement","x":"Get Started"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/product/business-dashboard.png","alt":"legal business documents dashboard"},{"t":"h","l":2,"x":"Start your business"},{"t":"p","x":"LegalNature can help you form a new company quickly and easily for as low as $39! You can choose between LLC, S Corp, C Corp, or Nonprofit."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/product/business-dashboard.png","alt":"legal business documents dashboard"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Our general partnership agreement solidifies the relationship between business partners and is an important tool for laying the groundwork for a successful, long-term business venture. The following instructions provide key insights and considerations when creating this essential document."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/partnership-agreement","x":"Create Partnership Agreement"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":3,"x":"Related Documents"},{"t":"p","x":"View additional documents that our customers are creating. Whether you are a small business or a large corporation, we have you covered."},{"t":"h","l":5,"x":"Loan Agreement"},{"t":"p","x":"Use this document to specify all the important terms and conditions for repayment of a loan. Loan agreements between partners or other lenders are important for protecting both the borrower and lender."},{"t":"h","l":5,"x":"Business Plan"},{"t":"p","x":"Use this document to outline your company's operations, marketing, and financial strategy for potential investors or partners."},{"t":"a","href":"/categories/business-formation/business-plan","x":"View more"},{"t":"h","l":5,"x":"Employee Handbook"},{"t":"p","x":"Use this document to specify all your policies and procedures concerning the important aspects of employment. Any company with employees needs to have an employee handbook in place to comply with state and federal employment laws."},{"t":"a","href":"/categories/human-resources/employee-handbook","x":"View more"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a partnership agreement?","a":[{"t":"p","x":"A general partnership agreement outlines the rights and responsibilities of two or more partners owning a for-profit business. The agreement typically includes the upfront capital contributions of the partners and also indicates the nature of the business."},{"t":"p","x":"Unlike corporations and LLCs, a general partnership is not a distinct legal entity separate from its owners. This means that partners personally incur all debts and liabilities on behalf of the partnership."}]},{"q":"When should I use a general partnership agreement?","a":[{"t":"p","x":"It is highly recommended that a written agreement always be used whenever two or more people decide to run this type of for-profit business together."},{"t":"p","x":[{"x":"Similar to a sole proprietorship, a general partnership is the default "},{"x":"business structure","h":"/guides/which-business-structure-is-right-for-you"},{"x":" created automatically whenever two or more people decide to conduct business together."}]}]},{"q":"Do I need to file or register my partnership agreement?","a":[{"t":"p","x":"You are not required to file a general partnership agreement with your state or local government. However, some states may permit you to do so. It is recommended that you visit your state's Secretary of State website (or similar business division website) in order to review any options they may provide. If permitted, there may be certain benefits available to partnerships that voluntarily register."}]},{"q":"What is joint and several liability?","a":[{"t":"p","x":"Partners in a general partnership are said to be \"jointly and severally\" liable for the partnership's obligations. This means that each partner may be held legally responsible for the total amount of any partnership debt. A party that brings a claim against the partnership may pursue one or all of the partners. If, as a result of the claim, one partner is forced to repay the debt in full, then that partner may later seek reimbursement against the remaining partners for their share of the debt in a separate proceeding."}]},{"q":"Do I need a partnership agreement?","a":[{"t":"p","x":"Partnership agreements are recommended for two or more people who run a for-profit business together for the purpose of making profit, including family (spouses), friends, or colleagues."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/partnership-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Partnership Agreement"},{"t":"p","x":"Complete your partnership agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/partnership-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Partnership Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-shareholder-agreement--767d7ffcca.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Shareholder Agreement"},{"t":"p","x":"A shareholder agreement describes how the company should be operated and outlines shareholders' rights and obligations."},{"t":"p","x":"It includes provisions to safeguard the company owners and their interests. Use our shareholder agreement to create an arrangement between a company's shareholders that clearly defines their ownership rights and obligations."},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How to","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"When should I use a shareholder agreement?"},{"t":"ul","items":["When a company is formed","When shares are issued to a new shareholder","When a shareholder sells or intends to sell their shares","When the company business model changes"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Step-by-step guidance to help you determine the options you need"},{"t":"p","x":"Throughout the form, we explain all the terms and guide you on making the best choices for your shareholder agreement."},{"t":"h","l":3,"x":"Shareholder Agreement"},{"t":"p","x":"Outlines shareholders' rights and obligations and describes how the company should be operated."},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Create Document"},{"t":"h","l":3,"x":"LLC Operating Agreement"},{"t":"p","x":"Specifies the regulations for a company's operations and defines the company's purpose."},{"t":"a","href":"/documents/create/llc-operating-agreement","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Complete your shareholder agreement in 6 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Gather all the relevant information to complete your document. This may include shareholder names, addresses, and stock ownership. You will also need dividend distribution preferences and company officer details."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete the agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions."},{"t":"p","x":"When signing the document, be sure to follow any additional instructions related to signing and witnessing the document. Any such instructions will either be located next to the signature line or in the instructions attached at the end of the document."},{"t":"p","x":"If a notary or other witness is required, you must wait to sign the document until they are present."},{"t":"h","l":3,"x":"Distribute and Store Copies"},{"t":"p","x":"At a minimum, all parties that sign the document should receive a copy once it is fully executed (everyone has signed). Other interested parties may need or want copies as well. Be sure that you store your copy in your corporate records. It is a good idea to keep both a physical and electronic copy."},{"t":"h","l":3,"x":"Periodically Review and Update"},{"t":"p","x":"It is easy to forget the ins and outs of your shareholder agreement. Periodically reviewing it will help you stay familiar with any responsibilities or requirements so that you can determine when it needs changes or additions. As your policies change or new laws pass, you will need to update your agreement."},{"t":"h","l":3,"x":"Complete Related Documents"},{"t":"p","x":[{"x":"Completing documents such as "},{"x":"corporate bylaws","h":"/categories/business-formation/corporate-bylaws"},{"x":" and "},{"x":"meeting minutes","h":"/categories/business-formation/meeting_minutes"},{"x":" will offer additional protection, as both are required for corporations in most states."}]},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Use our shareholder agreement to create an arrangement between a company's shareholders that clearly defines their ownership rights and obligations."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a shareholder?","a":[{"t":"p","x":"A shareholder, also referred to as a stockholder, is a person, company, or institution that owns stock(s) in a company, known as equity. A shareholder must own a minimum of one share in a company’s stock to make them a partial owner."}]},{"q":"What is a shareholder agreement?","a":[{"t":"p","x":"A shareholder agreement is an arrangement between all the company's shareholders on how they will own and manage the company business. It outlines the rights, obligations, and responsibilities of the shareholders and is intended to ensure that shareholders rights are protected. A shareholder agreement also ensures that the shareholders are treated fairly."}]},{"q":"What are shareholder rights?","a":[{"t":"p","x":"Shareholder rights refer to the rights that shareholders possess as a result of owning shares in a company. The most common shareholder rights include voting power, ownership, the right to transfer ownership, dividends, the right to inspect corporate documents, and the right to sue for wrongful acts."}]},{"q":"When should I use a shareholder agreement?","a":[{"t":"p","x":"A shareholder agreement may be used at any time and any shareholder can suggest its implementation. Typical scenarios in which a shareholder agreement may be used include when a company is formed, shares are issued to a new shareholder, the company business model changes, or the appointment or resignation of a director."}]},{"q":"What should a shareholder agreement include?","a":[{"t":"p","x":"A shareholder agreement generally includes provisions governing issuing and transferring shares, running the company including the appointment and removal of directors, voting rights, dividend distribution, and dispute resolution procedures."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Shareholder Agreement"},{"t":"p","x":"Complete your shareholder agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/shareholder-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Shareholder Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-formation-stock-certificate--3578835985.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Stock Certificate"},{"t":"p","x":"A stock certificate will help your company issue stock to shareholders and is used by shareholders as evidence of stock ownership."},{"t":"p","x":"Our step-by-step form will help you quickly create a stock certificate in compliance with applicable regulations and customized for your company. Get started now!"},{"t":"a","href":"/documents/create/stock-certificate","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our stock certificate"},{"t":"ul","items":["Is compliant throughout all states and the District of Columbia","Clearly discloses all applicable transfer restrictions","Allows you to set a par value to your stock","Allows for multiple people to own a stock"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a stock certificate in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your stock certificate, you will need to provide certain information related to your stock certificate, such as the company's state of incorporation, the number of shares being issued, the type of stock being issued, the par value of the stock, the name of recipients, the titles of any documents detailing transfer restrictions on the shares, and the names of those signing on behalf of the company."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete the stock certificate. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes to your document by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version and sign. In addition to the shareholders transferring their shares, an officer of the corporation should sign as a witness to the transfer."},{"t":"a","href":"/documents/create/stock-certificate","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Our stock certificate will help your company facilitate issuing stock to shareholders and may be used by shareholders as evidence of ownership. The following provides additional details about key information in your document."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/stock-certificate","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a stock certificate?","a":[{"t":"p","x":"A stock certificate is a document that represents a shareholder's ownership in a company. A stock certificate will include information such as the certificate number, the amount of shares issued, the par value, and any applicable transfer restrictions."}]},{"q":"Can more than one person own the same stock?","a":[{"t":"p","x":"Yes. If the certificate is being issued to more than one person or business entity shareholders, then the first paragraph will identify the type of joint ownership. The three main types of joint ownership for stocks are tenancy in common, joint tenancy, and community property ownership. A tenancy in common is an interest in property held by two or more people that all own an undivided interest as to the whole property; however, these interests do not have to be in equal shares. Also, the tenants in common do not have rights of survivorship. This means that when one dies, that person's share in the property goes to his or her named heirs or beneficiaries. A joint tenancy is an interest in property held by two or more people that all own equal interests, and each joint tenant has a right of survivorship. \"Community property\" ownership occurs where the stock is being acquired by both spouses during marriage while living in a community property state. The community property states are Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Texas, Washington, and Wisconsin. Spouses living in Alaska may choose to opt in to community property ownership during marriage."}]},{"q":"What is a stock's \"par value\"?","a":[{"t":"p","x":"Par value is the nominal value, or face value, of the stock and helps determine the value of the shares at a later date. Most corporations start out by issuing stock with nominal or little par value—for instance, $0.01 or $0.001 per share—and the worth of the shares will increase as the company grows."}]},{"q":"Does stock need to be assigned a par value?","a":[{"t":"p","x":[{"x":"No. Not all stock has a par value. The par value of a corporation's stock is normally specified in the company's "},{"x":"articles of incorporation","h":"/categories/business-formation/articles-of-incorporation"},{"x":" (known in some states as the "},{"x":"certificate of incorporation","h":"/categories/business-formation/certificate-of-incorporation"},{"x":"). If no par value is stated in that document, then your certificate should reflect this, stating \"no par value.\""}]}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/stock-certificate","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Stock Certificate"},{"t":"p","x":"Complete your stock certificate in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/stock-certificate","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Stock Certificate"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-general-services-agreement--9462ffff25.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"General Services Agreement"},{"t":"p","x":"A general services agreement defines the relationship between the business providing a service and the client receiving the service."},{"t":"p","x":"Our intuitive process will help you to create, download, and print your general services agreement in minutes."},{"t":"a","href":"/documents/create/general-services-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our general services agreement"},{"t":"ul","items":["Describes the terms of service, including payment terms","Helps prevent future misunderstandings","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance to easily construct your agreement"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Complete your general services agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your general services agreement, you will need to provide certain relevant information. This includes the client's name and address, a description of the services to be provided, any service benchmarks, compensation, and intellectual property rights."},{"t":"h","l":3,"x":"Complete Our Short Questionnaire"},{"t":"p","x":"Use the information you collected to complete the general services agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is important to read your agreement thoroughly to ensure the document is free of errors and omissions. After completing your agreement, all partners are required to sign the agreement to make it legally binding."},{"t":"a","href":"/documents/create/general-services-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"A good general services agreement will provide strong protection of the interests of both the client and the service provider. This help guide provides additional details and clarification on some of the key aspects in the agreement."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/general-services-agreement","x":"Get Started"},{"t":"h","l":3,"x":"Related documents"},{"t":"p","x":"View additional documents that our customers are creating. Whether you are a small business or a large corporation, we have you covered."},{"t":"h","l":5,"x":"Sales Contract"},{"t":"p","x":"Our sales contract can be used to set forth the terms of any transaction involving tangible goods."},{"t":"a","href":"/categories/business/sales-contract","x":"View more"},{"t":"h","l":5,"x":"Invoice"},{"t":"p","x":"Our advanced invoice generator makes it easy to make custom and professional invoices for your customers."},{"t":"a","href":"/categories/business/invoice","x":"View more"},{"t":"h","l":5,"x":"Employment Contract"},{"t":"p","x":"Establish the goals, expectations, and financial benefits that make up the relationship between the employee and employer."},{"t":"a","href":"/categories/human-resources/employment-agreement","x":"View more"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a general services agreement?","a":[{"t":"p","x":"A general services agreement is a document that defines the terms of an agreement between a provider of services and a client who is requesting a particular service. The agreement includes details about the scope of the work being done, the cost for the service, the applicable payment terms, and other important terms of service."}]},{"q":"Should I use a general services agreement?","a":[{"t":"p","x":"You should use a general services agreement if you are a person who provides services to another person. Some common examples of service providers that use this agreement include the following:"},{"t":"ul","items":["Caterers","Cleaners","Construction companies and contractors","Consultants","Child care providers (e.g., babysitters, nannies, and day cares)","Dog walkers","Freelancers","Graphic designers","Hairstylists and makeup artists","Landscapers","Legal service providers","Musicians","Photographers","Public relations specialists","Web developers","Writers and editors"]}]},{"q":"Can I cancel my general services agreement after signing it?","a":[{"t":"p","x":"Yes. Our general services agreement template gives you the option to specify cancellation terms and any applicable fines. In addition, if either party violates the terms of the agreement, the agreement can be cancelled or terminated. Our template further includes details about how disputes will be handled, such as through mediation, adjudication, or arbitration."}]},{"q":"Does a general service agreement need to be written down?","a":[{"t":"p","x":"Yes. It is important to write out your agreement, because a written agreement gives both parties protection in case something goes wrong and provides greater legal protection in the event of disputes."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/general-services-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your General Services Agreement"},{"t":"p","x":"Complete your agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/general-services-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your General Services Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-hold-harmless-agreement--679b0f26b1.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Hold Harmless Agreement"},{"t":"p","x":"Create a hold harmless agreement to limit your legal and financial liability for injuries or damages."},{"t":"p","x":"Our customizable hold harmless agreement template can be used to fit any circumstance, including use of property, contracts, sporting activities, services, or other events."},{"t":"a","href":"/documents/create/hold-harmless-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our hold harmless agreement"},{"t":"ul","items":["Is designed to offer protection during contracts, activities, or services","Offers different levels of indemnity and protection to fit your needs","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance and dynamically adjusts to your needs"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Create your hold harmless agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your hold harmless agreement, you will need to provide certain relevant information. This includes the name and address of each party and the date your agreement should go into effect."},{"t":"h","l":3,"x":"Complete Our Short Questionnaire"},{"t":"p","x":"Use the information you collected to complete the hold harmless agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. When signing your agreement, be sure to follow any additional instructions related to signing and witnessing the document."},{"t":"a","href":"/documents/create/hold-harmless-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Our hold harmless agreement is an excellent way to help parties accomplish their goals by better dividing responsibility for legal risks. This help guide provides clarification on some of the key aspects of your document."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/hold-harmless-agreement","x":"Create a Hold Harmless Agreement"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a hold harmless agreement?","a":[{"t":"p","x":"A hold harmless agreement, also known as a waiver of liability, a release form, a liability release form, an assumption of risk form, a release of liability agreement, or legal release, is an agreement between two or more parties to waive a legal claim for damages. A hold harmless agreement can be used to waive a claim for damages that have already occurred, or to waive future claims for injuries or damages."}]},{"q":"When do I need a hold harmless agreement?","a":[{"t":"p","x":"You need a hold harmless agreement whenever you engage in activities or events that are likely to cause injuries or damage. Thus, a hold harmless agreement can be used when a third party is using your property, during contracts, for the provision of services, sporting activities, or other events that involve any type of risk."}]},{"q":"What are the common uses of a hold harmless agreements?","a":[{"t":"p","x":"A hold harmless agreement is generally recommended when you engage in activities that involve some type of risk. A hold harmless agreement might also be used to release another party from the potential of a lawsuit for a past injury. Some common uses of a hold harmless agreements include:"},{"t":"ul","items":["Car accidents. This typically involves paying money for injuries or damages in return for a release of any further liability.","Field trips or sporting activities. Examples include soccer, sky diving, zip lining, boat rentals, gyms, baseball batting cages, and golf courses.","Media releases. These authorize the use of photographs and videos of or taken by a person.","Information releases. These allow third parties to release confidential medical, financial, employment, or other information.","Provision of services. This limits your liability when you provide a service to a third party, and is particularly useful when providing services that are risky or likely to cause injury, such as construction services.","Selling a car. Some states require the buyer to sign a release that protects the seller from any liability in the event the buyer is involved in a collision or incurs tickets for traffic or parking violations."]}]},{"q":"What isn't covered by a hold harmless agreement?","a":[{"t":"p","x":"A hold harmless agreement is intended to cover accidental injuries, but would not cover injuries or damages that result from your own negligence or deliberate actions."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/hold-harmless-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Hold Harmless Agreement"},{"t":"p","x":"Complete your document in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/hold-harmless-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Hold Harmless Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-investment-agreement--8d22a53ed3.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Investment Agreement"},{"t":"p","x":"Our investment agreement outlines the terms and conditions of a deal between someone who wants to invest money in a business or project and the person or entity who owns or runs it."},{"t":"p","x":"It can include things like how much money is invested and what rights and responsibilities each party has. An investment agreement helps to protect both sides from misunderstandings or disputes."},{"t":"a","href":"/documents/create/investment-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"When to use an investment agreement"},{"t":"ul","items":["When raising funds from angel investors or venture capitalists","When investing in a startup or a business venture","When creating a shareholder agreement"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Get a legally binding agreement"},{"t":"p","x":"Throughout the form, we explain all the terms and you’ll be guided on making the best choices for your investment agreement."},{"t":"h","l":3,"x":"Secure Funding and Accelerate Growth"},{"t":"p","x":"Attract more funding and accelerate growth by gaining access to valuable resources, networks, and expertise from your investors."},{"t":"a","href":"/documents/create/investment-agreement","x":"Create Document"},{"t":"h","l":3,"x":"Protect Your Rights and Interests"},{"t":"p","x":"Avoid disputes, misunderstandings, and conflicts with your investors by ensuring that both sides are aligned on the terms of the deal."},{"t":"a","href":"/documents/create/investment-agreement","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create an investment agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Begin by collecting basic information about the parties, including each party's address and email, when the agreement will begin, as well as sale price and stock amounts. Also determine at this point if any special or custom clauses need to be added to the agreement."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"We help you integrate the information you collected into an agreement adapted to your needs. As you complete our questionnaire, we inform you about your choices at each step and dynamically ask new questions based on your previous answers."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"Always read your document thoroughly to ensure it contains everything you need and is free of errors. In any case, once you finish creating your document, you will be able to alter it as much as you like in Microsoft Word. However, if you do not need to make any changes, you can simply download the PDF version and have the parties sign the agreement."},{"t":"a","href":"/documents/create/investment-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Use our investment agreement form template to quickly and easily establish the terms and conditions of an investment deal between a business owner and an investor. By having a clear and detailed investment agreement, you can ensure that your business relationship is based on trust, transparency, and mutual benefit."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/investment-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is an investment agreement?","a":[{"t":"p","x":"An investment agreement is a legal document that outlines the key terms and conditions of a deal between a company and its investors. It specifies the amount, type, and purpose of the investment, as well as the rights and obligations of both parties. Some of the common terms and clauses that an investment agreement may include are the identity of the company and the investors, the valuation of the company and the price per share, and the warranties and representations of both parties regarding the accuracy of information and compliance with laws."}]},{"q":"How can I negotiate the best investment agreement for my company?","a":[{"t":"p","x":"Negotiating the best investment agreement for your company can be a challenging task. Here are some tips to help you achieve the best investment agreement for your company:"},{"t":"ul","items":[[{"x":"Do your homework -","b":1},{"x":" Research the potential investors, their backgrounds, their interests, and their expectations. Know your company's strengths, weaknesses, opportunities, and threats."}],[{"x":"Be open to negotiation -","b":1},{"x":" Show that you are passionate about your company but be mindful of the other party's concerns. Answer their questions honestly and professionally. Once you have established a rapport with the investors, you can start discussing the terms of the agreement. Be flexible and realistic, but make sure the agreement is in your best interest."}],[{"x":"Seek legal advice -","b":1},{"x":" Before signing any agreement, make sure you consult with a lawyer who specializes in investment contracts if you have any doubts regarding the agreement. They can help you review the terms, identify any potential risks or pitfalls, and protect your rights and interests."}]]}]},{"q":"What are the common pitfalls and risks to avoid when signing an investment agreement?","a":[{"t":"p","x":"Some of the common pitfalls and risks to avoid when signing an investment agreement are as follows:"},{"t":"ul","items":[[{"x":"Not understanding the terms and implications of the agreement -","b":1},{"x":" It is important to read and understand every clause of the agreement, and to seek professional advice if needed, before signing anything."}],[{"x":"Not negotiating the terms and conditions of the agreement -","b":1},{"x":" Both business owners and investors should always try to negotiate the best possible deal for their company, and to walk away from any deal that does not align with their vision and goals."}],[{"x":"Not complying with the legal and regulatory requirements of the agreement -","b":1},{"x":" Signing an investment agreement may generate certain obligations and responsibilities on both parties, such as reporting, auditing, governance, compliance, etc. Failing to comply with these requirements can result in legal consequences, such as breach of contract, penalties, or termination of the agreement. Both business owners and investors should always adhere to the terms and conditions of the agreement, and communicate with their counter parties regularly and transparently."}]]}]},{"q":"Should the effective date be specific or when the last party signs?","a":[{"t":"p","x":"A fixed effective date can provide certainty and clarity for the parties, especially if there are pre-contractual obligations or conditions that need to be fulfilled before the contract becomes binding. A fixed effective date can also avoid disputes or confusion about when the contract was actually signed, especially if the parties sign at different times or locations. However, a fixed effective date may also create problems if the parties fail to sign the contract by that date, or if there are unforeseen events or circumstances that affect the performance of the contract after that date. Using the date of signing by all parties as the effective date can avoid some of the issues that may arise from a fixed effective date, such as missing the deadline or having to deal with changed circumstances. Using the date of signing can also reflect the parties' intention and consent to be bound by the contract at the time of signing, rather than at a future date. However, using the date of signing may also create uncertainty and ambiguity for the parties, especially if there are delays or gaps between the signing of different parties, or if there are post-contractual obligations or conditions that need to be satisfied after the contract becomes binding."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/investment-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Investment Agreement"},{"t":"p","x":"Complete your investment agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/investment-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Investment Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-letter-of-resignation--dab89ce22e.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Letter of Resignation"},{"t":"p","x":"A letter of resignation is used to formally notify to your organization that you are leaving your position."},{"t":"p","x":"We make writing a resignation letter quick and easy by utilizing a step-by-step template that can be used for various situations. Create and download your letter of resignation in minutes."},{"t":"a","href":"/documents/create/letter-of-resignation","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Why you need a letter of resignation"},{"t":"ul","items":["The letter serves as part of your HR record for future references","To provide a formal handover and to assist your organization with transition","To maintain and preserve positive relationships","To remain professional and provide personal contact information"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"Complete your resignation letter in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you prepare to complete your letter, take time to consider when your last day working in your position will likely be and to gather any additional details you may wish to include in your letter. If you are unsure of the date of your last day of work, you can opt to not specify this in the letter."},{"t":"h","l":3,"x":"Complete Our Short Questionnaire"},{"t":"p","x":"Complete our questionnaire to quickly customize your own resignation letter. Our advanced document-building technology will remove any guesswork, simplifying the process and guiding you each step of the way."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"Once you have completed the questionnaire, be sure to read your letter to make sure that it meets your needs and expectations. You can also print and sign your letter above your printed name in the signature line, but this step is optional."},{"t":"a","href":"/documents/create/letter-of-resignation","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"The following guide provides a review of key questions and considerations you may have when completing a resignation letter."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/letter-of-resignation","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a letter of resignation?","a":[{"t":"p","x":"A resignation letter is an official document that details your intention to leave your position at an organization."}]},{"q":"What should I include in a letter of resignation?","a":[{"t":"p","x":"A resignation letter should contain only information relevant to your resignation. This information typically includes your personal information, your position at the company, your last day of employment, your reason for leaving, and any plans for making the transition easier before you leave."}]},{"q":"Are there any laws that govern letters of resignation?","a":[{"t":"p","x":"Letters of resignation are not subject to any specific laws. However, it is important to check your employment contract or employee handbook to determine any requirements at your specific workplace."}]},{"q":"Who do you send your resignation letter to?","a":[{"t":"p","x":"Who you send your resignation letter to can vary depending on your workplace or company policies. It is always important to check your employment contract or employee handbook to determine any specific requirement. Typically, resignation letters are delivered to direct supervisors, senior managers, or the human resources department."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/letter-of-resignation","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Letter of Resignation"},{"t":"p","x":"Complete your document in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/letter-of-resignation","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Letter of Resignation"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-online-terms-and-conditions--58f80bdec8.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Online Terms and Conditions"},{"t":"p","x":"Websites must provide their terms and conditions so that their visitors are aware of the rules for using the site."},{"t":"p","x":"Our intuitive process allows you to easily customize the terms and conditions for websites based in the United States. Quickly specify your preferences regarding age restrictions, member accounts, posted content, cancellations, sales policies, refunds, and more."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our online terms and conditions"},{"t":"ul","items":["Are compliant throughout all states and the District of Columbia","Define vital concepts related to the service or goods provided","Help avoid confusion by defining each party's responsibilities","Help limit liability for a visitor's use of the site"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Get your terms and conditions now"},{"t":"p","x":"Easily get a set of online terms and conditions that are tailored to your specific needs."},{"t":"h","l":3,"x":"Limit your liability and set boundaries"},{"t":"p","x":"These terms and conditions will define each party's general obligations and responsibilities."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Create Document"},{"t":"h","l":3,"x":"Define key terms and conditions"},{"t":"p","x":"By defining clear terms and conditions, this form will help prevent unnecessary confusion."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create online terms and conditions in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your online terms and conditions, you will need to provide certain relevant information. This includes any policies you may have concerning member accounts, posted content, age restrictions, refunds, cancellations, sales policies, dispute resolution, and more. Depending on the type of website involved, some of these categories may be needed."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete your online terms and conditions. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review"},{"t":"p","x":"It is always important to read your terms and conditions thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"All websites need to post their online terms and conditions in order to notify visitors of its rules and protect themselves from a wide variety of potential legal liabilities. This help guide explains the main sections and key considerations when creating terms and conditions for your website. Note that this document is meant for websites based within the United States. It may not be appropriate for sites hosted in other countries or may need additional language."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What does the term \"browsewrap\" mean?","a":[{"t":"p","x":[{"x":"\""},{"x":"Browsewrap","b":1},{"x":"\" is the term used for websites that allow users to accept their terms and conditions simply by navigating through the site. Browsewrap is typically only used for static sites that are primarily informational in nature with little to no interaction with the site or others and do not offer products or services for sale."}]}]},{"q":"What does the term \"clickwrap\" mean?","a":[{"t":"p","x":[{"x":"\""},{"x":"Clickwrap","b":1},{"x":",\" on the other hand, refers to sites that require visitors to affirmatively agree to the terms by clicking an \"Accept\" button, or checking a similar box, before creating an account or making a purchase. Clickwrap is recommended for all sites that go beyond browsewrap by selling products and services or allowing users to post content or interact with others. If you choose to implement clickwrap, you should be sure that your method requires visitors to make an affirmative action assenting to the terms and conditions."}]}]},{"q":"Do I need to have a sale, refund, and cancellation policy?","a":[{"t":"p","x":[{"x":"If you "},{"x":"sell goods or services through your website","h":"/guides/how-to-start-an-ecommerce-business"},{"x":", then you should outline your sales policy, including any conditions of sale, return policies, guarantees, payment details, fees, and shipping terms. Doing so helps avoid potential disputes and lawsuits with aggrieved visitors. Likewise, you should include any refund and cancellation policies you may have in order to put visitors on notice and avoid conflicts."}]}]},{"q":"Should my online terms and conditions allow me to limit access to my site?","a":[{"t":"p","x":"Yes. Our online terms and conditions allow you to terminate a visitor's access to any part or service on the site at any time in your sole discretion, without notice. These terms may be updated at any time. A visitor's continued use of the site is often considered acceptance of such updates. It's important to provide visitors with notice of such updates by any reasonable means, including by email or posting notice in a prominent place on the site."}]},{"q":"Do these online terms and conditions contain disclaimers?","a":[{"t":"p","x":"Yes. The disclaimers in our form include many of the most important terms and conditions. Among these, visitors are told that the site is provided on an \"as is\" basis, and potential express and implied warranties are disclaimed in order to prevent visitors from seeking to hold you liable for promises you do not intend to offer. This also includes disclaimers for any loss or damages that may occur to visitors' computers, internet connections, or user content. Visitors are told that the content on your website is for informational purposes only and does not offer any professional advice, including legal, financial, or medical advice."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Online Terms and Conditions"},{"t":"p","x":"Complete your online terms and conditions in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/online-terms-and-conditions","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Online Terms and Conditions"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-security-agreement--401848563b.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Security Agreement"},{"t":"p","x":"This agreement is required in order to receive a security interest in collateral and may be used along with a financing statement if you wish to register your security interest with the state (known as \"perfecting\" your interest)."},{"t":"p","x":"Our step-by-step form makes it easy to quickly customize a security agreement to your needs. Get started now to create, download, and print your security agreement form online in minutes."},{"t":"a","href":"/documents/create/security-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our security agreement"},{"t":"ul","items":["Is compliant throughout all states and the District of Columbia","Provides optional fields for a notary or witnesses' signatures","Clearly defines each party's rights and obligations","Describes all relevant transaction details"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a security agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your security agreement, you will need to provide certain relevant information. This includes the names and addresses of the parties, the amount and interest rate (if any) owed by the debtor, and collateral details. You may also need to include additional payment details, such as payment frequency, late fees, and prepayment requirements, if they are not already contained in a separate agreement."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete the security agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. When signing the document, be sure to follow any additional instructions related to signing and witnessing the document. Also, although using a notary is not required, it is recommended that you do so to ensure that you can prove the authenticity of the document. When using a notary, be sure to wait to sign the document until they are present."},{"t":"a","href":"/documents/create/security-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"A security agreement provides the secured party with a security interest in collateral in order to insure a debtor's repayment. You may choose to include multiple debtors, secured parties, and co-signers depending on the requirements of the transaction. The information below will guide you through some of the important issues and considerations you will encounter when creating your security agreement."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/security-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a security agreement?","a":[{"t":"p","x":"A security agreement consists of a contract between a borrower and a secured lender. Each agreement explicitly specifies which assets are to be used as security and the conditions under which the lender would be allowed to foreclose on that property. Typically, security agreements involve business owners who hope to secure commercial loans. This agreement outlines obligations and rights for both the debtor and the creditor, while also highlighting the form the collateral will take and what will happen if the debtor defaults."}]},{"q":"What is collateral?","a":[{"t":"p","x":[{"x":"Collateral is any property or asset pledged by a debtor to secure repayment of a debt. It can take many forms, but generally involves some sort of property already owned by (or expected to be acquired by) the debtor. For example, in a "},{"x":"mortgage agreement","h":"/categories/property/mortgage-agreement"},{"x":" the collateral is the house itself. Under a security agreement, the debtor's personal property (non-real estate) and intangibles, such as intellectual property, are often used as collateral. Accurate classification of collateral is critical for security agreements. Often, classification depends on how exactly the debtor uses a particular asset. For example, a titled vehicle primarily used for personal or family purposes may be classified as consumer goods. However, if the vehicle is held for sale, it may be deemed inventory. If the vehicle is regularly used for business purposes, it should be classified as equipment. Other examples of collateral include inventory, equipment, machinery, farm products and crops, appliances, furnishings, fixtures, accounts receivable, deposit accounts, contract rights, and general intangibles. If the debtor defaults on repayment, the creditor (also called the secured party) will be able to keep or sell the collateral."}]}]},{"q":"What is secured debt and how does it differ from unsecured debt?","a":[{"t":"p","x":[{"x":"A basic understanding of secured and unsecured debt is critical to grasping the scope and process of a security agreement. Many individuals and organizations take on both types of debt, but in different contexts. "},{"x":"Secured debt","b":1},{"x":" is tied to an asset such as real estate or stock. This asset serves as collateral; fail to pay up, and the creditor takes possession of or otherwise uses the collateral. Common examples of secured debt include auto loans and mortgages. Such assets are never fully owned until the debt has been completely paid. "},{"x":"Unsecured debt","b":1},{"x":" provides no rights to collateral for the creditor. If the debtor fails to make payments, then the creditor must take other steps, such as working with a debt collector or suing in hope of garnishing the debtor's wages."}]}]},{"q":"Do I need to register my security interest with the state?","a":[{"t":"p","x":"Registering a security interest with your state—known as \"perfecting\" the security interest—is normally recommended in order to ensure that there are no prior claims to the collateral and to protect the secured party in the event that the debtor becomes insolvent or declares bankruptcy. While taking the step to perfect a security interest is not required by law, it is often the only way that the secured party can rest assured that its interest in the collateral is safe from other creditors. You can perfect your interest by simply filing a short document, called a financing statement, in the debtor's state or local jurisdiction. If the debtor is an individual, this is the state where the debtor resides; if the debtor is a business, this is the state where the business was formed. While the rules vary by location, a financing statement normally only requires identifying the parties and providing a description of the collateral. In most states you can easily provide this information by completing Form UCC-1 and filing it with the Secretary of State's office. You can find your state's requirements online or by calling your state office. Certain types of collateral may be perfected without filing a financing statement and simply by the secured party having possession or control over them. However, filing a financing statement is usually recommended as the more straightforward method of ensuring the secured party's interest is fully protected."}]},{"q":"What does perfection mean in regard to security agreements?","a":[{"t":"p","x":"Perfection essentially involves granting third parties notice of a security interest's role in property. Perfection may vary based on whether property is deemed personal or real. A variety of methods can be used to obtain perfection in a security agreement. The following are among the most common:"},{"t":"ul","items":["Filing a financing statement","Possession of the collateral by the secured party or the secured party's agent","Control over the collateral by the secured party","Automatic perfection upon attachment"]}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/security-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Security Agreement"},{"t":"p","x":"Complete your security agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/security-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Security Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-articles-of-incorporation--90f20d9026.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Articles of Incorporation"},{"t":"p","x":"This important document registers your company's name and intent to conduct business within the state as a domestic corporation. After you receive approval from the state, your new business will officially be ready to hold its first board meeting and begin operations."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/articles-of-incorporation","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-D.webp","alt":"Articles of Incorporation document preview"},{"t":"h","l":3,"x":"What are articles of incorporation?"},{"t":"p","x":"The term \"articles of incorporation\" refers to a legal document filed with a state to establish a new business corporation. Some states refer to articles of incorporation as a \"certificate of incorporation.\" These public records outline the fundamental aspects of a corporation, including the following basic information:"},{"t":"ul","items":["Corporate name","Principal office address","Registered agent information","Directors or officers","Stock information"]},{"t":"h","l":3,"x":"Use the business formation document which best suits your needs"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-Desktop.webp","alt":"Articles of Organization document preview"},{"t":"p","x":[{"x":"Articles of Organization","h":"/categories/business-services/articles-of-organization"},{"x":" Articles of organization are filed with a state to establish a limited liability company, or \"LLC.\" LLCs offer liability and tax protections similar to that of a corporation, but with a different ownership and management structure."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Certificate-Incorporation-Preview-D.webp","alt":"Certificate of Incorporation document preview"},{"t":"p","x":[{"x":"Certificate of Incorporation","h":"/categories/business-services/certificate-of-incorporation"},{"x":" Some states refer to articles of incorporation as a certificate of incorporation. LegalNature's intuitive forms will create the correct document based upon your chosen state's requirements."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Articles-Amend-Preview-D.webp","alt":"Articles of Amendment document preview"},{"t":"p","x":[{"x":"Articles of Amendment","h":"/categories/business-services/articles-of-amendment"},{"x":" Sometimes information on articles of incorporation needs to be changed (e.g. change of company name or address). Articles of amendment are filed with the corporation's state in order to submit amendments to articles of incorporation."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"Create articles of incorporation in your state"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=5","x":"California"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=9","x":"Florida"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=19","x":"Maine"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=26","x":"Montana"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=32","x":"New York"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=43","x":"Texas"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=44","x":"Utah"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=47","x":"Washington"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/articles-of-incorporation?state=50","x":"Wyoming"},{"t":"h","l":3,"x":"When to use articles of incorporation"},{"t":"p","x":"Articles of incorporation are essential legal documents used to establish a corporation at the state level. You should use articles of incorporation to do the following:"},{"t":"ul","items":[[{"x":"Form a new corporation","b":1},{"x":": This document officially creates your company as a distinct legal entity"}],[{"x":"Register with the state","b":1},{"x":": Articles of incorporation are required to register your corporation with the state government"}],[{"x":"Define company structure","b":1},{"x":": The articles outline the basic structure and purpose of your corporation"}],[{"x":"Protect personal assets","b":1},{"x":": By establishing a corporation, you can shield personal assets from business liabilities"}],[{"x":"Seek tax advantages","b":1},{"x":": Corporations offer potential tax benefits, which begin with proper formation"}],[{"x":"Comply with state laws","b":1},{"x":": Each state has specific requirements for corporation formation, which the articles of incorporation help to fulfill"}],[{"x":"Prepare for future growth","b":1},{"x":": Well-crafted articles can provide flexibility for business expansion"}]]},{"t":"h","l":2,"x":"How to create your articles of incorporation"},{"t":"ol","items":["Select the state where the corporation will be registeredOur articles of incorporation template dynamically changes according to the selected state's requirements. Since each state decides what details will be necessary to form a corporation, the required information can vary from one state to another.","Provide the corporation's name, company address, and other detailsWhen choosing your business name, it is important to consider your state's naming requirements. As for your corporation's company address, keep in mind that it will function as an official business address. For this reason, a street address will most likely be required.","Set forth the corporation's board of directors and officersThe names and addresses of the initial directors and officers of the corporation should be named, thereby establishing the governance structure of the corporation.","Describe the corporation's stock informationOutline the types and number of shares that the corporation is authorized to issue. This is crucial for capital structure and investment strategies. Corporate stock represents an ownership interest in a corporation, typically divided into shares that signify a proportionate ownership stake in the business."]},{"t":"h","l":3,"x":"Why create articles of incorporation and a corporation?"},{"t":"p","x":"A corporation is a business entity formed separately from the owner that can be used to incur business debts, expenses, and tax liabilities related to the business."},{"t":"p","x":"The corporate structure creates a legal separation between the business entity and its directors, owners, or officers, shielding them from personal liability if the business faces financial or legal troubles."},{"t":"p","x":"It is important to note that this limited liability protection is not absolute and can be compromised if owners fail to maintain proper business practices or engage in fraudulent activities."},{"t":"a","href":"/documents/create/articles-of-incorporation","x":"Create Your Articles of Incorporation Today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp","alt":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Articles of incorporation guide"},{"t":"p","x":"Articles of incorporation are formal documents used to establish a corporation and define the fundamental aspects of a corporation's structure. Sometimes also referred to as a certificate of incorporation, articles of incorporation must be filed with a state in order to create and register a corporation as a valid business organization within that state."},{"t":"p","x":"Articles of incorporation include the essential details of a corporation, including the following:"},{"t":"ul","items":[[{"x":"The Corporation's Name:","b":1},{"x":" Each state requires that companies have a distinct name, often including the entity designator \"Inc.\" or \"Corporation.\""}],[{"x":"Business Purpose:","b":1},{"x":" Some states require that a business purpose be outlined in its articles of incorporation. This is commonly a general statement, such as \"accounting services\" or \"any lawful act or activity.\""}],[{"x":"Business Address:","b":1},{"x":" The physical address of the business is often required to be reported in lieu of a P.O. Box."}],[{"x":"Registered Agent:","b":1},{"x":" This is the person or entity designated to receive legal paperwork, such as service of process or other government correspondence, on behalf of the corporation. The agent's name and physical street address are required to be reported."}],[{"x":"Directors or Officers:","b":1},{"x":" The initial board of directors and managing officers of the corporation are often required to be listed in the articles of incorporation. These titles can be held concurrently by the same person depending on the size of the corporation."}],[{"x":"The Effective Date of the Corporation's Formation:","b":1},{"x":" The date that the corporation's formation takes effect defaults to the day that the articles of organization are filed with the state; however, a specific date may be set forth as the owner wishes."}]]},{"t":"p","x":"These requirements are general, common information, and some states may require additional information."},{"t":"h","l":3,"x":"Articles of incorporation or articles of organization?"},{"t":"p","x":"The terms \"articles of organization\" and \"articles of incorporation\" are often mistakenly used interchangeably. Both documents are used for the purpose of registering a business entity with a state, but articles of organization are used to create LLCs while articles of incorporation are used to form corporations. Both business entities provide similar liability protections to the business's owner, but are owned and operated through different structures."},{"t":"h","l":3,"x":"Do I need an attorney to create articles of incorporation?"},{"t":"p","x":"Any business owner may file their own articles of incorporation and an attorney is not required for their creation. However, it is highly recommended to consult with an attorney or other legal service providers when creating this legal document since each state has its own specific requirements for filing that may be difficult or confusing to navigate."},{"t":"h","l":3,"x":"What if I need to make changes to my articles of incorporation?"},{"t":"p","x":"Articles of amendment should be filed when changes to a company's articles of incorporation need to be made. Articles of incorporation may require changing if they contain errors when they are first filed, or there are changes in the business over time. These changes, or amendments, may include reporting a new registered agent, updating the company's business address, or changing the company's board of directors and officers."},{"t":"h","l":3,"x":"What is the difference between a for-profit and a not-for-profit corporation?"},{"t":"p","x":"For-profit corporations are owned by shareholders who receive stock in exchange for investments which pay out to the shareholders in dividends. Not-for-profit, or nonprofit corporations, cannot issue shares or stock and have members, but no shareholders. The dividends and profits of for-profit corporations are taxed, while nonprofit corporations are often tax-exempt, falling under Section 501(c)(3) of the Internal Revenue Code."},{"t":"h","l":3,"x":"What should I do after filing articles of incorporation?"},{"t":"p","x":"After filing articles of incorporation and paying the filing fee, there is typically a short waiting period for the articles to be reviewed and approved by the state, though many states offer expedited processing for faster service. Once the articles are approved and the corporation is a registered business entity, there are several actions that should be taken in order to ensure that the newly formed company remains compliant with the Department of State:"},{"t":"ol","items":[[{"x":"Retrieve an EIN from the IRS","b":1},{"x":": An employer identification number, or EIN, is an essential nine-digit number required for federal tax purposes. Having a valid EIN is often required to apply for other business necessities, such as a license or financial accounts."}],[{"x":"Choose your corporate tax structure","b":1},{"x":": For-profit corporations are taxed under two different structures: C corp or S corp. C corps pay taxes on their profits and shareholders pay taxes on their dividends, while S corps offer pass-through taxation where profits and losses are reported on shareholders' personal tax returns. Choosing a tax structure is as easy as filing the correct form with the IRS. This choice is integrated into our intuitive online form."}],[{"x":"Create corporate bylaws","b":1},{"x":": While the articles of incorporation outline the general purpose of the corporation, a corporation's bylaws describe the specific functions, regulations, responsibilities, and rules for the business, including protocols for dealing with personal or financial liabilities or internal conflicts of interest."}],[{"x":"Open a business bank account","b":1},{"x":": Establishing a separate business bank account for your business is crucial for maintaining and managing your business assets and business finances, while protecting yourself from personal liability."}],[{"x":"Apply for any required business licenses","b":1},{"x":": Some business types are monitored and regulated more heavily by the states and require certification and licensure to operate legally."}],[{"x":"File annual reports","b":1},{"x":": Most states require corporations to file an annual report with the state's Division of Corporations to remain in good standing and preserve the liability protections offered by the corporate business structure."}]]},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"Why do I need to file articles of incorporation for my corporation?","a":[{"t":"p","x":"Articles of incorporation are designed to give your state's Secretary of State or Company Registrar the information required to determine whether or not to approve a new company. State laws governing businesses are designed to protect consumers and state residents, so every state has laws and requirements that businesses must comply with if they want the benefits of a corporate structure."}]},{"q":"In what state should I register my corporation?","a":[{"t":"p","x":"Although businesses can register to conduct business in any state, most businesses choose to organize their corporations in the state where their principal office is located. Although it may make sense to choose a different state for a corporation because of that state’s tax treatment, some states impose additional taxes, making it cheaper to organize under a neighboring state’s laws. If you are considering establishing your corporation in a state other than your own, it is important that you investigate whether that state requires additional paperwork."}]},{"q":"Will I need a registered agent?","a":[{"t":"p","x":"A registered agent is an individual or business entity residing within the company's state. All registered agents must maintain normal business hours at a physical address that is open to the public. The registered agent’s main function is to ensure reliable communication between the company and any third party, by receiving and forwarding legal documents, notices, or other requests to the company. It is mandatory that every company provides the registered agent's full name. If the registered agent is a business entity, then you should include the entity designation of the business such as Inc. or Co. It is also mandatory that every company provides the address where the registered agent is required to receive any legal correspondence. Check with your state regarding any specific requirements for listing the registered agent's address. LegalNature provides the registered agent with the option to use the company's physical address, the company's mailing address, or any other address where the registered agent is willing and able to receive mail. It is important to point out that some states require the registered agent’s consent in order to be named as such."}]},{"q":"How do I file my articles of incorporation?","a":[{"t":"p","x":"Most states allow articles of incorporation to be filed electronically online through the Secretary of State or Division of Corporations website. Articles can also be submitted through the mail; though, this typically results in an extended wait-period for processing. After receiving the articles and any required filing fees, there is typically a short processing period, unless the state offers expedited processing for an additional fee."}]}]},{"t":"h","l":4,"x":"Create your articles of incorporation in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview & download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-M.webp","alt":"Create your articles of incorporation in minutes"},{"t":"a","href":"/documents/create/articles-of-incorporation","x":"Create Document"},{"t":"h","l":2,"x":"Start Your Articles of Incorporation"},{"t":"p","x":"Complete your articles of incorporation in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/articles-of-incorporation","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-M.webp","alt":"Start Your Articles of Incorporation"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-articles-of-organization--1b3224f7eb.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Articles of Organization"},{"t":"p","x":"Filing your LLC's articles of organization is a necessary part of creating a limited liability company. We make this process easy by utilizing a dynamic form that not only adjusts to your state-specific needs, but also allows you to list all of your company's most important details."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/articles-of-organization","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-Desktop.webp","alt":"Articles of Organization document preview"},{"t":"h","l":3,"x":"What are articles of organization?"},{"t":"p","x":"Articles of organization is the legal document filed with a state to establish a limited liability company within that state. Some states refer to articles of organization as a \"certificate of organization\" or \"certificate of formation.\" These public records outline the fundamental aspects of a limited liability company, or LLC, including the following:"},{"t":"ul","items":["Company name","Business address","Founding members","Business purpose","Registered agent","Effective start date","Duration of the LLC"]},{"t":"p","x":"Filing articles of organization with a state is a crucial step in establishing the legal protections and benefits associated with a limited liability company."},{"t":"h","l":3,"x":"Use the business formation document that best suits your needs"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOI-Preview-D.webp","alt":"Articles of Incorporation document preview"},{"t":"p","x":[{"x":"Articles of Incorporation","h":"/documents/create/articles-of-incorporation"},{"x":" Articles of incorporation are filed with a state to establish a corporation. A corporation is a business organization that offers liability and tax protections similar to that of an LLC, but has a different ownership and management structure."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Cert-Form-Preview-D.webp","alt":"Certificate of Formation document preview"},{"t":"p","x":[{"x":"Certificate of Formation","h":"/documents/create/certificate-of-formation-for-llc"},{"x":" Some states refer to articles of organization as a certificate of formation. LegalNature's intuitive forms will create the correct document based upon your chosen state's requirements."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOA-Preview-Desktop.webp","alt":"Articles of Amendment document preview"},{"t":"p","x":[{"x":"Articles of Amendment","h":"/categories/business-services/articles-of-amendment"},{"x":" Sometimes information on articles of organization needs to be changed (e.g. change of company name or address). Articles of amendment are filed with the LLC's state in order to submit amendments to articles of organization."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"Create articles of organization in your state"},{"t":"a","href":"/documents/create/articles-of-organization?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/articles-of-organization?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/articles-of-organization?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/articles-of-organization?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/articles-of-organization?state=5","x":"California"},{"t":"a","href":"/documents/create/articles-of-organization?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/articles-of-organization?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/articles-of-organization?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/articles-of-organization?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/articles-of-organization?state=9","x":"Florida"},{"t":"a","href":"/documents/create/articles-of-organization?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/articles-of-organization?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/articles-of-organization?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/articles-of-organization?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/articles-of-organization?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/articles-of-organization?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/articles-of-organization?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/articles-of-organization?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/articles-of-organization?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/articles-of-organization?state=19","x":"Maine"},{"t":"a","href":"/documents/create/articles-of-organization?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/articles-of-organization?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/articles-of-organization?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/articles-of-organization?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/articles-of-organization?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/articles-of-organization?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/articles-of-organization?state=26","x":"Montana"},{"t":"a","href":"/documents/create/articles-of-organization?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/articles-of-organization?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/articles-of-organization?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/articles-of-organization?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/articles-of-organization?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/articles-of-organization?state=32","x":"New York"},{"t":"a","href":"/documents/create/articles-of-organization?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/articles-of-organization?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/articles-of-organization?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/articles-of-organization?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/articles-of-organization?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/articles-of-organization?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/articles-of-organization?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/articles-of-organization?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/articles-of-organization?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/articles-of-organization?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/articles-of-organization?state=43","x":"Texas"},{"t":"a","href":"/documents/create/articles-of-organization?state=44","x":"Utah"},{"t":"a","href":"/documents/create/articles-of-organization?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/articles-of-organization?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/articles-of-organization?state=47","x":"Washington"},{"t":"a","href":"/documents/create/articles-of-organization?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/articles-of-organization?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/articles-of-organization?state=50","x":"Wyoming"},{"t":"h","l":3,"x":"When to use articles of organization"},{"t":"p","x":"Articles of organization is an essential legal document used to establish a limited liability company (LLC) at the state level. You should use articles of organization to do the following:"},{"t":"ol","items":[[{"x":"Forming a new LLC","b":1},{"x":": This document officially creates your company as a distinct legal entity, separate from its owners."}],[{"x":"Registering with the state","b":1},{"x":": Articles of organization are required to register your LLC with the state government."}],[{"x":"Defining company structure","b":1},{"x":": They outline the basic structure and purpose of your LLC."}],[{"x":"Protecting personal assets","b":1},{"x":": By establishing an LLC, you can shield personal assets from business liabilities."}],[{"x":"Seeking tax advantages","b":1},{"x":": LLCs offer potential tax benefits, which begin with proper formation."}],[{"x":"Complying with state laws","b":1},{"x":": Each state has specific requirements for LLC formation, which articles of organization help fulfill."}],[{"x":"Creating a foundation for business operations","b":1},{"x":": This document serves as the legal and structural backbone of your company."}],[{"x":"Preparing for future growth","b":1},{"x":": Well-crafted articles can provide flexibility for business expansion."}]]},{"t":"h","l":2,"x":"How to create your articles of organization"},{"t":"ol","items":["Select the State Where the LLC will be RegisteredOur LLC articles of organization template dynamically changes according to the selected state's requirements. Since each state decides what details will be necessary to form an LLC, the required information can vary from one state to another.","Provide the LLC's Name, Company Address, and Other DetailsWhen choosing your LLC's name, it is important to consider your state's naming requirements. As for your LLC's company address, keep in mind that it will function as an official business address. For this reason, a street address will most likely be required.","Describe the LLC's Management StructureOftentimes an LLC will be managed either by a specific person who has been given the title of \"manager\" or by the LLC's members. If a manager is named, then that person will be authorized to handle the day-to-day activities of the LLC. On the other hand, if the members manage the LLC, each one will have the right to make management decisions."]},{"t":"h","l":3,"x":"Why create articles of organization and an LLC?"},{"t":"p","x":"An LLC is a business entity formed separately from the owner that can be used to incur business debts, expenses, and tax liabilities related to the business."},{"t":"p","x":"The LLC structure creates a legal separation between the business entity and its members/owners, shielding them from personal liability if the business faces financial or legal troubles."},{"t":"p","x":"It is important to note that this protection is not absolute and can be compromised if owners fail to maintain proper business practices or engage in fraudulent activities."},{"t":"a","href":"/documents/create/articles-of-organization","x":"Create Your Articles of Organization Today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp","alt":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Articles of organization guide"},{"t":"p","x":"Articles of organization are formal documents used to establish an LLC and define the fundamental aspects of a company's structure. Sometimes also referred to as a certificate of formation or certificate of organization, articles of organization must be filed with a state in order to create and register an LLC as a valid business organization within that state."},{"t":"p","x":"Articles of organization include the essential details of an LLC, including the following:"},{"t":"ul","items":[[{"x":"The LLC's Name:","b":1},{"x":" Each state requires that companies have a distinct name, often including the entity designator \"LLC\" or \"Limited Liability Company.\""}],[{"x":"Business Purpose:","b":1},{"x":" Some states require that a business purpose be outlined in its articles of organization. This is commonly a general statement, such as \"accounting services\" or \"any lawful act or activity.\""}],[{"x":"Business Address:","b":1},{"x":" The physical address of the business is often required to be reported in lieu of a P.O. Box."}],[{"x":"Registered Agent:","b":1},{"x":" This is the person or entity designated to receive legal paperwork, such as service of process or other government correspondence, on behalf of the LLC. The agent's name and physical street address are required to be reported."}],[{"x":"Members or Managers:","b":1},{"x":" The initial members, or owners, of the LLC are often required to be listed in the articles of organization. Whether the business will be managed by its members or a designated manager are also included."}],[{"x":"The Effective Date of the LLC's Formation:","b":1},{"x":" The date that the LLC's formation takes effect defaults to the day that the articles of organization are submitted to the state; however, a specific date may be set forth as the owner wishes."}]]},{"t":"p","x":"These requirements are general, common information, and the exact details required in articles of organization vary state by state."},{"t":"h","l":3,"x":"State-by-State Requirements"},{"t":"table","rows":[["Alabama","$236","Yes","7-10 business days (standard); 1-2 business days (expedited - $100)","No annual report required"],["Alaska","$250","Yes","5-10 business days (standard); same day (expedited - $50)","Yes / $100"],["Arizona","$50","Yes","5-10 business days (standard); 3-5 business days (expedited - $35)","No annual report required"],["Arkansas","$45","Yes","7-10 business days (standard); 24 hours (expedited - $100)","Yes / $150"],["California","$70","Yes","5-7 business days (standard); 1 business day (expedited - $350)","Yes / $20 + $800 annual franchise tax"],["Colorado","$50","Yes","3-5 business days (standard); same day (expedited - $100)","Yes / $10"],["Connecticut","$120","Yes","5-10 business days (standard); same day (expedited - $100)","Yes / $80"],["Delaware","$110","Yes","5-7 business days (standard); same day (expedited - $100)","Yes / $300"],["District of Columbia","$220","Yes","10-15 business days (standard); 2-3 business days (expedited - $100)","Yes / $300"],["Florida","$125","Yes","5-7 business days (standard); 2-3 business days (expedited - $52.50)","Yes / $138.75"],["Georgia","$100","Yes","7-10 business days (standard); 2-3 business days (expedited - $100)","Yes / $50"],["Hawaii","$50","Yes","5-10 business days (standard); same day (walk-in expedited - $25)","Yes / $15"],["Idaho","$100","Yes","5-7 business days (standard); same day (expedited - $100)","Yes / $0 (no fee, but filing required)"],["Illinois","$150","Yes","10-15 business days (standard); 24 hours (expedited - $100)","Yes / $75"],["Indiana","$95","Yes","5-7 business days (standard); same day (expedited - $50)","Yes / $31 (biennial)"],["Iowa","$50","Yes","5-7 business days (standard); 24 hours (expedited - $50)","Yes / $45 (biennial)"],["Kansas","$160","Yes","7-10 business days (standard); same day (expedited - $100)","Yes / $50"],["Kentucky","$40","Yes","5-7 business days (standard); same day (expedited - $100)","Yes / $15"],["Louisiana","$100","Yes","10-15 business days (standard); 24 hours (expedited - $110)","Yes / $35"],["Maine","$175","No","7-10 business days (standard); 24 hours (expedited - $50)","Yes / $85"],["Maryland","$100","Yes","7-10 business days (standard); same day (expedited - $50)","Yes / $300"],["Massachusetts","$500","Yes","7-15 business days (standard); 1-2 business days (expedited - $100)","Yes / $500"],["Michigan","$50","Yes","7-10 business days (standard); 24 hours (expedited - $50)","Yes / $25"],["Minnesota","$135","Yes","5-7 business days (standard); 24 hours (expedited - $50)","Yes / $0 (no fee, but filing required)"],["Mississippi","$50","Yes","7-10 business days (standard); 24 hours (expedited - $50)","Yes / $0 (no fee, but filing required)"],["Missouri","$50","Yes","5-7 business days (standard); 24 hours (expedited - $25)","No annual report required"],["Montana","$70","Yes","5-10 business days (standard); same day (expedited - $100)","Yes / $20"],["Nebraska","$100","Yes","7-10 business days (standard); 24 hours (expedited - $100)","Yes / $13 (biennial)"],["Nevada","$75 + $150 business license","Yes","2-5 business days (standard); same day (expedited - $125)","Yes / $150 business license + $350 annual list"],["New Hampshire","$100","Yes","7-10 business days (standard); 24 hours (expedited - $100)","Yes / $100"],["New Jersey","$125","Yes","7-10 business days (standard); 1 business day (expedited - $50)","Yes / $75"],["New Mexico","$50","Yes","10-15 business days (standard); same day (expedited - $100)","No annual report required"],["New York","$200","Yes","7-10 business days (standard); same day (expedited - $75)","Yes / $9 (biennial) + publication requirement"],["North Carolina","$125","Yes","5-7 business days (standard); same day (expedited - $200)","Yes / $200"],["North Dakota","$135","Yes","10-15 business days (standard); 24 hours (expedited - $100)","Yes / $50"],["Ohio","$99","Yes","5-7 business days (standard); 1-2 business days (expedited - $100)","No annual report required"],["Oklahoma","$100","Yes","7-10 business days (standard); same day (expedited - $100)","Yes / $25"],["Oregon","$100","Yes","5-7 business days (standard); 24 hours (expedited - $100)","Yes / $100"],["Pennsylvania","$125","Yes","7-10 business days (standard); 2-3 business days (expedited - $100)","Yes / $7"],["Rhode Island","$150","Yes","10-15 business days (standard); same day (expedited - $100)","Yes / $50"],["South Carolina","$110","Yes","5-7 business days (standard); 24 hours (expedited - $50)","No annual report required"],["South Dakota","$150","Yes","5-7 business days (standard); same day (expedited - $50)","Yes / $50"],["Tennessee","$300","Yes","7-10 business days (standard); same day (expedited - $100)","Yes / $300"],["Texas","$300","Yes","5-7 business days (standard); 1-2 business days (expedited - $25)","No annual report (but franchise tax filing required)"],["Utah","$70","Yes","3-5 business days (standard); same day (expedited - $100)","Yes / $20"],["Vermont","$125","Yes","7-10 business days (standard); same day (expedited - $100)","Yes / $35"],["Virginia","$100","Yes","7-12 business days (standard); same day (expedited - $100)","Yes / $50"],["Washington","$200","Yes","3-5 business days (standard); 1 business day (expedited - $50)","Yes / $60"],["West Virginia","$100","Yes","7-10 business days (standard); same day (expedited - $100)","Yes / $25"],["Wisconsin","$130","Yes","5-7 business days (standard); same day (online expedited - $25)","Yes / $25"],["Wyoming","$100 + $60 license tax","Yes","2-3 business days (standard); same day (expedited - $100)","Yes / $60 annual license tax"]],"head":["State","Filing Fee","Online Filing Available?","Processing Time","Annual Report/Fee"]},{"t":"h","l":3,"x":"Articles of Organization or Articles of Incorporation?"},{"t":"p","x":"The terms \"articles of organization\" and \"articles of incorporation\" are often mistakenly used interchangeably. Both documents are used for the purpose of registering a business entity with a state, but articles of organization are used to create LLCs while articles of incorporation are used to form corporations. Both business entities provide similar liability protections to the business's owner, but are owned and operated through different structures."},{"t":"h","l":3,"x":"Do I Need an Attorney to Create Articles of Organization?"},{"t":"p","x":"Any business owner may file their own articles of organization and an attorney is not required for their creation. However, it is highly recommended to consult with an attorney or other legal service when creating this legal document since each state has its own specific requirements for filing that may be difficult or confusing to navigate."},{"t":"h","l":3,"x":"What if I Need to Make Changes to My Articles of Organization?"},{"t":"p","x":"Articles of amendment should be filed when changes to a company's articles of organization need to be made. Articles of organization may require changing if they contain errors when they are first filed, or there are changes in the business over time. These changes, or amendments, may include reporting a new registered agent, updating the company's business address, or changing the company's owners, members, or managers."},{"t":"h","l":3,"x":"What Should I Do after Filing Articles of Organization?"},{"t":"p","x":"After filing articles of organization and paying the filing fee, there is typically a short waiting period for the articles to be reviewed and approved by the state, though many states offer expedited processing for faster service. Once the articles are approved and the LLC is a registered business entity, there are several actions that should be taken in order to ensure that the newly formed company remains compliant with the Department of State:"},{"t":"ol","items":[[{"x":"Retrieve an EIN from the IRS","b":1},{"x":": An employer identification number, or EIN, is an essential nine-digit number required for federal tax purposes. Having a valid EIN is often required to apply for other business necessities, such as a license or financial accounts."}],[{"x":"Create an LLC operating agreement","b":1},{"x":": While the articles of organization outline the general purpose of the LLC, an LLC's operating agreement describes the specific functions, regulations, responsibilities, and rules for the business, including protocols for dealing with personal or financial liabilities or internal conflicts of interest."}],[{"x":"Open a business bank account","b":1},{"x":": Establishing a separate business bank account for your business is crucial for maintaining and managing your business assets and business finances, while protecting yourself from personal liability."}],[{"x":"Apply for any required business licenses","b":1},{"x":": Some business types are monitored and regulated more heavily by the states and require certification and licensure to operate legally."}],[{"x":"File annual reports","b":1},{"x":": Most states require LLCs to file an annual report with the state's Division of Corporations to remain in good standing and preserve the liability protections offered by the LLC business structure"}]]},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"Why do I need to file articles of organization for my LLC?","a":[{"t":"p","x":"Articles of organization are designed to give your state's Secretary of State or Company Registrar the information required to determine whether or not to approve a new company. State laws governing businesses are designed to protect consumers and state residents, so every state has laws and requirements that businesses must comply with if they want the benefits of an LLC structure."}]},{"q":"In what state should I register my LLC?","a":[{"t":"p","x":"Although businesses can register to conduct business in any state, most businesses choose to organize their limited liability companies in the state where their principal office is located. Although it may make sense to choose a different state for an LLC because of that state’s tax treatment, some states impose additional taxes, making it cheaper to organize under a neighboring state’s laws. If you are considering establishing your LLC in a state other than your own, it is important that you investigate whether that state requires additional paperwork."}]},{"q":"What management structure should my company have?","a":[{"t":"p","x":"In a member-managed company, the day-to-day management and responsibilities of a limited liability company will usually reside with its members. In other words, they are directly involved in running the company's daily operations. Alternatively, in a manager-managed limited liability company, the day-to-day management and responsibilities reside with the appointed managers. This means that the members are not directly involved in the running of the company's daily operations and do not take on any managerial responsibilities. If managers are appointed, you will have the chance to provide the name and address of each initial manager. Managers may want to consider using a business address rather than a residential address as this information may become public. Do not provide social security numbers, dates of birth, or other private identification information. Remember, a manager may also be a member of the company. Do not forget to list managers who are also members."}]},{"q":"Will I need a registered agent?","a":[{"t":"p","x":"A registered agent is an individual or business entity residing within the company's state. All registered agents must maintain normal business hours at a physical address that is open to the public. The registered agent’s main function is to ensure reliable communication between the company and any third party, by receiving and forwarding legal documents, notices, or other requests to the company. It is mandatory that every company provides the registered agent's full name. If the registered agent is a business entity, then you should include the entity designation of the business such as Inc. or Co. It is also mandatory that every company provides the address where the registered agent is required to receive any legal correspondence. Check with your state regarding any specific requirements for listing the registered agent's address. LegalNature provides the registered agent with the option to use the company's physical address, the company's mailing address, or any other address where the registered agent is willing and able to receive mail. It is important to point out that some states require the registered agent’s consent in order to be named as such."}]},{"q":"How do I file my articles of organization?","a":[{"t":"p","x":"Most states allow articles of organization to be filed electronically online through the Secretary of State or Division of Corporations website. Articles can also be submitted through the mail; though, this typically results in an extended wait-period for processing. After receiving the articles and any required filing fees, there is typically a short processing period unless the state offers expedited processing for an additional fee."}]},{"q":"What is the difference between articles of organization, articles of incorporation, or an operating agreement?","a":[{"t":"p","x":"Articles of organization are distinct from an LLC's operating agreement, which is an internal document setting forth the company's operational rules. Articles of organization are also different from articles of incorporation, which are used to create corporations (a different business structure with similar benefits)."}]}]},{"t":"h","l":4,"x":"Create your articles of organization in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview and download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-M.webp","alt":"Create your articles of organization in minutes"},{"t":"a","href":"/documents/create/articles-of-organization","x":"Create Document"},{"t":"h","l":2,"x":"Start Your Articles of Organization"},{"t":"p","x":"Complete your articles opf organization in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/articles-of-organization","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/AOO-Preview-Desktop.webp","alt":"Start Your Articles of Organization"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-services-license-research--e4ba2e2189.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Business License Research Package"},{"t":"p","x":"Most businesses need licenses and permits to operate legally, but figuring out which ones apply to yours takes real research. LegalNature's business license research service does that work for you, producing a comprehensive report of your city, county, and state requirements with the forms you need to take action and stay compliant."},{"t":"a","href":"/orders/create/license-research","x":"Start Now"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/license-research-2.png","alt":"Business Formation","w":866,"h":1252},{"t":"h","l":2,"x":"We do the work. You stay compliant. Focus on your business."},{"t":"h","l":3,"x":"Determine exactly what is required"},{"t":"p","x":"Receive a comprehensive report of required licenses and permits at the city, county, and state level."},{"t":"h","l":3,"x":"Learn what your industry requires"},{"t":"p","x":"Identify industry-specific licenses before you open — not after a violation."},{"t":"h","l":3,"x":"Comprehensive state coverage"},{"t":"p","x":"Covers businesses across all 50 states and the District of Columbia."},{"t":"a","href":"/orders/create/license-research","x":"Get Started Today"},{"t":"h","l":2,"x":"What is a business license?"},{"t":"p","x":"A business license is a government-issued authorization that permits a business to legally operate within a given jurisdiction. Depending on your business, you may need licenses and permits from multiple government bodies."},{"t":"h","l":3,"x":"Federal Business Licenses"},{"t":"p","x":"Federal licenses apply when a business operates in an industry regulated at the national level. Most small businesses don't require a federal license, but those that do face some of the most complex and consequential requirements in the licensing landscape."},{"t":"h","l":3,"x":"State Business Licenses"},{"t":"p","x":"State-level licensing requirements vary more than any other tier of the compliance framework. Some states require a general business license for virtually every operating business; others have no such requirement at all but impose extensive industry-specific licensing through professional and occupational boards."},{"t":"h","l":3,"x":"Local Business Licenses"},{"t":"p","x":"Local requirements issued at the city or county level are the most frequently overlooked part of the compliance picture and, for many businesses, the most operationally significant. Most municipalities require a local business license or business tax certificate simply to operate within their boundaries."},{"t":"h","l":2,"x":"Why business license compliance matters"},{"t":"h","l":3,"x":"Requirements Exist at Every Level of Government"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/WbTKe46dQbenMalFbg5K.webp","alt":"llc owner"},{"t":"h","l":3,"x":"The Penalties for Non-Compliance are Real"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/pyorXnubTxWwc2lMQCCu.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Getting Compliant Early Is Always Easier"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/D6YNv7YSu21Gsn3eqh2U.webp","alt":"llc owner"},{"t":"h","l":2,"x":"See what our users have to say"},{"t":"p","x":"Join thousands of businesses who are choosing LegalNature every month to achieve their potential."},{"t":"p","x":"- Lorrie R"},{"t":"h","l":2,"x":"How to get your business license research report"},{"t":"ol","items":["Place Your OrderOrder the research service as a stand-alone purchase or add it to a new business formation order. If you're ordering it alongside an entity formation, the research process begins once your entity has been successfully filed with the state — this ensures the research is based on a registered, confirmed business.","Provide Your Business DetailsProvide your business's principal office address (city, county, state, and zip code), your business activity and industry, whether you plan to hire employees, and any trade names or DBAs your business uses.","The Research Gets UnderwayA comprehensive review of the licenses and permits required at the city, county, and state level is conducted based on your specific business information. This process typically takes a few business days to complete.","Receive Your Complete ReportYour business license research package is delivered directly to your account. It includes every license and permit identified as applicable to your business, organized by jurisdiction."]},{"t":"h","l":2,"x":"Business licenses by industry"},{"t":"a","href":"/orders/create/license-research","x":"Order your business license research package today"},{"t":"h","l":3,"x":"Food & Beverage"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/jLROIjTaRp29wdj98SVA.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Construction & Contracting"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/c8Om4OEQoeZa3fdrteXw.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Healthcare & Personal Services"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/PnITQmS1QySaxhoFGRBu.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Childcare & Education"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/eJPbzftxQJmbTSHnmDtQ.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Retail & E-Commerce"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/mnyCTeEiTzWxyT7tqNvr.webp","alt":"llc owner"},{"t":"h","l":3,"x":"Real Estate"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/cdn.buttercms.com/WbTKe46dQbenMalFbg5K.webp","alt":"llc owner"},{"t":"h","l":2,"x":"What our customers are saying about us"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-1.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-2.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-4.jpg.webp","alt":"","w":150,"h":150},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend-ipx/f_webp-q_80-s_150x150/_frontend/images/homepage/reviews-3.jpg.webp","alt":"","w":150,"h":150},{"t":"h","l":2,"x":"Frequently asked questions"},{"t":"faq","items":[{"q":"What is a business license research service?","a":[{"t":"p","x":"A business license research service identifies all of the licenses, permits, and registrations a specific business is required to obtain based on its location, industry, and business activity and delivers the results in a report that includes relevant application forms. It covers requirements at the city, county, and state level simultaneously, giving business owners a complete compliance picture rather than requiring them to research each jurisdiction independently."}]},{"q":"How do I know what business licenses I need?","a":[{"t":"p","x":"The licenses your business needs depend on where it's located, what it does, whether it has employees, and whether it operates under a trade name. In most cases, requirements exist at multiple levels of government — state, county, and city — and each level has its own agencies and application processes."}]},{"q":"Do all businesses need a business license?","a":[{"t":"p","x":"Most businesses in the United States need at least one license or permit to operate legally. The type and source of that requirement varies widely. Even in states that don't require a general state-level business license, businesses typically face county or city-level permit requirements and industry-specific licensing. Assuming no license is needed without verifying that assumption creates real compliance risk."}]},{"q":"How long does business license research take?","a":[{"t":"p","x":"LegalNature's research process typically takes a few business days after all required business information has been submitted. If additional details are needed to complete the research, LegalNature will reach out through your account."}]},{"q":"Can I order business license research without forming an LLC or corporation through LegalNature?","a":[{"t":"p","x":"Yes. The business license research service is available as a stand-alone order and does not require a formation order through LegalNature. You'll provide your business's principal office address, business activity, and other relevant details during the order process."}]},{"q":"What information do I need to provide for a license research order?","a":[{"t":"p","x":"LegalNature will need your business's principal office address (street, city, county, state, and zip code), your business activity and industry, whether you plan to hire employees, and any trade names or DBAs your business uses."}]},{"q":"What happens after I receive my business license research report?","a":[{"t":"p","x":"Your report identifies every applicable license and permit and includes the relevant application forms. Applying for and obtaining the licenses is your next step — LegalNature's service identifies what you need; it does not complete the applications on your behalf. For businesses in complex or heavily regulated industries, it is highly recommended to consult with an attorney who can help you navigate the application process and confirm that your compliance picture is complete."}]}]},{"t":"h","l":2,"x":"Research your business license requirements today"},{"t":"p","x":"Let LegalNature locate your licensing and permit requirements to keep your business compliant."},{"t":"a","href":"/orders/create/license-research","x":"Get Started"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-software-license-agreement--564b5caabb.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Software License Agreement"},{"t":"p","x":"For any business that gives its users access to its software, a software license agreement is absolutely essential to protect your rights."},{"t":"p","x":"For each new user permitted to use your software, you should have a software license agreement in place to lay out the user’s specific terms of use. Create a comprehensive software license agreement for any software product using our simple template."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our software license agreement"},{"t":"ul","items":["Is compliant throughout all states and the District of Columbia","Allows you to terminate use at any time with no problems","Allows you to license your software without selling it","Prevents abuse of your software by third parties"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Software licensing done right"},{"t":"p","x":"Easily create a software license agreement tailored to your needs."},{"t":"h","l":3,"x":"Prevent Abuses of Your Software"},{"t":"p","x":"To protect your business, you need to make sure you have a software license agreement in place."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Create Document"},{"t":"h","l":3,"x":"Limit Your Liability"},{"t":"p","x":"Prevent unnecessary legal action by having your customers agree to your terms."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a software license agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your software license agreement, you will need to provide certain relevant information. This includes the permitted uses of the software, the software delivery method, installation and testing details, and the fees involved."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete the software license agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes to your document by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version and sign. This agreement allows the parties to sign and deliver copies electronically. Therefore, it is not necessary for both parties to sign a single printed copy of the agreement."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"For a business, its software is intellectual property and a valued business asset. It deserves certain protections and defined terms and conditions when the software is being used by a customer. LegalNature's software license agreement helps articulate how the licensor and licensee want the software to be used and help the parties establish a sound business relationship based on the benefits the software offers."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/software-license-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a software license?","a":[{"t":"p","x":[{"x":"A software license allows a person or business (the licensee) to use software developed by another party (the licensor). The license itself is a legally binding document that allows the licensee to use the software without violating the intellectual property rights of the licensor. It is similar to a product or "},{"x":"service agreement","h":"/categories/business/general-services-agreement"},{"x":" in that it sets out the rights and obligations of both parties with regard to the software. The parties should have an opportunity to negotiate their rights before entering into the agreement. A software license is not the same as an end-user agreement that you would see on websites or apps where the user must accept the terms before using the software. It is also not the same as development software, which involves a customization process for the end user’s specific needs. Keep in mind that a software license agreement also differs from a technology services contract in that a technology services contract sets up an ongoing services agreement between an IT contractor and its client, but does not involve licensing and downloading specific software to a computer or other device."}]}]},{"q":"Who is a licensor? Who is a licensee?","a":[{"t":"p","x":"In a software license agreement, there are usually two parties: the licensor and the licensee. The licensee is the individual or entity in the relationship that receives the license, and the licensor is the person or entity that provides the license. The licensor is often a creator or inventor whereas the licensee can be a variety of individuals or entities, including end users, manufacturers, other businesses, etc. As a software license agreement can be extremely flexible, it is often a good option for a variety of relationships and circumstances."}]},{"q":"How is a license different from ownership?","a":[{"t":"p","x":"When you own something outright, the manufacturer or designer often has little control over what you do with the product post-sale. In most circumstances, you can manipulate the product however you want and even reproduce it and sell it. Consider an example of a physical product. If you bought a chair, you could copy how the chair was made and create another one for your home. You could also paint the chair or change certain features of it. You could even resell it if you wanted to do so. In contrast, having a license only allows you to use the product. You often cannot change it, copy it, or resell it unless you have specific permission to do so. In our chair example, you could use the chair, but you may not be able to do anything else with it. You could not sell it to someone else or change it in any way. You will usually see licenses in the context of software or design and specifications. In the software context, the license will usually restrict users from altering, copying, or selling it to another person. Software developers use licenses, as opposed to an outright transfer, to help decrease potential problems associated with over-sharing that can reduce demand and limit profits. A license will describe how a product can be used. That is, copying or distributing may be allowed according to the software license agreement, but it must be specifically stated to be permitted."}]},{"q":"What is “open source” software?","a":[{"t":"p","x":"Not every type of software will include a restrictive license. “Open source” software is any software that can be accessed, changed, used, and shared without charge. Open source software is the same as “free software.” There is no need to obtain an individual license because the developers of the software have chosen to share it with the world without restrictions. Nonetheless, open source software still technically has a license; it is simply not very restrictive. Open source software can be developed by anyone and must meet 10 specific criteria for it to be labelled “open source.”"},{"t":"ul","items":["Free redistribution","The program must include the source code","Derivative work must be permitted (modification and alterations to the original software)","Restrictions on distribution of the source code is allowed if the software is modified, but only if patch files can be distributed as well","No discrimination against any group or person","No discrimination against any particular field","Rights associated with the license must apply to everyone that receives a redistribution of the software","The license cannot be specific to a product","The license cannot restrict the use of other software","The license must not be predicated on any style of interface or individual technology"]},{"t":"p","x":"Open source software allows developers the ability to learn and continue developing their own software by collaborating with others. Software sometimes starts out as open source in its early phases of development. Open source software can be used for commercial purposes, and there is no way to restrict the utilization of the software. Developers also cannot control who uses the software and for what purpose, which is often a concern for those who may be using the software for illegal or unethical reasons."}]},{"q":"How can I limit the licensee’s use of my software?","a":[{"t":"p","x":"The best way to limit or restrict someone’s use of your software is to have them enter into a software license agreement with you. The agreement should set out how the licensee can and cannot use the software. It should also set out what will happen if the agreement is violated. Negotiation is a powerful tool in the context of software licensing. Software licensing agreements may also contain the following additional provisions:"},{"t":"ul","items":["Restrictions on remedies if the software is defective or does not comply with specific requirements","Limitations on liability (damage caps) if losses occur","Liability exclusions","Limitations on warranties","Alternative dispute resolution options","Information on copyright and ownership protections","The governing law if a conflict arises"]},{"t":"p","x":[{"x":"Like any "},{"x":"contract,","h":"/categories/business/sales-contract"},{"x":" you and the other party can include provisions that will work for your unique situation. You can be creative about limitations regarding the use and sale of your software. Just be sure that your creativity does not morph into making the agreement unreasonable or impractical."}]}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Software License Agreement"},{"t":"p","x":"Complete your software license agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/software-license-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Software License Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-statement-of-work--5751226d7c.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Statement of Work"},{"t":"p","x":"By outlining clear terms, this agreement will help create reasonable expectations as well as avoid any unnecessary confusion."},{"t":"p","x":"Easily create a statement of work tailored to your specific business needs in minutes. Start your project with confidence using this legally binding agreement."},{"t":"a","href":"/documents/create/statement-of-work","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"When to use a statement of work"},{"t":"ul","items":["Describe specific work requirements","Have a clear idea of what services will be rendered","Set a project's start and end date","Agree on how goods and services will be paid"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Get a statement of work that is legally binding with our step-by-step guidance"},{"t":"p","x":"Throughout the form, we explain all the terms and you’ll be guided on making the best choices for your statement of work."},{"t":"h","l":3,"x":"Statement of Work"},{"t":"p","x":"The main purpose of a statement of work is to describe specific work requirements in relation to goods and/or services. Keep in mind that a statement of work should be created in accordance with the master services agreement since these two agreements depend on one another."},{"t":"a","href":"/documents/create/statement-of-work","x":"Create Document"},{"t":"h","l":3,"x":"Master Services Agreement"},{"t":"p","x":"Typically, a master services agreement would be signed first in order to establish the general terms of the relationship, then subsequently the parties will complete a statement of work in order to outline the specific requirements of the services that are being provided."},{"t":"a","href":"/documents/create/master-services-agreement","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to get a statement of work in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Include certain necessary information, such as each party's address and current email. You will also need to provide information related to the goods and/or services that are covered by the agreement."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you gathered to complete your statement of work. We make this simple by guiding you through each step. As you respond to certain questions, the document will adapt to accommodate your requirements."},{"t":"h","l":3,"x":"Review"},{"t":"p","x":"Once you have finished creating your document, you will be able to review and edit it as much as you like with Microsoft Word. However, if you decide that changes are not necessary, you can simply download the PDF version."},{"t":"a","href":"/documents/create/statement-of-work","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"By outlining clear terms and conditions for ongoing services that are provided, this agreement will help create reasonable expectations as well as avoid any unnecessary confusion. The following guide will discuss key terms and options that are included in the agreement."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/statement-of-work","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a statement of work?","a":[{"t":"p","x":"A statement of work is a document that is often used within the context of project management. Its main function is to describe certain work requirements related to certain services or goods. The benefit of a well-drafted statement of work is that it defines particular deliverables, services, or activities that need to be observed by all the parties involved. That said, it's important to point out that many terms and conditions contained in a statement of work depend on the provisions of a master services agreement. As a result, it's important to make sure that the statement of work is drafted in consideration of the master services agreement's provisions."}]},{"q":"What is a master services agreement?","a":[{"t":"p","x":"A master services agreement is a type of contract where the parties can establish most of the terms that will govern future transactions between the parties. These agreements can cover a wide array of subjects, such as intellectual property rights, late payment penalties, warranties, and confidentiality expectations, among others. Also, although master services agreements are most often associated with arranging services, it is not all that uncommon for certain goods to be provided along with the services."}]},{"q":"What type of services can be included in this agreement?","a":[{"t":"p","x":"As a general rule, both a statement of work and a master services agreement can be used in most, if not all, service industries since most will require general terms and conditions that have become quite common. This means that both agreements are flexible enough to accommodate most uses, while still being legally binding contracts."}]},{"q":"Does a master services agreement need to have a starting date?","a":[{"t":"p","x":"Yes. As is the case for any other agreement, a master services agreement requires the parties to agree on when the contract’s provisions will begin to take effect. However, this does not always imply that a specific date must be set. Although this master services agreement allows the parties to indicate a specific date, the agreement’s effects could also begin when certain events take place, such as when all parties have signed it."}]},{"q":"Does this master services agreement require additional terms to be valid?","a":[{"t":"p","x":"Our master services agreement does not require any additional terms or conditions in order to be valid. Nonetheless, some particular arrangement might be required within certain industries. This is especially true if the master services agreement under which this statement of work will be issued does not include a particular term that is important to the parties. If that is the case, it is recommended that such a term be included and clearly defined."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/statement-of-work","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Statement of Work"},{"t":"p","x":"Complete your statement of work in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/statement-of-work","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Statement of Work"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-stock-purchase-agreement--f3f20d8b31.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Stock Purchase Agreement"},{"t":"p","x":"Our stock purchase agreement outlines the terms and conditions of a deal between someone who wants to invest money in a business or project and the person or entity who owns or runs it."},{"t":"p","x":"It can include things like how much money is invested and what rights and responsibilities each party has. A stock purchase agreement helps to protect both sides from misunderstandings or disputes."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"When to use a stock purchase agreement"},{"t":"ul","items":["When raising funds from angel investors or venture capitalists","When investing in a startup or a business venture","When creating a shareholder agreement"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Get a legally binding agreement"},{"t":"p","x":"Throughout the form, we explain all the terms and you will be guided on making the best choices for your stock purchase agreement."},{"t":"h","l":3,"x":"Secure Funding and Accelerate Growth"},{"t":"p","x":"Attract more funding and accelerate growth by gaining access to valuable resources, networks, and expertise from your investors."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Create Document"},{"t":"h","l":3,"x":"Protect Your Rights and Interests"},{"t":"p","x":"Avoid disputes, misunderstandings, and conflicts with your investors by ensuring that both sides are aligned on the terms of the deal."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a stock purchase agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Begin by collecting basic information about the parties, including each party's address and email, when the agreement will begin, as well as sale price and stock amounts. Also determine at this point if any special or custom clauses need to be added to the agreement."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"We help you integrate the information you collected into an agreement adapted to your needs. As you complete our questionnaire, we inform you about your choices at each step and dynamically ask new questions based on your previous answers."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"Always read your document thoroughly to ensure it contains everything you need and is free of errors. In any case, once you finish creating your document, you will be able to alter it as much as you like in Microsoft Word. However, if you do not need to make any changes, you can simply download the PDF version and have the parties sign the agreement."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Use our stock purchase agreement form template to quickly and easily establish the terms and conditions of an investment deal between a business owner and an investor. By having a clear and detailed stock purchase agreement, you can ensure that your business relationship is based on trust, transparency, and mutual benefit."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a stock purchase agreement?","a":[{"t":"p","x":"A stock purchase agreement is a legal document that outlines the key terms and conditions of a deal between a company and its investors. It specifies the amount, type, and purpose of the investment, as well as the rights and obligations of both parties. Some of the common terms and clauses that a stock purchase agreement may include are the identity of the company and the investors, the valuation of the company and the price per share, and the warranties and representations of both parties regarding the accuracy of information and compliance with laws."}]},{"q":"How can I negotiate the best stock purchase agreement for my company?","a":[{"t":"p","x":"Negotiating the best stock purchase agreement for your company can be a challenging task. Here are some tips to help you achieve the best stock purchase agreement for your company:"},{"t":"ul","items":[[{"x":"Do your homework -","b":1},{"x":" Research the potential investors, their backgrounds, their interests, and their expectations. Know your company's strengths, weaknesses, opportunities, and threats."}],[{"x":"Be open to negotiation -","b":1},{"x":" Show that you are passionate about your company but be mindful of the other party's concerns. Answer their questions honestly and professionally. Once you have established a rapport with the investors, you can start discussing the terms of the agreement. Be flexible and realistic, but make sure the agreement is in your best interest."}],[{"x":"Seek legal advice -","b":1},{"x":" Before signing any agreement, make sure you consult with a lawyer who specializes in investment contracts if you have any doubts regarding the agreement. They can help you review the terms, identify any potential risks or pitfalls, and protect your rights and interests."}]]}]},{"q":"What are the common pitfalls and risks to avoid when signing a stock purchase agreement?","a":[{"t":"p","x":"Some of the common pitfalls and risks to avoid when signing a stock purchase agreement are as follows:"},{"t":"ul","items":[[{"x":"Not understanding the terms and implications of the agreement -","b":1},{"x":" It is important to read and understand every clause of the agreement, and to seek professional advice if needed, before signing anything."}],[{"x":"Not negotiating the terms and conditions of the agreement -","b":1},{"x":" Both business owners and investors should always try to negotiate the best possible deal for their company, and to walk away from any deal that does not align with their vision and goals."}],[{"x":"Not complying with the legal and regulatory requirements of the agreement -","b":1},{"x":" Signing a stock purchase agreement may generate certain obligations and responsibilities on both parties, such as reporting, auditing, governance, compliance, etc. Failing to comply with these requirements can result in legal consequences, such as breach of contract, penalties, or termination of the agreement. Both business owners and investors should always adhere to the terms and conditions of the agreement, and communicate with their counter parties regularly and transparently."}]]}]},{"q":"Should the effective date be specific or when the last party signs?","a":[{"t":"p","x":"A fixed effective date can provide certainty and clarity for the parties, especially if there are pre-contractual obligations or conditions that need to be fulfilled before the contract becomes binding. A fixed effective date can also avoid disputes or confusion about when the contract was actually signed, especially if the parties sign at different times or locations. However, a fixed effective date may also create problems if the parties fail to sign the contract by that date, or if there are unforeseen events or circumstances that affect the performance of the contract after that date. Using the date of signing by all parties as the effective date can avoid some of the issues that may arise from a fixed effective date, such as missing the deadline or having to deal with changed circumstances. Using the date of signing can also reflect the parties' intention and consent to be bound by the contract at the time of signing, rather than at a future date. However, using the date of signing may also create uncertainty and ambiguity for the parties, especially if there are delays or gaps between the signing of different parties, or if there are post-contractual obligations or conditions that need to be satisfied after the contract becomes binding."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Stock Purchase Agreement"},{"t":"p","x":"Complete your stock purchase agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/stock-purchase-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Stock Purchase Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-terms-of-use--c8505a2486.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Website Terms of Use"},{"t":"p","x":"Your website terms of use will allow you to set up rules and regulations for your visitors using your website."},{"t":"p","x":"Our customizable website terms of use template makes it easy to customize the terms of use for websites based in the United States. Quickly add your preferences regarding member accounts, content, and more."},{"t":"a","href":"/documents/create/terms-of-use","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our website terms of use"},{"t":"ul","items":["Are compliant throughout all states and the District of Columbia","Define vital concepts related to the service or goods provided","Help avoid confusion by defining each party's responsibilities","Help limit liability for a visitor's use of the site"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Get your terms of use now"},{"t":"p","x":"Easily get a set of website terms of use that are tailored to your needs."},{"t":"h","l":3,"x":"Limit your liability and set boundaries"},{"t":"p","x":"These website terms of use will define each party's general obligations and responsibilities."},{"t":"a","href":"/documents/create/terms-of-use","x":"Create Document"},{"t":"h","l":3,"x":"Define key terms and conditions"},{"t":"p","x":"By defining clear terms and conditions, this form will help prevent unnecessary confusion."},{"t":"a","href":"/documents/create/terms-of-use","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create your website terms of use in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your website terms of use, you will need to provide certain relevant information. This includes any policies you may have concerning member accounts, posted content, age restrictions, refunds, cancellations, sales policies, dispute resolution, and more. Depending on the type of website involved, some of these categories may be needed."},{"t":"h","l":3,"x":"Answer Key Questions"},{"t":"p","x":"Use the information you collected to complete your website terms of use. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. The questions and information we present to you dynamically change depending on your answers and the state selected."},{"t":"h","l":3,"x":"Review"},{"t":"p","x":"It is always important to read your terms and conditions thoroughly to ensure it matches your needs and is free of errors and omissions. After completing the questionnaire, you can make textual changes by downloading it in Microsoft Word. If no changes are needed, you can simply download the PDF version."},{"t":"a","href":"/documents/create/terms-of-use","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"All websites need to post their terms of use in order to notify visitors of its rules and protect themselves from a wide variety of potential legal liabilities. This help guide explains the main sections and key considerations when creating terms of use for your website. Note that LegalNature's document is meant for websites based within the United States."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/terms-of-use","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What does the term \"browsewrap\" mean?","a":[{"t":"p","x":[{"x":"\""},{"x":"Browsewrap","b":1},{"x":"\" is the term used for websites that allow users to accept their terms and conditions simply by navigating through the site. Browsewrap is typically only used for static sites that are primarily informational in nature with little to no interaction with the site or others and do not offer products or services for sale."}]}]},{"q":"What does the term \"clickwrap\" mean?","a":[{"t":"p","x":[{"x":"\""},{"x":"Clickwrap","b":1},{"x":",\" on the other hand, refers to sites that require visitors to affirmatively agree to the terms by clicking an \"Accept\" button, or checking a similar box, before creating an account or making a purchase. Clickwrap is recommended for all sites that go beyond browsewrap by selling products and services or allowing users to post content or interact with others. If you choose to implement clickwrap, you should be sure that your method requires visitors to make an affirmative action assenting to the terms and conditions."}]}]},{"q":"Do I need to have a sale, refund, and cancellation policy?","a":[{"t":"p","x":[{"x":"If you "},{"x":"sell goods or services through your website","h":"/guides/how-to-start-an-ecommerce-business"},{"x":", then you should outline your sales policy, including any conditions of sale, return policies, guarantees, payment details, fees, and shipping terms. Doing so helps avoid potential disputes and lawsuits with aggrieved visitors. Likewise, you should include any refund and cancellation policies you may have in order to put visitors on notice and avoid conflicts."}]}]},{"q":"Should my website terms of use allow me to limit access to my site?","a":[{"t":"p","x":"Yes. Our website terms of use allow you to terminate a visitor's access to any part or service on the site at any time in your sole discretion, without notice. These terms may be updated at any time. A visitor's continued use of the site is often considered acceptance of such updates. It's important to provide visitors with notice of such updates by any reasonable means, including by email or posting notice in a prominent place on the site."}]},{"q":"Do these website terms of use contain disclaimers?","a":[{"t":"p","x":"Yes. The disclaimers in our form include many of the most important terms and conditions. Among these, visitors are told that the site is provided on an \"as is\" basis, and potential express and implied warranties are disclaimed in order to prevent visitors from seeking to hold you liable for promises you do not intend to offer. This also includes disclaimers for any loss or damages that may occur to visitors' computers, internet connections, or user content. Visitors are told that the content on your website is for informational purposes only and does not offer any professional advice, including legal, financial, or medical advice."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/terms-of-use","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Website Terms of Use"},{"t":"p","x":"Complete your website terms of use in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/terms-of-use","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Website Terms of Use"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-business-waiver-and-release-of-liability--258846774a.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Waiver and Release of Liability"},{"t":"p","x":"Create a waiver to release one or both parties involved in an event, dispute, contract, or other legal matter from liability (legal responsibility)."},{"t":"p","x":"Our customizable waiver and release of liability can be used to fit any circumstance, including use of property, contracts, sporting activities, services, or other events."},{"t":"a","href":"/documents/create/waiver-and-release-of-liability","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our waiver and release of liability"},{"t":"ul","items":["Is designed to offer protection during contracts, activities, or services","Offers different levels of indemnity and protection to fit your needs","Is compliant throughout all states and the District of Columbia","Provides step-by-step guidance and dynamically adjusts to your needs"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"Create your waiver and release of liability in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"As you complete your waiver and release of liability, you will need to provide certain relevant information. This includes the name and address of each party and the date your agreement should go into effect."},{"t":"h","l":3,"x":"Complete Our Short Questionnaire"},{"t":"p","x":"Use the information you collected to complete the waiver and release of liability. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"It is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. When signing your agreement, be sure to follow any additional instructions related to signing and witnessing the document."},{"t":"a","href":"/documents/create/waiver-and-release-of-liability","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"Our waiver and release of liability is an excellent way to help parties accomplish their goals by better dividing responsibility for legal risks. This help guide provides clarification on some of the key aspects of your document."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/waiver-and-release-of-liability","x":"Create Document"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a waiver and release of liability?","a":[{"t":"p","x":"A waiver and release of liability, also known as a hold harmless agreement, a release form, a liability release form, an assumption of risk form, a release of liability agreement, or legal release, is an agreement between two or more parties to waive a legal claim for damages. A hold harmless agreement can be used to waive a claim for damages that have already occurred, or to waive future claims for injuries or damages."}]},{"q":"When do I need a waiver and release of liability?","a":[{"t":"p","x":"You need a waiver and release of liability whenever you engage in activities or events that are likely to cause injuries or damage. Thus, a waiver and release of liability can be used when a third party is using your property, during contracts, for the provision of services, sporting activities, or other events that involve any type of risk."}]},{"q":"What are the common uses of a waiver and release of liability?","a":[{"t":"p","x":"A waiver and release of liability is generally recommended when you engage in activities that involve some type of risk. A waiver and release of liability might also be used to release another party from the potential of a lawsuit for a past injury. Some common uses of a waiver and release of liability include:"},{"t":"ul","items":["Car accidents. This typically involves paying money for injuries or damages in return for a release of any further liability.","Field trips or sporting activities. Examples include soccer, sky diving, zip lining, boat rentals, gyms, baseball batting cages, and golf courses.","Media releases. These authorize the use of photographs and videos of or taken by a person.","Information releases. These allow third parties to release confidential medical, financial, employment, or other information.","Provision of services. This limits your liability when you provide a service to a third party, and is particularly useful when providing services that are risky or likely to cause injury, such as construction services.","Selling a car. Some states require the buyer to sign a release that protects the seller from any liability in the event the buyer is involved in a collision or incurs tickets for traffic or parking violations.","Other uses include property damage incidents, contract disputes, debt settlements, or other legal matters."]}]},{"q":"What isn't covered by a waiver and release of liability?","a":[{"t":"p","x":"A waiver and release of liability is intended to cover accidental injuries, but would not cover injuries or damages that result from your own negligence or deliberate actions."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/waiver-and-release-of-liability","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Waiver and Release of Liability"},{"t":"p","x":"Complete your document in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/waiver-and-release-of-liability","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Waiver and Release of Liability"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-commercial-property-commercial-sublease-agreement--f91ae3fecb.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Commercial Sublease Agreement"},{"t":"p","x":"A commercial sublease agreement is an agreement between the original property tenant and a new commercial tenant, called the \"subtenant."},{"t":"p","x":"\" This allows the original tenant to lease out the property for all or part of the remaining term of the lease."},{"t":"a","href":"/documents/create/commercial-sublease-agreement","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our commercial sublease agreement"},{"t":"ul","items":["Helps you easily sublease your property while complying with applicable laws","Ensures you stay in compliance with your lease agreement","Helps provide specific disclosures as required by law or regulation","Is compliant throughout all states and the District of Columbia"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a sublease agreement in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Collect basic information about the parties and the agreed sublease terms in preparation for completing your agreement. This includes the landlord, tenant, and subtenant names, addresses, and phone numbers, lease dates, rent amount, utility responsibilities, and insurance requirements."},{"t":"h","l":3,"x":"Answer the Questionnaire"},{"t":"p","x":"Use the information you collected to complete your sublease agreement. We make this easy by guiding you each step of the way and helping you to customize your document to match your specific needs. As you answer certain questions, the document will adjust to accommodate your needs."},{"t":"h","l":3,"x":"Review and Sign"},{"t":"p","x":"Thoroughly review the commercial sublease agreement, correcting any errors or omissions along the way. You can make your own custom edits after downloading the word format of your document and opening it in a text editor, such as Microsoft Word or Google Docs."},{"t":"a","href":"/documents/create/commercial-sublease-agreement","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"This guide reviews the key considerations that go into creating a commercial sublease agreement."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/commercial-sublease-agreement","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is a commercial sublease?","a":[{"t":"p","x":"A commercial sublease is an agreement between a tenant who already holds a lease to a commercial property and another party who wants to occupy part or all of that commercial property."}]},{"q":"What is the difference between a commercial lease agreement and a residential lease agreement?","a":[{"t":"p","x":"The most significant difference between a commercial and residential lease is obvious: commercial leases are used for commercial properties while the primary purpose of a residential lease is to provide a property in which someone will live."},{"t":"p","x":"Residential leases are often referred to as “rental agreements.” Typical residential leases are for:"},{"t":"ul","items":["apartments","houses","townhouses","condominiums"]},{"t":"p","x":"Residential leases usually have no commercial purpose and most residential leases will run for a much shorter time period than a commercial lease—usually one year or less. They are also generally paid on a monthly basis. Termination requires much less notice than a commercial lease as well."},{"t":"p","x":[{"x":"A commercial lease, on the other hand, is between a commercial tenant and a landlord. The purpose of the contract is to provide a property for the tenant from which to run a business. It involves the sale of goods or services or provides a place to manufacture a product. The rental space is not designed to provide a place to live, and it is often against local or state law (or the "},{"x":"lease agreement","h":"/categories/landlord-and-tenant/lease-agreement"},{"x":") to reside in a commercial space."}]},{"t":"p","x":[{"x":"Residential renters have a lot more protections compared to commercial renters. Those who are renting an apartment often do not have the same type of experience or business knowledge that someone using a commercial lease would have. As a result, state law usually "},{"x":"protects residential renters","h":"/guides/what-are-your-rights-in-a-lease"},{"x":" from certain abuses that their landlords may attempt. For example, residential landlords must keep their premises habitable, which includes providing things like heat and water. Commercial landlords have no such obligation unless it is explicitly spelled out in the lease agreement."}]},{"t":"p","x":"Residential landlords are often in charge of things like keeping the premises pest free and providing necessary maintenance. Commercial tenants do not have the same benefits; they are often tasked with doing their own maintenance for the portion of the property that they are renting. Common area maintenance is usually the responsibility of the commercial landlord, however."}]},{"q":"Are utilities included in commercial subleases?","a":[{"t":"p","x":"This depends on the agreement between the tenant and the sublessee. While most leases cover operating expenses, including utilities, this is subject to negotiation by both parties."}]},{"q":"What law governs a commercial sublease?","a":[{"t":"p","x":"A commercial sublease is usually governed by the state and local laws that apply where the property sits, regardless of where each party’s headquarters or principal place of business is located. In some situations, federal law may apply, but those circumstances are rare and often address only a portion of the company."}]},{"q":"What is the difference between a commercial lease assignment and commercial sublease?","a":[{"t":"p","x":"Landlords can assign the rent that they receive from a commercial tenant to another person or entity. They usually do this to pay off an outstanding debt or other obligation. They can also use it as a way to fund other business ventures."},{"t":"p","x":"If a landlord assigns its right to the rental payments, the tenant must pay its rent obligation to a different entity, but the responsibility to pay rent will generally stay the same. The assignee can often step into the shoes of the landlord and force a tenant out of a specific location if the tenant is not meeting their rental obligations."},{"t":"p","x":[{"x":"A commercial sublease, on the other hand, deals with the tenant’s right to allow someone else to lease the property from them. "},{"x":"Subleases","h":"/guides/the-commercial-sublease"},{"x":" are generally only permitted if the commercial lease does not prohibit them. In many circumstances, the tenant must get permission from the landlord to engage in a "},{"x":"commercial sublease agreement","h":"/categories/commercial-property/commercial-sublease-agreement"},{"x":". Often, subleases may not be possible because of restrictions in the commercial lease, including specific limits that affect the type of business that can move into that particular location."}]}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/commercial-sublease-agreement","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Commercial Sublease Agreement"},{"t":"p","x":"Complete your sublease agreement in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/commercial-sublease-agreement","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Commercial Sublease Agreement"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-affidavit-of-heirship--5aa4ec7db3.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Affidavit of Heirship"},{"t":"p","x":"An affidavit of heirship is a legal document filed in court by the beneficiaries of an estate to help transfer the deceased person's real estate or personal property."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/affidavit-of-heirship","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Heirship-Preview-Desktop.webp","alt":"Affidavit of Heirship document preview"},{"t":"h","l":2,"x":"What is an affidavit of heirship?"},{"t":"p","x":"An affidavit of heirship is a sworn legal document used to establish the rightful heirs of a deceased person who died without a will, primarily for the purpose of transferring real estate without going through formal probate proceedings. The document works by having disinterested witnesses (people who knew the deceased and their family well but have no financial stake in the inheritance) swear under oath to facts about the deceased person's marital history, family relationships, and surviving relatives, thereby creating a public record of who legally inherited the property under state intestacy laws."},{"t":"h","l":3,"x":"Need another type of affidavit? Choose one below:"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Affidavit-Domicile-Preview-Desktop.webp","alt":"Affidavit of Domicile document preview"},{"t":"p","x":[{"x":"Affidavit of Domicile","h":"/categories/estate-planning/affidavit-of-domicile"},{"x":" An affidavit of domicile is a sworn statement that declares where a deceased person had their permanent legal residence at the time of death. It is used to verify where the deceased person lived during their lifetime and may be required by financial institutions to transfer stocks or other securities, close accounts, or settle estate matters."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Marriage-Preview-M.webp","alt":"Affidavit of Marriage document preview"},{"t":"p","x":[{"x":"Affidavit of Marriage","h":"/categories/estate-planning/affidavit-of-marriage"},{"x":" An affidavit of marriage is a sworn statement that confirms a marital relationship exists or existed, commonly used when official marriage certificates are unavailable, lost, or not recognized, particularly for immigration, name changes, insurance claims, or legal proceedings."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":3,"x":"Create an affidavit of heirship in your state"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=1","x":"Alabama"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=2","x":"Alaska"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=3","x":"Arizona"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=4","x":"Arkansas"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=5","x":"California"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=6","x":"Colorado"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=7","x":"Connecticut"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=8","x":"Delaware"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=52","x":"District of Columbia"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=9","x":"Florida"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=10","x":"Georgia"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=11","x":"Hawaii"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=12","x":"Idaho"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=13","x":"Illinois"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=14","x":"Indiana"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=15","x":"Iowa"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=16","x":"Kansas"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=17","x":"Kentucky"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=18","x":"Louisiana"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=19","x":"Maine"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=20","x":"Maryland"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=21","x":"Massachusetts"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=22","x":"Michigan"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=23","x":"Minnesota"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=24","x":"Mississippi"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=25","x":"Missouri"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=26","x":"Montana"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=27","x":"Nebraska"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=28","x":"Nevada"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=29","x":"New Hampshire"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=30","x":"New Jersey"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=31","x":"New Mexico"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=32","x":"New York"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=33","x":"North Carolina"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=34","x":"North Dakota"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=35","x":"Ohio"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=36","x":"Oklahoma"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=37","x":"Oregon"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=38","x":"Pennsylvania"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=39","x":"Rhode Island"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=40","x":"South Carolina"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=41","x":"South Dakota"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=42","x":"Tennessee"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=43","x":"Texas"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=44","x":"Utah"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=45","x":"Vermont"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=46","x":"Virginia"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=47","x":"Washington"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=48","x":"West Virginia"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=49","x":"Wisconsin"},{"t":"a","href":"/documents/create/affidavit-of-heirship?state=50","x":"Wyoming"},{"t":"h","l":2,"x":"When to use an affidavit of heirship"},{"t":"p","x":"An affidavit of heirship should be used when someone has died without a will and their heirs need to transfer or establish ownership of real estate without going through formal probate, particularly in situations where the estate's value does not justify the cost and time of court proceedings. This document works best when the family structure is straightforward and undisputed; for instance, when the deceased was survived by a spouse and children who all agree on the inheritance distribution, or when there is a single surviving heir with no complications."},{"t":"p","x":"The affidavit proves most valuable for modest real estate holdings where title companies, banks, or potential buyers need documented evidence of ownership transfer, such as when heirs want to sell inherited property, refinance it, or clear up title issues that prevent normal real estate transactions. It is particularly appropriate when enough time has passed since the death (often two to five years depending on state law), that creditor claims are less likely to arise, and when there are no known debts requiring formal estate administration."},{"t":"p","x":"However, this approach becomes less suitable when the family situation involves contested claims, when there are disputes among potential heirs about who should inherit, when significant creditors need to be addressed through structured estate proceedings, or when the deceased's marital history and family relationships are complex or poorly documented."},{"t":"p","x":"States like Texas that have strong statutory frameworks supporting affidavits of heirship make them more reliable options, while in other jurisdictions they serve more as supplementary evidence that may require additional documentation or procedures to satisfy title insurance requirements."},{"t":"h","l":2,"x":"Create your affidavit of heirship in 3 easy steps"},{"t":"ol","items":["Collect InformationGather all the relevant information to complete your document. This may include the name and address of the heirs and the decedent's property information including legal description and address.","Answer Key QuestionsUse the information you collected to complete our affidavit of heirship form. We make this easy by guiding you at each step of the way and helping you to customize your document to match your specific needs.","Review, Sign, and NotarizeIt is always important to read your document thoroughly to ensure it matches your needs and is free of errors and omissions. You must sign the affidavit in front of a notary public. When using a notary, always be sure to wait to sign the document until he or she is present."]},{"t":"h","l":1,"x":"Why use an affidavit of heirship?"},{"t":"p","x":"People use affidavits of heirship primarily to solve a practical problem: transferring ownership of real estate after someone dies without a will, while avoiding the expense, time, and complexity of formal probate court proceedings."},{"t":"p","x":"The core motivation is economic and practical. Probate can cost thousands of dollars in court fees, attorney costs, and administrative expenses, and can take months or even years to complete, whereas an affidavit of heirship typically costs a few hundred dollars and can be prepared and recorded within weeks. Beyond cost savings, families choose this approach when they need to clear title to property so they can sell it, refinance it, or simply establish clean ownership records that banks and title companies will accept. The affidavit creates an official public record that documents the chain of ownership transfer, which is essential because without some legal documentation, inherited property remains in legal limbo—you can't sell what you can't prove you own, and financial institutions will not lend against property with unclear ownership."},{"t":"p","x":"This document also serves families who want to avoid the public nature and emotional burden of probate proceedings, particularly when the estate is simple and everyone agrees on who inherited what. In states like Texas that give statutory authority to properly executed affidavits of heirship, they provide a legally recognized shortcut that accomplishes the same practical goal as probate (establishing clear title) without requiring court supervision, making them especially valuable for working-class families dealing with modest estates where the property might be worth $100,000 or $200,000 but probate costs could consume five to ten percent of that value."},{"t":"a","href":"/documents/create/affidavit-of-heirship","x":"Create Your Affidavit of Heirship Today"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Why-Choose.webp","alt":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Why choose LegalNature?"},{"t":"h","l":2,"x":"Affidavit of heirship help guide"},{"t":"p","x":"In the event that a person dies without leaving a last will and testament or without disposing of all of his or her property in a will, then you can use an affidavit of heirship to transfer the decedent's interest in real estate or personal property to his or her heirs. While this is the most common use, you can also use this document simply to name the decedent's heirs for a court. An affidavit of heirship is thorough in providing the relevant information, but if any of the questions do not apply to your decedent, then feel free to skip them. The information below will lead you through creating the form."},{"t":"h","l":3,"x":"Party Information"},{"t":"p","x":[{"x":"You will begin by entering in the names and addresses of the parties involved. The \"Affiant\" is the person swearing to the facts stated in the document. "},{"x":"The affiant cannot be an heir of the decedent","b":1},{"x":" since that would be a conflict of interest. The \"Decedent\" is the person who passed away and whose heirs are being named. You will also describe the nature of the parties' relationship and the dates when the parties knew each other."}]},{"t":"h","l":3,"x":"Probate Court"},{"t":"p","x":"Next, if the decedent left a will, you will enter in the basic information related to the probate court. Probate court is the court that administers the decedent's will and disburses his or her property. The case number and other information requested can usually be located on any of the formal probate court documents."},{"t":"h","l":3,"x":"Appointed Representative"},{"t":"p","x":"You will then indicate if an administrator or personal representative has been appointed to help administer the decedent's estate. This applies whether or not the decedent left a will. If an administrator or personal representative has been appointed, enter his or her name and address."},{"t":"h","l":3,"x":"Spouse, Children, and Other Heirs"},{"t":"p","x":"Next, you will have the option to identify the decedent's spouse, children, and other heirs. Generally, heirs only include a spouse, a registered domestic partner, and blood relatives. Friends of the decedent are typically not heirs; however, if the decedent named a friend to inherit property before death, then you can include the friend and try to get the court to accept them. It is best to be as thorough as possible here, but if the decedent has a lot of heirs or you do not have all of their names and addresses, then just enter the heirs necessary for your purpose in using this affidavit."},{"t":"h","l":3,"x":"Real Estate and Personal Property"},{"t":"p","x":"The real estate and personal property sections are used if you intend to use this affidavit to transfer the property to the decedent's heirs. If you are including multiple pieces of real estate, they must all be in the same county. If not all in the same county, you will need to use a separate affidavit for real estate located in a different county. You will be asked to specify a complete legal description of the property. This is usually called a lot and block or metes and bounds description. If you do not have the legal property description already, then you can try previously recorded deeds, your county Register or Recorder of Deeds (often online), tax assessments, websites such as Zillow.com, your mortgage contract, your land title, or ask a licensed real estate attorney for help. End each additional legal description with a period."},{"t":"p","x":"When entering personal property, be as specific as possible in identifying the exact property that you are referring to. For example, if the item is a car, then include the year, make, model, license plate, and VIN. If you are identifying cash, stock, or another intangible asset, be sure to specify the account number where the asset is being held."},{"t":"h","l":3,"x":"Debts and Liabilities"},{"t":"p","x":"The last few sections relate to the decedent's unpaid debts and liabilities. Again, if you do not know the answers, just answer to the best of your knowledge or skip these items."},{"t":"h","l":3,"x":"Attachments"},{"t":"p","x":"Attach the following papers, if applicable:"},{"t":"ul","items":["If any heirs of the decedent have died since his or her death, attach separate proof of heirship as to each.","If the decedent left a will, attach a certified copy.","If an executor or administrator has been appointed for the estate of the decedent, attach a certificate of appointment from the court that made the appointment.","If an administration of the decedent's estate has been completed and final order or decree of distribution has been rendered, attach a certified copy of such order or decree."]},{"t":"h","l":3,"x":"Execution"},{"t":"p","x":"To execute the affidavit, the affiant will need to sign it in front of a notary public. If you do not know a notary, you can find them at banks and similar professional offices open to the public."},{"t":"h","l":3,"x":"Filing"},{"t":"p","x":"Once executed, the affidavit will need to be filed with the appropriate court. This is usually a very straightforward process; if you are unsure of how to do this, you can always call the court and an administrator will explain the process to you. If you are naming real estate to be transferred in the affidavit, then the affidavit will need to be filed with the appropriate land records office in the county where the land is located (usually called the County Recorder's office). As rules vary greatly from county to county, it is recommended that you call the recorder's office ahead of time to find out if they have any specific local filing requirements."},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"What is an affidavit?","a":[{"t":"p","x":"An affidavit is a written statement of fact signed under oath."}]},{"q":"When should I use an affidavit of heirship?","a":[{"t":"p","x":"You should use an affidavit of heirship to establish property ownership when the original owner dies intestate."}]},{"q":"Does an affidavit of heirship need to be notarized?","a":[{"t":"p","x":"Notarization is the process of certifying the authenticity of your affidavit. The notary public, or other certifying official, attests to the authenticity of your signature by checking identification, then sealing or stamping the affidavit. Notarization is recommended to establish and support the authenticity of your affidavit. In addition, you will be required to have your affidavit notarized if it will be used in court."}]},{"q":"What’s included in an affidavit of heirship?","a":[{"t":"p","x":"An affidavit of heirship requires identifying information about both the decedent, their heirs, and assets to be legally valid. This includes the following information:"},{"t":"ul","items":["The details of the affiant","The decedent’s details","The decedent’s marital status","Details of the decedent’s children","Details of the decedent’s other relatives","Details of the decedent’s real estate and other property"]}]}]},{"t":"h","l":4,"x":"Create your affidavit of heirship in minutes"},{"t":"p","x":"Complete our form"},{"t":"p","x":"Preview and download your document"},{"t":"p","x":"Review and sign your document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Heirship-Preview-M.webp","alt":"Create your affidavit of heirship in minutes"},{"t":"a","href":"/documents/create/affidavit-of-heirship","x":"Create Document"},{"t":"h","l":2,"x":"Start Your Affidavit of Heirship"},{"t":"p","x":"Complete your affidavit of heirship in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/affidavit-of-heirship","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Aff-Heirship-Preview-Desktop.webp","alt":"Start Your Affidavit of Heirship"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-joint-revocable-living-trust--33473974f0.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Joint Revocable Living Trust"},{"t":"p","x":"A joint revocable living trust is used by spouses or unmarried individuals to jointly secure their assets during their lifetimes and efficiently transfer those assets upon death."},{"t":"p","x":"Our intuitive joint revocable living trust form builder guides you through each step of the process, making it easy to understand and giving you a powerful estate planning document you can rely on."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Get Started"},{"t":"ul","items":[[{"x":"How To","h":"#illustrated_steps"}],[{"x":"Help Guide","h":"#help_guide"}],[{"x":"FAQS","h":"#faqs"}]]},{"t":"h","l":2,"x":"Our joint revocable living trust"},{"t":"ul","items":["Helps avoid probate court and save money","Ensures your assets are distributed quickly","Ensures that you retain control over trust assets during your lifetime","Can be easily revoked or amended at any time","Is compliant throughout all states and the District of Columbia"]},{"t":"p","x":"Create your document in 3 steps"},{"t":"p","x":"Complete the form"},{"t":"p","x":"Preview your document"},{"t":"p","x":"Download and print"},{"t":"h","l":2,"x":"Simplify your estate planning"},{"t":"p","x":"Streamline the process of transferring your most valuable property with a joint revocable living trust."},{"t":"h","l":3,"x":"Pay Less in Probate Fees"},{"t":"p","x":"Save up to 15-20% of the value of the trust in probate fees while ensuring that your assets will be distributed to your beneficiaries."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Create Document"},{"t":"h","l":3,"x":"Avoid Probate Court"},{"t":"p","x":"One huge advantage of this document is that the assets in the trust will avoid probate court upon the death of its creator."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Create Document"},{"t":"anchor","id":"illustrated_steps"},{"t":"h","l":2,"x":"What Our Customers Are Saying"},{"t":"h","l":2,"x":"How to create a joint revocable living trust in 3 steps"},{"t":"h","l":3,"x":"Gather Information"},{"t":"p","x":"Begin by adding the relevant information for each Grantor, such as name and address. Grantors are the people creating, funding, and signing the joint revocable living trust."},{"t":"h","l":3,"x":"Describe the Assets"},{"t":"p","x":"Enter the name, description, and value of each asset that will be added to the trust. It is very important to provide a description that specifically identifies the asset in order to avoid unwanted confusion."},{"t":"h","l":3,"x":"Review and Notarize"},{"t":"p","x":"After completing your joint revocable living trust, be sure to review it thoroughly to ensure that it meets your needs. Be sure to sign your trust in front of a notary public."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Get Started"},{"t":"anchor","id":"help_guide"},{"t":"h","l":2,"x":"Help Guide"},{"t":"p","x":"This guide contains a description of the main sections of our joint revocable living trust. Note that some of the sections are optional depending on how you answer our questionnaire."},{"t":"p","x":"View more"},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Get Started"},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"FAQs","id":"faq-heading"},{"t":"faq","items":[{"q":"What is required to make a joint revocable living trust legal?","a":[{"t":"p","x":"Trust law is state specific, so the formalities to create a valid joint revocable living trust may vary from state to state. In every jurisdiction, the person(s) creating the trust (the “grantor”) must be at least 18 years old and must have the mental capacity to understand their actions at the time the trust agreement is signed. Some states require that the grantors' signature be witnessed and/or notarized when the document is signed."}]},{"q":"If I have a trust, do I still need a will?","a":[{"t":"p","x":[{"x":"Yes, you still need a "},{"x":"last will and testament","h":"/categories/estate-planning/last-will-and-testament"},{"x":". If you create a joint revocable living trust, then each grantor still needs a separate will. Even though a revocable living trust is an important estate planning document, it does not replace a will. Firstly, a living trust will never include all the property you own. In the event of your death, you will need a way to transfer any assets not placed into the living trust to your desired beneficiaries. This is accomplished by using a special type of will called a pour-over will. Secondly, if you have children or other dependents, a living trust does not enable you to name guardians. Lastly, in a will you also have the opportunity to express your burial wishes."}]}]},{"q":"Who can be a beneficiary of a joint revocable living trust?","a":[{"t":"p","x":"Any natural person and any organization can be named as a trust beneficiary. In the case of a beneficiary who is a minor, the trust can include provisions designed to govern distributions and provide some structure and control over the assets until the minor beneficiary reaches a pre-determined age (or ages). In most states, it is not legal to name a pet as a beneficiary in a joint revocable living trust."}]},{"q":"I am married. Should I establish a joint revocable living trust with my spouse, or should we each have our own individual revocable living trusts?","a":[{"t":"p","x":"Unlike a last will and testament, which is specific to individual people, you can create either separate revocable living trusts or a joint revocable living trust with someone else. If most of the assets that you will be using to fund the trust are owned jointly with another person and if your distribution wishes are the same, then regardless of who dies first, using a joint revocable living trust may make the most sense. With a joint revocable living trust, both parties normally serve as grantors and as co-trustees."}]},{"q":"What does it mean to “fund” a joint revocable living trust?","a":[{"t":"p","x":[{"x":"Establishing a joint revocable living trust is just the first step in creating your trust. In order to make your new trust legal, you will need to put assets into it. This process is referred to as "},{"x":"“funding” the trust","h":"/guides/establishing-and-funding-a-single-or-joint-revocable-living-trust"},{"x":". You can put a wide variety of assets into a trust. The following assets are some of the most commonly used to fund a trust:"}]},{"t":"ul","items":[[{"x":"Real estate","b":1},{"x":" – You can transfer real estate to a trust through a "},{"x":"quit claim deed","h":"/categories/property/quit-claim-deed"},{"x":", warranty deed, or transfer on death deed (if available in your state)."}],[{"x":"Bank accounts","b":1},{"x":" – Your checking and savings accounts can be retitled into the name of your new trust."}],[{"x":"Stocks and bonds","b":1},{"x":" – By contacting the transfer agent or your investment professional, you can retitle your non-retirement investments so that your trust is the nominal owner."}],[{"x":"Tangible personal property","b":1},{"x":" – You can retitle motor vehicles, boats, and other items of tangible personal property so that the trust owns them."}],[{"x":"Beneficiary changes","b":1},{"x":" – You can also make the trust the beneficiary of your retirement accounts and life insurance, so that assets pass according to the terms defined in the trust agreement."}]]},{"t":"p","x":"Other assets that can be placed into or directed toward a revocable living trust include contracts for deed or mortgages where someone else is paying you. An “assignment of interest” can also be used to transfer household goods and other assets into your new trust."}]}]},{"t":"h","l":2,"x":"Everything you need for your legal matters, one click away"},{"t":"p","x":"Access your personalized dashboard to manage all your legal documents and business services in one secure location."},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/www.legalnature.com/_frontend/images/common-sections/platform.png","alt":"LegalNature Dashboard Platform"},{"t":"h","l":3,"x":"Fast & Easy"},{"t":"p","x":"Quickly create new documents or business services."},{"t":"h","l":3,"x":"Safe & Secure"},{"t":"p","x":"Your documents and information are always kept private."},{"t":"h","l":3,"x":"Reliable & Trustworthy"},{"t":"p","x":"Over 4,000 five star reviews from our customers."},{"t":"h","l":3,"x":"Access Anytime"},{"t":"p","x":"Everything you need, directly from your dashboard."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Get Started"},{"t":"h","l":2,"x":"Start Your Joint Revocable Living Trust"},{"t":"p","x":"Complete your joint revocable living trust in minutes with LegalNature's intuitive, step-by-step guidance."},{"t":"a","href":"/documents/create/joint-revocable-living-trust","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/general-doc-image.jpg","alt":"Start Your Joint Revocable Living Trust"}]}
tasks/legalnature/environment/reference/clone/data/site/content/categories-estate-planning-lady-bird-deed--a4681e8669.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"blocks":[{"t":"h","l":1,"x":"Lady Bird Deed"},{"t":"p","x":"A lady bird deed, also called an enhanced life estate deed, is a legal document that transfers your real estate to a named beneficiary when you die, without going through probate."},{"t":"p","x":"Select a state"},{"t":"select","name":"states","options":[["","Select a state"],["1","Alabama"],["2","Alaska"],["3","Arizona"],["4","Arkansas"],["5","California"],["6","Colorado"],["7","Connecticut"],["8","Delaware"],["52","District of Columbia"],["9","Florida"],["10","Georgia"],["11","Hawaii"],["12","Idaho"],["13","Illinois"],["14","Indiana"],["15","Iowa"],["16","Kansas"],["17","Kentucky"],["18","Louisiana"],["19","Maine"],["20","Maryland"],["21","Massachusetts"],["22","Michigan"],["23","Minnesota"],["24","Mississippi"],["25","Missouri"],["26","Montana"],["27","Nebraska"],["28","Nevada"],["29","New Hampshire"],["30","New Jersey"],["31","New Mexico"],["32","New York"],["33","North Carolina"],["34","North Dakota"],["35","Ohio"],["36","Oklahoma"],["37","Oregon"],["38","Pennsylvania"],["39","Rhode Island"],["40","South Carolina"],["41","South Dakota"],["42","Tennessee"],["43","Texas"],["44","Utah"],["45","Vermont"],["46","Virginia"],["47","Washington"],["48","West Virginia"],["49","Wisconsin"],["50","Wyoming"]]},{"t":"a","href":"/documents/create/lady-bird-deed","x":"Create Document"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady-Bird-Deed-preview.png","alt":"Lady Bird Deed document preview"},{"t":"h","l":2,"x":"What is a lady bird deed?"},{"t":"p","x":[{"x":"A lady bird deed is a type of real estate deed that lets a property owner transfer their home or land to a named beneficiary at death while retaining full ownership rights, including the right to sell, mortgage, or revoke the deed during their lifetime."},{"x":" ","b":1},{"x":"Its formal legal name is an enhanced life estate deed."}]},{"t":"p","x":"There are two primary parties involved in creating a lady bird deed:"},{"t":"ul","items":[[{"x":"Grantor","b":1},{"x":" - the current property owner who creates, signs, and records the deed. The grantor continues to own and control the property fully — paying taxes, maintaining insurance, and making decisions about the property — until death."}],[{"x":"Beneficiary ","b":1},{"x":"- the person or entity who will receive the property at the grantor's death. The beneficiary has no ownership interest, no right of access, and no ability to sell or encumber the property while the grantor lives. Their interest only vests — becomes real — at the moment of the grantor's death."}]]},{"t":"p","x":"At death, ownership passes automatically to the named beneficiary without going through probate: the court-supervised process for distributing a deceased person's estate. The beneficiary simply records a certified copy of the death certificate with the county recorder to formalize the transfer."},{"t":"p","x":[{"x":"Lady bird deeds are only recognized in a handful of states: Florida, Michigan, Texas, Vermont, and West Virginia.","b":1}]},{"t":"a","href":"/documents/create/lady-bird-deed","x":"Create Your Lady Bird Deed Today!"},{"t":"h","l":3,"x":"Other property deeds"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/gbmc7CvqQM2GkOv0JyO1.webp","alt":"Property Deed document preview"},{"t":"p","x":[{"x":"Property Deed","h":"/categories/property/property-deed"},{"x":" A property deed is a legal document that transfers ownership of real estate from one party (the grantor) to another (the grantee). They must typically be signed, notarized, and filed with the county recorder's office to be legally effective."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/3OCf5FGaSraEbMtdtMq4.webp","alt":"Quit Claim Deed document preview"},{"t":"p","x":[{"x":"Quit Claim Deed","h":"/categories/property/quit-claim-deed"},{"x":" Transfers whatever ownership interest the grantor currently holds in a property without any guarantees that the title is clear or free of liens. It's commonly used between family members, divorcing spouses, or to clear up title issues rather than in standard real estate sales."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/ToDD-preview.png","alt":"Transfer on Death Deed document preview"},{"t":"p","x":[{"x":"Transfer on Death Deed","h":"/categories/property/transfer-on-death-deed"},{"x":" Functionally the same as a lady bird deed, this property deed transfers property at the owners death and avoids probate. This type of deed is available in different states from those that recognize lady bird deeds."}]},{"t":"p","x":"PDF"},{"t":"p","x":"WORD"},{"t":"h","l":2,"x":"Why use a lady bird deed?"},{"t":"p","x":[{"x":"A lady bird deed combines probate avoidance with lifetime flexibility — two benefits that most alternative estate planning tools offer separately, not together.","b":1}]},{"t":"ul","items":[[{"x":"Avoid probate entirely.","b":1},{"x":" When you die, ownership of the property transfers automatically to your named beneficiary. There is no court involvement, no waiting period, and no probate fees."}],[{"x":"Retain full control during your lifetime.","b":1},{"x":" You keep every right you have as a property owner: the rights to sell, refinance, lease, or live in the property, without needing your beneficiary's approval."}],[{"x":"Revoke or change the deed at any time.","b":1},{"x":" Life changes. If your family circumstances shift, you can name a new beneficiary or cancel the deed altogether by recording an updated document. Your beneficiary has no say in this."}],[{"x":"Benefit from a stepped-up tax basis.","b":1},{"x":" Your beneficiary inherits the property at its fair market value on the date of your death, not what you originally paid for it. This can significantly reduce capital gains taxes if they choose to sell."}],[{"x":"Preserve homestead exemptions and property tax benefits.","b":1},{"x":" In states like Florida and Texas, creating a lady bird deed does not disrupt existing homestead exemptions or trigger a property tax reassessment."}],[{"x":"An alternative to a living trust.","b":1},{"x":" For a single property with a clear beneficiary, a lady bird deed accomplishes the same probate-avoidance goal as a trust — often at a fraction of the cost and complexity."}]]},{"t":"h","l":3,"x":"Lady bird deed vs. transfer on death deed"},{"t":"p","x":[{"x":"A "},{"x":"transfer on death deed","h":"/categories/property/transfer-on-death-deed"},{"x":" (TODD) achieves the same core result as a lady bird deed: the property owner retains full control during their lifetime and the property passes to a named beneficiary at death without probate. Both instruments are revocable, both keep the beneficiary from having any rights to the property while the grantor is alive, and both bypass the probate process entirely at death. Lady bird deeds only allow for a single beneficiary, but may be executed by a valid power of attorney agent."}]},{"t":"p","x":"If you own property in one of the five lady bird deed states, a lady bird deed is typically the preferred instrument. If your property is located elsewhere, a transfer on death deed accomplishes the same goal under the statutory framework of your state."},{"t":"a","href":"/documents/create/lady-bird-deed","x":"Start Your Lady Bird Deed Now"},{"t":"h","l":2,"x":"How to create your lady bird deed"},{"t":"ol","items":["Confirm Your State Allows Lady Bird DeedsLady bird deeds are recognized in Florida, Michigan, Texas, Vermont, and West Virginia. If your property is located in another state, a transfer on death deed accomplishes the same goal and is available in most other states.","Collect the Required InformationThe deed must include your full legal name (exactly as it appears on your current title), the property's complete legal description, not just the street address, and the full legal name of each beneficiary. If you are naming an alternate beneficiary, include their full name as well.","Complete Our Intuitive Form OnlineLegalNature's questionnaire guides you through each required field and builds a state-specific document, including the required enhanced life-estate language, based on your answers.","Sign and Notarize the DeedThe grantor must sign the deed in front of a notary public. Some states also require one or more witnesses in addition to notarization. Requirements vary by state.","Record the Deed with Your County Recorder's OfficeTake the signed, notarized deed to the county register or recorder of deeds in the county where the property is located. Recording fees vary by county. Once recorded, the deed is part of the public record and legally effective."]},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/9XjrSCT3SqKbOVYYKZCI.webp","alt":"Why use LegalNature?"},{"t":"h","l":2,"x":"Why use LegalNature?"},{"t":"p","x":"LegalNature offers guidance to navigate the nuances of property transfer across all 50 states and the District of Columbia. LegalNature offers a 30-day money-back guarantee. If you're not happy, then we're not happy. Give us a call and let us help."},{"t":"anchor","id":"faqs"},{"t":"h","l":4,"x":"Frequently asked questions","id":"faq-heading"},{"t":"faq","items":[{"q":"What states allow lady bird deeds?","a":[{"t":"p","x":[{"x":"Lady bird deeds are currently recognized in five states: Florida, Michigan, Texas, Vermont, and West Virginia. They are not available in other states as a matter of common law or statute. Property owners in other states who want to avoid probate and retain lifetime control should typically look into a "},{"x":"transfer on death deed","h":"/categories/property/transfer-on-death-deed"},{"x":"."}]}]},{"q":"Can I revoke a lady bird deed after recording it?","a":[{"t":"p","x":"Yes — revocability is one of the lady bird deed's defining features. You can revoke or amend the deed at any time during your lifetime by recording a revocation document or a new deed with your county recorder's office. No consent from your beneficiary is required. Your beneficiary has no legal interest in the property until your death, so they generally cannot block or challenge a revocation."}]},{"q":"What is the difference between a lady bird deed and a regular life estate deed?","a":[{"t":"p","x":"The core difference is control. With a traditional life estate deed, you give up significant rights once the deed is recorded — you cannot sell, refinance, or change the beneficiary without the remainderman's consent. A lady bird deed retains the \"enhanced\" power to do all of those things without asking anyone's permission."}]},{"q":"Does a lady bird deed avoid probate?","a":[{"t":"p","x":"Yes. Because the deed transfers ownership automatically at the grantor's death outside of the estate, the property does not pass through probate court. The beneficiary claims the property by recording a certified copy of the death certificate with the county recorder."}]},{"q":"What happens if my beneficiary dies before me?","a":[{"t":"p","x":"If your named beneficiary dies before you, you retain the right to update the deed and name a new one at any time by recording a new deed or revocation document. If you have not updated the deed and the beneficiary predeceases you, the outcome depends on the language in your deed and applicable state law."}]}]},{"t":"h","l":4,"x":"Create your Lady Bird deed"},{"t":"p","x":"Complete our online form"},{"t":"p","x":"Download and print the completed deed"},{"t":"p","x":"Sign, notarize, and record your deed"},{"t":"img","src":"/static/assets/2026-08-21.legalnature-full-site-r1/s3.us-east-2.amazonaws.com/shared-cms-main-media.legalnature.com/Lady-Bird-Deed-preview-mobile-1.png","alt":"Create your Lady Bird deed"},{"t":"a","href":"/documents/create/lady-bird-deed","x":"Create Document"},{"t":"h","l":2,"x":"Create your lady bird deed today"},{"t":"p","x":"Transfer your property on death and avoid probate. Prepare a state-compliant lady bird deed using LegalNature's intuitive online forms."},{"t":"a","href":"/documents/create/lady-bird-deed","x":"Create Document"}]}