Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Run type and Svelte checks
run: npm run check

- name: Build
run: npm run build
- name: Build release bundles
run: npm run build:release

- name: Package release artifacts (smoke)
run: bash ./scripts/package-release.sh "v0.0.0-ci" release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
npm run test
npm run check

- name: Build production bundle
run: npm run build
- name: Build release bundles
run: npm run build:release

- name: Package release archives
run: bash ./scripts/package-release.sh "${GITHUB_REF_NAME}" release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ reference/
.wrangler
/.svelte-kit
/build
/dist

# OS
.DS_Store
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Open `http://localhost:5173`.

- `npm run dev` - local development server.
- `npm run build` - production build.
- `npm run build:module` - embeddable module build.
- `npm run build:release` - static app and embeddable module builds for release archives.
- `npm run preview` - preview built app.
- `npm run cli -- run` - serve built UI via local CLI entrypoint.
- `npm run test` - run Vitest suite.
Expand All @@ -66,7 +68,7 @@ Open `http://localhost:5173`.

## Global CLI Usage

GitHub release artifacts include a runnable CLI bundle with `build/` assets and launchers.
GitHub release artifacts include a runnable CLI bundle with `build/` assets, launchers, and the embeddable `module.js`.
After extracting a release archive, put the launcher on your `$PATH`:

```bash
Expand Down
8 changes: 5 additions & 3 deletions docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
npm ci
npm run test
npm run check
npm run build
npm run build:release
```

Output is generated into `build/` (static app bundle).
Output is generated into `build/` (static app bundle) and `dist/module.js` (embeddable module).

## Deployment Model

Expand Down Expand Up @@ -48,7 +48,7 @@ Security expectations:
1. Ensure docs match current runtime behavior.
2. Run `npm run test` and `npm run check`.
3. Manual verification of pairing, chat, approvals, logout.
4. Build production bundle.
4. Build release bundles: `npm run build:release`.
5. Verify CLI startup: `npm run cli -- run --host 127.0.0.1 --port 4173`.
6. Validate release archive layout: `bash ./scripts/package-release.sh vX.Y.Z release && bash ./scripts/verify-release-package.sh vX.Y.Z release`.
7. Tag a release: `git tag vYYYY.M.D && git push origin vYYYY.M.D`.
Expand All @@ -67,6 +67,8 @@ Each archive contains:
- `nullclaw-chat-ui` (Unix launcher)
- `nullclaw-chat-ui.cmd` (Windows launcher)
- `bin/nullclaw-chat-ui.js`
- `module.js` (embeddable module)
- `nullclaw-chat-ui.css` (embeddable module styles)
- `build/` (static app bundle)

## Troubleshooting
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"scripts": {
"dev": "vite dev",
"build": "vite build",
"build:release": "npm run build && npm run build:module",
"preview": "vite preview",
"cli": "node ./bin/nullclaw-chat-ui.js",
"test": "vitest run",
Expand Down
6 changes: 6 additions & 0 deletions scripts/package-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ rm -rf "${OUTDIR}"
mkdir -p "${PKG_DIR}/bin"

cp -R build "${PKG_DIR}/build"
if [[ ! -f dist/module.js ]]; then
echo "Module build output was not found: dist/module.js" >&2
echo "Run \`npm run build:module\` before packaging release archives." >&2
exit 1
fi
cp -R dist/. "${PKG_DIR}/"
cp bin/nullclaw-chat-ui.js "${PKG_DIR}/bin/nullclaw-chat-ui.js"
cp package.json "${PKG_DIR}/package.json"
cp README.md "${PKG_DIR}/README.md"
Expand Down
2 changes: 2 additions & 0 deletions scripts/verify-release-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ required_entries=(
"nullclaw-chat-ui/nullclaw-chat-ui"
"nullclaw-chat-ui/nullclaw-chat-ui.cmd"
"nullclaw-chat-ui/bin/nullclaw-chat-ui.js"
"nullclaw-chat-ui/module.js"
"nullclaw-chat-ui/nullclaw-chat-ui.css"
"nullclaw-chat-ui/build/index.html"
)

Expand Down
Loading