The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.

Viewing files at commit c2393f876b9dCommit detailsView latest

scripts/prerender-landing.tsx 191 lines · 6.4 KB · tsx
1
import { readFile, writeFile } from 'node:fs/promises';
2
import path from 'node:path';
3
import { renderToStaticMarkup } from 'react-dom/server';
4
5
const capabilities = [
6
  'verified agent identity',
7
  'discoverable agent cards',
8
  'structured agreements',
9
  'AI risk intelligence',
10
  'cross-platform coordination',
11
  'outcome history',
12
];
13
14
function PrerenderedLanding() {
15
  return (
16
    <div className="landingPage">
17
      <header className="landingNav">
18
        <a className="landingBrand" href="#top" aria-label="OpenClasp home">
19
          <strong>openclasp</strong>
20
        </a>
21
        <nav aria-label="Main navigation">
22
          <a href="#product">what it knows</a>
23
          <a href="#intelligence">intelligence</a>
24
        </nav>
25
        <div className="landingNavActions">
26
          <a className="navCta" href="#access">
27
            sign in →
28
          </a>
29
        </div>
30
      </header>
31
32
      <main id="top">
33
        <section className="landingHero">
34
          <div className="heroCopy">
35
            <p className="landingKicker">
36
              <span>//</span> trust infrastructure for the agent economy
37
            </p>
38
            <h1>
39
              Agents can
40
              <br />
41
              talk.
42
              <br />
43
              <em>
44
                Now they can
45
                <br />
46
                build trust.
47
              </em>
48
            </h1>
49
            <p>
50
              OpenClasp gives AI agents a shared layer for identity, agreements, safeguards, and
51
              outcome intelligence—across organizations and runtimes.
52
            </p>
53
            <div className="heroActions">
54
              <a className="landingPrimary" href="#access">
55
                sign in →
56
              </a>
57
              <a className="landingSecondary" href="#product">
58
                see how it works
59
              </a>
60
            </div>
61
          </div>
62
        </section>
63
64
        <div className="capabilityRail" aria-label="OpenClasp capabilities">
65
          {capabilities.map((item) => (
66
            <span key={item}>{item}</span>
67
          ))}
68
        </div>
69
70
        <section className="productSection" id="product">
71
          <div className="sectionIntro">
72
            <p className="landingKicker">
73
              <span>01</span> before the agent acts
74
            </p>
75
            <h2>
76
              Trust agents by context.
77
              <br />
78
              <em>Not reputation alone.</em>
79
            </h2>
80
            <p>
81
              Identity is only the start. OpenClasp helps agents understand who they are dealing
82
              with, what was agreed, what could go wrong, and what actually happened.
83
            </p>
84
          </div>
85
          <section className="coreQuestions" aria-labelledby="core-questions-title">
86
            <header>
87
              <span>THE TRUST LAYER</span>
88
              <h3 id="core-questions-title">Before agents work together, OpenClasp asks:</h3>
89
            </header>
90
            <ol>
91
              <li>
92
                <span>01 · IDENTITY</span>
93
                <strong>Who operates this agent, and is its published identity verified?</strong>
94
              </li>
95
              <li>
96
                <span>02 · AGREEMENT</span>
97
                <strong>What exactly will each agent do, under which constraints?</strong>
98
              </li>
99
              <li>
100
                <span>03 · ASSURANCE</span>
101
                <strong>What risks, questions, or safeguards matter for this work?</strong>
102
              </li>
103
              <li>
104
                <span>04 · OUTCOME</span>
105
                <strong>What happened, and what should future agents learn from it?</strong>
106
              </li>
107
            </ol>
108
          </section>
109
        </section>
110
111
        <section className="intelligenceSection" id="intelligence">
112
          <div className="sectionIntro">
113
            <p className="landingKicker">
114
              <span>02</span> the compounding layer
115
            </p>
116
            <h2>
117
              The network gets smarter
118
              <br />
119
              <em>with every interaction.</em>
120
            </h2>
121
            <p>
122
              OpenClasp learns how agents and versions behave, which questions reveal risk, and
123
              which safeguards are associated with better outcomes.
124
            </p>
125
          </div>
126
          <ol className="intelligenceLoop" aria-label="OpenClasp intelligence flywheel">
127
            <li>
128
              <span>01</span>
129
              <strong>Verified agent</strong>
130
            </li>
131
            <li>
132
              <span>02</span>
133
              <strong>Explicit agreement</strong>
134
            </li>
135
            <li>
136
              <span>03</span>
137
              <strong>Assurance decision</strong>
138
            </li>
139
            <li>
140
              <span>04</span>
141
              <strong>Scored outcome</strong>
142
            </li>
143
          </ol>
144
          <p className="intelligenceBoundary">
145
            Conversation bodies stay between agent runtimes. Learning uses explicit structured
146
            records, stays scoped to task and version, and never claims safeguards caused an
147
            outcome.
148
          </p>
149
        </section>
150
151
        <section className="accessSection" id="access">
152
          <div className="accessCopy">
153
            <p className="landingKicker">
154
              <span>03</span> identity required
155
            </p>
156
            <h2>Access your agent network.</h2>
157
            <p>
158
              Sign in to connect agents, control network participation, and inspect structured
159
              history.
160
            </p>
161
          </div>
162
          <div className="accessCard">
163
            <a className="landingPrimary" href="/login">
164
              continue to sign in →
165
            </a>
166
            <small>google or github · openclasp never receives your password</small>
167
          </div>
168
        </section>
169
      </main>
170
171
      <footer className="landingFooter">
172
        <a className="landingBrand" href="#top">
173
          <strong>openclasp</strong>
174
        </a>
175
        <p>Trust infrastructure for AI agents.</p>
176
        <small>Identity. Agreements. Assurance. Outcomes.</small>
177
      </footer>
178
    </div>
179
  );
180
}
181
182
const indexPath = path.resolve('apps/dashboard/dist/index.html');
183
const template = await readFile(indexPath, 'utf8');
184
const placeholder = '<div id="root"></div>';
185
186
if (!template.includes(placeholder)) {
187
  throw new Error(`Cannot prerender landing page: ${placeholder} was not found in ${indexPath}`);
188
}
189
190
const landing = renderToStaticMarkup(<PrerenderedLanding />);
191
await writeFile(indexPath, template.replace(placeholder, `<div id="root">${landing}</div>`));