From 71e2175bb732f13f315cbb5c1ab2c707da911b80 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Fri, 29 May 2026 02:22:12 -0400 Subject: [PATCH 1/5] fix: move documented examples under integrations --- README.md | 4 ++-- examples/README.md | 2 ++ examples/{ => integrations}/nextjs-basic/README.md | 0 .../nextjs-basic/app/api/chat/route.ts | 0 .../nextjs-basic/lib/context-sessions.ts | 0 .../{ => integrations}/nextjs-basic/next-env.d.ts | 0 .../nextjs-basic/package-lock.json | 0 .../{ => integrations}/nextjs-basic/package.json | 0 .../{ => integrations}/nextjs-basic/tsconfig.json | 0 examples/{ => integrations}/node-basic/README.md | 2 +- examples/{ => integrations}/node-basic/server.ts | 0 package-lock.json | 4 ++-- package.json | 14 +++++++++++++- tsconfig.build.json | 2 +- 14 files changed, 21 insertions(+), 7 deletions(-) rename examples/{ => integrations}/nextjs-basic/README.md (100%) rename examples/{ => integrations}/nextjs-basic/app/api/chat/route.ts (100%) rename examples/{ => integrations}/nextjs-basic/lib/context-sessions.ts (100%) rename examples/{ => integrations}/nextjs-basic/next-env.d.ts (100%) rename examples/{ => integrations}/nextjs-basic/package-lock.json (100%) rename examples/{ => integrations}/nextjs-basic/package.json (100%) rename examples/{ => integrations}/nextjs-basic/tsconfig.json (100%) rename examples/{ => integrations}/node-basic/README.md (93%) rename examples/{ => integrations}/node-basic/server.ts (100%) diff --git a/README.md b/README.md index e7eaae6..f264c19 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,11 @@ npm install @rlippmann/context-compiler ## Examples -- `examples/nextjs-basic/` — minimal Next.js App Router integration +- `examples/integrations/nextjs-basic/` — minimal Next.js App Router integration - request flow with compiler state where explicit instructions stay consistent across turns - `clarify` blocks LLM calls - per-session compiler state via checkpoint export/import so sessions can resume safely -- `examples/node-basic/` — minimal Node HTTP server integration +- `examples/integrations/node-basic/` — minimal Node HTTP server integration - `examples/integrations/vercel_ai_sdk_structured_output/` — host-side schema selection for Vercel AI SDK structured output ## Quick Start diff --git a/examples/README.md b/examples/README.md index 72058a5..dbf9407 100644 --- a/examples/README.md +++ b/examples/README.md @@ -44,4 +44,6 @@ Shows that preview does not mutate live engine state, then applies the same inpu ## Integrations +- [`examples/integrations/nextjs-basic/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/nextjs-basic/README.md) +- [`examples/integrations/node-basic/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/node-basic/README.md) - [`examples/integrations/vercel_ai_sdk_structured_output/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/vercel_ai_sdk_structured_output/README.md) diff --git a/examples/nextjs-basic/README.md b/examples/integrations/nextjs-basic/README.md similarity index 100% rename from examples/nextjs-basic/README.md rename to examples/integrations/nextjs-basic/README.md diff --git a/examples/nextjs-basic/app/api/chat/route.ts b/examples/integrations/nextjs-basic/app/api/chat/route.ts similarity index 100% rename from examples/nextjs-basic/app/api/chat/route.ts rename to examples/integrations/nextjs-basic/app/api/chat/route.ts diff --git a/examples/nextjs-basic/lib/context-sessions.ts b/examples/integrations/nextjs-basic/lib/context-sessions.ts similarity index 100% rename from examples/nextjs-basic/lib/context-sessions.ts rename to examples/integrations/nextjs-basic/lib/context-sessions.ts diff --git a/examples/nextjs-basic/next-env.d.ts b/examples/integrations/nextjs-basic/next-env.d.ts similarity index 100% rename from examples/nextjs-basic/next-env.d.ts rename to examples/integrations/nextjs-basic/next-env.d.ts diff --git a/examples/nextjs-basic/package-lock.json b/examples/integrations/nextjs-basic/package-lock.json similarity index 100% rename from examples/nextjs-basic/package-lock.json rename to examples/integrations/nextjs-basic/package-lock.json diff --git a/examples/nextjs-basic/package.json b/examples/integrations/nextjs-basic/package.json similarity index 100% rename from examples/nextjs-basic/package.json rename to examples/integrations/nextjs-basic/package.json diff --git a/examples/nextjs-basic/tsconfig.json b/examples/integrations/nextjs-basic/tsconfig.json similarity index 100% rename from examples/nextjs-basic/tsconfig.json rename to examples/integrations/nextjs-basic/tsconfig.json diff --git a/examples/node-basic/README.md b/examples/integrations/node-basic/README.md similarity index 93% rename from examples/node-basic/README.md rename to examples/integrations/node-basic/README.md index 67a4cee..c0a289b 100644 --- a/examples/node-basic/README.md +++ b/examples/integrations/node-basic/README.md @@ -12,7 +12,7 @@ npm install ``` ```bash -npx tsx examples/node-basic/server.ts +npx tsx examples/integrations/node-basic/server.ts ``` This example uses `exportCheckpointJson()` / `importCheckpointJson()` for per-session persistence. diff --git a/examples/node-basic/server.ts b/examples/integrations/node-basic/server.ts similarity index 100% rename from examples/node-basic/server.ts rename to examples/integrations/node-basic/server.ts diff --git a/package-lock.json b/package-lock.json index ad2f604..0b4a78f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rlippmann/context-compiler", - "version": "0.7.1", + "version": "0.7.2", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.9.3", diff --git a/package.json b/package.json index e77c398..60dcf80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.1", + "version": "0.7.2", "description": "Store AI rules and corrections separately from chat history so they stay consistent across turns.", "keywords": [ "llm", @@ -39,6 +39,18 @@ }, "files": [ "dist", + "examples/README.md", + "examples/integrations/nextjs-basic/README.md", + "examples/integrations/nextjs-basic/app", + "examples/integrations/nextjs-basic/lib", + "examples/integrations/nextjs-basic/next-env.d.ts", + "examples/integrations/nextjs-basic/package.json", + "examples/integrations/nextjs-basic/package-lock.json", + "examples/integrations/nextjs-basic/tsconfig.json", + "examples/integrations/node-basic/README.md", + "examples/integrations/node-basic/server.ts", + "examples/integrations/vercel_ai_sdk_structured_output/README.md", + "examples/integrations/vercel_ai_sdk_structured_output/index.ts", "LICENSE", "README.md" ], diff --git a/tsconfig.build.json b/tsconfig.build.json index 986970b..2e37c84 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -11,7 +11,7 @@ "index.ts", "src/**/*.ts", "examples/*.ts", - "examples/integrations/**/*.ts", + "examples/integrations/vercel_ai_sdk_structured_output/**/*.ts", "demos/**/*.ts", "demos/**/*.d.ts" ], From fc1820655e6de07a33cf12b3429f9c7a71bc8157 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Fri, 29 May 2026 02:24:14 -0400 Subject: [PATCH 2/5] docs: fix example README links --- examples/README.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/README.md b/examples/README.md index dbf9407..213c221 100644 --- a/examples/README.md +++ b/examples/README.md @@ -44,6 +44,6 @@ Shows that preview does not mutate live engine state, then applies the same inpu ## Integrations -- [`examples/integrations/nextjs-basic/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/nextjs-basic/README.md) -- [`examples/integrations/node-basic/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/node-basic/README.md) -- [`examples/integrations/vercel_ai_sdk_structured_output/README.md`](/Users/rlippmann/Source/context-compiler-ts/examples/integrations/vercel_ai_sdk_structured_output/README.md) +- [Next.js integration](integrations/nextjs-basic/README.md) +- [Node integration](integrations/node-basic/README.md) +- [Vercel AI SDK structured output](integrations/vercel_ai_sdk_structured_output/README.md) diff --git a/package-lock.json b/package-lock.json index 0b4a78f..0796915 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.2", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rlippmann/context-compiler", - "version": "0.7.2", + "version": "0.7.3", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.9.3", diff --git a/package.json b/package.json index 60dcf80..ea89ac4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.2", + "version": "0.7.3", "description": "Store AI rules and corrections separately from chat history so they stay consistent across turns.", "keywords": [ "llm", From 5a1622960d606ca21d917e1147888ab6c22246ed Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Fri, 29 May 2026 02:27:35 -0400 Subject: [PATCH 3/5] chore: restore package version to 0.7.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0796915..0b4a78f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.3", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rlippmann/context-compiler", - "version": "0.7.3", + "version": "0.7.2", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.9.3", diff --git a/package.json b/package.json index ea89ac4..60dcf80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rlippmann/context-compiler", - "version": "0.7.3", + "version": "0.7.2", "description": "Store AI rules and corrections separately from chat history so they stay consistent across turns.", "keywords": [ "llm", From c38df17e512cea5a8106d659b0f52433b87d3661 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Fri, 29 May 2026 02:29:49 -0400 Subject: [PATCH 4/5] fix: update ci nextjs integration path --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94fa8eb..a337493 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,9 +68,9 @@ jobs: run: npm test - name: Install Next.js example - working-directory: examples/nextjs-basic + working-directory: examples/integrations/nextjs-basic run: npm ci - name: Build Next.js example - working-directory: examples/nextjs-basic + working-directory: examples/integrations/nextjs-basic run: npm run build From 97b0b440500ea6eef87ddb1849b0f248d2c1a622 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Fri, 29 May 2026 02:33:15 -0400 Subject: [PATCH 5/5] fix: correct nextjs example local package path --- .../nextjs-basic/package-lock.json | 68 ++----------------- .../integrations/nextjs-basic/package.json | 2 +- 2 files changed, 5 insertions(+), 65 deletions(-) diff --git a/examples/integrations/nextjs-basic/package-lock.json b/examples/integrations/nextjs-basic/package-lock.json index 0ed10ae..20a6d2a 100644 --- a/examples/integrations/nextjs-basic/package-lock.json +++ b/examples/integrations/nextjs-basic/package-lock.json @@ -8,7 +8,7 @@ "name": "nextjs-basic-context-compiler-example", "version": "0.0.1", "dependencies": { - "@rlippmann/context-compiler": "file:../..", + "@rlippmann/context-compiler": "file:../../..", "next": "^15.3.0", "react": "^19.0.0", "react-dom": "^19.0.0" @@ -20,9 +20,9 @@ "typescript": "^5.7.2" } }, - "../..": { + "../../..": { "name": "@rlippmann/context-compiler", - "version": "0.5.0", + "version": "0.7.2", "license": "Apache-2.0", "devDependencies": { "typescript": "^5.9.3", @@ -132,9 +132,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -151,9 +148,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -170,9 +164,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -189,9 +180,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -208,9 +196,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -227,9 +212,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -246,9 +228,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -265,9 +244,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -284,9 +260,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -309,9 +282,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -334,9 +304,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -359,9 +326,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -384,9 +348,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -409,9 +370,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -434,9 +392,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -459,9 +414,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -598,9 +550,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -617,9 +566,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -636,9 +582,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -655,9 +598,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -700,7 +640,7 @@ } }, "node_modules/@rlippmann/context-compiler": { - "resolved": "../..", + "resolved": "../../..", "link": true }, "node_modules/@swc/helpers": { diff --git a/examples/integrations/nextjs-basic/package.json b/examples/integrations/nextjs-basic/package.json index 0757681..c49bccb 100644 --- a/examples/integrations/nextjs-basic/package.json +++ b/examples/integrations/nextjs-basic/package.json @@ -10,7 +10,7 @@ "test:integration": "node ../../scripts/test-nextjs-integration.js" }, "dependencies": { - "@rlippmann/context-compiler": "file:../..", + "@rlippmann/context-compiler": "file:../../..", "next": "^15.3.0", "react": "^19.0.0", "react-dom": "^19.0.0"