Skip to content

Commit

Permalink
Merge branch 'develop' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
antman1p authored Jan 10, 2025
2 parents 942ffbb + 82607be commit 7fc41e4
Show file tree
Hide file tree
Showing 53 changed files with 1,515 additions and 3,548 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ ZEROG_FLOW_ADDRESS=
TEE_MODE=OFF # LOCAL | DOCKER | PRODUCTION
WALLET_SECRET_SALT= # ONLY define if you want to use TEE Plugin, otherwise it will throw errors

ENABLE_TEE_LOG=false # Set to true to enable TEE logging, only available when running eliza in TEE

# Flow Blockchain Configuration
FLOW_ADDRESS=
FLOW_PRIVATE_KEY= # Private key for SHA3-256 + P256 ECDSA
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ coverage
.eslintcache

agent/content

eliza.manifest
eliza.manifest.sgx
eliza.sig
59 changes: 59 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (C) 2024 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
NODEJS_DIR ?= /usr/bin

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
GRAMINE_LOG_LEVEL = debug
else
GRAMINE_LOG_LEVEL = error
endif

.PHONY: all
all: eliza.manifest
ifeq ($(SGX),1)
all: eliza.manifest.sgx eliza.sig
endif

.PHONY: eliza.manifest
eliza.manifest: eliza.manifest.template
gramine-manifest \
-Dlog_level=$(GRAMINE_LOG_LEVEL) \
-Darch_libdir=$(ARCH_LIBDIR) \
-Dnodejs_dir=$(NODEJS_DIR) \
$< >$@

# Make on Ubuntu <= 20.04 doesn't support "Rules with Grouped Targets" (`&:`),
# for details on this workaround see
# https://github.com/gramineproject/gramine/blob/e8735ea06c/CI-Examples/helloworld/Makefile
eliza.manifest.sgx eliza.sig: sgx_sign
@:

.INTERMEDIATE: sgx_sign
sgx_sign: eliza.manifest
gramine-sgx-sign \
--manifest $< \
--output $<.sgx

ifeq ($(SGX),)
GRAMINE = gramine-direct
else
GRAMINE = gramine-sgx
endif

# Start the default character:
# SGX=1 make start
# Start a specific character by passing arguments:
# SGX=1 make start -- --character "character/your_character_file.json"
.PHONY: start
start: all
$(GRAMINE) ./eliza --loader ts-node/esm src/index.ts --isRoot $(filter-out $@,$(MAKECMDGOALS))
.PHONY: clean
clean:
$(RM) *.manifest *.manifest.sgx *.sig

.PHONY: distclean
distclean: clean
Loading

0 comments on commit 7fc41e4

Please sign in to comment.