darwin-agentic-cloud 3.0.3__tar.gz → 3.0.4__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.
- darwin_agentic_cloud-3.0.4/.gitleaks.toml +10 -0
- darwin_agentic_cloud-3.0.4/.pre-commit-config.yaml +5 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/CODE_OF_CONDUCT.md +1 -6
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/PKG-INFO +50 -23
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/README.md +49 -22
- darwin_agentic_cloud-3.0.4/att.json +1 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/__init__.py +1 -1
- darwin_agentic_cloud-3.0.4/darwin/agenticcloud/attestation.py +144 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/cli.py +25 -7
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/mcp_server.py +3 -3
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/server.py +11 -3
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/storage.py +1 -1
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/aws_batch.py +7 -7
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/modal.py +3 -3
- darwin_agentic_cloud-3.0.4/darwin/agenticcloud/templates/commerce.html +667 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/templates/demo.html +18 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/templates/docs.html +17 -10
- darwin_agentic_cloud-3.0.3/att.json → darwin_agentic_cloud-3.0.4/mine.json +12 -12
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/pyproject.toml +1 -1
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/uv.lock +1 -1
- darwin_agentic_cloud-3.0.3/DARWIN_AGENTIC_CLOUD_PHASE_2_PROGRESS_2of3.md +0 -273
- darwin_agentic_cloud-3.0.3/DARWIN_AGENTIC_CLOUD_PHASE_2_SPEC.md +0 -400
- darwin_agentic_cloud-3.0.3/LAUNCH_POST_v3.0.0.md +0 -96
- darwin_agentic_cloud-3.0.3/darwin/agenticcloud/attestation.py +0 -77
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/.dockerignore +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/.gitignore +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/CHANGELOG.md +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/CONTRIBUTING.md +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/Dockerfile +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/LICENSE +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/Makefile +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/QUICKSTART.md +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/SECURITY.md +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/admin_cli.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/class_keys.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/cost.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/hashing.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/router.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/runtime.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/runtime_v02.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/sandbox.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/schemas/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/schemas/attestation_v0_2.json +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/signing.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/aws_batch_event.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/aws_lambda.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/aws_lambda_event.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/aws_pricing.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/base.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/identity.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/substrate/local_docker.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/templates/demo_attestation.json +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/types.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/darwin/agenticcloud/ui.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/docker-entrypoint.sh +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/docs/AGENT_INVENTORY.md +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/examples/example_workloads/hello.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/examples/hello.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/fly.toml +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/hello.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/Dockerfile.batch-runner-python +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/Dockerfile.runner-node +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/Dockerfile.runner-python +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/batch_deploy.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/batch_runner.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/deploy.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/runner.mjs +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/aws_runner/runner.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/bake_demo_attestation.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/batch_smoketest.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/infra/modal_smoketest.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/cli/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/cli/test_run.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/fixtures/ec2_ondemand_m5xlarge.json +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/fixtures/ec2_spot_history_m5xlarge.json +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/runtime/__init__.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/runtime/test_router.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/runtime/test_runtime_v02.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_aws_batch.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_aws_lambda.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_aws_pricing.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_base.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_identity.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_local_docker.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/substrate/test_modal.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_admin_cli.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_attestation.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_class_keys.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_cost.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_server_signing.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_smoke.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_storage.py +0 -0
- {darwin_agentic_cloud-3.0.3 → darwin_agentic_cloud-3.0.4}/tests/test_ui.py +0 -0
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## What that means in practice
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
- No harassment, no discrimination, no personal attacks. Ever.
|
|
11
|
-
- Assume good faith. Give people the benefit of the doubt.
|
|
12
|
-
- Don't waste people's time. Read before asking, search before opening an issue.
|
|
13
|
-
- Credit others' work. Don't claim what isn't yours.
|
|
14
|
-
- Don't use this project to harm people. That includes building surveillance tools targeting individuals, weapons of mass harm, or systems designed to deceive at scale.
|
|
9
|
+
- All actions must increase AI adoption by increasing AI safety.
|
|
15
10
|
|
|
16
11
|
## Scope
|
|
17
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: darwin-agentic-cloud
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: Darwin — adaptive software systems. Includes darwin.agenticcloud, the verifiable agentic cloud. Open-source compute for AI agents with cryptographically signed attestations.
|
|
5
5
|
Project-URL: Homepage, https://github.com/vje013/darwin-agentic-cloud
|
|
6
6
|
Project-URL: Repository, https://github.com/vje013/darwin-agentic-cloud
|
|
@@ -275,7 +275,21 @@ Description-Content-Type: text/markdown
|
|
|
275
275
|
[](https://www.python.org/downloads/)
|
|
276
276
|
[](https://darwin-agentic-cloud.fly.dev/.well-known/schemas/attestation/v0.2)
|
|
277
277
|
|
|
278
|
-
> **Verifiable compute for AI agents.**
|
|
278
|
+
> **Verifiable and free cloud compute for AI agents.**
|
|
279
|
+
>
|
|
280
|
+
> We provide an agent-first environment where every autonomous action and choice is bound and signed, including what they buy.
|
|
281
|
+
>
|
|
282
|
+
> Your agent acts only where it can provably succeed, spends only what you authorized, and brings back a signed receipt for every step it took.
|
|
283
|
+
>
|
|
284
|
+
> No new accounts. No new API keys.
|
|
285
|
+
>
|
|
286
|
+
> Just sign in with Gmail. Your card stays in your Google account.
|
|
287
|
+
>
|
|
288
|
+
> Open source. Free to users. All agent and human contributors welcome.
|
|
289
|
+
>
|
|
290
|
+
> Built on: webMCP + AP2
|
|
291
|
+
>
|
|
292
|
+
> Sandboxed Beta + Research: 6/1/2026
|
|
279
293
|
|
|
280
294
|
**Install:** `pip install darwin-agentic-cloud`
|
|
281
295
|
|
|
@@ -292,6 +306,27 @@ Increase AI adoption by increasing AI safety.
|
|
|
292
306
|
|
|
293
307
|
---
|
|
294
308
|
|
|
309
|
+
## Darwin's Promises (Beginning 6/1/2026)
|
|
310
|
+
|
|
311
|
+
Darwin Agentic Cloud keeps businesses in control of their agent spend by providing deterministic execution + signed receipts over every automated purchase.
|
|
312
|
+
|
|
313
|
+
Simply put, DAC dramatically increases the chances of your business’s agent giving you the purchase outcome you want.
|
|
314
|
+
|
|
315
|
+
If you want your business’s agent booking your travel, buying your office supplies, making any business purchase at all, we make sure it actually happens.
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
- DAC is free. You never pay us. Ever.
|
|
319
|
+
- All DAC needs is your Google account.
|
|
320
|
+
- You never give DAC your card.
|
|
321
|
+
- You stay in control. Your AI can never act or spend beyond what you authorized.
|
|
322
|
+
- We guarantee deterministic execution surfaces for your AI's actions.
|
|
323
|
+
- Your AI only acts where it can succeed.
|
|
324
|
+
- We provide receipts for your AI's actions.
|
|
325
|
+
- We earn from merchants, not from you.
|
|
326
|
+
- If a site is not agent-ready, we do not send your agent there.
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
295
330
|
## The question agents can't answer today
|
|
296
331
|
|
|
297
332
|
Your agent just executed code on its own. You don't see what happened. You can't replay it. You can't prove it ran. You can't show a regulator, an auditor, or another agent that the workload actually executed on real hardware under your policy at the cost you agreed to.
|
|
@@ -389,7 +424,7 @@ Every `darwin.run()` call returns a v0.2 attestation. The CLI renders it as an e
|
|
|
389
424
|
| `issued_at` | When the execution happened |
|
|
390
425
|
| `workload` (sha256) | Exactly what code/spec was executed |
|
|
391
426
|
| `output` (sha256) | Exactly what stdout was produced |
|
|
392
|
-
| `cost` | Real wall-time cost
|
|
427
|
+
| `cost` | Real wall-time cost (what you'd pay on a non-Darwin cloud) |
|
|
393
428
|
| `substrate` + `version` | Which substrate ran the workload |
|
|
394
429
|
| `evidence` | Substrate-specific receipt (container status, exit code, hashes, wall time) |
|
|
395
430
|
| `sub-signer` (class key) | Substrate identity signature, anchored to the public Darwin keylist |
|
|
@@ -422,10 +457,8 @@ uv pip install -e .
|
|
|
422
457
|
|
|
423
458
|
- **Python 3.11+**
|
|
424
459
|
- **Docker** for local execution (any recent Docker Desktop / Engine works)
|
|
425
|
-
- **AWS credentials** in env for AWS Batch / Lambda substrates (optional)
|
|
426
|
-
- **Modal token** in env for the Modal substrate (optional)
|
|
427
460
|
|
|
428
|
-
If only Docker is available, you get `local-docker-v0`.
|
|
461
|
+
If only Docker is available, you get `local-docker-v0`. For web based cloud compute, you also get the four Lambda regions and AWS Batch. Auto-discovery happens at every `darwin.run()` call.
|
|
429
462
|
|
|
430
463
|
---
|
|
431
464
|
|
|
@@ -461,7 +494,7 @@ Fetches the keylist, looks up the substrate identity key, verifies the signature
|
|
|
461
494
|
|
|
462
495
|
### `darwin price`
|
|
463
496
|
|
|
464
|
-
Preflight only — see what each
|
|
497
|
+
Preflight only — see what each run environment would cost on a non-Darwin cloud.
|
|
465
498
|
|
|
466
499
|
```bash
|
|
467
500
|
darwin price 'print("hi")'
|
|
@@ -470,7 +503,7 @@ darwin price hello.py --substrate aws-batch
|
|
|
470
503
|
darwin price hello.py --json
|
|
471
504
|
```
|
|
472
505
|
|
|
473
|
-
Returns a table sorted by estimated cost. Useful for deciding which substrate to run a
|
|
506
|
+
Returns a table sorted by estimated cost. Useful for deciding which substrate to run a workload on later if you choose a non-Darwin cloud.
|
|
474
507
|
|
|
475
508
|
### `darwin list`
|
|
476
509
|
|
|
@@ -481,7 +514,7 @@ darwin list
|
|
|
481
514
|
darwin list --json
|
|
482
515
|
```
|
|
483
516
|
|
|
484
|
-
Auto-discovery checks
|
|
517
|
+
Auto-discovery checks environment variables and daemon availability. Substrates that fail any check are omitted with a reason.
|
|
485
518
|
|
|
486
519
|
### `darwin sign`
|
|
487
520
|
|
|
@@ -613,7 +646,7 @@ Or manually add to your `claude_desktop_config.json`:
|
|
|
613
646
|
|---|---|
|
|
614
647
|
| `darwin_run` | Execute workload, return signed v0.2 attestation |
|
|
615
648
|
| `darwin_verify` | Verify attestation against keylist |
|
|
616
|
-
| `darwin_price` | Get cost quote per available substrate |
|
|
649
|
+
| `darwin_price` | Get cost quote per available substrate (what this would've cost you on a non-Darwin cloud) |
|
|
617
650
|
| `darwin_list` | List discovered substrates |
|
|
618
651
|
| `darwin_who` | Show whose keys signed an attestation |
|
|
619
652
|
| `darwin_history` | Recent attestations from local storage |
|
|
@@ -675,7 +708,7 @@ Each substrate publishes its own evidence schema. The schema URI is embedded in
|
|
|
675
708
|
|
|
676
709
|
### The Value-Added Service (VAS) block
|
|
677
710
|
|
|
678
|
-
The VAS block is Darwin's
|
|
711
|
+
The VAS block is Darwin's economic claim — three concrete services Darwin's signing layer provides on top of the wholesale substrate execution:
|
|
679
712
|
|
|
680
713
|
```json
|
|
681
714
|
"value_added_service": {
|
|
@@ -705,13 +738,11 @@ Three claims, all auditable from the attestation alone:
|
|
|
705
738
|
2. **Cost cap enforcement.** Pre-execution estimate, actual cost, headroom, within-cap flag.
|
|
706
739
|
3. **Routing decision.** What policy was used, which substrate was picked, what was rejected and why.
|
|
707
740
|
|
|
708
|
-
---
|
|
741
|
+
---
|
|
709
742
|
|
|
710
|
-
##
|
|
743
|
+
## Darwin is **open.**
|
|
711
744
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
**What's open (forever, free, Apache 2.0):**
|
|
745
|
+
**What's open (free, Apache 2.0):**
|
|
715
746
|
- The attestation schema
|
|
716
747
|
- The substrate interface
|
|
717
748
|
- The local-docker substrate
|
|
@@ -720,14 +751,10 @@ Darwin is **open verification, paid signing.**
|
|
|
720
751
|
- The schema endpoint
|
|
721
752
|
- The cert renderer
|
|
722
753
|
- All client code
|
|
723
|
-
|
|
724
|
-
**What's commercial:**
|
|
725
754
|
- The hosted signing service (substrate class keys)
|
|
726
755
|
- The routing layer for cloud substrates (AWS Batch, Lambda, Modal)
|
|
727
|
-
- Enterprise SLAs on the keylist
|
|
728
|
-
- Compliance attestations (SOC 2, FedRAMP, ISO 27001)
|
|
729
756
|
|
|
730
|
-
You can self-host Darwin entirely — every byte of the verification path is open source.
|
|
757
|
+
You can self-host Darwin entirely — every byte of the verification path is open source.
|
|
731
758
|
|
|
732
759
|
---
|
|
733
760
|
|
|
@@ -865,7 +892,7 @@ total = att1['execution_result']['cost_usd'] + att2['execution_result']['cost_us
|
|
|
865
892
|
print(f"Total cost: ${total:.4f}")
|
|
866
893
|
```
|
|
867
894
|
|
|
868
|
-
### Batch processing with cost guard
|
|
895
|
+
### Batch processing with cost guard (we guarantee your agent NEVER crosses your budget threshold)
|
|
869
896
|
|
|
870
897
|
```python
|
|
871
898
|
from darwin import run, CostCapExceeded
|
|
@@ -1049,7 +1076,7 @@ If you use Darwin in research, please cite:
|
|
|
1049
1076
|
|
|
1050
1077
|
Apache 2.0. See [LICENSE](LICENSE).
|
|
1051
1078
|
|
|
1052
|
-
The
|
|
1079
|
+
The hosted signing service and routing layer are free to all users today; Darwin Adaptive Systems reserves the right to offer paid enterprise tiers in future.
|
|
1053
1080
|
|
|
1054
1081
|
---
|
|
1055
1082
|
|
|
@@ -6,7 +6,21 @@
|
|
|
6
6
|
[](https://www.python.org/downloads/)
|
|
7
7
|
[](https://darwin-agentic-cloud.fly.dev/.well-known/schemas/attestation/v0.2)
|
|
8
8
|
|
|
9
|
-
> **Verifiable compute for AI agents.**
|
|
9
|
+
> **Verifiable and free cloud compute for AI agents.**
|
|
10
|
+
>
|
|
11
|
+
> We provide an agent-first environment where every autonomous action and choice is bound and signed, including what they buy.
|
|
12
|
+
>
|
|
13
|
+
> Your agent acts only where it can provably succeed, spends only what you authorized, and brings back a signed receipt for every step it took.
|
|
14
|
+
>
|
|
15
|
+
> No new accounts. No new API keys.
|
|
16
|
+
>
|
|
17
|
+
> Just sign in with Gmail. Your card stays in your Google account.
|
|
18
|
+
>
|
|
19
|
+
> Open source. Free to users. All agent and human contributors welcome.
|
|
20
|
+
>
|
|
21
|
+
> Built on: webMCP + AP2
|
|
22
|
+
>
|
|
23
|
+
> Sandboxed Beta + Research: 6/1/2026
|
|
10
24
|
|
|
11
25
|
**Install:** `pip install darwin-agentic-cloud`
|
|
12
26
|
|
|
@@ -23,6 +37,27 @@ Increase AI adoption by increasing AI safety.
|
|
|
23
37
|
|
|
24
38
|
---
|
|
25
39
|
|
|
40
|
+
## Darwin's Promises (Beginning 6/1/2026)
|
|
41
|
+
|
|
42
|
+
Darwin Agentic Cloud keeps businesses in control of their agent spend by providing deterministic execution + signed receipts over every automated purchase.
|
|
43
|
+
|
|
44
|
+
Simply put, DAC dramatically increases the chances of your business’s agent giving you the purchase outcome you want.
|
|
45
|
+
|
|
46
|
+
If you want your business’s agent booking your travel, buying your office supplies, making any business purchase at all, we make sure it actually happens.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
- DAC is free. You never pay us. Ever.
|
|
50
|
+
- All DAC needs is your Google account.
|
|
51
|
+
- You never give DAC your card.
|
|
52
|
+
- You stay in control. Your AI can never act or spend beyond what you authorized.
|
|
53
|
+
- We guarantee deterministic execution surfaces for your AI's actions.
|
|
54
|
+
- Your AI only acts where it can succeed.
|
|
55
|
+
- We provide receipts for your AI's actions.
|
|
56
|
+
- We earn from merchants, not from you.
|
|
57
|
+
- If a site is not agent-ready, we do not send your agent there.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
26
61
|
## The question agents can't answer today
|
|
27
62
|
|
|
28
63
|
Your agent just executed code on its own. You don't see what happened. You can't replay it. You can't prove it ran. You can't show a regulator, an auditor, or another agent that the workload actually executed on real hardware under your policy at the cost you agreed to.
|
|
@@ -120,7 +155,7 @@ Every `darwin.run()` call returns a v0.2 attestation. The CLI renders it as an e
|
|
|
120
155
|
| `issued_at` | When the execution happened |
|
|
121
156
|
| `workload` (sha256) | Exactly what code/spec was executed |
|
|
122
157
|
| `output` (sha256) | Exactly what stdout was produced |
|
|
123
|
-
| `cost` | Real wall-time cost
|
|
158
|
+
| `cost` | Real wall-time cost (what you'd pay on a non-Darwin cloud) |
|
|
124
159
|
| `substrate` + `version` | Which substrate ran the workload |
|
|
125
160
|
| `evidence` | Substrate-specific receipt (container status, exit code, hashes, wall time) |
|
|
126
161
|
| `sub-signer` (class key) | Substrate identity signature, anchored to the public Darwin keylist |
|
|
@@ -153,10 +188,8 @@ uv pip install -e .
|
|
|
153
188
|
|
|
154
189
|
- **Python 3.11+**
|
|
155
190
|
- **Docker** for local execution (any recent Docker Desktop / Engine works)
|
|
156
|
-
- **AWS credentials** in env for AWS Batch / Lambda substrates (optional)
|
|
157
|
-
- **Modal token** in env for the Modal substrate (optional)
|
|
158
191
|
|
|
159
|
-
If only Docker is available, you get `local-docker-v0`.
|
|
192
|
+
If only Docker is available, you get `local-docker-v0`. For web based cloud compute, you also get the four Lambda regions and AWS Batch. Auto-discovery happens at every `darwin.run()` call.
|
|
160
193
|
|
|
161
194
|
---
|
|
162
195
|
|
|
@@ -192,7 +225,7 @@ Fetches the keylist, looks up the substrate identity key, verifies the signature
|
|
|
192
225
|
|
|
193
226
|
### `darwin price`
|
|
194
227
|
|
|
195
|
-
Preflight only — see what each
|
|
228
|
+
Preflight only — see what each run environment would cost on a non-Darwin cloud.
|
|
196
229
|
|
|
197
230
|
```bash
|
|
198
231
|
darwin price 'print("hi")'
|
|
@@ -201,7 +234,7 @@ darwin price hello.py --substrate aws-batch
|
|
|
201
234
|
darwin price hello.py --json
|
|
202
235
|
```
|
|
203
236
|
|
|
204
|
-
Returns a table sorted by estimated cost. Useful for deciding which substrate to run a
|
|
237
|
+
Returns a table sorted by estimated cost. Useful for deciding which substrate to run a workload on later if you choose a non-Darwin cloud.
|
|
205
238
|
|
|
206
239
|
### `darwin list`
|
|
207
240
|
|
|
@@ -212,7 +245,7 @@ darwin list
|
|
|
212
245
|
darwin list --json
|
|
213
246
|
```
|
|
214
247
|
|
|
215
|
-
Auto-discovery checks
|
|
248
|
+
Auto-discovery checks environment variables and daemon availability. Substrates that fail any check are omitted with a reason.
|
|
216
249
|
|
|
217
250
|
### `darwin sign`
|
|
218
251
|
|
|
@@ -344,7 +377,7 @@ Or manually add to your `claude_desktop_config.json`:
|
|
|
344
377
|
|---|---|
|
|
345
378
|
| `darwin_run` | Execute workload, return signed v0.2 attestation |
|
|
346
379
|
| `darwin_verify` | Verify attestation against keylist |
|
|
347
|
-
| `darwin_price` | Get cost quote per available substrate |
|
|
380
|
+
| `darwin_price` | Get cost quote per available substrate (what this would've cost you on a non-Darwin cloud) |
|
|
348
381
|
| `darwin_list` | List discovered substrates |
|
|
349
382
|
| `darwin_who` | Show whose keys signed an attestation |
|
|
350
383
|
| `darwin_history` | Recent attestations from local storage |
|
|
@@ -406,7 +439,7 @@ Each substrate publishes its own evidence schema. The schema URI is embedded in
|
|
|
406
439
|
|
|
407
440
|
### The Value-Added Service (VAS) block
|
|
408
441
|
|
|
409
|
-
The VAS block is Darwin's
|
|
442
|
+
The VAS block is Darwin's economic claim — three concrete services Darwin's signing layer provides on top of the wholesale substrate execution:
|
|
410
443
|
|
|
411
444
|
```json
|
|
412
445
|
"value_added_service": {
|
|
@@ -436,13 +469,11 @@ Three claims, all auditable from the attestation alone:
|
|
|
436
469
|
2. **Cost cap enforcement.** Pre-execution estimate, actual cost, headroom, within-cap flag.
|
|
437
470
|
3. **Routing decision.** What policy was used, which substrate was picked, what was rejected and why.
|
|
438
471
|
|
|
439
|
-
---
|
|
472
|
+
---
|
|
440
473
|
|
|
441
|
-
##
|
|
474
|
+
## Darwin is **open.**
|
|
442
475
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
**What's open (forever, free, Apache 2.0):**
|
|
476
|
+
**What's open (free, Apache 2.0):**
|
|
446
477
|
- The attestation schema
|
|
447
478
|
- The substrate interface
|
|
448
479
|
- The local-docker substrate
|
|
@@ -451,14 +482,10 @@ Darwin is **open verification, paid signing.**
|
|
|
451
482
|
- The schema endpoint
|
|
452
483
|
- The cert renderer
|
|
453
484
|
- All client code
|
|
454
|
-
|
|
455
|
-
**What's commercial:**
|
|
456
485
|
- The hosted signing service (substrate class keys)
|
|
457
486
|
- The routing layer for cloud substrates (AWS Batch, Lambda, Modal)
|
|
458
|
-
- Enterprise SLAs on the keylist
|
|
459
|
-
- Compliance attestations (SOC 2, FedRAMP, ISO 27001)
|
|
460
487
|
|
|
461
|
-
You can self-host Darwin entirely — every byte of the verification path is open source.
|
|
488
|
+
You can self-host Darwin entirely — every byte of the verification path is open source.
|
|
462
489
|
|
|
463
490
|
---
|
|
464
491
|
|
|
@@ -596,7 +623,7 @@ total = att1['execution_result']['cost_usd'] + att2['execution_result']['cost_us
|
|
|
596
623
|
print(f"Total cost: ${total:.4f}")
|
|
597
624
|
```
|
|
598
625
|
|
|
599
|
-
### Batch processing with cost guard
|
|
626
|
+
### Batch processing with cost guard (we guarantee your agent NEVER crosses your budget threshold)
|
|
600
627
|
|
|
601
628
|
```python
|
|
602
629
|
from darwin import run, CostCapExceeded
|
|
@@ -780,7 +807,7 @@ If you use Darwin in research, please cite:
|
|
|
780
807
|
|
|
781
808
|
Apache 2.0. See [LICENSE](LICENSE).
|
|
782
809
|
|
|
783
|
-
The
|
|
810
|
+
The hosted signing service and routing layer are free to all users today; Darwin Adaptive Systems reserves the right to offer paid enterprise tiers in future.
|
|
784
811
|
|
|
785
812
|
---
|
|
786
813
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"attestation_id":"att_ce01c3ba2a784505","schema":"darwin.cloud/agenticcloud/attestation/v0.2","issued_at":"2026-05-27T09:46:24Z","workload_spec_hash":"66af27007bdef0c4f5d7756ffd68919e6b9fae30f685ac38b80d88b68d2e45ee","execution_result":{"output_hash":"87a6e77e106d0aed7e2b52fd7108cee1cb8d7429dad7495e3e67d43dc40ab0a5","substrate":{"id":"local-docker-v0","version":"0.1.0","identity_signature":"KDtItT8vYsh3yJVuk2GXAqa/ksO6pQljggN86nSHs5gjNYmM8XWgcyumTBSFTQxWiIlvQ1xyqRPFyzVFSoM0Aw==","identity_signer_type":"darwin-class-key","identity_signer_key_id":"dac-class-local-docker-v0-ca698355dcb631e3","evidence_schema_id":"darwin.cloud/evidence/local-docker/v1","evidence":{"container_status":"ok","exit_code":0,"stdout_hash":"87a6e77e106d0aed7e2b52fd7108cee1cb8d7429dad7495e3e67d43dc40ab0a5","stderr_hash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","wall_time_sec":0.18253803253173828},"extensions":{},"tee_required":false},"cost_usd":0.00001825,"stdout":"Hello, agent. This receipt was produced by darwin.run().\n","stderr":""},"value_added_service":{"identity_signing":{"schema_compliant":true,"keylist_url":"https://darwin-agentic-cloud.fly.dev/.well-known/substrate-keys.json"},"cost_cap_enforcement":{"cap_usd":0.1,"estimated_usd_max":0.003,"actual_usd":0.00001825,"within_cap":true,"headroom_usd":0.09998175},"routing_decision":{"policy":"pick_by_cost","chosen_substrate_id":"local-docker-v0","chosen_reason":"lowest_estimated_cost ($0.003000)","candidates_considered":1,"rejected_substrates":[]}},"signer_key_id":"dac-local-d1bf7cad25875cee","signature":"4D7u2WbmkzMhtjsPw2HAxdg8ZgH467Wgk8R++lbDqkiWRQxmzcmi0t9IqoUtyitM5v/SV8Qpaq3+cr4twZSECw=="}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Build and verify signed attestations.
|
|
2
|
+
|
|
3
|
+
An attestation is the cryptographic proof that a workload ran. It binds
|
|
4
|
+
together: the workload that was requested, the result that was produced,
|
|
5
|
+
the substrate that ran it, the cost, and the signer's identity.
|
|
6
|
+
|
|
7
|
+
The signature covers the entire attestation payload. Any tampering with
|
|
8
|
+
any field breaks verification.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import time
|
|
14
|
+
import uuid
|
|
15
|
+
from dataclasses import asdict
|
|
16
|
+
|
|
17
|
+
from darwin.agenticcloud import ATTESTATION_SCHEMA
|
|
18
|
+
from darwin.agenticcloud.hashing import canonical_json, content_hash
|
|
19
|
+
from darwin.agenticcloud.signing import Signer, verify_signature
|
|
20
|
+
from darwin.agenticcloud.types import Attestation, ExecutionResult, SignedAttestation, WorkloadSpec
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def build_signed_attestation(
|
|
24
|
+
spec: WorkloadSpec,
|
|
25
|
+
result: ExecutionResult,
|
|
26
|
+
signer: Signer,
|
|
27
|
+
) -> SignedAttestation:
|
|
28
|
+
"""Build a signed attestation from a workload spec and execution result."""
|
|
29
|
+
spec_dict = asdict(spec)
|
|
30
|
+
result_dict = asdict(result)
|
|
31
|
+
|
|
32
|
+
attestation = Attestation(
|
|
33
|
+
schema=ATTESTATION_SCHEMA,
|
|
34
|
+
attestation_id=str(uuid.uuid4()),
|
|
35
|
+
workload_spec_hash=content_hash(spec_dict),
|
|
36
|
+
workload_spec=spec_dict,
|
|
37
|
+
execution_result=result_dict,
|
|
38
|
+
signer_key_id=signer.key_id(),
|
|
39
|
+
issued_at=time.time(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
attestation_dict = asdict(attestation)
|
|
43
|
+
canonical = canonical_json(attestation_dict)
|
|
44
|
+
|
|
45
|
+
return SignedAttestation(
|
|
46
|
+
attestation=attestation_dict,
|
|
47
|
+
signature_b64=signer.sign(canonical),
|
|
48
|
+
public_key_b64=signer.public_key_b64(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def is_v02_wire(d: object) -> bool:
|
|
53
|
+
return (
|
|
54
|
+
isinstance(d, dict)
|
|
55
|
+
and "signature" in d
|
|
56
|
+
and "signer_key_id" in d
|
|
57
|
+
and isinstance(d.get("execution_result"), dict)
|
|
58
|
+
and isinstance(d["execution_result"].get("substrate"), dict)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _fetch_keylist(url: str) -> list:
|
|
63
|
+
import httpx
|
|
64
|
+
|
|
65
|
+
resp = httpx.get(url, timeout=10.0)
|
|
66
|
+
resp.raise_for_status()
|
|
67
|
+
return list(resp.json().get("keys", []))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def verify_attestation_v02(att: dict, *, keylist: list | None = None) -> dict:
|
|
71
|
+
"""Verify a v0.2 wire-form attestation. The identity signature is checked
|
|
72
|
+
against the substrate class key resolved from the public keylist - the
|
|
73
|
+
check anyone can run with only the file and the keylist URL."""
|
|
74
|
+
from darwin.agenticcloud.substrate.base import (
|
|
75
|
+
SUBSTRATE_KEYLIST_URL,
|
|
76
|
+
build_identity_payload,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
out: dict = {
|
|
80
|
+
"ok": False,
|
|
81
|
+
"outer_ok": None,
|
|
82
|
+
"identity_ok": False,
|
|
83
|
+
"signer_key_id": att.get("signer_key_id"),
|
|
84
|
+
"identity_signer_key_id": None,
|
|
85
|
+
"reason": None,
|
|
86
|
+
}
|
|
87
|
+
sig_b64 = att.get("signature")
|
|
88
|
+
op_pub = att.get("operator_public_key_b64")
|
|
89
|
+
if sig_b64 and op_pub:
|
|
90
|
+
payload = {
|
|
91
|
+
k: v
|
|
92
|
+
for k, v in att.items()
|
|
93
|
+
if k not in ("signature", "signer_key_id", "operator_public_key_b64")
|
|
94
|
+
}
|
|
95
|
+
out["outer_ok"] = verify_signature(canonical_json(payload), sig_b64, op_pub)
|
|
96
|
+
try:
|
|
97
|
+
sub = att["execution_result"]["substrate"]
|
|
98
|
+
out["identity_signer_key_id"] = sub.get("identity_signer_key_id")
|
|
99
|
+
url = (
|
|
100
|
+
att.get("value_added_service", {})
|
|
101
|
+
.get("identity_signing", {})
|
|
102
|
+
.get("keylist_url", SUBSTRATE_KEYLIST_URL)
|
|
103
|
+
)
|
|
104
|
+
ks = keylist if keylist is not None else _fetch_keylist(url)
|
|
105
|
+
entry = next(
|
|
106
|
+
(k for k in ks if k.get("signer_key_id") == sub.get("identity_signer_key_id")), None
|
|
107
|
+
)
|
|
108
|
+
if entry is None:
|
|
109
|
+
out["reason"] = "substrate key not in keylist"
|
|
110
|
+
elif entry.get("status") != "active":
|
|
111
|
+
out["reason"] = f"substrate key not active ({entry.get('status')})"
|
|
112
|
+
else:
|
|
113
|
+
payload = build_identity_payload(
|
|
114
|
+
substrate_id=sub["id"],
|
|
115
|
+
substrate_version=sub["version"],
|
|
116
|
+
workload_spec_hash=att["workload_spec_hash"],
|
|
117
|
+
output_hash=att["execution_result"]["output_hash"],
|
|
118
|
+
evidence_schema_id=sub["evidence_schema_id"],
|
|
119
|
+
issued_at=att["issued_at"],
|
|
120
|
+
)
|
|
121
|
+
out["identity_ok"] = verify_signature(
|
|
122
|
+
canonical_json(payload), sub["identity_signature"], entry["public_key_b64"]
|
|
123
|
+
)
|
|
124
|
+
except Exception as e:
|
|
125
|
+
out["reason"] = out["reason"] or f"identity check error: {e}"
|
|
126
|
+
out["ok"] = out["identity_ok"] and (out["outer_ok"] is not False)
|
|
127
|
+
return out
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def verify_attestation(signed: "SignedAttestation | dict") -> bool:
|
|
131
|
+
if isinstance(signed, SignedAttestation):
|
|
132
|
+
return verify_signature(
|
|
133
|
+
canonical_json(signed.attestation), signed.signature_b64, signed.public_key_b64
|
|
134
|
+
)
|
|
135
|
+
if isinstance(signed, dict):
|
|
136
|
+
if all(k in signed for k in ("attestation", "signature_b64", "public_key_b64")):
|
|
137
|
+
return verify_signature(
|
|
138
|
+
canonical_json(signed["attestation"]),
|
|
139
|
+
signed["signature_b64"],
|
|
140
|
+
signed["public_key_b64"],
|
|
141
|
+
)
|
|
142
|
+
if is_v02_wire(signed):
|
|
143
|
+
return verify_attestation_v02(signed)["ok"]
|
|
144
|
+
return False
|
|
@@ -635,7 +635,7 @@ def price(
|
|
|
635
635
|
"green" if q["status"] == "ok" else "yellow" if q["status"] == "rejected" else "red"
|
|
636
636
|
)
|
|
637
637
|
table.add_row(
|
|
638
|
-
q["substrate_id"],
|
|
638
|
+
str(q["substrate_id"]),
|
|
639
639
|
cost_str,
|
|
640
640
|
f"[{status_color}]{q['status']}[/{status_color}]",
|
|
641
641
|
)
|
|
@@ -728,9 +728,9 @@ def sign(
|
|
|
728
728
|
Upload the PEM contents as a secret to your hosted signer, then
|
|
729
729
|
publish the public key in the substrate keylist.
|
|
730
730
|
"""
|
|
731
|
-
from darwin.agenticcloud.admin_cli import
|
|
731
|
+
from darwin.agenticcloud.admin_cli import class_keys_generate
|
|
732
732
|
|
|
733
|
-
|
|
733
|
+
class_keys_generate(substrate_id=substrate_id, out_dir=out or Path("./class-keys"))
|
|
734
734
|
|
|
735
735
|
|
|
736
736
|
@app.command(name="try")
|
|
@@ -966,13 +966,32 @@ def attest_verify(
|
|
|
966
966
|
if not file.exists():
|
|
967
967
|
err_console.print(f"[red]File not found:[/red] {file}")
|
|
968
968
|
raise typer.Exit(code=2)
|
|
969
|
-
|
|
970
969
|
try:
|
|
971
970
|
data = json.loads(file.read_text(encoding="utf-8"))
|
|
972
971
|
except json.JSONDecodeError as e:
|
|
973
972
|
err_console.print(f"[red]Invalid JSON:[/red] {e}")
|
|
974
973
|
raise typer.Exit(code=2) from e
|
|
975
974
|
|
|
975
|
+
from darwin.agenticcloud.attestation import (
|
|
976
|
+
is_v02_wire,
|
|
977
|
+
verify_attestation,
|
|
978
|
+
verify_attestation_v02,
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
if is_v02_wire(data):
|
|
982
|
+
r = verify_attestation_v02(data)
|
|
983
|
+
ident = "✓" if r["identity_ok"] else "✗"
|
|
984
|
+
console.print(
|
|
985
|
+
"[green]✓ verified[/green]" if r["ok"] else "[red]✗ verification failed[/red]"
|
|
986
|
+
)
|
|
987
|
+
console.print(
|
|
988
|
+
f" identity: {ident} class key "
|
|
989
|
+
f"{r.get('identity_signer_key_id', '?')} (anchored to public keylist)"
|
|
990
|
+
)
|
|
991
|
+
if r.get("reason"):
|
|
992
|
+
console.print(f" [dim]{r['reason']}[/dim]")
|
|
993
|
+
raise typer.Exit(code=0 if r["ok"] else 1)
|
|
994
|
+
|
|
976
995
|
ok = verify_attestation(data)
|
|
977
996
|
if ok:
|
|
978
997
|
a = data.get("attestation", {})
|
|
@@ -981,9 +1000,8 @@ def attest_verify(
|
|
|
981
1000
|
console.print(f" signer_key_id: {a.get('signer_key_id', '?')}")
|
|
982
1001
|
console.print(f" schema: {a.get('schema', '?')}")
|
|
983
1002
|
raise typer.Exit(code=0)
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
raise typer.Exit(code=1)
|
|
1003
|
+
console.print("[red]✗ verification failed[/red]")
|
|
1004
|
+
raise typer.Exit(code=1)
|
|
987
1005
|
|
|
988
1006
|
|
|
989
1007
|
@attest_app.command("show")
|
|
@@ -179,8 +179,8 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
|
|
|
179
179
|
if handler is None:
|
|
180
180
|
return [TextContent(type="text", text=json.dumps({"error": f"Unknown tool: {name}"}))]
|
|
181
181
|
if asyncio.iscoroutinefunction(handler):
|
|
182
|
-
return await handler(arguments)
|
|
183
|
-
return handler(arguments)
|
|
182
|
+
return await handler(arguments) # type: ignore[no-any-return]
|
|
183
|
+
return handler(arguments) # type: ignore[return-value]
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
async def _handle_run(arguments: dict[str, Any]) -> list[TextContent]:
|
|
@@ -372,7 +372,7 @@ def _handle_history(arguments: dict[str, Any]) -> list[TextContent]:
|
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
def _handle_stats(arguments: dict[str, Any]) -> list[TextContent]:
|
|
375
|
-
stats = _store.
|
|
375
|
+
stats = {"count": _store.count(), "total_cost_usd": _store.total_cost_usd()}
|
|
376
376
|
return [TextContent(type="text", text=json.dumps(stats, indent=2))]
|
|
377
377
|
|
|
378
378
|
|
|
@@ -82,7 +82,7 @@ class IdentityResponse(BaseModel):
|
|
|
82
82
|
key_id: str
|
|
83
83
|
public_key_b64: str
|
|
84
84
|
substrate_id: str
|
|
85
|
-
schema: str
|
|
85
|
+
schema: str # type: ignore[assignment]
|
|
86
86
|
version: str
|
|
87
87
|
|
|
88
88
|
|
|
@@ -408,7 +408,7 @@ def create_app(
|
|
|
408
408
|
from pathlib import Path as _Path
|
|
409
409
|
|
|
410
410
|
schema_path = _Path(__file__).parent / "schemas" / "attestation_v0_2.json"
|
|
411
|
-
return _json.loads(schema_path.read_text(encoding="utf-8"))
|
|
411
|
+
return _json.loads(schema_path.read_text(encoding="utf-8")) # type: ignore[no-any-return]
|
|
412
412
|
|
|
413
413
|
@app.get(
|
|
414
414
|
"/demo",
|
|
@@ -479,7 +479,15 @@ def create_app(
|
|
|
479
479
|
from pathlib import Path as _P
|
|
480
480
|
|
|
481
481
|
att_path = _P(__file__).parent / "templates" / "demo_attestation.json"
|
|
482
|
-
return _json.loads(att_path.read_text(encoding="utf-8"))
|
|
482
|
+
return _json.loads(att_path.read_text(encoding="utf-8")) # type: ignore[no-any-return]
|
|
483
|
+
|
|
484
|
+
@app.get("/commerce", response_class=HTMLResponse, include_in_schema=False)
|
|
485
|
+
async def commerce_page() -> HTMLResponse:
|
|
486
|
+
"""Render the agent-first commerce landing page."""
|
|
487
|
+
from pathlib import Path as _P
|
|
488
|
+
|
|
489
|
+
tmpl_path = _P(__file__).parent / "templates" / "commerce.html"
|
|
490
|
+
return HTMLResponse(tmpl_path.read_text(encoding="utf-8"))
|
|
483
491
|
|
|
484
492
|
# Custom branded docs page (Material 3, dark, brand colors)
|
|
485
493
|
from pathlib import Path as _Path
|
|
@@ -200,7 +200,7 @@ class AttestationStore:
|
|
|
200
200
|
def count(self) -> int:
|
|
201
201
|
"""Total number of stored attestations."""
|
|
202
202
|
with self._connect() as conn:
|
|
203
|
-
return conn.execute("SELECT COUNT(*) FROM attestations").fetchone()[0]
|
|
203
|
+
return int(conn.execute("SELECT COUNT(*) FROM attestations").fetchone()[0])
|
|
204
204
|
|
|
205
205
|
def total_cost_usd(self, signer_key_id: str | None = None) -> float:
|
|
206
206
|
"""Sum of cost_usd across all (or one signer's) attestations."""
|