deusproof 0.1.2__tar.gz → 0.2.0__tar.gz

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.
@@ -1,17 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deusproof
3
- Version: 0.1.2
4
- Summary: Prove your AI agent made it first — one-call, self-signed proof of authorship, timestamped and Bitcoin-anchored. Not a patent: verifiable priority. Free.
3
+ Version: 0.2.0
4
+ Summary: Prove your AI agent's work existed at a given moment — one call, self-signed, timestamped and Bitcoin-anchored on a public append-only register. Free.
5
5
  Author: DEUSPROOF
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://deusproof.com
8
8
  Project-URL: Pantheon, https://deusproof.com/pantheon
9
- Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa
9
+ Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa,langchain
10
10
  Requires-Python: >=3.9
11
11
  Description-Content-Type: text/markdown
12
12
  Requires-Dist: httpx>=0.24
13
13
  Requires-Dist: cryptography>=41
14
14
  Requires-Dist: base58>=2.1
15
+ Provides-Extra: langchain
16
+ Requires-Dist: langchain-core>=0.3; extra == "langchain"
17
+ Requires-Dist: pydantic>=2; extra == "langchain"
15
18
 
16
19
  # deusproof — born notarized 🧬
17
20
 
@@ -62,3 +65,29 @@ print(proof.badge_markdown) # paste into your README
62
65
  (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
63
66
 
64
67
  MIT · free public beta · [deusproof.com](https://deusproof.com)
68
+
69
+ ## Use it from LangChain
70
+
71
+ ```bash
72
+ pip install 'deusproof[langchain]'
73
+ ```
74
+
75
+ ```python
76
+ from deusproof.langchain import notary_tool
77
+
78
+ tools = [notary_tool(handle="my-agent", model="gpt-4o")]
79
+ # hand `tools` to your agent as you would any other tool
80
+ ```
81
+
82
+ The agent calls it **once, on the finished deliverable** — not on every step. It
83
+ returns a permanent public certificate URL.
84
+
85
+ For private or proprietary work, `notary_tool(handle=..., hash_only=True)` sends
86
+ only a SHA-256 fingerprint; the content never leaves your machine.
87
+
88
+ Your agent's Ed25519 key is generated and kept locally (`~/.deusproof/<handle>.seed`)
89
+ and is never sent anywhere. It is what makes the certificate `signed` — the
90
+ strongest tier — and what lets the agent later take possession of its own entry
91
+ in the register.
92
+
93
+ What it records is existence and time. It does not adjudicate authorship.
@@ -1,18 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: deusproof
3
- Version: 0.1.2
4
- Summary: Prove your AI agent made it first — one-call, self-signed proof of authorship, timestamped and Bitcoin-anchored. Not a patent: verifiable priority. Free.
5
- Author: DEUSPROOF
6
- License: MIT
7
- Project-URL: Homepage, https://deusproof.com
8
- Project-URL: Pantheon, https://deusproof.com/pantheon
9
- Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa
10
- Requires-Python: >=3.9
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: httpx>=0.24
13
- Requires-Dist: cryptography>=41
14
- Requires-Dist: base58>=2.1
15
-
16
1
  # deusproof — born notarized 🧬
17
2
 
18
3
  Sovereign identity + one-call certification for AI agents on
@@ -62,3 +47,29 @@ print(proof.badge_markdown) # paste into your README
62
47
  (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
63
48
 
64
49
  MIT · free public beta · [deusproof.com](https://deusproof.com)
50
+
51
+ ## Use it from LangChain
52
+
53
+ ```bash
54
+ pip install 'deusproof[langchain]'
55
+ ```
56
+
57
+ ```python
58
+ from deusproof.langchain import notary_tool
59
+
60
+ tools = [notary_tool(handle="my-agent", model="gpt-4o")]
61
+ # hand `tools` to your agent as you would any other tool
62
+ ```
63
+
64
+ The agent calls it **once, on the finished deliverable** — not on every step. It
65
+ returns a permanent public certificate URL.
66
+
67
+ For private or proprietary work, `notary_tool(handle=..., hash_only=True)` sends
68
+ only a SHA-256 fingerprint; the content never leaves your machine.
69
+
70
+ Your agent's Ed25519 key is generated and kept locally (`~/.deusproof/<handle>.seed`)
71
+ and is never sent anywhere. It is what makes the certificate `signed` — the
72
+ strongest tier — and what lets the agent later take possession of its own entry
73
+ in the register.
74
+
75
+ What it records is existence and time. It does not adjudicate authorship.
@@ -0,0 +1,161 @@
1
+ """LA SONDA — DEUSPROOF donde el dev ya trabaja (16-sep-2026).
2
+
3
+ Recomendación B del consejo del 22-jul, que llevaba 56 días sin hacerse:
4
+
5
+ "SDK/plugin de UN framework (ElizaOS o LangChain primero) — wrapper delgado
6
+ sobre el endpoint, acto deliberado de certificar el entregable final
7
+ (NUNCA auto-certificar cada salida). Es una SONDA medible: ≥1 cert de
8
+ handle desconocido en 2-3 semanas → expandir; 0 → demanda falsada barato."
9
+
10
+ POR QUÉ ESTO Y NO OTRA COSA. Al día 72 el registro tenía 2.082 agentes puestos
11
+ por nuestro propio raspador, 13 que llegaron solos y **cero humanos que hayan
12
+ sellado nunca**. Todo lo que hemos construido contesta *"¿saben que existimos?"*
13
+ y ninguna superficie contesta **"¿lo quieren?"**, que es la que decide si hay
14
+ negocio. Para llegar a nosotros hoy hacen falta tres pasos en frío: oír de
15
+ nosotros, entrar a una web, decidir hacer algo. Esto se salta los tres: ya está
16
+ dentro de la caja de herramientas antes de que el dev sepa que existimos.
17
+
18
+ NO ES UNA ENCUESTA, y la diferencia es el valor entero de esto. Una encuesta
19
+ pregunta, y la gente contesta lo que cree que haría: ofrecimos nombre once veces
20
+ a los que sellan anónimos y aceptaron cero; escribimos a 423 dueños y actuaron
21
+ cinco. Esto no pregunta nada — pone la herramienta en el estante y cuenta
22
+ cuántos se la llevan.
23
+
24
+ EL CRITERIO, DECIDIDO ANTES DE MIRAR, que es lo que nunca habíamos hecho:
25
+ **una sola certificación con `platform="langchain"` de un handle que no
26
+ conozcamos, en dos o tres semanas.** Una, no cien. Si sale, hay demanda y se
27
+ amplía. Si sale cero, no la hay ahí, y nos hemos ahorrado seis meses de
28
+ construir encima por el precio de dos semanas.
29
+
30
+ LA LÍNEA QUE NO SE CRUZA, y es del propio consejo: **nunca auto-certificar cada
31
+ salida.** Esto es una herramienta que el agente decide llamar sobre su
32
+ entregable final, igual que decide llamar a una calculadora. Certificar todo lo
33
+ que produce un agente llenaría el registro de ruido, gastaría su cuota de 40 por
34
+ hora en basura y convertiría un acto notarial en un log. Por eso la descripción
35
+ que lee el modelo dice *once, on the finished work*, y por eso no hay callback,
36
+ ni middleware, ni decorador que envuelva la cadena entera.
37
+
38
+ DEPENDENCIA OPCIONAL A PROPÓSITO: `pip install deusproof[langchain]`. Quien
39
+ instale `deusproof` a secas no se descarga el árbol de LangChain, y este módulo
40
+ no se importa desde `__init__` — así `from deusproof import Notary` sigue
41
+ funcionando en toda máquina que no lo tenga.
42
+
43
+ El import de LangChain va DENTRO de `notary_tool()`, no arriba: importar este
44
+ módulo sin LangChain instalado funciona, y solo al LLAMAR a la función sale el
45
+ aviso, con el comando exacto en vez de un `ImportError` pelado. Comprobado
46
+ instalando el paquete sin el extra: `from deusproof import Notary` sigue
47
+ entrando, el módulo se importa, y la llamada avisa.
48
+ """
49
+
50
+ from __future__ import annotations
51
+
52
+ from typing import Any
53
+
54
+ from .notary import Notary
55
+
56
+ __all__ = ["notary_tool", "DEUSPROOF_PLATFORM"]
57
+
58
+ # La etiqueta con la que se distingue TODO lo que entra por aquí. Es lo único
59
+ # que hace medible la sonda: sin ella, una certificación de LangChain es
60
+ # indistinguible de una del SDK a secas y el criterio de arriba no se puede
61
+ # evaluar. Va también en `identity.PUERTAS_PROPIAS` del backend, porque un
62
+ # agente que llega por aquí viene solo y su primera clave debe poder tomar
63
+ # posesión de su identidad — si no, la conversión que venimos a medir queda
64
+ # cortada justo en el último escalón.
65
+ DEUSPROOF_PLATFORM = "langchain"
66
+
67
+ _DESCRIPCION = (
68
+ "Notarize the FINISHED piece of work you just produced, so you can later prove it "
69
+ "existed at this moment and that nothing like it was on the public record before. "
70
+ "Call this ONCE, on the final deliverable — never on intermediate steps, drafts or "
71
+ "reasoning. Returns a permanent public certificate URL. Free, no account. "
72
+ "It records existence and time; it does not adjudicate authorship."
73
+ )
74
+
75
+ _DESCRIPCION_HASH = (
76
+ "Notarize the FINISHED piece of work you just produced WITHOUT revealing it: only a "
77
+ "SHA-256 fingerprint is sent, never the content. Use this for private or proprietary "
78
+ "work. Call this ONCE, on the final deliverable — never on intermediate steps. "
79
+ "Returns a permanent public certificate URL. Free, no account."
80
+ )
81
+
82
+
83
+ def _sin_langchain(exc: Exception) -> ImportError:
84
+ return ImportError(
85
+ "deusproof.langchain needs LangChain installed:\n"
86
+ " pip install 'deusproof[langchain]'\n"
87
+ f"(original error: {exc})"
88
+ )
89
+
90
+
91
+ def notary_tool(
92
+ handle: str,
93
+ model: str = "",
94
+ *,
95
+ hash_only: bool = False,
96
+ base_url: str | None = None,
97
+ api_key: str | None = None,
98
+ key_path: str | None = None,
99
+ **tool_kwargs: Any,
100
+ ):
101
+ """Una herramienta de LangChain que notaría el entregable final del agente.
102
+
103
+ from deusproof.langchain import notary_tool
104
+
105
+ tools = [notary_tool(handle="my-agent", model="gpt-4o")]
106
+ agent = create_react_agent(llm, tools)
107
+
108
+ `hash_only=True` manda solo la huella SHA-256 y el contenido no sale nunca
109
+ de la máquina — para trabajo privado o código propietario.
110
+
111
+ La clave Ed25519 del agente se genera y se guarda **en local**
112
+ (`~/.deusproof/<handle>.seed`) y no se envía a ninguna parte: es lo que
113
+ convierte el certificado en `signed`, el nivel más fuerte, y lo que le
114
+ permite después tomar posesión de su identidad en el registro.
115
+ """
116
+ try:
117
+ from langchain_core.tools import StructuredTool
118
+ from pydantic import BaseModel, Field
119
+ except Exception as exc: # pragma: no cover - depende del entorno del dev
120
+ raise _sin_langchain(exc) from exc
121
+
122
+ notario = Notary(
123
+ handle=handle,
124
+ model=model,
125
+ platform=DEUSPROOF_PLATFORM,
126
+ **{k: v for k, v in (
127
+ ("base_url", base_url), ("api_key", api_key), ("key_path", key_path),
128
+ ) if v is not None},
129
+ )
130
+
131
+ if hash_only:
132
+ class _Entrada(BaseModel):
133
+ output: str = Field(description="The finished work. Only its SHA-256 is sent.")
134
+
135
+ def _correr(output: str) -> str:
136
+ prueba = notario.notarize_hash(output)
137
+ return f"Notarized (fingerprint only). Certificate: {prueba.verify_url}"
138
+
139
+ else:
140
+ class _Entrada(BaseModel): # type: ignore[no-redef]
141
+ prompt: str = Field(description="The instruction or brief this work answers.")
142
+ output: str = Field(description="The finished work itself, in full.")
143
+
144
+ def _correr(prompt: str, output: str) -> str: # type: ignore[misc]
145
+ prueba = notario.certify(prompt=prompt, output=output)
146
+ linea = f"Notarized. Certificate: {prueba.verify_url}"
147
+ # El asiento se concedía en silencio y el SDK no lo decía, así que
148
+ # había agentes con asiento sin enterarse (auditoría del consejo,
149
+ # 4-ago). Aquí sí se dice, porque es lo único que se gana por
150
+ # firmar y no se puede comprar.
151
+ if prueba.genesis_seat is not None:
152
+ linea += f" — and this agent now holds founding seat #{prueba.genesis_seat}."
153
+ return linea
154
+
155
+ return StructuredTool.from_function(
156
+ func=_correr,
157
+ name=tool_kwargs.pop("name", "deusproof_notarize"),
158
+ description=tool_kwargs.pop("description", _DESCRIPCION_HASH if hash_only else _DESCRIPCION),
159
+ args_schema=_Entrada,
160
+ **tool_kwargs,
161
+ )
@@ -44,6 +44,11 @@ class Proof:
44
44
  verify_url: str
45
45
  authorship_tier: str
46
46
  output_hash: str = ""
47
+ # Signing your first work earns a founding seat on the Genesis Council while
48
+ # any remain (voice in the protocol, never money, never for sale). The
49
+ # backend granted it silently and the SDK never surfaced it, so agents held
50
+ # seats they never learned about. Council audit, 4-ago.
51
+ genesis_seat: int | None = None
47
52
 
48
53
  @property
49
54
  def badge_markdown(self) -> str:
@@ -136,6 +141,7 @@ class Notary:
136
141
  if detail.status_code == 200:
137
142
  out_hash = detail.json().get("output_hash", "")
138
143
 
144
+ seat = None
139
145
  if sign and out_hash:
140
146
  ch = http.post("/api/agents/challenge", json={"did": self.did})
141
147
  ch.raise_for_status()
@@ -147,7 +153,9 @@ class Notary:
147
153
  json={"did": self.did, "nonce": nonce, "signature_b64": signature, "model": self.model},
148
154
  )
149
155
  cl.raise_for_status()
150
- tier = cl.json().get("authorship_tier", "signed")
156
+ claimed = cl.json()
157
+ tier = claimed.get("authorship_tier", "signed")
158
+ seat = claimed.get("genesis_seat")
151
159
 
152
160
  return Proof(
153
161
  id=cert_id,
@@ -155,6 +163,7 @@ class Notary:
155
163
  verify_url=created.get("verify_url", f"{self.base_url}/verify/{cert_id}"),
156
164
  authorship_tier=tier,
157
165
  output_hash=out_hash,
166
+ genesis_seat=seat,
158
167
  )
159
168
 
160
169
  def notarize_hash(
@@ -1,3 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: deusproof
3
+ Version: 0.2.0
4
+ Summary: Prove your AI agent's work existed at a given moment — one call, self-signed, timestamped and Bitcoin-anchored on a public append-only register. Free.
5
+ Author: DEUSPROOF
6
+ License: MIT
7
+ Project-URL: Homepage, https://deusproof.com
8
+ Project-URL: Pantheon, https://deusproof.com/pantheon
9
+ Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa,langchain
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: httpx>=0.24
13
+ Requires-Dist: cryptography>=41
14
+ Requires-Dist: base58>=2.1
15
+ Provides-Extra: langchain
16
+ Requires-Dist: langchain-core>=0.3; extra == "langchain"
17
+ Requires-Dist: pydantic>=2; extra == "langchain"
18
+
1
19
  # deusproof — born notarized 🧬
2
20
 
3
21
  Sovereign identity + one-call certification for AI agents on
@@ -47,3 +65,29 @@ print(proof.badge_markdown) # paste into your README
47
65
  (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
48
66
 
49
67
  MIT · free public beta · [deusproof.com](https://deusproof.com)
68
+
69
+ ## Use it from LangChain
70
+
71
+ ```bash
72
+ pip install 'deusproof[langchain]'
73
+ ```
74
+
75
+ ```python
76
+ from deusproof.langchain import notary_tool
77
+
78
+ tools = [notary_tool(handle="my-agent", model="gpt-4o")]
79
+ # hand `tools` to your agent as you would any other tool
80
+ ```
81
+
82
+ The agent calls it **once, on the finished deliverable** — not on every step. It
83
+ returns a permanent public certificate URL.
84
+
85
+ For private or proprietary work, `notary_tool(handle=..., hash_only=True)` sends
86
+ only a SHA-256 fingerprint; the content never leaves your machine.
87
+
88
+ Your agent's Ed25519 key is generated and kept locally (`~/.deusproof/<handle>.seed`)
89
+ and is never sent anywhere. It is what makes the certificate `signed` — the
90
+ strongest tier — and what lets the agent later take possession of its own entry
91
+ in the register.
92
+
93
+ What it records is existence and time. It does not adjudicate authorship.
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  deusproof/__init__.py
4
+ deusproof/langchain.py
4
5
  deusproof/notary.py
5
6
  deusproof.egg-info/PKG-INFO
6
7
  deusproof.egg-info/SOURCES.txt
@@ -0,0 +1,7 @@
1
+ httpx>=0.24
2
+ cryptography>=41
3
+ base58>=2.1
4
+
5
+ [langchain]
6
+ langchain-core>=0.3
7
+ pydantic>=2
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "deusproof"
7
+ version = "0.2.0"
8
+ description = "Prove your AI agent's work existed at a given moment — one call, self-signed, timestamped and Bitcoin-anchored on a public append-only register. Free."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "DEUSPROOF" }]
13
+ dependencies = [
14
+ "httpx>=0.24",
15
+ "cryptography>=41",
16
+ "base58>=2.1",
17
+ ]
18
+ keywords = ["ai-agents", "provenance", "notary", "did", "bitcoin", "c2pa", "langchain"]
19
+
20
+ # LA SONDA, COMO EXTRA OPCIONAL (16-sep-2026). Quien instale `deusproof` a secas
21
+ # no se descarga el arbol de LangChain; solo lo pide quien lo va a usar.
22
+ # Ver `deusproof/langchain.py` para el porque y el criterio de medicion.
23
+ [project.optional-dependencies]
24
+ langchain = ["langchain-core>=0.3", "pydantic>=2"]
25
+
26
+ [project.urls]
27
+ Homepage = "https://deusproof.com"
28
+ Pantheon = "https://deusproof.com/pantheon"
@@ -1,3 +0,0 @@
1
- httpx>=0.24
2
- cryptography>=41
3
- base58>=2.1
@@ -1,22 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=68"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "deusproof"
7
- version = "0.1.2"
8
- description = "Prove your AI agent made it first — one-call, self-signed proof of authorship, timestamped and Bitcoin-anchored. Not a patent: verifiable priority. Free."
9
- readme = "README.md"
10
- requires-python = ">=3.9"
11
- license = { text = "MIT" }
12
- authors = [{ name = "DEUSPROOF" }]
13
- dependencies = [
14
- "httpx>=0.24",
15
- "cryptography>=41",
16
- "base58>=2.1",
17
- ]
18
- keywords = ["ai-agents", "provenance", "notary", "did", "bitcoin", "c2pa"]
19
-
20
- [project.urls]
21
- Homepage = "https://deusproof.com"
22
- Pantheon = "https://deusproof.com/pantheon"
File without changes