index.md

HTML wrapper for HTML-only fetchers; content is shown verbatim.

Raw file

Links (extracted)

Clickable list for reviewers; avoids copy/paste line-wrap issues.
# if.api demo — Tray.io automation resolver (receipt-backed)

**Audience:** external reviewers + operators  
**Reality gate:** demo of a transformation contract, not a deployed Tray.io integration.

---

## Links (HTML-first)

if.trace receipt:
https://infrafabric.io/static/trace/DfEMhe_bAtZpAh_JMjGl1w

Pack (HTML view):
https://infrafabric.io/static/pack/DfEMhe_bAtZpAh_JMjGl1w

Pack (raw Markdown):
https://infrafabric.io/static/pack/DfEMhe_bAtZpAh_JMjGl1w.md

Source bundle (tgz):
https://infrafabric.io/static/source/58fb99ccf21e8e8628db197e730e2a1e2b8e74f5dd080d956fae44b657ac5424.tgz

---

## What this proves (black/white)

This demo proves:
- a known Tray.io workflow definition can be transformed deterministically into a normalized event envelope
- the output is bound to if.trace receipts (hash checks; signatures only where present and verifiable)

This demo does not prove:
- live Tray.io API calls, OAuth scopes, or workflow execution
- any shipped if.bus runtime or message broker

---

## Demo artifacts

Source bundle sha256 (tgz):

    58fb99ccf21e8e8628db197e730e2a1e2b8e74f5dd080d956fae44b657ac5424

Input JSON sha256:

    d17068d4e6af29706a3364efb086d59a72127f37ba3e1634169b3a41d2d7c307

Normalized output JSON sha256:

    666e90acc3b0376ea2edcfe040f936b134f0add72865f569da9a743ac828869d

---

## How to reproduce (no internal access)

```bash
curl -fsSL -o if-api-tray-demo-source.tgz "https://infrafabric.io/static/source/58fb99ccf21e8e8628db197e730e2a1e2b8e74f5dd080d956fae44b657ac5424.tgz"
sha256sum if-api-tray-demo-source.tgz

tar -xzf if-api-tray-demo-source.tgz
python3 resolve_tray_demo.py tray_input.json > resolved_event.json
sha256sum resolved_event.json
```

Expected `sha256sum` (source bundle):

    58fb99ccf21e8e8628db197e730e2a1e2b8e74f5dd080d956fae44b657ac5424  if-api-tray-demo-source.tgz

Expected `sha256sum` (normalized output):

    666e90acc3b0376ea2edcfe040f936b134f0add72865f569da9a743ac828869d  resolved_event.json

---

## Output (normalized event envelope)

```json
{
  "event": "resolve",
  "input_sha256": "d17068d4e6af29706a3364efb086d59a72127f37ba3e1634169b3a41d2d7c307",
  "integration": "tray.io",
  "notes": {
    "integrity": "see if.trace receipt for output bytes",
    "live_lookup": false
  },
  "requested_at": "2026-01-07T00:00:00Z",
  "resolved_at": "2026-01-07T00:00:00Z",
  "results": [
    {
      "metadata": {
        "action": "google.sheets.append_row",
        "owner": "demo.builder@example.com",
        "status": "enabled",
        "trigger": "slack.new_message"
      },
      "resolution_method": "synthetic-map",
      "status": "resolved",
      "target_url": "https://tray.io/workflows/4101",
      "workflow_id": "wf_4101"
    },
    {
      "metadata": {
        "action": "slack.post_message",
        "owner": "demo.builder@example.com",
        "status": "paused",
        "trigger": "salesforce.new_lead"
      },
      "resolution_method": "synthetic-map",
      "status": "resolved",
      "target_url": "https://tray.io/workflows/4102",
      "workflow_id": "wf_4102"
    }
  ],
  "schema_version": "demo.v1"
}
```