duclaw-cli 1.7.4 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +10383 -9264
- package/dist/main.js +1 -1
- package/dist/web/assets/index-BPqv2UuT.js +96 -0
- package/dist/web/assets/index-o9OcdRwu.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/worker-main.js +2 -0
- package/package.json +8 -8
- package/dist/web/assets/index-C2IdC4IZ.css +0 -1
- package/dist/web/assets/index-U7WfpOzC.js +0 -59
- package/skills/.skills_store_lock.json +0 -11
- package/skills/duclaw-saas-release/SKILL.md +0 -161
- package/skills/github-api/LICENSE.txt +0 -21
- package/skills/github-api/SKILL.md +0 -763
- package/skills/github-api/_meta.json +0 -6
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: duclaw-saas-release
|
|
3
|
-
description: |
|
|
4
|
-
Release and roll out Duclaw Core updates to the SaaS layer without coupling Core back to SaaS.
|
|
5
|
-
Use this skill when updating tenant images, publishing Core versions, building tenant images from local source or npm, updating TENANT_IMAGE, or rolling out already-running tenants to a new image tag.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Duclaw SaaS Release
|
|
9
|
-
|
|
10
|
-
Use this skill for the release/update chain between Core and SaaS.
|
|
11
|
-
|
|
12
|
-
Boundary rule:
|
|
13
|
-
|
|
14
|
-
- Core may evolve to support SaaS
|
|
15
|
-
- SaaS may orchestrate Core
|
|
16
|
-
- Core must not depend on SaaS internals
|
|
17
|
-
|
|
18
|
-
This skill assumes:
|
|
19
|
-
|
|
20
|
-
- Core = `src/` + `web/`
|
|
21
|
-
- SaaS = `control-plane/` + `portal/`
|
|
22
|
-
- Tenant runtime is updated by **image tag + container recreate**
|
|
23
|
-
- `Restart` alone does **not** switch image versions
|
|
24
|
-
|
|
25
|
-
## Pick The Right Flow
|
|
26
|
-
|
|
27
|
-
Use **Local Source Flow** when:
|
|
28
|
-
|
|
29
|
-
- You changed Core code locally
|
|
30
|
-
- You want a local SaaS environment to use the latest Core immediately
|
|
31
|
-
|
|
32
|
-
Use **Published npm Flow** when:
|
|
33
|
-
|
|
34
|
-
- SaaS is deployed on another machine
|
|
35
|
-
- That machine can access npm, but not your local source tree
|
|
36
|
-
|
|
37
|
-
## Local Source Flow
|
|
38
|
-
|
|
39
|
-
1. Build or refresh base images if needed:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
pnpm tenant:base:build
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Only needed when base images are missing, or `docker/Dockerfile.base` changed.
|
|
46
|
-
|
|
47
|
-
2. Build the tenant image from the current local Core source:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pnpm tenant:image:build
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
This flow uses:
|
|
54
|
-
|
|
55
|
-
- `build:all`
|
|
56
|
-
- `core:pack`
|
|
57
|
-
- Docker build from the packed Core artifact
|
|
58
|
-
|
|
59
|
-
3. Roll out existing tenants to the new image:
|
|
60
|
-
|
|
61
|
-
Dry run first:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
pnpm --filter @duclaw/control-plane rollout:image --image duclaw:latest --dry-run --all
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Then real rollout:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
pnpm --filter @duclaw/control-plane rollout:image --image duclaw:latest --all
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Target only one tenant when safer:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pnpm --filter @duclaw/control-plane rollout:image --image duclaw:latest --tenant <tenantId>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Published npm Flow
|
|
80
|
-
|
|
81
|
-
1. Publish a Core version to npm, for example `duclaw-cli@1.8.0`
|
|
82
|
-
|
|
83
|
-
2. On the SaaS machine, build a tenant image from npm:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
pnpm tenant:base:build
|
|
87
|
-
IMAGE_REPO=registry/duclaw-runtime pnpm tenant:image:build:npm --version 1.8.0
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
If base images already exist, skip `tenant:base:build`.
|
|
91
|
-
|
|
92
|
-
If `--version` is omitted, the command resolves npm `latest`.
|
|
93
|
-
|
|
94
|
-
3. Update `TENANT_IMAGE` in `control-plane/.env`
|
|
95
|
-
|
|
96
|
-
Example:
|
|
97
|
-
|
|
98
|
-
```env
|
|
99
|
-
TENANT_IMAGE="registry/duclaw-runtime:1.8.0"
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Important:
|
|
103
|
-
|
|
104
|
-
- `TENANT_IMAGE` affects **future new tenants**
|
|
105
|
-
- existing tenants keep their own `imageTag` until rollout
|
|
106
|
-
|
|
107
|
-
4. Restart control-plane so the new default takes effect
|
|
108
|
-
|
|
109
|
-
5. Roll out existing tenants:
|
|
110
|
-
|
|
111
|
-
Dry run:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.8.0 --dry-run --all
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Real rollout:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.8.0 --all
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Scope the rollout if needed:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.8.0 --tenant <tenantId>
|
|
127
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.8.0 --user <userId>
|
|
128
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.8.0 --limit 10 --all
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Rollback
|
|
132
|
-
|
|
133
|
-
Rollback uses the same rollout mechanism with an older image tag.
|
|
134
|
-
|
|
135
|
-
1. Set `TENANT_IMAGE` back to the old stable tag
|
|
136
|
-
2. Restart control-plane
|
|
137
|
-
3. Roll out existing tenants to the old tag
|
|
138
|
-
|
|
139
|
-
Example:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
pnpm --filter @duclaw/control-plane rollout:image --image registry/duclaw-runtime:1.7.9 --all
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Operational Rules
|
|
146
|
-
|
|
147
|
-
- Prefer immutable version tags in production, not `latest`
|
|
148
|
-
- Use `--dry-run` before large rollouts
|
|
149
|
-
- Roll out one tenant first when risk is non-trivial
|
|
150
|
-
- Treat image build and tenant rollout as separate steps
|
|
151
|
-
- Never assume `restart` updates running tenants to a new Core version
|
|
152
|
-
|
|
153
|
-
## Canonical Files
|
|
154
|
-
|
|
155
|
-
Read these only when you need deeper context:
|
|
156
|
-
|
|
157
|
-
- `docs/CORE-SAAS-BOUNDARY.md`
|
|
158
|
-
- `docs/SAAS-QUICKSTART.md`
|
|
159
|
-
- `docker/Dockerfile.npm`
|
|
160
|
-
- `scripts/buildTenantImageFromNpm.js`
|
|
161
|
-
- `control-plane/scripts/rolloutImage.ts`
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Maton
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|