Install and sign
This is the generic command sequence for a Hello World-style app.
npm install --save-dev \
https://github.com/free2pa/free2pa/releases/download/v0.4.2/free2pa-0.4.2.tgz
npx free2pa keygen \
--name "Hello World Publisher" \
--id hello-world \
--out-dir .free2pa/private
npx free2pa trust add \
.free2pa/private/hello-world.crt \
--store .free2pa/trusted-publishers \
--id hello-world
npx free2pa sign agent/SOUL.md \
--cert .free2pa/private/hello-world.crt \
--key .free2pa/private/hello-world.key
Wire the load gate
Hello World's server calls the gate before starting the model call.
import { loadVerifiedFile } from 'free2pa/load-gate';
async function runHelloWorldAgent({ assetPath, trustStore }) {
const verifiedSoul = await loadVerifiedFile({
assetPath,
trustStore,
});
return startAgent(verifiedSoul);
}
await runHelloWorldAgent({
assetPath: 'public/demo/hello-agent/trusted/SOUL.md',
trustStore: 'public/demo/hello-agent/trusted-publishers',
});