@evident-ai/runner-cdk 0.1.1-dev.04ef8b1 → 0.1.1-dev.1e07e9a

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.
package/README.md CHANGED
@@ -9,9 +9,9 @@ Reusable AWS CDK constructs for running an [Evident](https://evident.run) agent
9
9
  `desiredCount 0`, and an HMAC-authenticated waker Lambda scales it back up on the next
10
10
  message. You pay for the time the agent is actually working.
11
11
  - **`EvidentMicrovmConstruct`** — a per-session AWS Lambda MicroVM that boots on demand
12
- and suspends between messages. Installing this package is all you need: the image build
13
- context ships inside it (see [The MicroVM image](#the-microvm-image) below), so there is
14
- no checkout of `sroze/evident` involved. See
12
+ and suspends between messages. Installing the `@dev` tag of this package is all you
13
+ need: the image build context ships inside it (see [The MicroVM image](#the-microvm-image)
14
+ below), so there is no checkout of `sroze/evident` involved. See
15
15
  [the AWS runner doc](https://evident.run/docs/aws-runner) for the full picture of both
16
16
  strategies.
17
17
 
@@ -34,8 +34,9 @@ cluster can host several agents.
34
34
  ## Getting started
35
35
 
36
36
  For a full end-to-end walkthrough — shared infra, secrets without SOPS/KMS, the image,
37
- the two grants, deploy, and wiring the wake webhook — see
38
- [`GETTING-STARTED.md`](./GETTING-STARTED.md). The snippet below is the short version.
37
+ the two grants, deploy, and wiring the wake webhook — see `GETTING-STARTED.md` in this
38
+ package's directory (not published to npm; read it from a checkout of the repo). The
39
+ snippet below is the short version.
39
40
 
40
41
  ```ts
41
42
  import { EvidentScaleToZeroConstruct } from "@evident-ai/runner-cdk";
@@ -126,6 +127,7 @@ the per-phase hook scripts and the bundled hook server, published inside the tar
126
127
  the agent's workspace. `stageMicrovmImageContext()` puts the two together:
127
128
 
128
129
  ```ts
130
+ import path from 'node:path';
129
131
  import {
130
132
  EvidentMicrovmConstruct,
131
133
  HOOKS_PORT,
@@ -158,12 +160,11 @@ and the agent installs on first use.
158
160
 
159
161
  ## Status / limitations
160
162
 
161
- - **Published to npm** as `@evident-ai/runner-cdk` (MIT) — see
162
- [#957](https://github.com/sroze/evident/issues/957). Install it with `npm install
163
- @evident-ai/runner-cdk` (or `pnpm add`/`yarn add`); no checkout of this repo is
164
- required. It builds to a self-contained `dist/` (`pnpm --filter @evident-ai/runner-cdk
165
- build`) with no `workspace:`/`@evident/*` runtime dependency. This repo's own
166
- consumer (`infrastructure/evident-runner`) still consumes it as a `workspace:*`
167
- dependency for dogfooding.
163
+ - **Published to npm** as `@evident-ai/runner-cdk` (MIT). Install the `@dev` tag
164
+ `npm install @evident-ai/runner-cdk@dev` (or `pnpm add`/`yarn add`); no checkout of
165
+ this repo is required. It builds to a self-contained `dist/` (`pnpm --filter
166
+ @evident-ai/runner-cdk build`) with no `workspace:`/`@evident/*` runtime dependency.
167
+ This repo's own consumer (`infrastructure/evident-runner`) still consumes it as a
168
+ `workspace:*` dependency for dogfooding.
168
169
  - **AWS/ECS-specific.** Non-AWS clouds are an open question on the epic, not a supported
169
170
  path.
@@ -12,7 +12,7 @@ export interface EvidentMicrovmConstructProps {
12
12
  readonly imageSource: string;
13
13
  /**
14
14
  * ARN of the Lambda-managed base MicroVM image, from
15
- * `aws lambda list-managed-microvm-images`. A string, not a `CfnParameter`
15
+ * `aws lambda-microvms list-managed-microvm-images`. A string, not a `CfnParameter`
16
16
  * built here: the caller creates the parameter at ITS OWN stack scope
17
17
  * (preserving its logical id) and passes its resolved value down — a
18
18
  * construct must not mint parameters into a consumer's stack.
@@ -20,7 +20,7 @@ export interface EvidentMicrovmConstructProps {
20
20
  readonly baseImageArn: string;
21
21
  /**
22
22
  * Version of the Lambda-managed base MicroVM image, from
23
- * `aws lambda list-managed-microvm-images`. See `baseImageArn` for why this
23
+ * `aws lambda-microvms list-managed-microvm-images`. See `baseImageArn` for why this
24
24
  * is a plain string.
25
25
  */
26
26
  readonly baseImageVersion: string;
@@ -81,7 +81,9 @@ class EvidentMicrovmConstruct extends constructs_1.Construct {
81
81
  // ANDed with the age condition and counts newer noncurrent versions of
82
82
  // the SAME key, but litestream's LTX keys are txid-unique and churn by
83
83
  // DELETE, so a churned key has exactly one noncurrent version and zero
84
- // newer ones.
84
+ // newer ones. `expiredObjectDeleteMarker` reaps the delete marker itself once
85
+ // its noncurrent version is gone — without it, the version index grows
86
+ // unboundedly, one marker per churned LTX key.
85
87
  const durableState = new s3.Bucket(this, 'DurableState', {
86
88
  encryption: s3.BucketEncryption.S3_MANAGED,
87
89
  blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
@@ -98,6 +100,7 @@ class EvidentMicrovmConstruct extends constructs_1.Construct {
98
100
  {
99
101
  id: 'ExpireNoncurrentVersions',
100
102
  noncurrentVersionExpiration: cdk.Duration.days(7),
103
+ expiredObjectDeleteMarker: true,
101
104
  },
102
105
  ],
103
106
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evident-ai/runner-cdk",
3
- "version": "0.1.1-dev.04ef8b1",
3
+ "version": "0.1.1-dev.1e07e9a",
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",
@@ -15,13 +15,14 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "pnpm run build-bundled-deps && ts-node scripts/build.ts",
18
- "//build-bundled-deps": "scripts/build.ts esbuild-bundles src/microvm/image/hook-server.ts, which imports @evident-ai/lambda-microvm-runtime by its built `main`. Chained into `build` rather than left to turbo's `^build` because publish-runner-cdk.yaml invokes `pnpm --filter @evident-ai/runner-cdk build` directly, which bypasses turbo entirely.",
19
- "build-bundled-deps": "pnpm --filter @evident-ai/lambda-microvm-runtime build",
18
+ "//build-bundled-deps": "scripts/build.ts esbuild-bundles src/microvm/image/hook-server.ts, which imports @evident-ai/lambda-microvm-runtime by its built `main`. @evident-ai/lambda-microvm-cdk is a workspace:* devDependency whose types resolve through its own dist/, so tsc --project tsconfig.build.json cannot compile src/microvm/{shapes,construct}.ts without it. Chained into `build` rather than left to turbo's `^build` because publish-runner-cdk.yaml and infrastructure/evident-runner's build-runner-cdk-dep invoke `pnpm --filter @evident-ai/runner-cdk build` directly, which bypasses turbo entirely.",
19
+ "build-bundled-deps": "pnpm --filter @evident-ai/lambda-microvm-cdk build && pnpm --filter @evident-ai/lambda-microvm-runtime build",
20
20
  "typecheck": "tsc --noEmit",
21
21
  "test": "node --test --require ts-node/register 'src/**/*.test.ts'",
22
22
  "format": "prettier --write 'src/**/*.ts'",
23
23
  "lint": "eslint 'src/**/*.ts' --max-warnings=0"
24
24
  },
25
+ "//peerDependencies": "@evident-ai/lambda-microvm-cdk is a registry range here, never workspace:*: publish-runner-cdk.yaml ships this package with `npm publish`, not `pnpm publish`, so pnpm's workspace-protocol substitution never runs and a workspace: range would reach npm literally, breaking every external install. Enforced by infrastructure/evident-runner/src/runner-cdk-published-surface.test.ts. The matching devDependency is workspace:* so this monorepo's own build compiles against packages/lambda-microvm-cdk's source.",
25
26
  "peerDependencies": {
26
27
  "@evident-ai/lambda-microvm-cdk": "^0.1.1",
27
28
  "aws-cdk-lib": "^2.240.0",
@@ -31,7 +32,7 @@
31
32
  "@aws-sdk/client-ecs": "^3.682.0",
32
33
  "@aws-sdk/client-lambda-microvms": "^3.1095.0",
33
34
  "@aws-sdk/client-secrets-manager": "^3.682.0",
34
- "@evident-ai/lambda-microvm-cdk": "^0.1.1",
35
+ "@evident-ai/lambda-microvm-cdk": "workspace:*",
35
36
  "@evident-ai/lambda-microvm-runtime": "workspace:*",
36
37
  "@evident/webhook-signature": "workspace:*",
37
38
  "@types/node": "^22",
@@ -51,6 +52,6 @@
51
52
  "directory": "packages/runner-cdk"
52
53
  },
53
54
  "homepage": "https://evident.run",
54
- "author": "Evident <contact@evident.run>",
55
+ "author": "Evident <hello@evident.run>",
55
56
  "license": "MIT"
56
57
  }