@clawos-dev/clawd 0.2.520 → 0.2.521
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/app-builder-plugin/mcp-server.cjs +65 -19
- package/dist/cli.cjs +1 -1
- package/dist/deploy-kit/scripts/ensure-credentials.spec.ts +139 -18
- package/dist/deploy-kit/scripts/new-extension.sh +6 -2
- package/dist/deploy-kit/scripts/publish.sh +32 -9
- package/dist/deploy-kit/scripts/publish.spec.ts +72 -0
- package/dist/deploy-kit/scripts/remove-extension.sh +36 -9
- package/dist/persona-defaults/persona-app-builder/.claude/skills/app-builder-projects/SKILL.md +20 -4
- package/dist/persona-defaults/persona-app-builder/.claude/skills/app-builder-projects/scripts/collect-files.mjs +2 -2
- package/dist/persona-defaults/persona-app-builder/.claude/skills/app-builder-projects/scripts/list-projects.mjs +4 -1
- package/dist/persona-defaults/persona-app-builder/.claude/skills/app-builder-projects/scripts/render-sql.mjs +64 -0
- package/dist/persona-defaults/persona-app-builder/CLAUDE.md +19 -14
- package/dist/persona-defaults/persona-app-builder/extension-kit/README.md +1 -1
- package/dist/persona-defaults/persona-app-builder/extension-kit/contract/s.yaml.tmpl +8 -3
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/ext.conf +3 -1
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/server/.env.example +4 -0
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/server/.fcignore +1 -0
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/server/db/schema.sql +15 -0
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/server/src/main.ts +3 -1
- package/dist/persona-defaults/persona-app-builder/extension-kit/examples/nestjs-react/server/src/table-name.ts +19 -0
- package/dist/persona-defaults/persona-dataclaw-builder/.claude/skills/app-builder-projects/SKILL.md +20 -4
- package/dist/persona-defaults/persona-dataclaw-builder/.claude/skills/app-builder-projects/scripts/collect-files.mjs +2 -2
- package/dist/persona-defaults/persona-dataclaw-builder/.claude/skills/app-builder-projects/scripts/list-projects.mjs +4 -1
- package/dist/persona-defaults/persona-dataclaw-builder/.claude/skills/app-builder-projects/scripts/render-sql.mjs +64 -0
- package/dist/persona-defaults/persona-dataclaw-builder/CLAUDE.md +4 -2
- package/dist/persona-defaults/persona-dataclaw-builder/extension-kit/README.md +1 -1
- package/dist/persona-defaults/persona-dataclaw-builder/extension-kit/contract/s.yaml.tmpl +15 -6
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
一个 app = 当前用户工作区下的 `projects/<name>/`,配一个 GitHub 组织 `ottin4ttc` 下的私有仓库(`<name>-<slug>`),仓库由你经 **`github` MCP** 建和提交,本机不需要 `gh`、项目里不需要 git。会话不绑项目:一个会话里可以改多个 app,隔几天新开会话改旧 app 用 skill 的 `list-projects.mjs` 找目录。没有右栏预览、没有 dev server 概念,验证靠发布后的公网链接。
|
|
10
10
|
|
|
11
|
-
宿主侧 **`clawd-app-builder` MCP** 只有 3 个 tool:`createProject({name})` / `publish({name})` / `removeProject({name})`。没有 `listProjects`(走脚本),没有任何 `appBuilder:*` RPC。
|
|
11
|
+
宿主侧 **`clawd-app-builder` MCP** 只有 3 个 tool:`createProject({name})` / `publish({name, env})` / `removeProject({name})`。没有 `listProjects`(走脚本),没有任何 `appBuilder:*` RPC。
|
|
12
12
|
|
|
13
13
|
### 新建
|
|
14
14
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
```
|
|
28
28
|
key 只存这里:dev 由 dotenv 加载、发布 FC 时 pre-deploy 自动从这读出注入 FC(`.env` 被 `.fcignore` / `.gitignore` 排除,不进部署包、`collect-files.mjs` 也不会把它推上 GitHub)。老板要换 key → 重写本文件
|
|
29
29
|
7. 按需求改数据集 / 端点 / 展示;每完成一段按 skill 推一次:`collect-files.mjs` → `push_files` → `record-push.mjs`。不调 `gh`、不 `git push`
|
|
30
|
-
8. `publish({ name })`
|
|
30
|
+
8. 先 `publish({ name, env: "integration" })` 拿到测试链接给老板看;老板点头再 `publish({ name, env: "prod" })` 给正式链接。老板看链接提意见,回到第 7 步
|
|
31
31
|
|
|
32
32
|
### 改旧页面
|
|
33
33
|
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
|
|
36
36
|
### 发布
|
|
37
37
|
|
|
38
|
+
**上线两步走**:先 `publish({ name, env: "integration" })`,把测试链接给老板;老板确认没问题后再 `publish({ name, env: "prod" })`。prod 只接受 integration 发过的同一个 commit,tool 会机械拒绝(`env` 必填,没有默认值、没有绕过开关)。本 persona 不用 Supabase,表两套那条与你无关。
|
|
39
|
+
|
|
38
40
|
**只走 `publish` tool,不手跑 `publish.sh`**(凭据只在 tool 进程的 env 里)。发布前先把改动推到仓库并 `record-push.mjs`——`publish` 会重算文件树哈希跟记账的比,有没推的改动直接拒。失败时读项目目录下的 `.publish.log`,修好 → 推 → 再 `publish`。本地想先看一眼:`cd server && pnpm dev` + `cd web && pnpm dev`(`/api` 代理到 3000),看完停掉。
|
|
39
41
|
|
|
40
42
|
### 删页面
|
|
@@ -40,7 +40,7 @@ PR="$HOME/.clawd/personas/persona-dataclaw-builder"; DK="$HOME/.clawd/deploy-kit
|
|
|
40
40
|
# 1) scaffold(daemon 已自动跑;手动签名: new-extension.sh <name> <模板源目录> <目标目录>)
|
|
41
41
|
# 2) 改 web/ 和 server/ 业务逻辑(只读查 dataclaw 公网 API,不接 Supabase 写库)
|
|
42
42
|
# 3) 一键发布到 FC,输出公网地址(apikey 在建页时已写进生成 app 的 server/.env,无需额外配置)
|
|
43
|
-
"$DK/scripts/publish.sh" <projDir> "$PR"
|
|
43
|
+
"$DK/scripts/publish.sh" <projDir> "$PR" integration # 第 3 参 env:integration | prod(必填)
|
|
44
44
|
# 4) 不要了就一键清理 FC 资源
|
|
45
45
|
"$DK/scripts/remove-extension.sh" <projDir> "$PR"
|
|
46
46
|
```
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# s.yaml 模板 —— publish.sh 用 sed 替换 __占位符__ 后生成实际 s.yaml
|
|
2
2
|
# 框架无关:command 固定走 ./bootstrap,入口由 FC_ENTRY 环境变量决定
|
|
3
|
+
#
|
|
4
|
+
# 占位符约定:
|
|
5
|
+
# __APP_NAME__ = 用户给的项目名(描述/可读用)
|
|
6
|
+
# __DEPLOY_NAME__ = APP_NAME-<4位 slug>[-int],FC functionName / s 项目名 / 资源 key 走这个;
|
|
7
|
+
# integration 环境带 -int 标签,prod 不带
|
|
8
|
+
# __APP_ENV__ = integration | prod
|
|
9
|
+
# __TABLE_PREFIX__ = APP_NAME_<slug>_[int_](本 persona 不用 supabase,随共享 publish.sh 一起注入)
|
|
3
10
|
edition: 3.0.0
|
|
4
|
-
name:
|
|
11
|
+
name: __DEPLOY_NAME__-app
|
|
5
12
|
# clawd 自己的 Serverless Devs profile,写在 deploy-kit 私有 s-home 里(见 scripts/ensure-credentials.sh)。
|
|
6
13
|
# 刻意不用 default —— 那是用户自己账号的 profile,不该被 clawd 读也不该被 clawd 写。
|
|
7
14
|
access: clawd-fc
|
|
@@ -10,12 +17,12 @@ vars:
|
|
|
10
17
|
region: __REGION__
|
|
11
18
|
|
|
12
19
|
resources:
|
|
13
|
-
|
|
20
|
+
__DEPLOY_NAME__:
|
|
14
21
|
component: fc3
|
|
15
22
|
props:
|
|
16
23
|
region: ${vars.region}
|
|
17
|
-
functionName:
|
|
18
|
-
description: __APP_NAME__ extension (
|
|
24
|
+
functionName: __DEPLOY_NAME__
|
|
25
|
+
description: __APP_NAME__ extension (__APP_ENV__)
|
|
19
26
|
runtime: __FC_RUNTIME__
|
|
20
27
|
logConfig: auto
|
|
21
28
|
layers:
|
|
@@ -35,6 +42,8 @@ resources:
|
|
|
35
42
|
APP_ENTRY: __FC_ENTRY__
|
|
36
43
|
DATACLAW_SERVICE_URL: __DATACLAW_SERVICE_URL__
|
|
37
44
|
DATACLAW_API_KEY: __DATACLAW_API_KEY__
|
|
45
|
+
APP_ENV: __APP_ENV__
|
|
46
|
+
TABLE_PREFIX: __TABLE_PREFIX__
|
|
38
47
|
triggers:
|
|
39
48
|
- triggerName: httpTrigger
|
|
40
49
|
triggerType: http
|
|
@@ -43,7 +52,7 @@ resources:
|
|
|
43
52
|
methods: [GET, POST, PUT, DELETE, HEAD]
|
|
44
53
|
|
|
45
54
|
# 自定义域名:否则 fcapp.run 默认 URL 强制下载网页(防滥用),浏览器无法渲染
|
|
46
|
-
|
|
55
|
+
__DEPLOY_NAME__Domain:
|
|
47
56
|
component: fc3-domain
|
|
48
57
|
props:
|
|
49
58
|
region: ${vars.region}
|
|
@@ -52,5 +61,5 @@ resources:
|
|
|
52
61
|
routeConfig:
|
|
53
62
|
routes:
|
|
54
63
|
- path: /*
|
|
55
|
-
functionName:
|
|
64
|
+
functionName: __DEPLOY_NAME__
|
|
56
65
|
qualifier: LATEST
|