Skip to content

Commit aac58f7

Browse files
authored
Merge branch 'develop' into patch-4
2 parents 867dc90 + cfcfd26 commit aac58f7

38 files changed

+1528
-206
lines changed

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ ZEROG_FLOW_ADDRESS=
340340
TEE_MODE=OFF # LOCAL | DOCKER | PRODUCTION
341341
WALLET_SECRET_SALT= # ONLY define if you want to use TEE Plugin, otherwise it will throw errors
342342

343+
ENABLE_TEE_LOG=false # Set to true to enable TEE logging, only available when running eliza in TEE
344+
343345
# Flow Blockchain Configuration
344346
FLOW_ADDRESS=
345347
FLOW_PRIVATE_KEY= # Private key for SHA3-256 + P256 ECDSA

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ coverage
5757
.eslintcache
5858

5959
agent/content
60+
61+
eliza.manifest
62+
eliza.manifest.sgx
63+
eliza.sig

Makefile

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright (C) 2024 Gramine contributors
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
5+
NODEJS_DIR ?= /usr/bin
6+
7+
ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)
8+
9+
ifeq ($(DEBUG),1)
10+
GRAMINE_LOG_LEVEL = debug
11+
else
12+
GRAMINE_LOG_LEVEL = error
13+
endif
14+
15+
.PHONY: all
16+
all: eliza.manifest
17+
ifeq ($(SGX),1)
18+
all: eliza.manifest.sgx eliza.sig
19+
endif
20+
21+
.PHONY: eliza.manifest
22+
eliza.manifest: eliza.manifest.template
23+
gramine-manifest \
24+
-Dlog_level=$(GRAMINE_LOG_LEVEL) \
25+
-Darch_libdir=$(ARCH_LIBDIR) \
26+
-Dnodejs_dir=$(NODEJS_DIR) \
27+
$< >$@
28+
29+
# Make on Ubuntu <= 20.04 doesn't support "Rules with Grouped Targets" (`&:`),
30+
# for details on this workaround see
31+
# https://github.com/gramineproject/gramine/blob/e8735ea06c/CI-Examples/helloworld/Makefile
32+
eliza.manifest.sgx eliza.sig: sgx_sign
33+
@:
34+
35+
.INTERMEDIATE: sgx_sign
36+
sgx_sign: eliza.manifest
37+
gramine-sgx-sign \
38+
--manifest $< \
39+
--output $<.sgx
40+
41+
ifeq ($(SGX),)
42+
GRAMINE = gramine-direct
43+
else
44+
GRAMINE = gramine-sgx
45+
endif
46+
47+
# Start the default character:
48+
# SGX=1 make start
49+
# Start a specific character by passing arguments:
50+
# SGX=1 make start -- --character "character/your_character_file.json"
51+
.PHONY: start
52+
start: all
53+
$(GRAMINE) ./eliza --loader ts-node/esm src/index.ts --isRoot $(filter-out $@,$(MAKECMDGOALS))
54+
.PHONY: clean
55+
clean:
56+
$(RM) *.manifest *.manifest.sgx *.sig
57+
58+
.PHONY: distclean
59+
distclean: clean

0 commit comments

Comments
 (0)