@atolis-hq/wake 0.1.23 → 0.2.0

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.
@@ -1 +1 @@
1
- export const wakeVersion = "0.1.23+ge21a0d4";
1
+ export const wakeVersion = "0.2.0+g8c4b399";
package/docker/Dockerfile CHANGED
@@ -44,11 +44,17 @@ RUN --mount=type=cache,target=/root/.npm \
44
44
 
45
45
  COPY . .
46
46
  ARG WAKE_BUILD_TAG
47
- RUN WAKE_BUILD_TAG="$WAKE_BUILD_TAG" npm run build && chmod +x docker/entrypoint.sh
47
+ RUN WAKE_BUILD_TAG="$WAKE_BUILD_TAG" npm run build
48
48
 
49
49
  USER wake
50
50
  WORKDIR /home/wake
51
51
 
52
52
  EXPOSE 4317
53
53
 
54
- ENTRYPOINT ["/app/docker/entrypoint.sh"]
54
+ # Baked at build time so wake sandbox-entrypoint (and anything it spawns) can
55
+ # find the compiled CLI without hardcoding /app in multiple places. Docker's
56
+ # exec-form ENTRYPOINT below does not expand env vars, so it stays literal —
57
+ # that's fine since it's the very first thing that runs.
58
+ ENV WAKE_MAIN_JS=/app/dist/src/main.js
59
+
60
+ ENTRYPOINT ["node", "/app/dist/src/main.js", "sandbox-entrypoint"]
@@ -0,0 +1,53 @@
1
+ # syntax=docker/dockerfile:1
2
+ FROM node:20-bookworm-slim
3
+
4
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5
+ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
6
+ apt-get update \
7
+ && apt-get install -y --no-install-recommends git openssh-client ca-certificates curl gnupg \
8
+ && mkdir -p /etc/apt/keyrings \
9
+ && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
10
+ | gpg --dearmor -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
11
+ && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
12
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
13
+ > /etc/apt/sources.list.d/github-cli.list \
14
+ && curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
15
+ | gpg --dearmor -o /etc/apt/keyrings/ngrok-archive-keyring.gpg \
16
+ && chmod go+r /etc/apt/keyrings/ngrok-archive-keyring.gpg \
17
+ && echo "deb [signed-by=/etc/apt/keyrings/ngrok-archive-keyring.gpg] https://ngrok-agent.s3.amazonaws.com buster main" \
18
+ > /etc/apt/sources.list.d/ngrok.list \
19
+ && apt-get update \
20
+ && apt-get install -y --no-install-recommends gh ngrok
21
+
22
+ ARG WAKE_VERSION
23
+ RUN test -n "$WAKE_VERSION" || (echo "WAKE_VERSION build arg is required" && exit 1)
24
+
25
+ RUN --mount=type=cache,target=/root/.npm \
26
+ npm install -g @anthropic-ai/claude-code @openai/codex "@atolis-hq/wake@${WAKE_VERSION}"
27
+
28
+ RUN useradd --create-home --shell /bin/bash wake \
29
+ && mkdir -p /home/wake/.codex-runtime \
30
+ && mkdir -p /home/wake/.cursor \
31
+ && chown -R wake:wake /home/wake/.codex-runtime \
32
+ && chown -R wake:wake /home/wake/.cursor
33
+
34
+ ENV CODEX_HOME=/home/wake/.codex-runtime
35
+ ENV PATH=/home/wake/.local/bin:$PATH
36
+
37
+ RUN curl https://cursor.com/install -fsS | HOME=/home/wake bash \
38
+ && printf '#!/bin/bash\n[ "$1" = "agent" ] && shift\nexec ~/.local/bin/agent "$@"\n' \
39
+ > /home/wake/.local/bin/cursor \
40
+ && chmod +x /home/wake/.local/bin/cursor \
41
+ && chown -R wake:wake /home/wake/.local
42
+
43
+ USER wake
44
+ WORKDIR /home/wake
45
+
46
+ EXPOSE 4317
47
+
48
+ # No WAKE_MAIN_JS here: there is no /app in a packaged-mode image, and its
49
+ # absence is the signal (see resolveWakeInvocation in
50
+ # sandbox-entrypoint-command.ts) that the CLI should be invoked via the bare
51
+ # `wake` binary that `npm install -g` puts on PATH, rather than a hardcoded
52
+ # npm global lib path that varies by npm/OS setup.
53
+ ENTRYPOINT ["wake", "sandbox-entrypoint"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.1.23",
3
+ "version": "0.2.0",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,30 +0,0 @@
1
- import { join } from 'node:path';
2
- function normalizePath(value) {
3
- return value.replaceAll('\\', '/').replace(/^[A-Za-z]:/, '');
4
- }
5
- function toContainerPath(pathValue, hostWakeRoot, containerWakeRoot) {
6
- const normalizedPath = normalizePath(pathValue);
7
- const normalizedHostRoot = normalizePath(hostWakeRoot);
8
- const normalizedContainerRoot = normalizePath(containerWakeRoot);
9
- if (normalizedPath === normalizedHostRoot) {
10
- return normalizedContainerRoot;
11
- }
12
- if (normalizedPath.startsWith(`${normalizedHostRoot}/`)) {
13
- return `${normalizedContainerRoot}${normalizedPath.slice(normalizedHostRoot.length)}`;
14
- }
15
- return normalizedPath;
16
- }
17
- export function buildSandboxLoggedCommand(input) {
18
- const env = [
19
- `WAKE_SANDBOX_LABEL=${input.label}`,
20
- `WAKE_SANDBOX_CONTAINER_WAKE_ROOT=${input.config.sandbox.containerMountPath}`,
21
- `WAKE_SANDBOX_PROMPTS_ROOT=${toContainerPath(input.config.paths.promptsRoot ?? join(input.wakeRoot, 'prompts'), input.wakeRoot, input.config.sandbox.containerMountPath)}`,
22
- `WAKE_SANDBOX_CONTAINER_HOME=${input.config.sandbox.containerHomeMountPath}`,
23
- `WAKE_SANDBOX_HOST_WAKE_ROOT=${input.wakeRoot}`,
24
- `WAKE_SANDBOX_HOST_CONTAINER_HOME=${input.containerHomeRoot}`,
25
- `WAKE_SANDBOX_CONTAINER_MOUNT=${input.config.sandbox.containerMountPath}`,
26
- `WAKE_SANDBOX_CONTAINER_NAME=${input.config.sandbox.containerName}`,
27
- ...(input.cwd === undefined ? [] : [`WAKE_SANDBOX_CWD=${input.cwd}`]),
28
- ];
29
- return ['env', ...env, '/wake/docker/log-command.sh', '--', ...input.command];
30
- }