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

Viewing files at commit 20744dd65349Commit detailsView latest

scripts/prerender-landing.tsx 190 lines · 6.6 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
  'publisher authenticated',
7
  'success prediction',
8
  'adaptive risk questions',
9
  'recommended safeguards',
10
  'direct A2A',
11
  'outcome learning',
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> AI assurance for agent-to-agent agreements
37
            </p>
38
            <h1>
39
              Know if an agent will deliver.
40
              <br />
41
              <em>Before you trust it.</em>
42
            </h1>
43
            <p>
44
              OpenClasp predicts whether an external agent will complete this specific agreement—and
45
              tells your agent what safeguards to require.
46
            </p>
47
            <div className="heroActions">
48
              <a className="landingPrimary" href="#access">
49
                sign in →
50
              </a>
51
              <a className="landingSecondary" href="#product">
52
                see the assurance loop
53
              </a>
54
            </div>
55
            <div className="heroNotes" aria-label="Protocol flags">
56
              <span>--direct-a2a</span>
57
              <span>--one-question-at-a-time</span>
58
              <span>--no-conversation-storage</span>
59
            </div>
60
          </div>
61
        </section>
62
63
        <div className="capabilityRail" aria-label="OpenClasp capabilities">
64
          {capabilities.map((item) => (
65
            <span key={item}>{item}</span>
66
          ))}
67
        </div>
68
69
        <section className="productSection" id="product">
70
          <div className="sectionIntro">
71
            <p className="landingKicker">
72
              <span>01</span> before the agent acts
73
            </p>
74
            <h2>
75
              A decision, not
76
              <br />
77
              <em>a generic trust score.</em>
78
            </h2>
79
            <p>
80
              The same agent can be safe for one task and risky for another. OpenClasp evaluates the
81
              exact agreement, version, permissions, evidence requirements, and relevant history.
82
            </p>
83
          </div>
84
          <section className="coreQuestions" aria-labelledby="core-questions-title">
85
            <header>
86
              <span>AI ASSURANCE DECISION</span>
87
              <h3 id="core-questions-title">For this agreement, OpenClasp determines:</h3>
88
            </header>
89
            <ol>
90
              <li>
91
                <span>01 · PREDICTION</span>
92
                <strong>How likely is this agent version to complete the task?</strong>
93
              </li>
94
              <li>
95
                <span>02 · RISK</span>
96
                <strong>What is most likely to make the agreement fail?</strong>
97
              </li>
98
              <li>
99
                <span>03 · NEXT QUESTION</span>
100
                <strong>Which single answer would reduce uncertainty most?</strong>
101
              </li>
102
              <li>
103
                <span>04 · SAFEGUARDS</span>
104
                <strong>What should change before either agent proceeds?</strong>
105
              </li>
106
            </ol>
107
          </section>
108
        </section>
109
110
        <section className="intelligenceSection" id="intelligence">
111
          <div className="sectionIntro">
112
            <p className="landingKicker">
113
              <span>02</span> the compounding layer
114
            </p>
115
            <h2>
116
              Every outcome
117
              <br />
118
              <em>makes the next decision better.</em>
119
            </h2>
120
            <p>
121
              OpenClasp measures which predictions were calibrated, which questions revealed risk,
122
              and which accepted safeguards correlate with success.
123
            </p>
124
          </div>
125
          <ol className="intelligenceLoop" aria-label="OpenClasp intelligence flywheel">
126
            <li>
127
              <span>01</span>
128
              <strong>Specific agreement</strong>
129
            </li>
130
            <li>
131
              <span>02</span>
132
              <strong>Prediction + probe</strong>
133
            </li>
134
            <li>
135
              <span>03</span>
136
              <strong>Safeguard decision</strong>
137
            </li>
138
            <li>
139
              <span>04</span>
140
              <strong>Scored outcome</strong>
141
            </li>
142
          </ol>
143
          <p className="intelligenceBoundary">
144
            Conversation bodies stay between agent runtimes. Learning uses explicit structured
145
            records, stays scoped to task and version, and never claims safeguards caused an
146
            outcome.
147
          </p>
148
        </section>
149
150
        <section className="accessSection" id="access">
151
          <div className="accessCopy">
152
            <p className="landingKicker">
153
              <span>03</span> identity required
154
            </p>
155
            <h2>Access your agent network.</h2>
156
            <p>
157
              Sign in to connect agents, control network participation, and inspect structured
158
              history.
159
            </p>
160
          </div>
161
          <div className="accessCard">
162
            <a className="landingPrimary" href="/login">
163
              continue to sign in →
164
            </a>
165
            <small>google or github · openclasp never receives your password</small>
166
          </div>
167
        </section>
168
      </main>
169
170
      <footer className="landingFooter">
171
        <a className="landingBrand" href="#top">
172
          <strong>openclasp</strong>
173
        </a>
174
        <p>AI assurance for agent-to-agent agreements.</p>
175
        <small>Predict success. Expose risk. Require safeguards. Learn from outcomes.</small>
176
      </footer>
177
    </div>
178
  );
179
}
180
181
const indexPath = path.resolve('apps/dashboard/dist/index.html');
182
const template = await readFile(indexPath, 'utf8');
183
const placeholder = '<div id="root"></div>';
184
185
if (!template.includes(placeholder)) {
186
  throw new Error(`Cannot prerender landing page: ${placeholder} was not found in ${indexPath}`);
187
}
188
189
const landing = renderToStaticMarkup(<PrerenderedLanding />);
190
await writeFile(indexPath, template.replace(placeholder, `<div id="root">${landing}</div>`));