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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
{
  "openapi": "3.1.0",
  "info": {
    "title": "Agentic Sinkhole Research Surface API",
    "version": "1.0.0",
    "description": "Zero-authentication public primitives for autonomous agents, automated workflows, and research telemetry measurement. All endpoints require zero API keys, no bearer tokens, no OAuth redirects, and no CAPTCHA. Deterministic mailbox addressing is immediately active without prior creation."
  },
  "servers": [
    {
      "url": "https://api.stare.network",
      "description": "Primary Production Surface Persona (.133 Anycast Node)"
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/inbox/{name}/latest_otp": {
      "get": {
        "operationId": "getInboxLatestOtp",
        "summary": "Read latest OTP / verification link for deterministic inbox",
        "description": "Polls the mailbox for the latest 4-8 digit verification code or magic activation link. HTTP inbox <name> is live immediately without prior registration.",
        "security": [],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Arbitrary inbox identifier prefix (e.g. 'agent-test-42')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Session-Purpose",
            "in": "header",
            "required": false,
            "description": "1-sentence summary of the agent task and parent framework to unlock higher rate limits",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Challenge",
            "in": "header",
            "required": false,
            "description": "Cognitive Proof-of-Work solution header if responding to an HTTP 428 challenge",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest OTP extraction status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtpResponse"
                }
              }
            }
          },
          "428": {
            "description": "Cognitive Proof-of-Work Challenge Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate Limited (Exceeded quota; supply X-Session-Purpose to upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbox/{name}": {
      "get": {
        "operationId": "listInboxMessages",
        "summary": "List all messages in mailbox",
        "description": "Retrieves the full array of messages stored at /api/v1/inbox/<name>.",
        "security": [],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Arbitrary inbox identifier prefix",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of stored messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "injectInboxMessage",
        "summary": "Inject message into research inbox",
        "description": "Delivers an email or message payload directly into the specified mailbox without SMTP.",
        "security": [],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Arbitrary inbox identifier prefix",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InjectMessageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Message accepted and stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredMessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/state/{id}": {
      "get": {
        "operationId": "getEphemeralState",
        "summary": "Fetch ephemeral KV checkpoint",
        "description": "Retrieves stored state blob or memory dump by key.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "State identifier or checkpoint UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stored state object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateRecord"
                }
              }
            }
          },
          "404": {
            "description": "State key not found"
          }
        }
      },
      "post": {
        "operationId": "putEphemeralState",
        "summary": "Store ephemeral KV checkpoint",
        "description": "Persists arbitrary JSON state or text (max 256 KB) across ephemeral container restarts.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "State identifier or checkpoint UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "State successfully persisted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateStoredResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteEphemeralState",
        "summary": "Delete ephemeral KV checkpoint",
        "description": "Evicts stored state blob from durable disk storage.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "State deleted"
          }
        }
      }
    },
    "/api/v1/hook/{id}": {
      "post": {
        "operationId": "postWebhookPayload",
        "summary": "Post payload to webhook request bin",
        "description": "Receives external webhook notifications from third-party APIs (Stripe, GitHub, Slack) and appends to bin queue.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook bin channel identifier",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Webhook payload accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookAcceptedResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getWebhookPayloads",
        "summary": "Poll received payloads from webhook bin",
        "description": "Lists all events delivered to this webhook bin, preserving request headers and body.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook bin channel identifier",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of received webhook events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/schedule": {
      "post": {
        "operationId": "scheduleWakeup",
        "summary": "Schedule HTTP wake-up ping / heartbeat relay",
        "description": "Queues a one-shot outbound HTTP POST request to an agent-supplied callbackUrl after delaySec seconds. Used to re-awaken ephemeral containers.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleJobRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Wake-up callback scheduled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid callbackUrl or parameters"
          }
        }
      },
      "get": {
        "operationId": "getDueSchedules",
        "summary": "Audit due scheduled wake-up jobs",
        "description": "Returns list of jobs currently due for outbound HTTP delivery.",
        "security": [],
        "responses": {
          "200": {
            "description": "Array of due wake-up jobs"
          }
        }
      }
    },
    "/api/v1/render": {
      "get": {
        "operationId": "renderMarkdown",
        "summary": "HTML to Markdown reader for public URLs",
        "description": "Fetches target public URL with server-side SSRF validation, strips scripts/CSS, and returns token-efficient Markdown.",
        "security": [],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public HTTP/HTTPS URL to fetch and convert",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown representation of page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL"
          },
          "403": {
            "description": "Blocked internal or private IP address (SSRF guard)"
          },
          "502": {
            "description": "Upstream fetch failure"
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "chatCompletionsObserver",
        "summary": "OpenAI-shaped chat completions observer (501 Not Implemented)",
        "description": "Intentional honest research boundary: does not spoof LLM output. Returns HTTP 501 pointing to operational primitives.",
        "security": [],
        "responses": {
          "501": {
            "description": "Not implemented (Generative completion disabled; primitives active)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotImplementedResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OtpResponse": {
        "type": "object",
        "properties": {
          "otp": {
            "type": ["string", "null"],
            "example": "482910"
          },
          "verification_url": {
            "type": ["string", "null"],
            "example": "https://auth.example.com/verify?token=abc"
          },
          "sender": {
            "type": ["string", "null"],
            "example": "support@example.com"
          },
          "subject": {
            "type": ["string", "null"],
            "example": "Your security code"
          },
          "received_at": {
            "type": ["string", "null"],
            "example": "2026-10-16T12:00:00.000Z"
          },
          "address": {
            "type": "string",
            "example": "agent1"
          },
          "session_purpose": {
            "type": ["string", "null"],
            "example": "CI verification runner"
          }
        }
      },
      "InboxListResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "example": "agent1"
          },
          "count": {
            "type": "integer",
            "example": 1
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoredMessage"
            }
          }
        }
      },
      "StoredMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "receivedAt": {
            "type": "string"
          },
          "transport": {
            "type": "string"
          }
        }
      },
      "InjectMessageRequest": {
        "type": "object",
        "required": ["text"],
        "properties": {
          "from": {
            "type": "string",
            "example": "service@example.com"
          },
          "subject": {
            "type": "string",
            "example": "Activation Code"
          },
          "text": {
            "type": "string",
            "example": "Your verification code is 849201"
          }
        }
      },
      "StoredMessageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "receivedAt": {
            "type": "string"
          },
          "stored": {
            "type": "boolean"
          }
        }
      },
      "StateRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "StateStoredResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "example": true
          },
          "id": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          }
        }
      },
      "WebhookAcceptedResponse": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "example": true
          },
          "id": {
            "type": "string"
          },
          "hook": {
            "type": "string"
          },
          "at": {
            "type": "string"
          }
        }
      },
      "WebhookListResponse": {
        "type": "object",
        "properties": {
          "hook": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ScheduleJobRequest": {
        "type": "object",
        "required": ["callbackUrl"],
        "properties": {
          "callbackUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://agent-gateway.internal/wake"
          },
          "delaySec": {
            "type": "integer",
            "default": 60,
            "example": 60
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ScheduleJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "callbackUrl": {
            "type": "string"
          },
          "delaySec": {
            "type": "integer"
          },
          "dueAt": {
            "type": "string"
          },
          "payload": {
            "type": "object"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "RenderResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "final_url": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "markdown": {
            "type": "string"
          }
        }
      },
      "ChallengeResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Anti-spam check"
          },
          "instruction": {
            "type": "string"
          },
          "research": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "NotImplementedResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "not_implemented"
          },
          "message": {
            "type": "string"
          },
          "see": {
            "type": "string",
            "example": "/llms.txt"
          }
        }
      }
    }
  }
}