Skip to content

Commit

Permalink
fix last items for cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
HashWarlock committed Jan 4, 2025
1 parent aadf8cb commit 6f24839
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
12 changes: 10 additions & 2 deletions docs/docs/packages/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ const response = await runtime.triggerAction("INVOKE_CONTRACT", {

Integrates [Dstack SDK](https://github.com/Dstack-TEE/dstack) to enable TEE (Trusted Execution Environment) functionality and deploy secure & privacy-enhanced Eliza Agents:

**Actions:**

- `REMOTE_ATTESTATION` - Generate a Remote Attestation Quote based on `runtime.agentId` when the agent is prompted for a remote attestation. The quote is uploaded to the [proof.t16z.com](https://proof.t16z.com) service and the agent is informed of the attestation report URL.

**Providers:**

- `deriveKeyProvider` - Allows for secure key derivation within a TEE environment. It supports deriving keys for both Solana (Ed25519) and Ethereum (ECDSA) chains.
Expand Down Expand Up @@ -526,8 +530,12 @@ docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:latest
When using the provider through the runtime environment, ensure the following settings are configured:

```env
# Optional, for simulator purposes if testing on mac or windows. Leave empty for Linux x86 machines.
DSTACK_SIMULATOR_ENDPOINT="http://host.docker.internal:8090"
# TEE_MODE options:
# - LOCAL: Uses simulator at localhost:8090 (for local development)
# - DOCKER: Uses simulator at host.docker.internal:8090 (for docker development)
# - PRODUCTION: No simulator, uses production endpoints
# Defaults to OFF if not specified
TEE_MODE=OFF # LOCAL | DOCKER | PRODUCTION
WALLET_SECRET_SALT=your-secret-salt // Required to single agent deployments
```

Expand Down
12 changes: 5 additions & 7 deletions packages/plugin-tee/src/actions/remoteAttestation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IAgentRuntime, Memory, State, HandlerCallback } from "@elizaos/core";
import { RemoteAttestationProvider } from "../providers/remoteAttestationProvider";
import { fetch, type BodyInit } from 'undici'
import { fetch, type BodyInit } from "undici";

function hexToUint8Array(hex: string) {
hex = hex.trim();
Expand Down Expand Up @@ -58,11 +58,9 @@ export const remoteAttestationAction = {
const response = await uploadUint8Array(attestationData);
const data = await response.json();
callback({
text: `Uploading attestation to proof.t16z.com...`,
action: "NONE",
});
callback({
text: `Attestation report for ${agentName}: https://proof.t16z.com/reports/${data.checksum}`,
text: `Here's my 🧾 RA Quote 🫡
https://proof.t16z.com/reports/${data.checksum}`,

Check failure on line 63 in packages/plugin-tee/src/actions/remoteAttestation.ts

View workflow job for this annotation

GitHub Actions / check

'agentName' is assigned a value but never used. Allowed unused vars must match /^_/u
action: "NONE",
});
return true;
Expand All @@ -85,7 +83,7 @@ export const remoteAttestationAction = {
{
user: "{{user2}}",
content: {
text: "One second, let me generate and upload my attestation report",
text: "Of course, one second...",
action: "REMOTE_ATTESTATION",
},
}
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-tee/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ export default defineConfig({
"@solana/buffer-layout",
"stream",
"buffer",
"undici",
],
});

0 comments on commit 6f24839

Please sign in to comment.