feat: npm publish pipeline + package versioning (0.0.1-alpha.1)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

Publish pipeline:
- Add publish-npm step to .woodpecker/publish.yml — publishes all
  @mosaic/* packages to Gitea npm registry on main push/tag
- Requires gitea_npm_token Woodpecker secret (package:write scope)
- publish-npm runs after build, parallel with Docker image builds
- pnpm publish resolves workspace:* to concrete versions automatically

Package configuration:
- All 20 packages versioned at 0.0.1-alpha.1
- publishConfig added to all packages (Gitea registry, public access)
- files field added to all packages (ship only dist/)
- @mosaic/forge includes pipeline/ assets in published package

Meta package (@mosaic/mosaic):
- Now depends on @mosaic/forge, @mosaic/macp, @mosaic/prdy,
  @mosaic/quality-rails, @mosaic/types
- npm install @mosaic/mosaic pulls in the standalone framework

Build fixes:
- Fix forge and macp tsconfig rootDir: '.' -> 'src' so dist/index.js
  resolves correctly (was dist/src/index.js)
- Exclude __tests__ and vitest.config from build includes
- Clean stale build artifacts from old rootDir config

Required Woodpecker secret:
  woodpecker secret add mosaic/mosaic-stack \
    --name gitea_npm_token --value '<token>' \
    --event push,manual,tag
This commit is contained in:
Jason Woltje
2026-04-01 12:46:13 -05:00
parent aa80013811
commit 13934d4879
24 changed files with 243 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
# Docker image build and push — runs only on main branch push/tag
# Completely independent of the CI test pipeline
# Build, publish npm packages, and push Docker images
# Runs only on main branch push/tag
variables:
- &node_image 'node:22-alpine'
@@ -24,6 +24,28 @@ steps:
depends_on:
- install
publish-npm:
image: *node_image
environment:
NPM_TOKEN:
from_secret: gitea_npm_token
commands:
- *enable_pnpm
# Configure auth for Gitea npm registry
- |
echo "//git.mosaicstack.dev/api/packages/mosaic/npm/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "@mosaic:registry=https://git.mosaicstack.dev/api/packages/mosaic/npm/" >> ~/.npmrc
# Publish all non-private packages (--no-git-checks skips dirty/branch checks in CI)
# --filter excludes private apps (gateway, web) and the root
- >
pnpm --filter "@mosaic/*"
--filter "!@mosaic/gateway"
--filter "!@mosaic/web"
publish --no-git-checks --access public
|| echo "[publish] Some packages may already exist at this version — continuing"
depends_on:
- build
build-gateway:
image: gcr.io/kaniko-project/executor:debug
environment:

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/agent",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -21,5 +21,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/auth",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -25,5 +25,12 @@
"dependencies": {
"@mosaic/db": "workspace:^",
"better-auth": "^1.5.5"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/brain",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -22,5 +22,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/cli",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -39,5 +39,12 @@
"tsx": "^4.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/coord",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -22,5 +22,12 @@
"@types/node": "^22.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/db",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -30,5 +30,12 @@
"dependencies": {
"drizzle-orm": "^0.45.1",
"postgres": "^3.4.8"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/design-tokens",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -19,5 +19,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,15 +1,19 @@
{
"name": "@mosaic/forge",
"version": "0.0.1",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./src/index.ts"
"default": "./dist/index.js"
}
},
"files": [
"dist",
"pipeline"
],
"scripts": {
"build": "tsc",
"lint": "eslint src",
@@ -24,5 +28,9 @@
"@vitest/coverage-v8": "^2.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
}
}

View File

@@ -2,8 +2,8 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "."
"rootDir": "src"
},
"include": ["src/**/*", "__tests__/**/*", "vitest.config.ts"],
"exclude": ["node_modules", "dist"]
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "__tests__"]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/log",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -23,5 +23,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/macp",
"version": "0.0.1",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -21,5 +21,12 @@
"@vitest/coverage-v8": "^2.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -2,8 +2,8 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "."
"rootDir": "src"
},
"include": ["src/**/*", "__tests__/**/*", "vitest.config.ts"],
"exclude": ["node_modules", "dist"]
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "__tests__"]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/memory",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -24,5 +24,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,7 +1,7 @@
{
"name": "@mosaic/mosaic",
"version": "0.1.0",
"description": "Mosaic installation wizard",
"version": "0.0.1-alpha.1",
"description": "Mosaic agent framework — installation wizard and meta package",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -21,6 +21,11 @@
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"@mosaic/forge": "workspace:*",
"@mosaic/macp": "workspace:*",
"@mosaic/prdy": "workspace:*",
"@mosaic/quality-rails": "workspace:*",
"@mosaic/types": "workspace:*",
"@clack/prompts": "^0.9.1",
"commander": "^12.1.0",
"picocolors": "^1.1.1",
@@ -31,5 +36,12 @@
"@types/node": "^22.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/prdy",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -26,5 +26,12 @@
"@types/node": "^22.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/quality-rails",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -23,5 +23,12 @@
"@types/node": "^22.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/queue",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -22,5 +22,12 @@
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/types",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -22,5 +22,12 @@
"dependencies": {
"class-transformer": "^0.5.1",
"class-validator": "^0.15.1"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/discord-plugin",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -24,5 +24,12 @@
"tsx": "^4.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/oc-macp-plugin",
"version": "0.1.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "src/index.ts",
"description": "OpenClaw ACP runtime backend that routes sessions_spawn(runtime:\"macp\") to the Pi MACP runner.",
@@ -16,5 +16,12 @@
},
"devDependencies": {
"openclaw": "*"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/oc-framework-plugin",
"version": "0.1.0",
"version": "0.0.1-alpha.1",
"type": "module",
"main": "src/index.ts",
"description": "Injects Mosaic framework rails, runtime contract, and active mission context into all OpenClaw agent sessions and ACP subagent spawns.",
@@ -11,5 +11,12 @@
},
"devDependencies": {
"openclaw": "*"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@mosaic/telegram-plugin",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -22,5 +22,12 @@
"dependencies": {
"socket.io-client": "^4.8.0",
"telegraf": "^4.16.3"
}
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaic/npm/",
"access": "public"
},
"files": [
"dist"
]
}

76
pnpm-lock.yaml generated
View File

@@ -472,6 +472,21 @@ importers:
'@clack/prompts':
specifier: ^0.9.1
version: 0.9.1
'@mosaic/forge':
specifier: workspace:*
version: link:../forge
'@mosaic/macp':
specifier: workspace:*
version: link:../macp
'@mosaic/prdy':
specifier: workspace:*
version: link:../prdy
'@mosaic/quality-rails':
specifier: workspace:*
version: link:../quality-rails
'@mosaic/types':
specifier: workspace:*
version: link:../types
commander:
specifier: ^12.1.0
version: 12.1.0
@@ -594,10 +609,10 @@ importers:
dependencies:
'@mariozechner/pi-agent-core':
specifier: ^0.63.1
version: 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@3.25.76)
version: 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)
'@mariozechner/pi-ai':
specifier: ^0.63.1
version: 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@3.25.76)
version: 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)
'@sinclair/typebox':
specifier: ^0.34.41
version: 0.34.48
@@ -6865,12 +6880,6 @@ snapshots:
'@jridgewell/gen-mapping': 0.3.13
'@jridgewell/trace-mapping': 0.3.31
'@anthropic-ai/sdk@0.73.0(zod@3.25.76)':
dependencies:
json-schema-to-ts: 3.1.1
optionalDependencies:
zod: 3.25.76
'@anthropic-ai/sdk@0.73.0(zod@4.3.6)':
dependencies:
json-schema-to-ts: 3.1.1
@@ -8455,18 +8464,6 @@ snapshots:
- ws
- zod
'@mariozechner/pi-agent-core@0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@3.25.76)':
dependencies:
'@mariozechner/pi-ai': 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@3.25.76)
transitivePeerDependencies:
- '@modelcontextprotocol/sdk'
- aws-crt
- bufferutil
- supports-color
- utf-8-validate
- ws
- zod
'@mariozechner/pi-agent-core@0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)':
dependencies:
'@mariozechner/pi-ai': 0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)
@@ -8527,30 +8524,6 @@ snapshots:
- ws
- zod
'@mariozechner/pi-ai@0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@3.25.76)':
dependencies:
'@anthropic-ai/sdk': 0.73.0(zod@3.25.76)
'@aws-sdk/client-bedrock-runtime': 3.1008.0
'@google/genai': 1.45.0(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))
'@mistralai/mistralai': 1.14.1
'@sinclair/typebox': 0.34.48
ajv: 8.18.0
ajv-formats: 3.0.1(ajv@8.18.0)
chalk: 5.6.2
openai: 6.26.0(ws@8.20.0)(zod@3.25.76)
partial-json: 0.1.7
proxy-agent: 6.5.0
undici: 7.24.3
zod-to-json-schema: 3.25.1(zod@3.25.76)
transitivePeerDependencies:
- '@modelcontextprotocol/sdk'
- aws-crt
- bufferutil
- supports-color
- utf-8-validate
- ws
- zod
'@mariozechner/pi-ai@0.63.2(@modelcontextprotocol/sdk@1.28.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)':
dependencies:
'@anthropic-ai/sdk': 0.73.0(zod@4.3.6)
@@ -10435,6 +10408,14 @@ snapshots:
chai: 5.3.3
tinyrainbow: 1.2.0
'@vitest/mocker@2.1.9(vite@5.4.21(@types/node@22.19.15)(lightningcss@1.31.1))':
dependencies:
'@vitest/spy': 2.1.9
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
vite: 5.4.21(@types/node@22.19.15)(lightningcss@1.31.1)
'@vitest/mocker@2.1.9(vite@5.4.21(@types/node@24.12.0)(lightningcss@1.31.1))':
dependencies:
'@vitest/spy': 2.1.9
@@ -12704,11 +12685,6 @@ snapshots:
dependencies:
mimic-function: 5.0.1
openai@6.26.0(ws@8.20.0)(zod@3.25.76):
optionalDependencies:
ws: 8.20.0
zod: 3.25.76
openai@6.26.0(ws@8.20.0)(zod@4.3.6):
optionalDependencies:
ws: 8.20.0
@@ -13870,7 +13846,7 @@ snapshots:
vitest@2.1.9(@types/node@22.19.15)(jsdom@29.0.0(@noble/hashes@2.0.1))(lightningcss@1.31.1):
dependencies:
'@vitest/expect': 2.1.9
'@vitest/mocker': 2.1.9(vite@5.4.21(@types/node@24.12.0)(lightningcss@1.31.1))
'@vitest/mocker': 2.1.9(vite@5.4.21(@types/node@22.19.15)(lightningcss@1.31.1))
'@vitest/pretty-format': 2.1.9
'@vitest/runner': 2.1.9
'@vitest/snapshot': 2.1.9