@press2ai/engine 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@press2ai/engine",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Multi-tenant runtime + template contracts dla otwarty-* verticali. SSR na Cloudflare Workers, isomorphic renderer (SSG/browser w roadmapie).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,7 +24,8 @@
24
24
  * mieszając wszystkie wertykale).
25
25
  * - Opt-out jest **globalny** — UPDATE leads bez filtra category. RODO
26
26
  * sprzeciw to usunięcie danych osobowych, nie selektywne ukrycie w jednej
27
- * kategorii. Komentarz przeniesiony z terapeuta-landinga.
27
+ * kategorii. Soft flag + filtr w queries — hard delete bez proof-of-ownership
28
+ * jest podatny na sabotage (patrz NEXT-STEPS manifest-1/manifest-2 notatka).
28
29
  *
29
30
  * Hono jest peer dependency (każdy wertykal i tak go ma). Engine core nie
30
31
  * importuje Hono — tylko ten subpath go używa.
@@ -274,6 +275,10 @@ export function createVerticalApp(config: VerticalConfig): Hono<{ Bindings: Ceid
274
275
 
275
276
  // Opt-out jest GLOBALNY — usuwa też z innych wertykali. RODO sprzeciw to
276
277
  // usunięcie danych osobowych, nie selektywne ukrycie w jednej kategorii.
278
+ // Soft flag (nie DELETE) — defense in depth przeciw masowej sabotage:
279
+ // catalog.json emituje slug+imię+miasto bez NIP, więc adversary musi
280
+ // zmapować slug→NIP przez CEIDG pod rate limit (6000 req/h); dodatkowo
281
+ // soft flag jest natychmiast odwracalny jednym UPDATE gdyby coś poszło nie tak.
277
282
  const res = await c.env.DB
278
283
  .prepare(
279
284
  'UPDATE leads SET opted_out_at = ?, opted_out_ip = ?, opted_out_ua = ? WHERE nip = ? AND opted_out_at IS NULL',