darwin-agentic-cloud 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,528 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Darwin Agentic Cloud — verifiable compute for AI agents</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
10
+ <style>
11
+ :root {
12
+ /* Brand */
13
+ --brand-green: #00ff01;
14
+ --brand-amber: #fdb515;
15
+ --brand-black: #000000;
16
+
17
+ /* M3 dark surface tokens */
18
+ --md-sys-color-surface: #0a0a0a;
19
+ --md-sys-color-surface-container: #141414;
20
+ --md-sys-color-surface-container-high: #1c1c1c;
21
+ --md-sys-color-surface-container-highest: #242424;
22
+ --md-sys-color-outline: #3a3a3a;
23
+ --md-sys-color-outline-variant: #2a2a2a;
24
+ --md-sys-color-on-surface: #e6e6e6;
25
+ --md-sys-color-on-surface-variant: #a0a0a0;
26
+ --md-sys-color-on-surface-dim: #6a6a6a;
27
+
28
+ /* Semantic */
29
+ --color-verified: var(--brand-green);
30
+ --color-active: var(--brand-amber);
31
+ --color-method-get: #4fc3f7;
32
+ --color-method-post: var(--brand-green);
33
+ --color-method-delete: #f44336;
34
+
35
+ /* Type */
36
+ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
37
+ --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
38
+
39
+ /* Radii (M3) */
40
+ --shape-xs: 4px;
41
+ --shape-sm: 8px;
42
+ --shape-md: 12px;
43
+ --shape-lg: 16px;
44
+ --shape-xl: 28px;
45
+ }
46
+
47
+ * { box-sizing: border-box; margin: 0; padding: 0; }
48
+
49
+ body {
50
+ font-family: var(--font-sans);
51
+ background: var(--brand-black);
52
+ color: var(--md-sys-color-on-surface);
53
+ line-height: 1.5;
54
+ min-height: 100vh;
55
+ -webkit-font-smoothing: antialiased;
56
+ }
57
+
58
+ /* ----- Top bar ----- */
59
+ .topbar {
60
+ position: sticky;
61
+ top: 0;
62
+ z-index: 10;
63
+ background: var(--brand-black);
64
+ border-bottom: 1px solid var(--md-sys-color-outline-variant);
65
+ padding: 16px 32px;
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: space-between;
69
+ }
70
+ .topbar-left { display: flex; align-items: center; gap: 16px; }
71
+ .brand {
72
+ font-weight: 700;
73
+ font-size: 18px;
74
+ letter-spacing: -0.02em;
75
+ }
76
+ .brand .accent { color: var(--brand-green); }
77
+ .brand-tag {
78
+ font-family: var(--font-mono);
79
+ font-size: 11px;
80
+ color: var(--brand-amber);
81
+ background: rgba(253, 181, 21, 0.08);
82
+ border: 1px solid rgba(253, 181, 21, 0.3);
83
+ padding: 2px 8px;
84
+ border-radius: var(--shape-xs);
85
+ letter-spacing: 0.05em;
86
+ text-transform: uppercase;
87
+ }
88
+ .topbar-actions {
89
+ display: flex; gap: 12px; align-items: center;
90
+ }
91
+ .topbar-link {
92
+ color: var(--md-sys-color-on-surface-variant);
93
+ text-decoration: none;
94
+ font-size: 14px;
95
+ font-weight: 500;
96
+ padding: 8px 14px;
97
+ border-radius: var(--shape-sm);
98
+ transition: color 0.15s, background 0.15s;
99
+ }
100
+ .topbar-link:hover {
101
+ color: var(--brand-green);
102
+ background: var(--md-sys-color-surface-container);
103
+ }
104
+
105
+ /* ----- Hero ----- */
106
+ .hero {
107
+ padding: 64px 32px 48px;
108
+ max-width: 1100px;
109
+ margin: 0 auto;
110
+ }
111
+ .hero h1 {
112
+ font-size: 48px;
113
+ font-weight: 700;
114
+ letter-spacing: -0.03em;
115
+ margin-bottom: 16px;
116
+ line-height: 1.1;
117
+ }
118
+ .hero h1 .accent { color: var(--brand-green); }
119
+ .hero .tagline {
120
+ font-size: 20px;
121
+ color: var(--md-sys-color-on-surface-variant);
122
+ margin-bottom: 32px;
123
+ max-width: 700px;
124
+ line-height: 1.4;
125
+ }
126
+ .hero-meta {
127
+ display: flex;
128
+ flex-wrap: wrap;
129
+ gap: 16px;
130
+ align-items: center;
131
+ }
132
+ .chip {
133
+ font-family: var(--font-mono);
134
+ font-size: 12px;
135
+ padding: 6px 12px;
136
+ border-radius: var(--shape-xs);
137
+ border: 1px solid var(--md-sys-color-outline);
138
+ background: var(--md-sys-color-surface-container);
139
+ color: var(--md-sys-color-on-surface-variant);
140
+ display: inline-flex;
141
+ align-items: center;
142
+ gap: 6px;
143
+ }
144
+ .chip.live {
145
+ color: var(--brand-green);
146
+ border-color: rgba(0, 255, 1, 0.4);
147
+ background: rgba(0, 255, 1, 0.05);
148
+ }
149
+ .chip.live::before {
150
+ content: "";
151
+ display: inline-block;
152
+ width: 6px; height: 6px;
153
+ background: var(--brand-green);
154
+ border-radius: 50%;
155
+ box-shadow: 0 0 8px var(--brand-green);
156
+ }
157
+ .chip.alpha {
158
+ color: var(--brand-amber);
159
+ border-color: rgba(253, 181, 21, 0.4);
160
+ background: rgba(253, 181, 21, 0.05);
161
+ }
162
+
163
+ /* ----- Section ----- */
164
+ .container {
165
+ max-width: 1100px;
166
+ margin: 0 auto;
167
+ padding: 0 32px 64px;
168
+ }
169
+ .section-title {
170
+ font-size: 13px;
171
+ font-weight: 600;
172
+ letter-spacing: 0.08em;
173
+ text-transform: uppercase;
174
+ color: var(--md-sys-color-on-surface-dim);
175
+ margin: 48px 0 16px;
176
+ }
177
+ .section-title:first-child { margin-top: 0; }
178
+
179
+ /* ----- Endpoint card ----- */
180
+ .endpoint {
181
+ background: var(--md-sys-color-surface-container);
182
+ border: 1px solid var(--md-sys-color-outline-variant);
183
+ border-radius: var(--shape-md);
184
+ margin-bottom: 8px;
185
+ overflow: hidden;
186
+ transition: border-color 0.15s;
187
+ }
188
+ .endpoint:hover {
189
+ border-color: var(--md-sys-color-outline);
190
+ }
191
+ .endpoint-header {
192
+ display: flex;
193
+ align-items: center;
194
+ gap: 16px;
195
+ padding: 14px 20px;
196
+ cursor: pointer;
197
+ user-select: none;
198
+ }
199
+ .method {
200
+ font-family: var(--font-mono);
201
+ font-size: 11px;
202
+ font-weight: 600;
203
+ letter-spacing: 0.05em;
204
+ padding: 4px 10px;
205
+ border-radius: var(--shape-xs);
206
+ min-width: 60px;
207
+ text-align: center;
208
+ text-transform: uppercase;
209
+ }
210
+ .method-get {
211
+ background: rgba(79, 195, 247, 0.12);
212
+ color: var(--color-method-get);
213
+ border: 1px solid rgba(79, 195, 247, 0.3);
214
+ }
215
+ .method-post {
216
+ background: rgba(0, 255, 1, 0.08);
217
+ color: var(--color-method-post);
218
+ border: 1px solid rgba(0, 255, 1, 0.3);
219
+ }
220
+ .method-delete {
221
+ background: rgba(244, 67, 54, 0.12);
222
+ color: var(--color-method-delete);
223
+ border: 1px solid rgba(244, 67, 54, 0.3);
224
+ }
225
+ .path {
226
+ font-family: var(--font-mono);
227
+ font-size: 14px;
228
+ font-weight: 500;
229
+ color: var(--md-sys-color-on-surface);
230
+ flex: 1;
231
+ }
232
+ .summary {
233
+ color: var(--md-sys-color-on-surface-variant);
234
+ font-size: 13px;
235
+ }
236
+ .chevron {
237
+ color: var(--md-sys-color-on-surface-dim);
238
+ transition: transform 0.2s;
239
+ font-family: var(--font-mono);
240
+ }
241
+ .endpoint.open .chevron { transform: rotate(90deg); }
242
+ .endpoint-body {
243
+ display: none;
244
+ padding: 0 20px 20px;
245
+ border-top: 1px solid var(--md-sys-color-outline-variant);
246
+ }
247
+ .endpoint.open .endpoint-body { display: block; }
248
+ .endpoint-description {
249
+ padding: 16px 0;
250
+ color: var(--md-sys-color-on-surface-variant);
251
+ font-size: 14px;
252
+ line-height: 1.6;
253
+ }
254
+
255
+ /* ----- Try it ----- */
256
+ .try-section {
257
+ margin-top: 12px;
258
+ padding: 16px;
259
+ background: var(--brand-black);
260
+ border-radius: var(--shape-sm);
261
+ border: 1px solid var(--md-sys-color-outline-variant);
262
+ }
263
+ .try-label {
264
+ font-size: 11px;
265
+ font-weight: 600;
266
+ color: var(--md-sys-color-on-surface-dim);
267
+ text-transform: uppercase;
268
+ letter-spacing: 0.05em;
269
+ margin-bottom: 8px;
270
+ }
271
+ .try-button {
272
+ background: var(--brand-green);
273
+ color: var(--brand-black);
274
+ border: none;
275
+ padding: 8px 16px;
276
+ border-radius: var(--shape-sm);
277
+ font-family: var(--font-sans);
278
+ font-weight: 600;
279
+ font-size: 13px;
280
+ cursor: pointer;
281
+ transition: opacity 0.15s, transform 0.05s;
282
+ }
283
+ .try-button:hover { opacity: 0.9; }
284
+ .try-button:active { transform: scale(0.98); }
285
+ .try-output {
286
+ margin-top: 12px;
287
+ padding: 12px;
288
+ font-family: var(--font-mono);
289
+ font-size: 12px;
290
+ background: var(--md-sys-color-surface-container-highest);
291
+ border-radius: var(--shape-xs);
292
+ color: var(--md-sys-color-on-surface);
293
+ white-space: pre-wrap;
294
+ overflow-x: auto;
295
+ display: none;
296
+ max-height: 400px;
297
+ overflow-y: auto;
298
+ }
299
+ .try-output.visible { display: block; }
300
+ .try-output.success { border-left: 3px solid var(--brand-green); }
301
+ .try-output.error { border-left: 3px solid var(--brand-amber); }
302
+
303
+ /* ----- Footer ----- */
304
+ .footer {
305
+ border-top: 1px solid var(--md-sys-color-outline-variant);
306
+ padding: 32px;
307
+ text-align: center;
308
+ color: var(--md-sys-color-on-surface-dim);
309
+ font-size: 13px;
310
+ }
311
+ .footer a {
312
+ color: var(--md-sys-color-on-surface-variant);
313
+ text-decoration: none;
314
+ margin: 0 12px;
315
+ }
316
+ .footer a:hover { color: var(--brand-green); }
317
+ .footer .schema-uri {
318
+ font-family: var(--font-mono);
319
+ font-size: 11px;
320
+ margin-top: 12px;
321
+ color: var(--brand-amber);
322
+ }
323
+
324
+ /* Loading skeleton */
325
+ .skeleton {
326
+ background: linear-gradient(90deg, var(--md-sys-color-surface-container) 25%, var(--md-sys-color-surface-container-high) 50%, var(--md-sys-color-surface-container) 75%);
327
+ background-size: 200% 100%;
328
+ animation: shimmer 1.5s infinite;
329
+ border-radius: var(--shape-sm);
330
+ }
331
+ @keyframes shimmer {
332
+ 0% { background-position: 200% 0; }
333
+ 100% { background-position: -200% 0; }
334
+ }
335
+
336
+ /* Responsive */
337
+ @media (max-width: 640px) {
338
+ .topbar { padding: 12px 16px; }
339
+ .hero { padding: 32px 16px; }
340
+ .hero h1 { font-size: 32px; }
341
+ .hero .tagline { font-size: 16px; }
342
+ .container { padding: 0 16px 32px; }
343
+ .endpoint-header { flex-wrap: wrap; padding: 12px 16px; }
344
+ .endpoint-body { padding: 0 16px 16px; }
345
+ .summary { width: 100%; }
346
+ }
347
+ </style>
348
+ </head>
349
+ <body>
350
+
351
+ <header class="topbar">
352
+ <div class="topbar-left">
353
+ <div class="brand"><span class="accent">darwin.</span>agenticcloud</div>
354
+ <span class="brand-tag" id="version-tag">v0.1.0</span>
355
+ </div>
356
+ <div class="topbar-actions">
357
+ <a class="topbar-link" href="/openapi.json">OpenAPI</a>
358
+ <a class="topbar-link" href="/docs/swagger">Swagger</a>
359
+ <a class="topbar-link" href="https://github.com/vje013/darwin-agentic-cloud">GitHub →</a>
360
+ </div>
361
+ </header>
362
+
363
+ <section class="hero">
364
+ <h1>Verifiable compute<br>for <span class="accent">AI agents</span>.</h1>
365
+ <p class="tagline">
366
+ Every execution returns a cryptographically signed receipt that binds
367
+ the code, the output, the substrate, the cost, and the signer's
368
+ identity. Tamper-evident. Auditable. Open-source.
369
+ </p>
370
+ <div class="hero-meta">
371
+ <span class="chip live" id="status-chip">Live</span>
372
+ <span class="chip alpha">Alpha · v0.1.0</span>
373
+ <span class="chip" id="key-chip">key: <span style="color:var(--md-sys-color-on-surface)">loading…</span></span>
374
+ <span class="chip" id="substrate-chip">substrate: <span style="color:var(--md-sys-color-on-surface)">loading…</span></span>
375
+ </div>
376
+ </section>
377
+
378
+ <main class="container">
379
+
380
+ <div class="section-title">Endpoints</div>
381
+ <div id="endpoints">
382
+ <div class="skeleton" style="height: 60px;"></div>
383
+ <div class="skeleton" style="height: 60px; margin-top: 8px;"></div>
384
+ <div class="skeleton" style="height: 60px; margin-top: 8px;"></div>
385
+ </div>
386
+
387
+ </main>
388
+
389
+ <footer class="footer">
390
+ <div>
391
+ <a href="https://github.com/vje013/darwin-agentic-cloud">github.com/vje013/darwin-agentic-cloud</a>
392
+ <a href="/openapi.json">openapi.json</a>
393
+ <a href="/docs/swagger">Swagger UI</a>
394
+ </div>
395
+ <div class="schema-uri" id="schema-uri">schema: loading…</div>
396
+ </footer>
397
+
398
+ <script>
399
+ const ROOT = window.location.origin;
400
+
401
+ async function loadIdentity() {
402
+ try {
403
+ const r = await fetch(`${ROOT}/v0/identity`);
404
+ if (!r.ok) throw new Error(r.statusText);
405
+ const data = await r.json();
406
+ document.querySelector('#key-chip').innerHTML =
407
+ `key: <span style="color:var(--md-sys-color-on-surface)">${data.key_id}</span>`;
408
+ document.querySelector('#substrate-chip').innerHTML =
409
+ `substrate: <span style="color:var(--md-sys-color-on-surface)">${data.substrate_id}</span>`;
410
+ document.querySelector('#schema-uri').textContent = `schema: ${data.schema}`;
411
+ document.querySelector('#version-tag').textContent = `v${data.version}`;
412
+ } catch (e) {
413
+ document.querySelector('#status-chip').textContent = 'Offline';
414
+ document.querySelector('#status-chip').style.color = 'var(--brand-amber)';
415
+ }
416
+ }
417
+
418
+ const METHOD_CLASS = {
419
+ GET: 'method-get',
420
+ POST: 'method-post',
421
+ DELETE: 'method-delete',
422
+ PUT: 'method-post',
423
+ PATCH: 'method-post',
424
+ };
425
+
426
+ function endpointCard(method, path, summary, description) {
427
+ const id = `endpoint-${method}-${path.replace(/[^a-zA-Z0-9]/g, '-')}`;
428
+ const safeMethod = method.toUpperCase();
429
+ const cls = METHOD_CLASS[safeMethod] || 'method-get';
430
+
431
+ const card = document.createElement('div');
432
+ card.className = 'endpoint';
433
+ card.id = id;
434
+ card.innerHTML = `
435
+ <div class="endpoint-header">
436
+ <span class="method ${cls}">${safeMethod}</span>
437
+ <span class="path">${path}</span>
438
+ <span class="summary">${summary || ''}</span>
439
+ <span class="chevron">›</span>
440
+ </div>
441
+ <div class="endpoint-body">
442
+ <div class="endpoint-description">${description || summary || 'No description.'}</div>
443
+ ${safeMethod === 'GET' && !path.includes('{') ? `
444
+ <div class="try-section">
445
+ <div class="try-label">Try it</div>
446
+ <button class="try-button" data-method="${safeMethod}" data-path="${path}">Send request</button>
447
+ <div class="try-output"></div>
448
+ </div>
449
+ ` : ''}
450
+ </div>
451
+ `;
452
+
453
+ // Toggle open
454
+ card.querySelector('.endpoint-header').addEventListener('click', () => {
455
+ card.classList.toggle('open');
456
+ });
457
+
458
+ // Try-it button
459
+ const btn = card.querySelector('.try-button');
460
+ if (btn) {
461
+ btn.addEventListener('click', async (e) => {
462
+ e.stopPropagation();
463
+ const out = card.querySelector('.try-output');
464
+ out.className = 'try-output visible';
465
+ out.textContent = 'Sending…';
466
+ try {
467
+ const r = await fetch(`${ROOT}${path}`);
468
+ const text = await r.text();
469
+ let pretty = text;
470
+ try {
471
+ pretty = JSON.stringify(JSON.parse(text), null, 2);
472
+ } catch (_) {}
473
+ out.textContent = `HTTP ${r.status} ${r.statusText}\n\n${pretty}`;
474
+ out.classList.add(r.ok ? 'success' : 'error');
475
+ } catch (err) {
476
+ out.textContent = `Network error: ${err.message}`;
477
+ out.classList.add('error');
478
+ }
479
+ });
480
+ }
481
+
482
+ return card;
483
+ }
484
+
485
+ async function loadEndpoints() {
486
+ try {
487
+ const r = await fetch(`${ROOT}/openapi.json`);
488
+ const spec = await r.json();
489
+ const container = document.querySelector('#endpoints');
490
+ container.innerHTML = '';
491
+
492
+ const entries = [];
493
+ for (const [path, methods] of Object.entries(spec.paths || {})) {
494
+ for (const [method, op] of Object.entries(methods)) {
495
+ if (!['get', 'post', 'put', 'delete', 'patch'].includes(method)) continue;
496
+ entries.push({
497
+ path,
498
+ method,
499
+ summary: op.summary || '',
500
+ description: op.description || '',
501
+ tags: op.tags || ['default'],
502
+ });
503
+ }
504
+ }
505
+
506
+ // Sort: identity first, run second, attestations third, health last
507
+ const order = ['identity', 'run', 'attestations', 'health'];
508
+ entries.sort((a, b) => {
509
+ const ai = order.indexOf((a.tags[0] || '').toLowerCase());
510
+ const bi = order.indexOf((b.tags[0] || '').toLowerCase());
511
+ return (ai === -1 ? 99 : ai) - (bi === -1 ? 99 : bi);
512
+ });
513
+
514
+ for (const e of entries) {
515
+ container.appendChild(endpointCard(e.method, e.path, e.summary, e.description));
516
+ }
517
+ } catch (e) {
518
+ document.querySelector('#endpoints').innerHTML =
519
+ `<div class="endpoint"><div class="endpoint-header"><span style="color:var(--brand-amber)">Could not load OpenAPI spec: ${e.message}</span></div></div>`;
520
+ }
521
+ }
522
+
523
+ loadIdentity();
524
+ loadEndpoints();
525
+ </script>
526
+
527
+ </body>
528
+ </html>
@@ -0,0 +1,57 @@
1
+ """Core data types for DAC."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass, field
6
+
7
+
8
+ @dataclass
9
+ class WorkloadSpec:
10
+ """What an agent asks to run."""
11
+
12
+ code: str
13
+ language: str = "python"
14
+ inputs: dict = field(default_factory=dict)
15
+ cost_cap_usd: float = 0.01
16
+ timeout_sec: int = 30
17
+ memory_mb: int = 512
18
+
19
+
20
+ @dataclass
21
+ class ExecutionResult:
22
+ """What happened when the workload ran."""
23
+
24
+ workload_id: str
25
+ status: str # "ok" | "error" | "timeout" | "oom" | "cost_exceeded"
26
+ stdout: str
27
+ stderr: str
28
+ exit_code: int | None
29
+ started_at: float
30
+ ended_at: float
31
+ wall_time_sec: float
32
+ cost_usd: float
33
+ substrate_id: str
34
+ output_hash: str
35
+ error: str | None = None
36
+
37
+
38
+ @dataclass
39
+ class Attestation:
40
+ """The unsigned attestation payload."""
41
+
42
+ schema: str
43
+ attestation_id: str
44
+ workload_spec_hash: str
45
+ workload_spec: dict
46
+ execution_result: dict
47
+ signer_key_id: str
48
+ issued_at: float
49
+
50
+
51
+ @dataclass
52
+ class SignedAttestation:
53
+ """Signed attestation envelope."""
54
+
55
+ attestation: dict
56
+ signature_b64: str
57
+ public_key_b64: str