Skip to content

Commit 4aec6ed

Browse files
committed
What is this?
0 parents  commit 4aec6ed

176 files changed

Lines changed: 61836 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
library:
11+
name: Library — lint / test / build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
cache: npm
19+
- run: npm ci
20+
- run: npx nx lint stream-resource
21+
- run: npx nx test stream-resource --coverage
22+
- run: npx nx build stream-resource --configuration=production
23+
24+
website:
25+
name: Website — lint / build
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
cache: npm
33+
- run: npm ci
34+
- run: npx nx lint website
35+
# nx build website triggers demo:build first (dependsOn in project.json)
36+
- run: npx nx build website
37+
38+
mcp:
39+
name: MCP — build / smoke
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 22
46+
cache: npm
47+
- run: npm ci
48+
- run: npx nx test mcp --skip-nx-cache
49+
50+
chat-agent-smoke:
51+
name: Chat Agent — smoke
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: actions/setup-node@v4
56+
with:
57+
node-version: 22
58+
cache: npm
59+
- name: Install uv
60+
uses: astral-sh/setup-uv@v4
61+
with:
62+
python-version: '3.12'
63+
- run: npm ci
64+
- working-directory: examples/chat-agent
65+
run: uv sync
66+
- run: npx nx run chat-agent:smoke --skip-nx-cache
67+
68+
website-e2e:
69+
name: Website — e2e
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-node@v4
74+
with:
75+
node-version: 22
76+
cache: npm
77+
- run: npm ci
78+
- run: npx playwright install --with-deps chromium
79+
- run: npx nx e2e website --skip-nx-cache
80+
81+
deploy:
82+
name: Deploy → Vercel
83+
needs: [library, website, mcp, chat-agent-smoke, website-e2e]
84+
runs-on: ubuntu-latest
85+
# Only deploy on pushes to main, not on pull requests
86+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
87+
steps:
88+
- uses: actions/checkout@v4
89+
- uses: actions/setup-node@v4
90+
with:
91+
node-version: 22
92+
cache: npm
93+
# Vercel re-runs the full build on its servers using vercel.json buildCommand.
94+
# Required GitHub secrets (Settings → Secrets and variables → Actions):
95+
# VERCEL_TOKEN — vercel.com/account/tokens
96+
# VERCEL_ORG_ID — from .vercel/project.json after `vercel link`
97+
# VERCEL_PROJECT_ID — from .vercel/project.json after `vercel link`
98+
- run: npm ci
99+
- run: npx playwright install --with-deps chromium
100+
- name: Deploy to Vercel (production)
101+
id: deploy
102+
run: |
103+
url=$(npx vercel deploy --prod --yes --token=${{ secrets.VERCEL_TOKEN }} | tail -n 1)
104+
echo "deployment_url=$url" >> "$GITHUB_OUTPUT"
105+
env:
106+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
107+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
108+
- name: Verify deployed website
109+
run: npx nx e2e website --skip-nx-cache
110+
env:
111+
BASE_URL: ${{ steps.deploy.outputs.deployment_url }}

.github/workflows/e2e.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: E2E
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
e2e:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: npm
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v4
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install npm dependencies
24+
run: npm ci
25+
26+
- name: Install Python dependencies
27+
working-directory: examples/chat-agent
28+
run: uv sync
29+
30+
- name: Start LangGraph dev server
31+
working-directory: examples/chat-agent
32+
run: uv run langgraph dev --no-browser &
33+
env:
34+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
35+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
36+
LANGSMITH_TRACING: "true"
37+
LANGSMITH_PROJECT: stream-resource-e2e-ci
38+
39+
- name: Wait for server to be ready
40+
run: |
41+
echo "Waiting for LangGraph server..."
42+
for i in {1..30}; do
43+
curl -sf http://localhost:2024/ok && echo "Server ready" && break
44+
echo "Attempt $i/30..."
45+
sleep 2
46+
done
47+
curl -sf http://localhost:2024/ok || (echo "Server failed to start after 60s" && exit 1)
48+
49+
- name: Run e2e tests
50+
run: npx nx e2e stream-resource-e2e
51+
env:
52+
LANGGRAPH_URL: http://localhost:2024

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: npm
17+
registry-url: https://registry.npmjs.org
18+
- run: npm ci
19+
- run: npx nx test mcp --skip-nx-cache
20+
- run: npx nx test stream-resource
21+
- run: npx nx build stream-resource --configuration=production
22+
- name: Publish to npm
23+
run: npx nx-release-publish stream-resource
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Worktrees
2+
.worktrees/
3+
.superpowers/
4+
5+
# Node
6+
node_modules/
7+
dist/
8+
.next/
9+
10+
# Nx
11+
.nx/cache/
12+
.nx/workspace-data
13+
tmp/
14+
apps/website/test-results/
15+
apps/website/public/demo/
16+
17+
# Env
18+
.env
19+
.env.local
20+
21+
# OS
22+
.DS_Store
23+
24+
.angular
25+
26+
# Next.js
27+
.next
28+
out
29+
.vercel

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
/.nx/cache
5+
/.nx/workspace-data
6+
7+
.angular

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.verdaccio/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
log:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

COMMERCIAL.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Commercial Licensing
2+
3+
`@cacheplane/stream-resource` is source-available software dual-licensed under:
4+
5+
- **PolyForm Noncommercial 1.0.0** — free for noncommercial use (see [`LICENSE`](./LICENSE))
6+
- **StreamResource Commercial License** — required for commercial use (see [`LICENSE-COMMERCIAL`](./LICENSE-COMMERCIAL))
7+
8+
## What requires a commercial license?
9+
10+
Any use in a for-profit product, service, or organization requires a paid commercial license. This includes:
11+
12+
- Production applications at for-profit companies
13+
- SaaS products or internal tools at revenue-generating organizations
14+
- Consulting or client work where the software is deployed commercially
15+
16+
## License tiers
17+
18+
| Tier | Price | Scope |
19+
|---|---|---|
20+
| **Developer Seat** | $500 / seat / year | One developer, all environments, 12-month release lock |
21+
| **App Deployment** | $2,000 / app (one-time) | One named application, all developers, perpetual for version |
22+
| **Enterprise** | Custom | Volume licensing, priority support, custom contract |
23+
24+
## Purchase or inquire
25+
26+
- Website: https://stream-resource.dev/pricing
27+
- Email: hello@cacheplane.ai
28+
29+
See [`LICENSE-COMMERCIAL`](./LICENSE-COMMERCIAL) for the full commercial license terms.

0 commit comments

Comments
 (0)