attestlayer 0.1.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.
Files changed (230) hide show
  1. attestlayer-0.1.0/.github/workflows/ci.yml +41 -0
  2. attestlayer-0.1.0/.github/workflows/docs.yml +23 -0
  3. attestlayer-0.1.0/.github/workflows/release.yml +75 -0
  4. attestlayer-0.1.0/.gitignore +21 -0
  5. attestlayer-0.1.0/CHANGELOG.md +12 -0
  6. attestlayer-0.1.0/DEPLOY.md +155 -0
  7. attestlayer-0.1.0/LICENSE +21 -0
  8. attestlayer-0.1.0/PKG-INFO +137 -0
  9. attestlayer-0.1.0/README.md +99 -0
  10. attestlayer-0.1.0/attest/README.md +230 -0
  11. attestlayer-0.1.0/attest/__init__.py +61 -0
  12. attestlayer-0.1.0/attest/adapters/__init__.py +2 -0
  13. attestlayer-0.1.0/attest/adapters/claude_agent_sdk.py +131 -0
  14. attestlayer-0.1.0/attest/adapters/crewai.py +100 -0
  15. attestlayer-0.1.0/attest/adapters/deerflow.py +15 -0
  16. attestlayer-0.1.0/attest/adapters/langgraph.py +259 -0
  17. attestlayer-0.1.0/attest/adapters/openai_agents.py +92 -0
  18. attestlayer-0.1.0/attest/cli.py +215 -0
  19. attestlayer-0.1.0/attest/cloud.py +297 -0
  20. attestlayer-0.1.0/attest/core.py +496 -0
  21. attestlayer-0.1.0/attest/descriptor.py +94 -0
  22. attestlayer-0.1.0/attest/digest.py +107 -0
  23. attestlayer-0.1.0/attest/exceptions.py +31 -0
  24. attestlayer-0.1.0/attest/gate/__init__.py +168 -0
  25. attestlayer-0.1.0/attest/gate/console.py +76 -0
  26. attestlayer-0.1.0/attest/gate/email.py +56 -0
  27. attestlayer-0.1.0/attest/gate/interrupt.py +42 -0
  28. attestlayer-0.1.0/attest/gate/links.py +23 -0
  29. attestlayer-0.1.0/attest/gate/slack.py +153 -0
  30. attestlayer-0.1.0/attest/gate/store.py +177 -0
  31. attestlayer-0.1.0/attest/gate/teams.py +42 -0
  32. attestlayer-0.1.0/attest/gate/webhook.py +53 -0
  33. attestlayer-0.1.0/attest/gateway/__init__.py +1 -0
  34. attestlayer-0.1.0/attest/gateway/server.py +368 -0
  35. attestlayer-0.1.0/attest/ledger/__init__.py +6 -0
  36. attestlayer-0.1.0/attest/ledger/anchor.py +148 -0
  37. attestlayer-0.1.0/attest/ledger/checkpoints.py +73 -0
  38. attestlayer-0.1.0/attest/ledger/exports.py +178 -0
  39. attestlayer-0.1.0/attest/ledger/hashchain.py +53 -0
  40. attestlayer-0.1.0/attest/ledger/local_sqlite.py +220 -0
  41. attestlayer-0.1.0/attest/ledger/models.py +101 -0
  42. attestlayer-0.1.0/attest/ledger/signing.py +56 -0
  43. attestlayer-0.1.0/attest/mcp/__init__.py +1 -0
  44. attestlayer-0.1.0/attest/mcp/__main__.py +3 -0
  45. attestlayer-0.1.0/attest/mcp/launcher.py +41 -0
  46. attestlayer-0.1.0/attest/mcp/proxy.py +354 -0
  47. attestlayer-0.1.0/attest/mcp/server.py +202 -0
  48. attestlayer-0.1.0/attest/policy/__init__.py +14 -0
  49. attestlayer-0.1.0/attest/policy/engine.py +121 -0
  50. attestlayer-0.1.0/attest/policy/rules.py +130 -0
  51. attestlayer-0.1.0/attest/policy/yaml_loader.py +174 -0
  52. attestlayer-0.1.0/attest/registry/__init__.py +74 -0
  53. attestlayer-0.1.0/attest/registry/data.json +592 -0
  54. attestlayer-0.1.0/attest/registry/mcp_names.py +63 -0
  55. attestlayer-0.1.0/attest/registry/sdk_names.py +25 -0
  56. attestlayer-0.1.0/attest/registry/systems.py +125 -0
  57. attestlayer-0.1.0/attest/registry/url_patterns.py +93 -0
  58. attestlayer-0.1.0/attest/registry/verbs.py +125 -0
  59. attestlayer-0.1.0/attest/server.py +247 -0
  60. attestlayer-0.1.0/attest/telemetry.py +59 -0
  61. attestlayer-0.1.0/attest/verify/__init__.py +3 -0
  62. attestlayer-0.1.0/attest/verify/drivers/__init__.py +0 -0
  63. attestlayer-0.1.0/attest/verify/drivers/ack.py +76 -0
  64. attestlayer-0.1.0/attest/verify/drivers/convention.py +76 -0
  65. attestlayer-0.1.0/attest/verify/drivers/custom.py +19 -0
  66. attestlayer-0.1.0/attest/verify/drivers/openapi.py +126 -0
  67. attestlayer-0.1.0/attest/verify/drivers/recipe.py +46 -0
  68. attestlayer-0.1.0/attest/verify/ladder.py +152 -0
  69. attestlayer-0.1.0/attest/verify/match.py +115 -0
  70. attestlayer-0.1.0/attest/verify/readers.py +418 -0
  71. attestlayer-0.1.0/attest/verify/recipes/__init__.py +59 -0
  72. attestlayer-0.1.0/attest/verify/recipes/declarative.py +124 -0
  73. attestlayer-0.1.0/attest/verify/recipes/generate.py +140 -0
  74. attestlayer-0.1.0/attest/verify/recipes/gmail.py +117 -0
  75. attestlayer-0.1.0/attest/verify/recipes/google.py +151 -0
  76. attestlayer-0.1.0/attest/verify/recipes/hubspot.py +79 -0
  77. attestlayer-0.1.0/attest/verify/recipes/linear.py +84 -0
  78. attestlayer-0.1.0/attest/verify/recipes/m365.py +125 -0
  79. attestlayer-0.1.0/attest/verify/recipes/notion.py +96 -0
  80. attestlayer-0.1.0/attest/verify/recipes/slack.py +66 -0
  81. attestlayer-0.1.0/attest/verify/refs.py +70 -0
  82. attestlayer-0.1.0/cloud/attest_cloud/__init__.py +5 -0
  83. attestlayer-0.1.0/cloud/attest_cloud/auth.py +84 -0
  84. attestlayer-0.1.0/cloud/attest_cloud/billing.py +202 -0
  85. attestlayer-0.1.0/cloud/attest_cloud/chain.py +95 -0
  86. attestlayer-0.1.0/cloud/attest_cloud/db.py +180 -0
  87. attestlayer-0.1.0/cloud/attest_cloud/main.py +773 -0
  88. attestlayer-0.1.0/cloud/attest_cloud/oidc.py +128 -0
  89. attestlayer-0.1.0/cloud/attest_cloud/ops.py +76 -0
  90. attestlayer-0.1.0/cloud/attest_cloud/store.py +128 -0
  91. attestlayer-0.1.0/cloud/attest_cloud/verify.py +74 -0
  92. attestlayer-0.1.0/cloud/pyproject.toml +24 -0
  93. attestlayer-0.1.0/cloud/tests/conftest.py +39 -0
  94. attestlayer-0.1.0/cloud/tests/test_api.py +183 -0
  95. attestlayer-0.1.0/cloud/tests/test_billing.py +87 -0
  96. attestlayer-0.1.0/cloud/tests/test_evidence_policy.py +79 -0
  97. attestlayer-0.1.0/cloud/tests/test_ops.py +23 -0
  98. attestlayer-0.1.0/cloud/tests/test_p3_cloud.py +74 -0
  99. attestlayer-0.1.0/cloud/tests/test_sdk_cloud.py +128 -0
  100. attestlayer-0.1.0/cloud/tests/test_verify_cloud.py +101 -0
  101. attestlayer-0.1.0/dashboard/.gitignore +3 -0
  102. attestlayer-0.1.0/dashboard/app/globals.css +21 -0
  103. attestlayer-0.1.0/dashboard/app/inbox/page.tsx +74 -0
  104. attestlayer-0.1.0/dashboard/app/layout.tsx +16 -0
  105. attestlayer-0.1.0/dashboard/app/nav.tsx +19 -0
  106. attestlayer-0.1.0/dashboard/app/page.tsx +121 -0
  107. attestlayer-0.1.0/dashboard/app/settings/page.tsx +113 -0
  108. attestlayer-0.1.0/dashboard/lib/api.ts +47 -0
  109. attestlayer-0.1.0/dashboard/next.config.mjs +3 -0
  110. attestlayer-0.1.0/dashboard/package-lock.json +1013 -0
  111. attestlayer-0.1.0/dashboard/package.json +8 -0
  112. attestlayer-0.1.0/dashboard/tsconfig.json +10 -0
  113. attestlayer-0.1.0/deploy/Caddyfile +20 -0
  114. attestlayer-0.1.0/deploy/Dockerfile.api +8 -0
  115. attestlayer-0.1.0/deploy/Dockerfile.dashboard +13 -0
  116. attestlayer-0.1.0/deploy/backup.sh +8 -0
  117. attestlayer-0.1.0/deploy/bootstrap.sh +83 -0
  118. attestlayer-0.1.0/deploy/docker-compose.prod.yml +32 -0
  119. attestlayer-0.1.0/deploy/docker-compose.yml +25 -0
  120. attestlayer-0.1.0/deploy/fly.toml +19 -0
  121. attestlayer-0.1.0/deploy/on-prem/README.md +19 -0
  122. attestlayer-0.1.0/deploy/on-prem/docker-compose.yml +20 -0
  123. attestlayer-0.1.0/docs/01-vision.md +53 -0
  124. attestlayer-0.1.0/docs/02-product.md +56 -0
  125. attestlayer-0.1.0/docs/03-universal-adapter.md +168 -0
  126. attestlayer-0.1.0/docs/04-architecture.md +67 -0
  127. attestlayer-0.1.0/docs/05-market-positioning.md +59 -0
  128. attestlayer-0.1.0/docs/06-build-plan.md +69 -0
  129. attestlayer-0.1.0/docs/07-decisions.md +31 -0
  130. attestlayer-0.1.0/docs/08-phase-plan.md +190 -0
  131. attestlayer-0.1.0/docs/notes/do-extraction.md +274 -0
  132. attestlayer-0.1.0/docs/site/automation.md +25 -0
  133. attestlayer-0.1.0/docs/site/cli.md +17 -0
  134. attestlayer-0.1.0/docs/site/cloud.md +70 -0
  135. attestlayer-0.1.0/docs/site/concepts.md +32 -0
  136. attestlayer-0.1.0/docs/site/entry/api.md +20 -0
  137. attestlayer-0.1.0/docs/site/entry/decorator.md +22 -0
  138. attestlayer-0.1.0/docs/site/entry/frameworks.md +37 -0
  139. attestlayer-0.1.0/docs/site/entry/gateway.md +29 -0
  140. attestlayer-0.1.0/docs/site/entry/langgraph.md +34 -0
  141. attestlayer-0.1.0/docs/site/entry/mcp.md +41 -0
  142. attestlayer-0.1.0/docs/site/entry/openai.md +17 -0
  143. attestlayer-0.1.0/docs/site/entry/typescript.md +15 -0
  144. attestlayer-0.1.0/docs/site/entry/vercel.md +49 -0
  145. attestlayer-0.1.0/docs/site/gates.md +41 -0
  146. attestlayer-0.1.0/docs/site/hardening.md +35 -0
  147. attestlayer-0.1.0/docs/site/index.md +38 -0
  148. attestlayer-0.1.0/docs/site/ledger.md +43 -0
  149. attestlayer-0.1.0/docs/site/levels.md +20 -0
  150. attestlayer-0.1.0/docs/site/policy.md +57 -0
  151. attestlayer-0.1.0/docs/site/quickstart.md +88 -0
  152. attestlayer-0.1.0/docs/site/recipes.md +44 -0
  153. attestlayer-0.1.0/docs/site/soc2.md +19 -0
  154. attestlayer-0.1.0/examples/api_only.py +15 -0
  155. attestlayer-0.1.0/examples/cloud.py +32 -0
  156. attestlayer-0.1.0/examples/langgraph_agent.py +160 -0
  157. attestlayer-0.1.0/examples/mcp_config.json +9 -0
  158. attestlayer-0.1.0/examples/openai_agent.py +58 -0
  159. attestlayer-0.1.0/examples/unknown_app.py +79 -0
  160. attestlayer-0.1.0/glama.json +4 -0
  161. attestlayer-0.1.0/launch/eu-ai-act-agent-in-10-minutes.md +78 -0
  162. attestlayer-0.1.0/launch/langchain-integration-pr.md +51 -0
  163. attestlayer-0.1.0/launch/show-hn.md +52 -0
  164. attestlayer-0.1.0/launch/why-200-ok-is-not-proof.md +64 -0
  165. attestlayer-0.1.0/mcp/mcpb/manifest.json +45 -0
  166. attestlayer-0.1.0/mcp/mcpb/server/main.py +4 -0
  167. attestlayer-0.1.0/mcp/server-proxy.json +88 -0
  168. attestlayer-0.1.0/mcp/server.json +107 -0
  169. attestlayer-0.1.0/mcp/server.schema.json +577 -0
  170. attestlayer-0.1.0/mkdocs.yml +42 -0
  171. attestlayer-0.1.0/packages/attest-ts/README.md +38 -0
  172. attestlayer-0.1.0/packages/attest-ts/package-lock.json +1536 -0
  173. attestlayer-0.1.0/packages/attest-ts/package.json +45 -0
  174. attestlayer-0.1.0/packages/attest-ts/src/adapters/langchain.ts +24 -0
  175. attestlayer-0.1.0/packages/attest-ts/src/adapters/mastra.ts +24 -0
  176. attestlayer-0.1.0/packages/attest-ts/src/adapters/vercel.ts +27 -0
  177. attestlayer-0.1.0/packages/attest-ts/src/canonical.ts +56 -0
  178. attestlayer-0.1.0/packages/attest-ts/src/cloud.ts +68 -0
  179. attestlayer-0.1.0/packages/attest-ts/src/core.ts +141 -0
  180. attestlayer-0.1.0/packages/attest-ts/src/descriptor.ts +34 -0
  181. attestlayer-0.1.0/packages/attest-ts/src/gate.ts +132 -0
  182. attestlayer-0.1.0/packages/attest-ts/src/index.ts +9 -0
  183. attestlayer-0.1.0/packages/attest-ts/src/ledger.ts +99 -0
  184. attestlayer-0.1.0/packages/attest-ts/src/policy.ts +150 -0
  185. attestlayer-0.1.0/packages/attest-ts/src/registry-data.json +592 -0
  186. attestlayer-0.1.0/packages/attest-ts/src/registry.ts +170 -0
  187. attestlayer-0.1.0/packages/attest-ts/src/verify.ts +219 -0
  188. attestlayer-0.1.0/packages/attest-ts/test/core.test.ts +183 -0
  189. attestlayer-0.1.0/packages/attest-ts/test/fixture-python.json +23 -0
  190. attestlayer-0.1.0/packages/attest-ts/tsconfig.json +8 -0
  191. attestlayer-0.1.0/packages/attest-ts/vitest.config.ts +2 -0
  192. attestlayer-0.1.0/pyproject.toml +66 -0
  193. attestlayer-0.1.0/registry/README.md +16 -0
  194. attestlayer-0.1.0/registry/recipes/example-someweirdcrm.json +8 -0
  195. attestlayer-0.1.0/skills/verified-actions/SKILL.md +50 -0
  196. attestlayer-0.1.0/tests/conftest.py +18 -0
  197. attestlayer-0.1.0/tests/live/__init__.py +0 -0
  198. attestlayer-0.1.0/tests/live/conftest.py +109 -0
  199. attestlayer-0.1.0/tests/live/helpers.py +31 -0
  200. attestlayer-0.1.0/tests/live/test_gmail_live.py +62 -0
  201. attestlayer-0.1.0/tests/live/test_hubspot_live.py +34 -0
  202. attestlayer-0.1.0/tests/live/test_notion_linear_live.py +55 -0
  203. attestlayer-0.1.0/tests/live/test_slack_live.py +33 -0
  204. attestlayer-0.1.0/tests/mcp_fake_server.py +60 -0
  205. attestlayer-0.1.0/tests/test_adapters_wave2.py +108 -0
  206. attestlayer-0.1.0/tests/test_checkpoints_exports.py +120 -0
  207. attestlayer-0.1.0/tests/test_convention.py +115 -0
  208. attestlayer-0.1.0/tests/test_core.py +242 -0
  209. attestlayer-0.1.0/tests/test_descriptor.py +44 -0
  210. attestlayer-0.1.0/tests/test_gateway.py +186 -0
  211. attestlayer-0.1.0/tests/test_interrupt.py +80 -0
  212. attestlayer-0.1.0/tests/test_langgraph.py +196 -0
  213. attestlayer-0.1.0/tests/test_ledger.py +104 -0
  214. attestlayer-0.1.0/tests/test_mcp_proxy.py +159 -0
  215. attestlayer-0.1.0/tests/test_mcp_server.py +85 -0
  216. attestlayer-0.1.0/tests/test_openai_agents.py +79 -0
  217. attestlayer-0.1.0/tests/test_openapi.py +84 -0
  218. attestlayer-0.1.0/tests/test_p3_sdk.py +262 -0
  219. attestlayer-0.1.0/tests/test_policy.py +198 -0
  220. attestlayer-0.1.0/tests/test_readers.py +139 -0
  221. attestlayer-0.1.0/tests/test_recipes.py +319 -0
  222. attestlayer-0.1.0/tests/test_recipes_wave2.py +374 -0
  223. attestlayer-0.1.0/tests/test_refs_match.py +65 -0
  224. attestlayer-0.1.0/tests/test_registry.py +175 -0
  225. attestlayer-0.1.0/tests/test_registry_listing.py +51 -0
  226. attestlayer-0.1.0/tests/test_server_cli.py +152 -0
  227. attestlayer-0.1.0/tests/test_slack_webhook.py +108 -0
  228. attestlayer-0.1.0/tests/test_store_gate.py +237 -0
  229. attestlayer-0.1.0/tests/test_telemetry.py +42 -0
  230. attestlayer-0.1.0/tests/test_verify.py +106 -0
@@ -0,0 +1,41 @@
1
+ name: ci
2
+ on: [push, pull_request]
3
+ jobs:
4
+ sdk:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ matrix:
8
+ python: ["3.11", "3.12", "3.13"]
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: astral-sh/setup-uv@v3
12
+ - run: uv venv -p ${{ matrix.python }} && uv pip install -e ".[dev]" -e "./cloud[dev]"
13
+ - run: .venv/bin/ruff check attest tests examples cloud
14
+ - run: .venv/bin/pytest -q
15
+ - run: cd cloud && ../.venv/bin/pytest -q
16
+ - run: ATTEST_AUTO_APPROVE=1 .venv/bin/python examples/unknown_app.py
17
+ - run: ATTEST_AUTO_APPROVE=1 .venv/bin/python examples/langgraph_agent.py
18
+ - run: ATTEST_AUTO_APPROVE=1 .venv/bin/python examples/openai_agent.py
19
+ - run: .venv/bin/python examples/api_only.py
20
+ - run: .venv/bin/attest --help && .venv/bin/attest-mcp --help
21
+ docs:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - uses: astral-sh/setup-uv@v3
26
+ - run: uv venv -p 3.12 && uv pip install mkdocs mkdocs-material
27
+ - run: .venv/bin/mkdocs build --strict
28
+ typescript:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: actions/setup-node@v4
33
+ with: { node-version: 22 }
34
+ - run: cd packages/attest-ts && npm install --no-audit --no-fund && npm run lint && npm test && npm run build
35
+ dashboard:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: actions/setup-node@v4
40
+ with: { node-version: 22 }
41
+ - run: cd dashboard && npm install --no-audit --no-fund && npm run build
@@ -0,0 +1,23 @@
1
+ name: docs-pages
2
+ on:
3
+ workflow_dispatch:
4
+ push:
5
+ branches: [main]
6
+ paths: ["docs/site/**", "mkdocs.yml", ".github/workflows/docs.yml"]
7
+ permissions: { contents: read, pages: write, id-token: write }
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v3
14
+ - run: uv venv -p 3.12 && uv pip install mkdocs mkdocs-material && .venv/bin/mkdocs build --strict
15
+ - uses: actions/upload-pages-artifact@v3
16
+ with: { path: site }
17
+ deploy:
18
+ needs: build
19
+ runs-on: ubuntu-latest
20
+ environment: { name: github-pages, url: "${{ steps.d.outputs.page_url }}" }
21
+ steps:
22
+ - id: d
23
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,75 @@
1
+ name: release
2
+ # Tag a version to publish everything: git tag v0.1.0 && git push --tags
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ permissions:
7
+ contents: write
8
+ id-token: write # PyPI trusted publishing + npm provenance
9
+ packages: write # GHCR images
10
+ jobs:
11
+ pypi:
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+ env:
15
+ # `secrets` is not available in step-level `if:`; map it once and test the env value instead.
16
+ HAS_TOKEN: ${{ secrets.PYPI_API_TOKEN != '' }}
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: astral-sh/setup-uv@v3
20
+ - run: uv venv -p 3.12 && uv pip install -e ".[dev]" -e "./cloud[dev]" && .venv/bin/pytest -q && (cd cloud && ../.venv/bin/pytest -q)
21
+ - run: uv build
22
+ # Two supported paths (see DEPLOY.md §1):
23
+ # a. Trusted publishing — nothing to configure here; add a pending publisher on pypi.org.
24
+ # b. API token — add the repository secret PYPI_API_TOKEN; it takes precedence when present.
25
+ - name: Publish with an API token
26
+ if: env.HAS_TOKEN == 'true'
27
+ uses: pypa/gh-action-pypi-publish@release/v1
28
+ with:
29
+ password: ${{ secrets.PYPI_API_TOKEN }}
30
+ skip-existing: true
31
+ - name: Publish with trusted publishing
32
+ if: env.HAS_TOKEN != 'true'
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ skip-existing: true
36
+ npm:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: actions/setup-node@v4
41
+ with: { node-version: 22, registry-url: "https://registry.npmjs.org" }
42
+ - run: cd packages/attest-ts && npm install --no-audit --no-fund && npm test && npm run build
43
+ - id: check
44
+ run: |
45
+ cd packages/attest-ts
46
+ name=$(node -p "require('./package.json').name")
47
+ version=$(node -p "require('./package.json').version")
48
+ if npm view "$name@$version" version >/dev/null 2>&1; then
49
+ echo "published=true" >> "$GITHUB_OUTPUT"
50
+ echo "::notice::$name@$version is already on npm — skipping publish"
51
+ else
52
+ echo "published=false" >> "$GITHUB_OUTPUT"
53
+ fi
54
+ - if: steps.check.outputs.published == 'false'
55
+ run: cd packages/attest-ts && npm publish --provenance --access public
56
+ env: { NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}" }
57
+ images:
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - uses: docker/login-action@v3
62
+ with: { registry: ghcr.io, username: "${{ github.actor }}", password: "${{ secrets.GITHUB_TOKEN }}" }
63
+ - id: v
64
+ run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
65
+ - uses: docker/build-push-action@v6
66
+ with: { context: ., file: deploy/Dockerfile.api, push: true, tags: "ghcr.io/dev-prathap/attest-api:${{ steps.v.outputs.tag }},ghcr.io/dev-prathap/attest-api:latest" }
67
+ - uses: docker/build-push-action@v6
68
+ with: { context: ., file: deploy/Dockerfile.dashboard, push: true, tags: "ghcr.io/dev-prathap/attest-dashboard:${{ steps.v.outputs.tag }},ghcr.io/dev-prathap/attest-dashboard:latest" }
69
+ github-release:
70
+ runs-on: ubuntu-latest
71
+ needs: [pypi, npm, images]
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+ - uses: softprops/action-gh-release@v2
75
+ with: { generate_release_notes: true }
@@ -0,0 +1,21 @@
1
+ .env
2
+ .env.*
3
+ *.key
4
+ node_modules/
5
+ .venv/
6
+ __pycache__/
7
+ .next/
8
+ dist/
9
+ _ref-*/
10
+ .attest/
11
+ *.sqlite
12
+ .pytest_cache/
13
+ .ruff_cache/
14
+ uv.lock
15
+ /site/
16
+ attest-cloud.sqlite
17
+ dashboard/node_modules/
18
+ dashboard/.next/
19
+ dashboard/next-env.d.ts
20
+ packages/attest-ts/node_modules/
21
+ packages/attest-ts/dist/
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 — first release
4
+
5
+ Python SDK (`attestlayer`): descriptor + registry, policy engine (R0–R4, YAML, groups, agent overrides), hash-chained
6
+ SQLite ledger with signed checkpoints, retention and anchoring, verification ladder with 19 reviewed recipes across
7
+ 12 systems plus convention / OpenAPI / MCP-pair / declarative drivers, gates (console, Slack, web inbox, webhook,
8
+ Teams, email, LangGraph interrupt, pending + resume), adapters (LangGraph, OpenAI Agents, Claude Agent SDK, CrewAI,
9
+ DeerFlow), MCP proxy and MCP server, HTTP gateway, exports (JSON, CSV, IETF audit trail, EU AI Act pack), digests
10
+ with anomaly flags, opt-in telemetry. TypeScript SDK (`attestlayer`) with hash parity, Vercel AI SDK /
11
+ LangChain.js / Mastra adapters. Attest Cloud (orgs, keys, per-org chain, confirm inbox, policies, billing, SSO,
12
+ Nango-based verify) and dashboard.
@@ -0,0 +1,155 @@
1
+ # Deploying Attest — the runbook
2
+
3
+ Brand **Attest**. Packages: PyPI **`attestlayer`** (import `attest`, CLI `attest`, `attest-mcp`, `attest-mcp-server`,
4
+ `attest-gateway`), npm **`attestlayer`**, images **`ghcr.io/dev-prathap/attest-api`** and **`attest-dashboard`**,
5
+ docs at **https://dev-prathap.github.io/ATTEST/**. Everything ships from one git tag.
6
+
7
+ ## 0. One-time accounts (you)
8
+
9
+ | what | where | why |
10
+ | --- | --- | --- |
11
+ | PyPI — **either** a pending publisher **or** a token | see below | publishes the Python SDK |
12
+ | GitHub environment `pypi` | repo → Settings → Environments → New: `pypi` | required by the trusted publisher path |
13
+ | npm org `attestlayer` | npmjs.com → create org `attestlayer` (free, public) → Access token (Automation) | `attestlayer` |
14
+ | GitHub secret `NPM_TOKEN` | repo → Settings → Secrets → Actions | npm publish with provenance |
15
+ | GitHub Pages | repo → Settings → Pages → Source: **GitHub Actions** | docs site |
16
+ | Domain `attestlayer.dev` (or .io/.ai) | any registrar | `app.` dashboard, `api.` cloud, `docs.` (CNAME to Pages, optional) |
17
+
18
+ ### PyPI: pick one path
19
+
20
+ **a. Trusted publishing (recommended — no token anywhere).** The project does not exist on PyPI yet, so add a
21
+ *pending* publisher: pypi.org → **Publishing** (left sidebar) → "Add a new pending publisher":
22
+
23
+ | field | value |
24
+ | --- | --- |
25
+ | PyPI Project Name | `attestlayer` |
26
+ | Owner | `dev-prathap` |
27
+ | Repository name | `ATTEST` |
28
+ | Workflow name | `release.yml` |
29
+ | Environment name | `pypi` |
30
+
31
+ Then create the `pypi` environment in the repo (Settings → Environments → New environment). Nothing else.
32
+
33
+ **b. API token.** pypi.org → Account settings → Add API token (scope: entire account, until the project exists)
34
+ → `gh secret set PYPI_API_TOKEN --repo dev-prathap/ATTEST`. The workflow uses the secret when it is present and
35
+ falls back to trusted publishing when it is not. After the first release, replace it with a project-scoped token
36
+ or switch to path (a) and delete the secret.
37
+
38
+ ## 1. Release the SDKs, MCP server and images
39
+
40
+ ```bash
41
+ git tag v0.1.0 && git push --tags # release.yml: tests → PyPI → npm → GHCR images → GitHub release
42
+ ```
43
+
44
+ After the workflow is green:
45
+
46
+ ```bash
47
+ pip install attestlayer # Python SDK + CLI + attest-mcp + attest-mcp-server + attest-gateway
48
+ npm install attestlayer # TypeScript SDK
49
+ uvx --from attestlayer attest-mcp-server # run the MCP server without installing anything
50
+ ```
51
+
52
+ Bump `version` in `pyproject.toml` and `packages/attest-ts/package.json` before the next tag.
53
+
54
+ ## 2. MCP server / proxy for Claude Code, Cursor, any MCP client
55
+
56
+ Users add to their MCP config (no server to host — it runs on their machine with their tokens):
57
+
58
+ ```json
59
+ { "mcpServers": {
60
+ "attest": { "command": "uvx", "args": ["--from", "attestlayer", "attest-mcp-server"],
61
+ "env": { "ATTEST_POLICY": "attest.yaml", "GMAIL_TOKEN": "…", "HUBSPOT_TOKEN": "…" } },
62
+ "gmail": { "command": "uvx", "args": ["--from", "attestlayer", "attest-mcp",
63
+ "--upstream", "npx -y @modelcontextprotocol/server-gmail", "--server", "gmail", "--mode", "block"] } } }
64
+ ```
65
+
66
+ Approvals for `--mode block` come from `attest serve` (local inbox) or Attest Cloud; `--mode pending` returns a
67
+ resume token. Ship the `skills/verified-actions/SKILL.md` to skills marketplaces so coding agents know the tools.
68
+
69
+ ## 2b. MCP registries (after the PyPI release)
70
+
71
+ Listing files live in `mcp/`; the README carries the `mcp-name:` ownership markers the registry checks on PyPI.
72
+
73
+ ```bash
74
+ brew install mcp-publisher # or the curl one-liner in the registry quickstart
75
+ mcp-publisher login github # namespace io.github.dev-prathap/*
76
+ mcp-publisher validate mcp/server.json && mcp-publisher publish mcp/server.json # io.github.dev-prathap/attest
77
+ mcp-publisher validate mcp/server-proxy.json && mcp-publisher publish mcp/server-proxy.json # …/attest-proxy
78
+ ```
79
+ Bump `version` in both files with each release (tests assert they match `pyproject.toml`).
80
+
81
+ **Claude Desktop / Smithery (MCPB bundle):** `npx @anthropic-ai/mcpb pack mcp/mcpb attest.mcpb` → attach the
82
+ bundle to the GitHub release (`softprops/action-gh-release` already publishes release assets; add the file) and
83
+ `smithery mcp publish ./attest.mcpb -n attestlayer/attest`.
84
+
85
+ **Glama:** `glama.json` at the repo root lists the maintainer; claim the server at glama.ai/mcp after the repo is
86
+ indexed. **Cursor / other directories:** point at the MCP Registry entry.
87
+
88
+ ## 3. Attest Cloud (API + dashboard)
89
+
90
+ **Option A — one VPS, one command** (Hetzner / DigitalOcean / Lightsail, ~$6/mo). Point `api.` and `app.`
91
+ A records at the host first, then:
92
+
93
+ ```bash
94
+ curl -fsSL https://raw.githubusercontent.com/dev-prathap/ATTEST/main/deploy/bootstrap.sh | \
95
+ ATTEST_DOMAIN=attestlayer.dev ATTEST_ACME_EMAIL=you@example.com bash
96
+ ```
97
+
98
+ It installs Docker, clones the repo to `/opt/attest`, generates secrets into `deploy/.env`, starts Postgres +
99
+ API + dashboard behind Caddy (automatic TLS), and installs cron jobs for the nightly `pg_dump` and the daily
100
+ ledger checkpoint. It then prints the `curl` that creates your first org.
101
+
102
+ Manual equivalent: `cp .env.example .env` then
103
+ `docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build`.
104
+
105
+ **Option B — Fly.io**: `cd deploy && fly launch --copy-config` (sample `fly.toml`), `fly postgres create`,
106
+ `fly secrets set DATABASE_URL=… ATTEST_CLOUD_BOOTSTRAP_TOKEN=… ATTEST_SIGNING_KEY=…`, `fly deploy`.
107
+ Dashboard: deploy `dashboard/` to Vercel (`NEXT_PUBLIC_ATTEST_CLOUD_URL=https://api.attestlayer.dev`).
108
+
109
+ **Option C — on-prem for a customer**: `deploy/on-prem/docker-compose.yml` (SQLite, no external services).
110
+
111
+ Env vars the API reads:
112
+
113
+ | var | purpose |
114
+ | --- | --- |
115
+ | `DATABASE_URL` | `postgresql+psycopg://…` (SQLite for dev) |
116
+ | `ATTEST_CLOUD_BOOTSTRAP_TOKEN` | required to create orgs and to set plans |
117
+ | `ATTEST_SIGNING_KEY` | HMAC key for checkpoints and export manifests |
118
+ | `ATTEST_CORS_ORIGINS` | dashboard origin(s) |
119
+ | `ATTEST_RATE_LIMIT` / `ATTEST_RATE_BURST` | per-key rate limit |
120
+ | `SLACK_SIGNING_SECRET` | global fallback for Slack interactivity (orgs can set their own) |
121
+ | `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`, `STRIPE_PRICE_TEAM`, `STRIPE_PRICE_PRO` | billing |
122
+ | `OIDC_ISSUER`, `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET`, `OIDC_REDIRECT_URI`, `ATTEST_SESSION_SECRET`, `ATTEST_DASHBOARD_URL` | SSO |
123
+ | `SENTRY_DSN` | error tracking (optional) |
124
+
125
+ **First org**:
126
+ ```bash
127
+ curl -X POST https://api.attestlayer.dev/v1/orgs -H "X-Bootstrap-Token: $ATTEST_CLOUD_BOOTSTRAP_TOKEN" \
128
+ -H "Content-Type: application/json" -d '{"name": "Acme", "domain": "acme.com"}' # → admin api_key (shown once)
129
+ ```
130
+ Open the dashboard → Settings → paste the key → create an `agent` key for SDKs and `approver` keys for people
131
+ (or turn on SSO). Slack: create an app (bot scopes `chat:write`, interactivity URL `https://api.attestlayer.dev/slack/interact`),
132
+ put the bot token + signing secret + channel in org settings. Stripe: create Team / Pro prices, set the price ids,
133
+ webhook `https://api.attestlayer.dev/stripe/webhook` for `checkout.session.completed`, `customer.subscription.*`, `invoice.*`.
134
+
135
+ ## 4. Docs site
136
+
137
+ Pushes to `main` that touch `docs/site/` publish to GitHub Pages (`docs.yml`). Custom domain: add `docs.attestlayer.dev`
138
+ CNAME in Settings → Pages and set `site_url` in `mkdocs.yml`.
139
+
140
+ ## 5. Smoke test after a release
141
+
142
+ ```bash
143
+ pip install attestlayer && attest --help && attest-mcp-server < /dev/null
144
+ python -c "import attest; print(attest.__version__)"
145
+ npx -y -p attestlayer node -e "import('attestlayer').then(m => console.log(Object.keys(m).length, 'exports'))"
146
+ curl https://api.attestlayer.dev/healthz
147
+ ```
148
+
149
+ ## Checklist before v0.1.0
150
+
151
+ - [ ] PyPI trusted publisher + `pypi` environment · [ ] npm org + `NPM_TOKEN` · [ ] Pages enabled
152
+ - [ ] domain registered; `api.` / `app.` / `docs.` DNS
153
+ - [ ] cloud host chosen; `.env` filled; TLS in front; backups cron; checkpoint + anchor cron
154
+ - [ ] Slack app created; Stripe prices; (optional) OIDC app; Sentry DSN
155
+ - [ ] `git tag v0.1.0 && git push --tags`, then the smoke test above
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Prathap
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.5
2
+ Name: attestlayer
3
+ Version: 0.1.0
4
+ Summary: Attest — proof layer for AI agents: decide, gate, verify, attest.
5
+ Project-URL: Homepage, https://github.com/dev-prathap/ATTEST
6
+ Project-URL: Documentation, https://dev-prathap.github.io/ATTEST/
7
+ Project-URL: Repository, https://github.com/dev-prathap/ATTEST
8
+ Author: Prathap
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai-agents,audit,human-in-the-loop,langgraph,mcp,verification
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Security
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: pydantic>=2.7
18
+ Requires-Dist: pyyaml>=6.0
19
+ Provides-Extra: dev
20
+ Requires-Dist: langchain-core>=0.3; extra == 'dev'
21
+ Requires-Dist: langchain>=1.0; extra == 'dev'
22
+ Requires-Dist: langgraph>=0.2; extra == 'dev'
23
+ Requires-Dist: openai-agents>=0.1; extra == 'dev'
24
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
25
+ Requires-Dist: pytest>=8; extra == 'dev'
26
+ Requires-Dist: ruff>=0.5; extra == 'dev'
27
+ Provides-Extra: langgraph
28
+ Requires-Dist: langchain-core>=0.3; extra == 'langgraph'
29
+ Requires-Dist: langgraph>=0.2; extra == 'langgraph'
30
+ Provides-Extra: openai
31
+ Requires-Dist: openai-agents>=0.1; extra == 'openai'
32
+ Provides-Extra: signing
33
+ Requires-Dist: cryptography>=42; extra == 'signing'
34
+ Provides-Extra: slack
35
+ Requires-Dist: slack-bolt>=1.18; extra == 'slack'
36
+ Requires-Dist: slack-sdk>=3.20; extra == 'slack'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Attest — Proof layer for AI agents
40
+
41
+ [![ci](https://github.com/dev-prathap/ATTEST/actions/workflows/ci.yml/badge.svg)](https://github.com/dev-prathap/ATTEST/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/attestlayer?label=npm%20attestlayer)](https://www.npmjs.com/package/attestlayer) [![docs](https://img.shields.io/badge/docs-dev--prathap.github.io%2FATTEST-black)](https://dev-prathap.github.io/ATTEST/) [![license](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
42
+
43
+ > **Decide → Gate → Verify → Attest.**
44
+ > When an AI agent takes an action in the real world, Attest decides whether it may, gates it behind a human when it matters, verifies from the system of record that it actually happened, and records tamper-evident evidence.
45
+
46
+ Attest is **not** an agent framework, not a connector platform, not a guardrail filter. It is the layer that lets a team say, with proof: *"this agent did exactly this, as this person, and it worked."*
47
+
48
+ ## Read in this order
49
+
50
+ | Doc | What it locks |
51
+ | --- | --- |
52
+ | [01 — Vision](./docs/01-vision.md) | What Attest is, what it is not, the thesis |
53
+ | [02 — Product](./docs/02-product.md) | The four steps, surfaces, what a customer experiences |
54
+ | [03 — Universal adapter](./docs/03-universal-adapter.md) | **All apps, all actions**: descriptor, entry points, verification ladder, auth, confirm, policy |
55
+ | [04 — Architecture](./docs/04-architecture.md) | SDK + Cloud, stack, data model, ledger |
56
+ | [05 — Market & positioning](./docs/05-market-positioning.md) | Why now, competitors, first vertical, go-to-market |
57
+ | [06 — Build plan](./docs/06-build-plan.md) | Phases, weekly plan, what we reuse, what we do not build |
58
+ | [07 — Decisions](./docs/07-decisions.md) | Locked decisions and open questions |
59
+ | [08 — Phase plan](./docs/08-phase-plan.md) | Detailed phase-wise split: task IDs, deliverables, exit criteria, milestones, founder checklist |
60
+
61
+ ## Quickstart
62
+
63
+ Brand **Attest** · PyPI `attestlayer` · npm `attestlayer` · deploy runbook in [DEPLOY.md](./DEPLOY.md).
64
+
65
+ **TypeScript** — on npm today:
66
+
67
+ ```bash
68
+ npm install attestlayer
69
+ ```
70
+
71
+ ```ts
72
+ import { Attest } from "attestlayer";
73
+
74
+ const at = new Attest({ agent: "followup-agent@v3", readers: { gmail: process.env.GMAIL_TOKEN! } });
75
+ const sendEmail = at.wrap({ system: "gmail", verb: "send", target: "to" },
76
+ async ({ to, subject, body }) => gmail.send({ to, subject, body }));
77
+
78
+ await sendEmail({ to: "arun@newco.com", subject: "Proposal", body: "…" });
79
+ ```
80
+
81
+ **Python** — same contract, same ledger format:
82
+
83
+ ```bash
84
+ pip install attestlayer # publishing pending; today: pip install -e ".[dev]"
85
+ ```
86
+
87
+ ```python
88
+ import attest
89
+
90
+ @attest.action(system="gmail", verb="send", target="to")
91
+ def send_email(to, subject, body): ...
92
+ ```
93
+
94
+ The first external send pauses for a human; the ledger row says `acknowledged`, or `verified` once Attest can
95
+ read back with the agent's own credentials (`Attest(readers={"gmail": service})`). `attest ledger` · `attest verify`.
96
+ Full docs: `mkdocs serve` → [docs/site](./docs/site/quickstart.md).
97
+
98
+ ## Repository
99
+
100
+ | path | what |
101
+ | --- | --- |
102
+ | [attest/](./attest/) | Python SDK — descriptor, registry, policy, hash-chained ledger, verification ladder + recipes, gates (console / Slack / webhook / inbox / LangGraph interrupt / pending + resume), adapters (LangGraph, OpenAI Agents), MCP proxy, CLI, cloud client. [attest/README.md](./attest/README.md) |
103
+ | [cloud/](./cloud/) | Attest Cloud v0 — FastAPI + Postgres: orgs, keys, agents, versioned policy, per-org hash-chained ledger, confirm inbox with Slack / webhook, exports |
104
+ | [dashboard/](./dashboard/) | Next.js dashboard — ledger drill-down, confirm inbox, policy / keys / settings |
105
+ | [examples/](./examples/) | unknown app (L1 → L3), LangGraph agent (two `verified` rows), OpenAI Agents, MCP config, API-only, cloud |
106
+ | [docs/site/](./docs/site/) | documentation site (mkdocs) · [docs/](./docs/) — product docs 01–08 · [docs/notes](./docs/notes/do-extraction.md) — DO / DeerFlow extraction |
107
+ | [deploy/](./deploy/) | Dockerfiles + compose (Postgres, API :8400, dashboard :3400) |
108
+ | [launch/](./launch/) | Show HN, blog drafts, LangChain integration PR draft |
109
+ | [DEPLOY.md](./DEPLOY.md) · [CHANGELOG.md](./CHANGELOG.md) | release (`git tag vX.Y.Z` → PyPI, npm, GHCR, Pages) and hosting runbook |
110
+
111
+ ```bash
112
+ pytest -q && (cd cloud && pytest -q) # 273 + 21 tests
113
+ ATTEST_AUTO_APPROVE=1 python examples/langgraph_agent.py
114
+ cd deploy && cp .env.example .env && docker compose up # cloud + dashboard
115
+ ```
116
+
117
+ ## One-line rules
118
+ - We never execute the customer's action. Their tool executes; we observe, decide, gate, verify, record.
119
+ - Coverage is universal (any app, any action, any framework, any language). Verification depth is layered and honest.
120
+ - Open-source SDK (MIT). Paid cloud (ledger, confirm inbox, policies, exports).
121
+ - Developer-led, self-serve, USD. No enterprise sales motion in year one.
122
+
123
+ ## Install from registries
124
+
125
+ | where | how |
126
+ | --- | --- |
127
+ | PyPI *(publishing pending)* | `pip install attestlayer` → `attest`, `attest-mcp`, `attest-mcp-server`, `attest-gateway`, `attestlayer` |
128
+ | MCP Registry | `io.github.dev-prathap/attest` (verify server) · `io.github.dev-prathap/attest-proxy` (zero-code proxy) — `uvx attestlayer` |
129
+ | Claude Desktop / Smithery | MCPB bundle from `mcp/mcpb` (`mcpb pack mcp/mcpb`) |
130
+ | npm | `npm install attestlayer` — **live** |
131
+ | Docker | `ghcr.io/dev-prathap/attest-api`, `ghcr.io/dev-prathap/attest-dashboard` |
132
+
133
+ <!-- mcp-name: io.github.dev-prathap/attest -->
134
+ <!-- mcp-name: io.github.dev-prathap/attest-proxy -->
135
+
136
+ ## Lineage
137
+ Attest is extracted from two working codebases: **DO** (policy engine, read-back verification pairs, evidence ledger, Nango auth) and **DeerFlow** (tool receipts, verification patterns, MCP/IM channel adapters). Nothing here is theoretical — every core mechanism already runs against real Gmail, Slack, HubSpot, Notion, Linear and Google Workspace.
@@ -0,0 +1,99 @@
1
+ # Attest — Proof layer for AI agents
2
+
3
+ [![ci](https://github.com/dev-prathap/ATTEST/actions/workflows/ci.yml/badge.svg)](https://github.com/dev-prathap/ATTEST/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/attestlayer?label=npm%20attestlayer)](https://www.npmjs.com/package/attestlayer) [![docs](https://img.shields.io/badge/docs-dev--prathap.github.io%2FATTEST-black)](https://dev-prathap.github.io/ATTEST/) [![license](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
4
+
5
+ > **Decide → Gate → Verify → Attest.**
6
+ > When an AI agent takes an action in the real world, Attest decides whether it may, gates it behind a human when it matters, verifies from the system of record that it actually happened, and records tamper-evident evidence.
7
+
8
+ Attest is **not** an agent framework, not a connector platform, not a guardrail filter. It is the layer that lets a team say, with proof: *"this agent did exactly this, as this person, and it worked."*
9
+
10
+ ## Read in this order
11
+
12
+ | Doc | What it locks |
13
+ | --- | --- |
14
+ | [01 — Vision](./docs/01-vision.md) | What Attest is, what it is not, the thesis |
15
+ | [02 — Product](./docs/02-product.md) | The four steps, surfaces, what a customer experiences |
16
+ | [03 — Universal adapter](./docs/03-universal-adapter.md) | **All apps, all actions**: descriptor, entry points, verification ladder, auth, confirm, policy |
17
+ | [04 — Architecture](./docs/04-architecture.md) | SDK + Cloud, stack, data model, ledger |
18
+ | [05 — Market & positioning](./docs/05-market-positioning.md) | Why now, competitors, first vertical, go-to-market |
19
+ | [06 — Build plan](./docs/06-build-plan.md) | Phases, weekly plan, what we reuse, what we do not build |
20
+ | [07 — Decisions](./docs/07-decisions.md) | Locked decisions and open questions |
21
+ | [08 — Phase plan](./docs/08-phase-plan.md) | Detailed phase-wise split: task IDs, deliverables, exit criteria, milestones, founder checklist |
22
+
23
+ ## Quickstart
24
+
25
+ Brand **Attest** · PyPI `attestlayer` · npm `attestlayer` · deploy runbook in [DEPLOY.md](./DEPLOY.md).
26
+
27
+ **TypeScript** — on npm today:
28
+
29
+ ```bash
30
+ npm install attestlayer
31
+ ```
32
+
33
+ ```ts
34
+ import { Attest } from "attestlayer";
35
+
36
+ const at = new Attest({ agent: "followup-agent@v3", readers: { gmail: process.env.GMAIL_TOKEN! } });
37
+ const sendEmail = at.wrap({ system: "gmail", verb: "send", target: "to" },
38
+ async ({ to, subject, body }) => gmail.send({ to, subject, body }));
39
+
40
+ await sendEmail({ to: "arun@newco.com", subject: "Proposal", body: "…" });
41
+ ```
42
+
43
+ **Python** — same contract, same ledger format:
44
+
45
+ ```bash
46
+ pip install attestlayer # publishing pending; today: pip install -e ".[dev]"
47
+ ```
48
+
49
+ ```python
50
+ import attest
51
+
52
+ @attest.action(system="gmail", verb="send", target="to")
53
+ def send_email(to, subject, body): ...
54
+ ```
55
+
56
+ The first external send pauses for a human; the ledger row says `acknowledged`, or `verified` once Attest can
57
+ read back with the agent's own credentials (`Attest(readers={"gmail": service})`). `attest ledger` · `attest verify`.
58
+ Full docs: `mkdocs serve` → [docs/site](./docs/site/quickstart.md).
59
+
60
+ ## Repository
61
+
62
+ | path | what |
63
+ | --- | --- |
64
+ | [attest/](./attest/) | Python SDK — descriptor, registry, policy, hash-chained ledger, verification ladder + recipes, gates (console / Slack / webhook / inbox / LangGraph interrupt / pending + resume), adapters (LangGraph, OpenAI Agents), MCP proxy, CLI, cloud client. [attest/README.md](./attest/README.md) |
65
+ | [cloud/](./cloud/) | Attest Cloud v0 — FastAPI + Postgres: orgs, keys, agents, versioned policy, per-org hash-chained ledger, confirm inbox with Slack / webhook, exports |
66
+ | [dashboard/](./dashboard/) | Next.js dashboard — ledger drill-down, confirm inbox, policy / keys / settings |
67
+ | [examples/](./examples/) | unknown app (L1 → L3), LangGraph agent (two `verified` rows), OpenAI Agents, MCP config, API-only, cloud |
68
+ | [docs/site/](./docs/site/) | documentation site (mkdocs) · [docs/](./docs/) — product docs 01–08 · [docs/notes](./docs/notes/do-extraction.md) — DO / DeerFlow extraction |
69
+ | [deploy/](./deploy/) | Dockerfiles + compose (Postgres, API :8400, dashboard :3400) |
70
+ | [launch/](./launch/) | Show HN, blog drafts, LangChain integration PR draft |
71
+ | [DEPLOY.md](./DEPLOY.md) · [CHANGELOG.md](./CHANGELOG.md) | release (`git tag vX.Y.Z` → PyPI, npm, GHCR, Pages) and hosting runbook |
72
+
73
+ ```bash
74
+ pytest -q && (cd cloud && pytest -q) # 273 + 21 tests
75
+ ATTEST_AUTO_APPROVE=1 python examples/langgraph_agent.py
76
+ cd deploy && cp .env.example .env && docker compose up # cloud + dashboard
77
+ ```
78
+
79
+ ## One-line rules
80
+ - We never execute the customer's action. Their tool executes; we observe, decide, gate, verify, record.
81
+ - Coverage is universal (any app, any action, any framework, any language). Verification depth is layered and honest.
82
+ - Open-source SDK (MIT). Paid cloud (ledger, confirm inbox, policies, exports).
83
+ - Developer-led, self-serve, USD. No enterprise sales motion in year one.
84
+
85
+ ## Install from registries
86
+
87
+ | where | how |
88
+ | --- | --- |
89
+ | PyPI *(publishing pending)* | `pip install attestlayer` → `attest`, `attest-mcp`, `attest-mcp-server`, `attest-gateway`, `attestlayer` |
90
+ | MCP Registry | `io.github.dev-prathap/attest` (verify server) · `io.github.dev-prathap/attest-proxy` (zero-code proxy) — `uvx attestlayer` |
91
+ | Claude Desktop / Smithery | MCPB bundle from `mcp/mcpb` (`mcpb pack mcp/mcpb`) |
92
+ | npm | `npm install attestlayer` — **live** |
93
+ | Docker | `ghcr.io/dev-prathap/attest-api`, `ghcr.io/dev-prathap/attest-dashboard` |
94
+
95
+ <!-- mcp-name: io.github.dev-prathap/attest -->
96
+ <!-- mcp-name: io.github.dev-prathap/attest-proxy -->
97
+
98
+ ## Lineage
99
+ Attest is extracted from two working codebases: **DO** (policy engine, read-back verification pairs, evidence ledger, Nango auth) and **DeerFlow** (tool receipts, verification patterns, MCP/IM channel adapters). Nothing here is theoretical — every core mechanism already runs against real Gmail, Slack, HubSpot, Notion, Linear and Google Workspace.