@evident-ai/runner-cdk 3.4.1-dev.cb56b3f → 3.4.1-dev.d4a79de
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,13 +95,23 @@ ARG OPENCODE_VERSION=1.18.3
|
|
|
95
95
|
ARG EVIDENT_CLI_VERSION=dev
|
|
96
96
|
ARG CLAUDE_CODE_VERSION=latest
|
|
97
97
|
ARG RUNNER_SYNCHRONISER_VERSION=dev
|
|
98
|
+
#
|
|
99
|
+
# @brave/brave-search-mcp-server is pinned (not a build arg — a single caller,
|
|
100
|
+
# opencode.evident.jsonc, needs one version) and baked here for the same reason
|
|
101
|
+
# as the ECS runner image: a cold `npx -y` install of it took ~38s in a fresh
|
|
102
|
+
# MicroVM, over OpenCode's ~30s MCP connect timeout, so the server silently
|
|
103
|
+
# failed to connect on every first turn after a boot. Baking it lets
|
|
104
|
+
# opencode.evident.jsonc invoke the installed `brave-search-mcp-server` binary
|
|
105
|
+
# directly instead of through `npx`.
|
|
98
106
|
RUN npm install -g \
|
|
99
107
|
"opencode-ai@${OPENCODE_VERSION}" \
|
|
100
108
|
"@evident-ai/cli@${EVIDENT_CLI_VERSION}" \
|
|
101
109
|
"@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" \
|
|
102
110
|
"@evident-ai/runner-synchroniser@${RUNNER_SYNCHRONISER_VERSION}" \
|
|
111
|
+
"@brave/brave-search-mcp-server@2.1.0" \
|
|
103
112
|
&& opencode --version \
|
|
104
113
|
&& evident --version \
|
|
114
|
+
&& brave-search-mcp-server --help >/dev/null \
|
|
105
115
|
&& npm cache clean --force
|
|
106
116
|
|
|
107
117
|
# Playwright chromium + OS deps for E2E, baked at build time to avoid a slow
|
|
@@ -21,6 +21,12 @@ OPENCODE_PORT="${OPENCODE_PORT:-4096}"
|
|
|
21
21
|
# /proc/<pid>/environ, which runs as that same uid. /terminate removes it.
|
|
22
22
|
# shellcheck disable=SC2034 # read by the scripts that source this file
|
|
23
23
|
CONTEXT_FILE="/dev/shm/evident-run-context"
|
|
24
|
+
|
|
25
|
+
# The runtime injects MICROVM_ID only into /run, never /resume. This tmpfs file
|
|
26
|
+
# survives suspend/resume so /resume can restore the id for every fresh CLI
|
|
27
|
+
# process to self-report and acknowledge a fulfilled recycle request (#1906).
|
|
28
|
+
# shellcheck disable=SC2034 # read by the scripts that source this file
|
|
29
|
+
MICROVM_ID_FILE="/dev/shm/evident-microvm-id"
|
|
24
30
|
TUNNEL_PID_FILE="/dev/shm/evident-tunnel.pid"
|
|
25
31
|
OPENCODE_PID_FILE="/dev/shm/evident-opencode.pid"
|
|
26
32
|
LITESTREAM_PID_FILE="/dev/shm/evident-litestream.pid"
|
|
@@ -39,6 +39,13 @@ fi
|
|
|
39
39
|
read -r runner_key
|
|
40
40
|
} <"${CONTEXT_FILE}"
|
|
41
41
|
|
|
42
|
+
# Restore the id so the resumed CLI can self-report and acknowledge any
|
|
43
|
+
# outstanding recycle request (#1906). Older images may not have this file.
|
|
44
|
+
if [ -s "${MICROVM_ID_FILE}" ]; then
|
|
45
|
+
MICROVM_ID="$(cat "${MICROVM_ID_FILE}")"
|
|
46
|
+
export MICROVM_ID
|
|
47
|
+
fi
|
|
48
|
+
|
|
42
49
|
# Tolerant, never fatal: a resume that fails costs the user their whole
|
|
43
50
|
# session, so a broken durable-state config degrades to "no session-DB
|
|
44
51
|
# replication" rather than a failed resume. The CLI's own guards handle the
|
|
@@ -77,7 +77,14 @@ check_runner_key "${runner_key}" "${api_url}" || exit 1
|
|
|
77
77
|
# is written. Bare: every guard inside start_credential_sync is its own `return 0`.
|
|
78
78
|
start_credential_sync
|
|
79
79
|
|
|
80
|
-
# 7 — the
|
|
80
|
+
# 7 — preserve the VM id across suspend/resume. The runtime always supplies it
|
|
81
|
+
# for a /run hook, and the subshell keeps the persisted value protected.
|
|
82
|
+
(
|
|
83
|
+
umask 077
|
|
84
|
+
printf '%s\n' "${MICROVM_ID}" >"${MICROVM_ID_FILE}"
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# 8 — the first per-VM identity on the wire. The subshell's umask makes the file
|
|
81
88
|
# unreadable to anyone else from the moment it exists, before the key is in it.
|
|
82
89
|
(
|
|
83
90
|
umask 077
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evident-ai/runner-cdk",
|
|
3
|
-
"version": "3.4.1-dev.
|
|
3
|
+
"version": "3.4.1-dev.d4a79de",
|
|
4
4
|
"description": "Reusable CDK constructs for an Evident agent runner: a single scale-to-zero Fargate runner (task + service + per-agent self-stop role + waker Lambda), or a per-session AWS Lambda MicroVM that boots on demand and suspends between messages. Instantiate once per agent from your own stack.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|