Skip to content

Commit d0fc934

Browse files
committed
What is this?
0 parents  commit d0fc934

169 files changed

Lines changed: 60795 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: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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
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 build mcp
49+
50+
deploy:
51+
name: Deploy → Vercel
52+
needs: [library, website, mcp]
53+
runs-on: ubuntu-latest
54+
# Only deploy on pushes to main, not on pull requests
55+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: actions/setup-node@v4
59+
with:
60+
node-version: 22
61+
cache: npm
62+
# Vercel re-runs the full build on its servers using vercel.json buildCommand.
63+
# Required GitHub secrets (Settings → Secrets and variables → Actions):
64+
# VERCEL_TOKEN — vercel.com/account/tokens
65+
# VERCEL_ORG_ID — from .vercel/project.json after `vercel link`
66+
# VERCEL_PROJECT_ID — from .vercel/project.json after `vercel link`
67+
- name: Deploy to Vercel (production)
68+
run: npx vercel deploy --prod --yes --token=${{ secrets.VERCEL_TOKEN }}
69+
env:
70+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
71+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

.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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 stream-resource
20+
- run: npx nx build stream-resource --configuration=production
21+
- name: Publish to npm
22+
run: npx nx-release-publish stream-resource
23+
env:
24+
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.

LICENSE

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
PolyForm Noncommercial License 1.0.0
2+
3+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
4+
5+
Copyright (c) 2026 Brian Love d/b/a cacheplane
6+
7+
## Acceptance
8+
9+
In order to get any license under these terms, you must agree
10+
to them as both strict obligations and conditions to all
11+
your licenses.
12+
13+
## Copyright License
14+
15+
The licensor grants you a copyright license for the
16+
software to do everything you might do with the software
17+
that would otherwise infringe the licensor's copyright
18+
in it for any permitted purpose. However, you may
19+
only distribute the software according to Distribution
20+
License and make changes or new works based on the
21+
software according to Changes and New Works License.
22+
23+
## Distribution License
24+
25+
The licensor grants you an additional copyright license
26+
to distribute copies of the software. Your license
27+
to distribute covers distributing the software with
28+
changes and new works permitted by Changes and New
29+
Works License.
30+
31+
## Notices
32+
33+
You must ensure that anyone who gets a copy of
34+
any part of the software from you also gets a
35+
copy of these terms or the URL for them above,
36+
as well as copies of any plain-text lines beginning
37+
with `Required Notice:` that the licensor provided
38+
with the software. For example:
39+
40+
> Required Notice: Copyright (c) 2026 Brian Love d/b/a cacheplane
41+
42+
## Changes and New Works License
43+
44+
The licensor grants you an additional copyright license
45+
to make changes and new works based on the software
46+
for any permitted purpose.
47+
48+
## Patent License
49+
50+
The licensor grants you a patent license for the
51+
software that covers patent claims the licensor can
52+
license, or becomes able to license, that you would
53+
infringe by using the software.
54+
55+
## Noncommercial Purposes
56+
57+
Any noncommercial purpose is a permitted purpose.
58+
59+
## Personal Uses
60+
61+
Personal use for research, experiment, and testing for
62+
the benefit of public knowledge, personal study, private
63+
entertainment, hobby projects, amateur pursuits, or religious
64+
observance, without any anticipated commercial application,
65+
is use for a noncommercial purpose.
66+
67+
## Noncommercial Organizations
68+
69+
Use in the scope of an organization with no substantial
70+
commercial activity is use for a noncommercial purpose.
71+
Substantial commercial activity does not include
72+
providing software to an organization with substantial
73+
commercial activity if the software is not itself
74+
a commercial product.
75+
76+
## Fair Use
77+
78+
You may have "fair use" rights for the software under
79+
the law. These terms do not limit them.
80+
81+
## Free Trial
82+
83+
Use to evaluate whether the software suits a particular
84+
application for less than 32 consecutive calendar days,
85+
on behalf of you or your organization, is use for a
86+
noncommercial purpose.
87+
88+
## No Other Rights
89+
90+
These terms do not allow you to sublicense or transfer
91+
any of your licenses to anyone else, or prevent the
92+
licensor from granting licenses to anyone else. These
93+
terms do not imply any other licenses.
94+
95+
## Patent Defense
96+
97+
If you make any written claim that the software
98+
infringes or contributes to infringement of any patent,
99+
your patent license for the software granted under
100+
these terms ends immediately. If your employer makes
101+
such a claim, your patent license ends immediately for
102+
work on behalf of your employer.
103+
104+
## Violations
105+
106+
The first time you are notified in writing that you
107+
have violated any of these terms, and you stop your
108+
violation within 30 days after your notification, your
109+
license continues forever. Otherwise, your license
110+
ends immediately.
111+
112+
## No Liability
113+
114+
***As far as the law allows, the software comes as is,
115+
without any warranty or condition, and the licensor
116+
will not be liable to you for any damages arising out
117+
of these terms or the use or nature of the software,
118+
under any kind of legal claim.***
119+
120+
## Definitions
121+
122+
The **licensor** is the individual or entity offering
123+
these terms, and the **software** is the software the
124+
licensor makes available under these terms.
125+
126+
**You** refers to the individual or entity agreeing
127+
to these terms.
128+
129+
**Your organization** is any legal entity, sole
130+
proprietorship, or other kind of organization that
131+
you work for, plus all organizations that have control
132+
over, are under the control of, or are under common
133+
control with that organization. **Control** means
134+
ownership of substantially all the assets of an entity,
135+
or the power to direct its management and legal affairs.
136+
137+
**Your licenses** are all the licenses granted to you
138+
for the software under these terms.
139+
140+
**Use** means anything you do with the software
141+
requiring one of your licenses.
142+
143+
**Trademark** means trademarks, service marks, and
144+
similar rights.

0 commit comments

Comments
 (0)