@clawos-dev/clawd 0.2.547 → 0.2.549
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 +40 -37
- package/dist/cli.cjs +488 -657
- package/dist/dispatch/mcp-server.cjs +5 -2
- package/dist/persona-defaults/persona-app-builder/.mcp.json +17 -2
- package/dist/persona-defaults/persona-app-builder/CLAUDE.md +8 -9
- package/dist/persona-defaults/persona-app-builder/extension-kit/README.md +6 -7
- package/dist/persona-defaults/persona-app-builder/extension-kit/contract/s.yaml.tmpl +3 -2
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit/scripts/ensure-credentials.sh +96 -0
- package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/scripts/publish.sh +3 -3
- package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/scripts/remove-extension.sh +2 -2
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/mcp-server.cjs +25400 -0
- package/dist/persona-defaults/persona-dataclaw-builder/.mcp.json +14 -1
- package/dist/persona-defaults/persona-dataclaw-builder/CLAUDE.md +1 -1
- package/dist/persona-defaults/persona-dataclaw-builder/extension-kit/README.md +6 -7
- package/dist/persona-defaults/persona-dataclaw-builder/extension-kit/config.env +1 -1
- package/dist/persona-defaults/persona-dataclaw-builder/extension-kit/contract/s.yaml.tmpl +3 -2
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/contract/bootstrap +22 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/ensure-credentials.sh +96 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/ensure-toolchain.sh +65 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/new-extension.sh +71 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/publish.sh +205 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/remove-extension.sh +89 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/deploy-kit/scripts/verify.sh +49 -0
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/mcp-server.cjs +25400 -0
- package/dist/share-md-viewer-error.html +1 -1
- package/dist/share-md-viewer.html +1 -1
- package/dist/share-ui/assets/{guest-LyTPPmtK.js → guest-BG2kYWjt.js} +132 -132
- package/dist/share-ui/assets/guest-BHSs9s97.css +32 -0
- package/dist/share-ui/guest.html +2 -2
- package/package.json +1 -1
- package/dist/deploy-kit/.secrets/aliyun.env.example +0 -7
- package/dist/deploy-kit/.secrets/aliyun.env.local.example +0 -12
- package/dist/deploy-kit/scripts/ensure-credentials.sh +0 -111
- package/dist/deploy-kit/scripts/ensure-credentials.spec.ts +0 -438
- package/dist/deploy-kit/scripts/publish.spec.ts +0 -278
- package/dist/share-ui/assets/guest-DVW7Ohf0.css +0 -32
- /package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/contract/bootstrap +0 -0
- /package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/scripts/ensure-toolchain.sh +0 -0
- /package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/scripts/new-extension.sh +0 -0
- /package/dist/{deploy-kit → persona-defaults/persona-app-builder/mcp/clawd-app-builder/deploy-kit}/scripts/verify.sh +0 -0
|
@@ -3227,8 +3227,8 @@ var require_utils = __commonJS({
|
|
|
3227
3227
|
}
|
|
3228
3228
|
return ind;
|
|
3229
3229
|
}
|
|
3230
|
-
function removeDotSegments(
|
|
3231
|
-
let input =
|
|
3230
|
+
function removeDotSegments(path5) {
|
|
3231
|
+
let input = path5;
|
|
3232
3232
|
const output = [];
|
|
3233
3233
|
let nextSlash = -1;
|
|
3234
3234
|
let len = 0;
|
|
@@ -3480,8 +3480,8 @@ var require_schemes = __commonJS({
|
|
|
3480
3480
|
wsComponent.secure = void 0;
|
|
3481
3481
|
}
|
|
3482
3482
|
if (wsComponent.resourceName) {
|
|
3483
|
-
const [
|
|
3484
|
-
wsComponent.path =
|
|
3483
|
+
const [path5, query] = wsComponent.resourceName.split("?");
|
|
3484
|
+
wsComponent.path = path5 && path5 !== "/" ? path5 : void 0;
|
|
3485
3485
|
wsComponent.query = query;
|
|
3486
3486
|
wsComponent.resourceName = void 0;
|
|
3487
3487
|
}
|
|
@@ -6894,11 +6894,12 @@ __export(mcp_server_exports, {
|
|
|
6894
6894
|
handleCreateProject: () => handleCreateProject,
|
|
6895
6895
|
handlePublish: () => handlePublish,
|
|
6896
6896
|
handleRemoveProject: () => handleRemoveProject,
|
|
6897
|
-
|
|
6898
|
-
|
|
6897
|
+
registerTools: () => registerTools,
|
|
6898
|
+
resolvePluginEnv: () => resolvePluginEnv
|
|
6899
6899
|
});
|
|
6900
6900
|
module.exports = __toCommonJS(mcp_server_exports);
|
|
6901
6901
|
var import_node_fs4 = __toESM(require("fs"), 1);
|
|
6902
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
6902
6903
|
|
|
6903
6904
|
// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
|
|
6904
6905
|
var external_exports = {};
|
|
@@ -7378,8 +7379,8 @@ function getErrorMap() {
|
|
|
7378
7379
|
|
|
7379
7380
|
// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
7380
7381
|
var makeIssue = (params) => {
|
|
7381
|
-
const { data, path:
|
|
7382
|
-
const fullPath = [...
|
|
7382
|
+
const { data, path: path5, errorMaps, issueData } = params;
|
|
7383
|
+
const fullPath = [...path5, ...issueData.path || []];
|
|
7383
7384
|
const fullIssue = {
|
|
7384
7385
|
...issueData,
|
|
7385
7386
|
path: fullPath
|
|
@@ -7495,11 +7496,11 @@ var errorUtil;
|
|
|
7495
7496
|
|
|
7496
7497
|
// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
7497
7498
|
var ParseInputLazyPath = class {
|
|
7498
|
-
constructor(parent, value,
|
|
7499
|
+
constructor(parent, value, path5, key) {
|
|
7499
7500
|
this._cachedPath = [];
|
|
7500
7501
|
this.parent = parent;
|
|
7501
7502
|
this.data = value;
|
|
7502
|
-
this._path =
|
|
7503
|
+
this._path = path5;
|
|
7503
7504
|
this._key = key;
|
|
7504
7505
|
}
|
|
7505
7506
|
get path() {
|
|
@@ -11136,10 +11137,10 @@ function assignProp(target, prop, value) {
|
|
|
11136
11137
|
configurable: true
|
|
11137
11138
|
});
|
|
11138
11139
|
}
|
|
11139
|
-
function getElementAtPath(obj,
|
|
11140
|
-
if (!
|
|
11140
|
+
function getElementAtPath(obj, path5) {
|
|
11141
|
+
if (!path5)
|
|
11141
11142
|
return obj;
|
|
11142
|
-
return
|
|
11143
|
+
return path5.reduce((acc, key) => acc?.[key], obj);
|
|
11143
11144
|
}
|
|
11144
11145
|
function promiseAllObject(promisesObj) {
|
|
11145
11146
|
const keys = Object.keys(promisesObj);
|
|
@@ -11459,11 +11460,11 @@ function aborted(x, startIndex = 0) {
|
|
|
11459
11460
|
}
|
|
11460
11461
|
return false;
|
|
11461
11462
|
}
|
|
11462
|
-
function prefixIssues(
|
|
11463
|
+
function prefixIssues(path5, issues) {
|
|
11463
11464
|
return issues.map((iss) => {
|
|
11464
11465
|
var _a;
|
|
11465
11466
|
(_a = iss).path ?? (_a.path = []);
|
|
11466
|
-
iss.path.unshift(
|
|
11467
|
+
iss.path.unshift(path5);
|
|
11467
11468
|
return iss;
|
|
11468
11469
|
});
|
|
11469
11470
|
}
|
|
@@ -21686,6 +21687,9 @@ var DeployReleaseResultSchema = external_exports.discriminatedUnion("outcome", [
|
|
|
21686
21687
|
var DeployPersonaArgsSchema = external_exports.object({
|
|
21687
21688
|
personaId: external_exports.string().min(1)
|
|
21688
21689
|
}).strict();
|
|
21690
|
+
var DeployReleaseArgsSchema = DeployPersonaArgsSchema.extend({
|
|
21691
|
+
scanBase: ScanBaseKindSchema.optional()
|
|
21692
|
+
}).strict();
|
|
21689
21693
|
var DeployPatchArgsSchema = external_exports.object({
|
|
21690
21694
|
personaId: external_exports.string().min(1),
|
|
21691
21695
|
patch: external_exports.object({
|
|
@@ -24172,8 +24176,8 @@ var METHOD_DOCS = {
|
|
|
24172
24176
|
args: DeployFinishScanArgsSchema
|
|
24173
24177
|
},
|
|
24174
24178
|
"deploy:release": {
|
|
24175
|
-
summary: "\u53D1\u5E03\u2014\u2014\u4E0A\u4E91\u552F\u4E00\u7684\u52A8\u4F5C\uFF0C\u626B\u63CF\u662F\u5B83\u7684\u7B2C\u4E00\u6BB5\u3002**\u6CA1\u4ED3\u5E93\u5148\u5EFA\u4ED3**\uFF08GitHub REST \u5EFA\u5728\u7EC4\u7EC7\u4E0B\u3001\u79C1\u6709\uFF0Cgit \u63A8\u9996\u4E2A\u63D0\u4EA4\uFF1Btoken \u6765\u81EA\u672C\u673A git \u7684\u8EAB\u4EFD\uFF0C\u6CA1\u6388\u6743\u5148\u62D2\uFF09\u3002\u6E05\u5355\u8FC7\u65F6\uFF08persona \u6539\u8FC7 / \u6CA1\u626B\u8FC7 / \u4E0A\u6B21\u626B\u5931\u8D25\uFF09\uFF1A\u5148\u628A persona \u76EE\u5F55\u63D0\u4EA4\u5230\u672C\u5730\uFF08\u4E0D\u63A8\uFF09\uFF0C\u8D77 persona-butler \u7684\u626B\u63CF\u4F1A\u8BDD\uFF0C\u56DE outcome=scanning\u2014\u2014\u7ED3\u679C\u5199\u8FDB .clawd/deploy.json\uFF08\u6E05\u5355\uFF0C\u8FDB\u4ED3\u5E93\uFF09\u4E0E .clawd/deploy-scan.json\uFF08\u8BC1\u636E\uFF0C\u4E0D\u8FDB\u4ED3\u5E93\uFF09\uFF0C\u6B63\u5728\u626B\u7684\u8BDD\u539F\u6837\u8FD4\u56DE\u4E0D\u8D77\u7B2C\u4E8C\u4E2A\u4F1A\u8BDD\u3002\u6E05\u5355\u65B0\u9C9C\uFF1A\u8FC7\u95F8\uFF08\u6BCF\u4E2A\u53D8\u91CF\u540D\u90FD\u5728 Secrets \u91CC\u3001\u8FDE\u63A5\u5668\u6765\u6E90\u70B9\u8FC7\u3001\u9009\u4E86\u6A21\u578B\uFF09\u2192 \u91CD\u5199 workflow \u6A21\u677F \u2192 git add -A \u2192 \u7A7A\u63D0\u4EA4\u4E5F\u5141\u8BB8 \u2192 push\uFF0C\u56DE outcome=pushed \u5E26 commit \u4E0E Actions \u5730\u5740\uFF1B\u4ED3\u5E93\u91CC\u7684\u6D41\u6C34\u7EBF\u63A5\u7740\u6784\u955C\u50CF\u3001\u8BD5\u8DD1\u3001\u767B\u8BB0\
|
|
24176
|
-
args:
|
|
24179
|
+
summary: "\u53D1\u5E03\u2014\u2014\u4E0A\u4E91\u552F\u4E00\u7684\u52A8\u4F5C\uFF0C\u626B\u63CF\u662F\u5B83\u7684\u7B2C\u4E00\u6BB5\u3002**\u6CA1\u4ED3\u5E93\u5148\u5EFA\u4ED3**\uFF08GitHub REST \u5EFA\u5728\u7EC4\u7EC7\u4E0B\u3001\u79C1\u6709\uFF0Cgit \u63A8\u9996\u4E2A\u63D0\u4EA4\uFF1Btoken \u6765\u81EA\u672C\u673A git \u7684\u8EAB\u4EFD\uFF0C\u6CA1\u6388\u6743\u5148\u62D2\uFF09\u3002\u6E05\u5355\u8FC7\u65F6\uFF08persona \u6539\u8FC7 / \u6CA1\u626B\u8FC7 / \u4E0A\u6B21\u626B\u5931\u8D25\uFF09\uFF1A\u5148\u628A persona \u76EE\u5F55\u63D0\u4EA4\u5230\u672C\u5730\uFF08\u4E0D\u63A8\uFF09\uFF0C\u8D77 persona-butler \u7684\u626B\u63CF\u4F1A\u8BDD\uFF0C\u56DE outcome=scanning\u2014\u2014\u7ED3\u679C\u5199\u8FDB .clawd/deploy.json\uFF08\u6E05\u5355\uFF0C\u8FDB\u4ED3\u5E93\uFF09\u4E0E .clawd/deploy-scan.json\uFF08\u8BC1\u636E\uFF0C\u4E0D\u8FDB\u4ED3\u5E93\uFF09\uFF0C\u6B63\u5728\u626B\u7684\u8BDD\u539F\u6837\u8FD4\u56DE\u4E0D\u8D77\u7B2C\u4E8C\u4E2A\u4F1A\u8BDD\u3002\u6E05\u5355\u65B0\u9C9C\uFF1A\u8FC7\u95F8\uFF08\u6BCF\u4E2A\u53D8\u91CF\u540D\u90FD\u5728 Secrets \u91CC\u3001\u8FDE\u63A5\u5668\u6765\u6E90\u70B9\u8FC7\u3001\u9009\u4E86\u6A21\u578B\uFF09\u2192 \u91CD\u5199 workflow \u6A21\u677F \u2192 git add -A \u2192 \u7A7A\u63D0\u4EA4\u4E5F\u5141\u8BB8 \u2192 push\uFF0C\u56DE outcome=pushed \u5E26 commit \u4E0E Actions \u5730\u5740\uFF1B\u4ED3\u5E93\u91CC\u7684\u6D41\u6C34\u7EBF\u63A5\u7740\u6784\u955C\u50CF\u3001\u8BD5\u8DD1\u3001\u767B\u8BB0\u3002\u5E26 scanBase\uFF08hard / soft\uFF09= \u8FD9\u6B21\u4E00\u5B9A\u5148\u626B\u3001\u6309\u8BE5\u6863\u4F4D\u626B\uFF08soft \u4E0D\u6210\u7ACB\u81EA\u52A8\u9000 hard\uFF09\uFF0C\u6E05\u5355\u65B0\u9C9C\u4E5F\u56DE scanning\uFF1Bowner-only",
|
|
24180
|
+
args: DeployReleaseArgsSchema
|
|
24177
24181
|
},
|
|
24178
24182
|
"deploy:rerunJob": {
|
|
24179
24183
|
summary: "\u539F\u6837\u91CD\u8DD1\u6700\u65B0\u90A3\u6761\u6D41\u6C34\u7EBF\u91CC\u5931\u8D25\u7684\u67D0\u4E00\u6BB5\uFF08GitHub REST rerun job\uFF09\u3002**\u540C\u4E00\u4E2A commit\u3001\u540C\u4E00\u4EFD\u8F93\u5165**\uFF0C\u4E0D\u4EA7\u751F\u65B0\u63D0\u4EA4\u2014\u2014\u6539\u4E86 persona \u5185\u5BB9\u6216\u51ED\u636E\u8981\u8D70 deploy:release\u3002jobId \u5FC5\u987B\u5C5E\u4E8E\u6700\u65B0\u90A3\u6761 run\uFF1Bowner-only",
|
|
@@ -25240,24 +25244,23 @@ var ok = (payload) => ({
|
|
|
25240
25244
|
});
|
|
25241
25245
|
var fail = (text) => ({ content: [{ type: "text", text }], isError: true });
|
|
25242
25246
|
var errMsg2 = (err) => err instanceof Error ? err.message : String(err);
|
|
25243
|
-
var
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
}
|
|
25251
|
-
|
|
25252
|
-
|
|
25253
|
-
|
|
25254
|
-
|
|
25255
|
-
|
|
25256
|
-
}
|
|
25257
|
-
return out;
|
|
25247
|
+
var WORK_DIR_ENV = "CLAWD_WORK_DIR";
|
|
25248
|
+
var SCAFFOLD_TEMPLATE = "nestjs-react";
|
|
25249
|
+
function resolvePluginEnv(env, pluginDir) {
|
|
25250
|
+
const personaRoot = import_node_path6.default.resolve(pluginDir, "..", "..");
|
|
25251
|
+
const scripts = import_node_path6.default.join(pluginDir, "deploy-kit", "scripts");
|
|
25252
|
+
const root = env[WORK_DIR_ENV];
|
|
25253
|
+
return {
|
|
25254
|
+
...root ? { root } : {},
|
|
25255
|
+
personaRoot,
|
|
25256
|
+
templateDir: import_node_path6.default.join(personaRoot, "extension-kit", "examples", SCAFFOLD_TEMPLATE),
|
|
25257
|
+
scaffoldScript: import_node_path6.default.join(scripts, "new-extension.sh"),
|
|
25258
|
+
publishScript: import_node_path6.default.join(scripts, "publish.sh"),
|
|
25259
|
+
removeScript: import_node_path6.default.join(scripts, "remove-extension.sh")
|
|
25260
|
+
};
|
|
25258
25261
|
}
|
|
25259
25262
|
function missingEnv(env, keys) {
|
|
25260
|
-
const missing = keys.filter((k) => !env[k]).map((k) =>
|
|
25263
|
+
const missing = keys.filter((k) => !env[k]).map((k) => k === "root" ? WORK_DIR_ENV : k);
|
|
25261
25264
|
return missing.length ? `env not set: ${missing.join(", ")}` : null;
|
|
25262
25265
|
}
|
|
25263
25266
|
async function handleCreateProject(input, ctx) {
|
|
@@ -25372,8 +25375,8 @@ function registerTools(server, ctx) {
|
|
|
25372
25375
|
);
|
|
25373
25376
|
}
|
|
25374
25377
|
async function main() {
|
|
25375
|
-
const env =
|
|
25376
|
-
log("boot", { pid: process.pid, root: env.root ?? "(unset)", personaRoot: env.personaRoot
|
|
25378
|
+
const env = resolvePluginEnv(process.env, __dirname);
|
|
25379
|
+
log("boot", { pid: process.pid, root: env.root ?? "(unset)", personaRoot: env.personaRoot });
|
|
25377
25380
|
const server = new McpServer({ name: "clawd-app-builder", version: "0.3.0" });
|
|
25378
25381
|
registerTools(server, { env });
|
|
25379
25382
|
await server.connect(new StdioServerTransport());
|
|
@@ -25392,6 +25395,6 @@ if (isMainModule) {
|
|
|
25392
25395
|
handleCreateProject,
|
|
25393
25396
|
handlePublish,
|
|
25394
25397
|
handleRemoveProject,
|
|
25395
|
-
|
|
25396
|
-
|
|
25398
|
+
registerTools,
|
|
25399
|
+
resolvePluginEnv
|
|
25397
25400
|
});
|