@clawos-dev/clawd 0.2.446 → 0.2.447
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/cli.cjs +40 -5
- package/dist/dispatch/mcp-server.cjs +13 -1
- package/dist/share-md-viewer-error.html +1 -1
- package/dist/share-md-viewer.html +1 -1
- package/dist/share-ui/assets/{guest-DgGpoVf5.css → guest-7QsWRy9Q.css} +1 -1
- package/dist/share-ui/assets/{guest-ChNRpL1J.js → guest-CilettnR.js} +3 -3
- package/dist/share-ui/guest.html +2 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -7594,6 +7594,14 @@ var init_schemas = __esm({
|
|
|
7594
7594
|
// 快速问答临时会话标记(spec 2026-06-23-fork-quick-ask):true = 关闭抽屉即删、
|
|
7595
7595
|
// 不进 sidebar 树、daemon 启动清扫孤儿。普通会话缺省。
|
|
7596
7596
|
ephemeral: external_exports.boolean().optional(),
|
|
7597
|
+
/**
|
|
7598
|
+
* 这条会话属于哪张部署单(persona 上云的环境扫描会话)。
|
|
7599
|
+
*
|
|
7600
|
+
* 有值 = 它在单据页右栏里活着,**sidebar 不再列它**——同一条会话两处出现,和话题 worker
|
|
7601
|
+
* 会话不进「最近」是同一条规矩。不复用 `ephemeral`:那个标记会被 daemon 启动清扫**删掉**,
|
|
7602
|
+
* 而扫描会话要跟单据一样长期留着(人隔天回来还要翻管家当时是怎么判的、还要接着追问)。
|
|
7603
|
+
*/
|
|
7604
|
+
deployId: external_exports.string().min(1).optional(),
|
|
7597
7605
|
// owner-mode persona session 身份标识;UI 用它在 SessionList 过滤 + jump,
|
|
7598
7606
|
// daemon 用它做 idempotent dedupe + spawn 时派生 ctx.personaMode='owner'
|
|
7599
7607
|
ownerPersonaId: external_exports.string().min(1).optional(),
|
|
@@ -8796,9 +8804,13 @@ var init_methods = __esm({
|
|
|
8796
8804
|
args: WorkspaceReadArgs
|
|
8797
8805
|
},
|
|
8798
8806
|
"deploy:start": {
|
|
8799
|
-
summary: "\
|
|
8807
|
+
summary: "\u6253\u5F00\u67D0\u4E2A persona \u7684\u90E8\u7F72\u5355\uFF1A**\u5DF2\u6709\u5C31\u539F\u6837\u8FD4\u56DE\u90A3\u5F20**\uFF08\u8349\u7A3F\u7EED\u586B\uFF0C\u4E0D\u91CD\u626B\uFF0C\u4E5F\u4E0D\u65B0\u5EFA\uFF09\uFF0C\u6CA1\u6709\u624D\u5EFA\u4E00\u5F20\u5E76**\u5F02\u6B65**\u8D77\u73AF\u5883\u626B\u63CF\u3002\u4E00\u4E2A persona \u540C\u65F6\u53EA\u6709\u4E00\u5F20\u5355\uFF0C\u8981\u91CD\u626B\u8D70 deploy:rescan\uFF1Bowner-only",
|
|
8800
8808
|
args: DeployStartArgsSchema
|
|
8801
8809
|
},
|
|
8810
|
+
"deploy:rescan": {
|
|
8811
|
+
summary: "\u5C31\u5730\u91CD\u626B\u4E00\u5F20\u5DF2\u6709\u7684\u90E8\u7F72\u5355\uFF1A\u6E05\u6389\u4E0A\u6B21\u626B\u51FA\u6765\u7684\u6E05\u5355 / \u8BC1\u636E / \u5B58\u7591\u9879\uFF0C\u72B6\u6001\u56DE scanning\uFF0C\u8D77\u4E00\u4E2A\u65B0\u7684\u626B\u63CF\u4F1A\u8BDD\u3002**\u5DF2\u586B\u7684\u51ED\u636E\u503C\u548C\u5C65\u7EA6\u9009\u62E9\u539F\u6837\u4FDD\u7559**\uFF08\u5B83\u4EEC\u6309\u5355\u636E id \u5B58\uFF0C\u4E0D\u968F\u626B\u63CF\u7ED3\u679C\u8D70\uFF09\uFF0C\u6240\u4EE5\u91CD\u626B\u4E0D\u4F1A\u8BA9\u4EBA\u767D\u586B\u4E00\u904D\uFF1Bowner-only",
|
|
8812
|
+
args: DeployIdArgsSchema
|
|
8813
|
+
},
|
|
8802
8814
|
"deploy:list": {
|
|
8803
8815
|
summary: "\u5217\u51FA\u5168\u90E8\u90E8\u7F72\u5355\uFF08\u65B0\u7684\u5728\u524D\uFF09\uFF1Bowner-only\u3002\u65E0\u53C2\u6570",
|
|
8804
8816
|
args: NO_ARGS
|
|
@@ -48645,6 +48657,7 @@ var SessionManager = class {
|
|
|
48645
48657
|
// persona 绑定的 model / effort 快照进 SessionFile(spec 2026-08-12)
|
|
48646
48658
|
...personaDefaultFields(personaDefaults),
|
|
48647
48659
|
...args.sourceSessionId ? { shiftFiredFromSessionId: args.sourceSessionId } : {},
|
|
48660
|
+
...args.deployId ? { deployId: args.deployId } : {},
|
|
48648
48661
|
createdAt: now,
|
|
48649
48662
|
updatedAt: now
|
|
48650
48663
|
};
|
|
@@ -54406,8 +54419,8 @@ function buildDeployHandlers(deps) {
|
|
|
54406
54419
|
if (!deps.hasPersona(args.personaId)) {
|
|
54407
54420
|
throw new ClawdError(ERROR_CODES.PERSONA_NOT_FOUND, `PERSONA_NOT_FOUND: \u6CA1\u6709\u8FD9\u4E2A persona\uFF08${args.personaId}\uFF09`);
|
|
54408
54421
|
}
|
|
54409
|
-
const
|
|
54410
|
-
if (
|
|
54422
|
+
const existing = deps.receipts.list().find((r) => r.personaId === args.personaId);
|
|
54423
|
+
if (existing) return view(existing);
|
|
54411
54424
|
const receipt = deps.receipts.create({
|
|
54412
54425
|
deployId: deps.genId(),
|
|
54413
54426
|
personaId: args.personaId,
|
|
@@ -54417,6 +54430,26 @@ function buildDeployHandlers(deps) {
|
|
|
54417
54430
|
if (scanSessionId) deps.receipts.update(receipt.deployId, { scanSessionId });
|
|
54418
54431
|
return view(deps.receipts.get(receipt.deployId) ?? receipt);
|
|
54419
54432
|
};
|
|
54433
|
+
const rescan = async (frame, _client, ctx) => {
|
|
54434
|
+
ensureOwner(ctx);
|
|
54435
|
+
const args = parseArgs2(DeployIdArgsSchema, frame, "deploy:rescan");
|
|
54436
|
+
const receipt = mustGet(deps, args.deployId);
|
|
54437
|
+
if (receipt.status === "scanning") {
|
|
54438
|
+
throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "VALIDATION_ERROR: \u8FD9\u5F20\u5355\u6B63\u5728\u626B\u63CF\u4E2D\uFF0C\u7B49\u5B83\u626B\u5B8C\u518D\u91CD\u626B");
|
|
54439
|
+
}
|
|
54440
|
+
deps.receipts.update(args.deployId, {
|
|
54441
|
+
status: "scanning",
|
|
54442
|
+
manifest: void 0,
|
|
54443
|
+
evidence: [],
|
|
54444
|
+
notes: [],
|
|
54445
|
+
smokeTask: void 0,
|
|
54446
|
+
error: void 0,
|
|
54447
|
+
scanSessionId: void 0
|
|
54448
|
+
});
|
|
54449
|
+
const scanSessionId = deps.startScan(args.deployId, receipt.personaId);
|
|
54450
|
+
if (scanSessionId) deps.receipts.update(args.deployId, { scanSessionId });
|
|
54451
|
+
return view(deps.receipts.get(args.deployId) ?? receipt);
|
|
54452
|
+
};
|
|
54420
54453
|
const list = async (_frame, _client, ctx) => {
|
|
54421
54454
|
ensureOwner(ctx);
|
|
54422
54455
|
return { response: { type: "deploy:list", receipts: deps.receipts.list() } };
|
|
@@ -54517,6 +54550,7 @@ function buildDeployHandlers(deps) {
|
|
|
54517
54550
|
};
|
|
54518
54551
|
return {
|
|
54519
54552
|
"deploy:start": start,
|
|
54553
|
+
"deploy:rescan": rescan,
|
|
54520
54554
|
"deploy:list": list,
|
|
54521
54555
|
"deploy:get": get,
|
|
54522
54556
|
"deploy:patch": patch,
|
|
@@ -63379,6 +63413,7 @@ var METHOD_GRANT_MAP = {
|
|
|
63379
63413
|
// deploy:*(persona 上云的部署单):全部 owner-only。单据里有履约决策、凭据录入口,
|
|
63380
63414
|
// guest 不该看见更不该动。
|
|
63381
63415
|
"deploy:start": ADMIN_ANY,
|
|
63416
|
+
"deploy:rescan": ADMIN_ANY,
|
|
63382
63417
|
"deploy:list": ADMIN_ANY,
|
|
63383
63418
|
"deploy:get": ADMIN_ANY,
|
|
63384
63419
|
"deploy:patch": ADMIN_ANY,
|
|
@@ -63631,7 +63666,7 @@ function computeMethodAccess(args) {
|
|
|
63631
63666
|
}
|
|
63632
63667
|
|
|
63633
63668
|
// src/version.ts
|
|
63634
|
-
var version = "0.2.
|
|
63669
|
+
var version = "0.2.447".length > 0 ? "0.2.447" : "dev";
|
|
63635
63670
|
|
|
63636
63671
|
// src/cli-probe/probe.ts
|
|
63637
63672
|
var fs68 = __toESM(require("fs"), 1);
|
|
@@ -68628,7 +68663,7 @@ async function startDaemon(config) {
|
|
|
68628
68663
|
].join("\n");
|
|
68629
68664
|
let handle;
|
|
68630
68665
|
try {
|
|
68631
|
-
handle = manager.createShiftSession({ targetPersona: BUTLER_PERSONA_ID, prompt });
|
|
68666
|
+
handle = manager.createShiftSession({ targetPersona: BUTLER_PERSONA_ID, prompt, deployId });
|
|
68632
68667
|
} catch (err) {
|
|
68633
68668
|
deployReceipts.update(deployId, { status: "scanFailed", error: `\u8D77\u626B\u63CF\u4F1A\u8BDD\u5931\u8D25\uFF1A${String(err)}` });
|
|
68634
68669
|
logger.error("deploy scan session failed to start", { deployId, personaId: personaId2, error: String(err) });
|
|
@@ -22682,6 +22682,14 @@ var SessionFileSchema = external_exports.object({
|
|
|
22682
22682
|
// 快速问答临时会话标记(spec 2026-06-23-fork-quick-ask):true = 关闭抽屉即删、
|
|
22683
22683
|
// 不进 sidebar 树、daemon 启动清扫孤儿。普通会话缺省。
|
|
22684
22684
|
ephemeral: external_exports.boolean().optional(),
|
|
22685
|
+
/**
|
|
22686
|
+
* 这条会话属于哪张部署单(persona 上云的环境扫描会话)。
|
|
22687
|
+
*
|
|
22688
|
+
* 有值 = 它在单据页右栏里活着,**sidebar 不再列它**——同一条会话两处出现,和话题 worker
|
|
22689
|
+
* 会话不进「最近」是同一条规矩。不复用 `ephemeral`:那个标记会被 daemon 启动清扫**删掉**,
|
|
22690
|
+
* 而扫描会话要跟单据一样长期留着(人隔天回来还要翻管家当时是怎么判的、还要接着追问)。
|
|
22691
|
+
*/
|
|
22692
|
+
deployId: external_exports.string().min(1).optional(),
|
|
22685
22693
|
// owner-mode persona session 身份标识;UI 用它在 SessionList 过滤 + jump,
|
|
22686
22694
|
// daemon 用它做 idempotent dedupe + spawn 时派生 ctx.personaMode='owner'
|
|
22687
22695
|
ownerPersonaId: external_exports.string().min(1).optional(),
|
|
@@ -23840,9 +23848,13 @@ var METHOD_DOCS = {
|
|
|
23840
23848
|
args: WorkspaceReadArgs
|
|
23841
23849
|
},
|
|
23842
23850
|
"deploy:start": {
|
|
23843
|
-
summary: "\
|
|
23851
|
+
summary: "\u6253\u5F00\u67D0\u4E2A persona \u7684\u90E8\u7F72\u5355\uFF1A**\u5DF2\u6709\u5C31\u539F\u6837\u8FD4\u56DE\u90A3\u5F20**\uFF08\u8349\u7A3F\u7EED\u586B\uFF0C\u4E0D\u91CD\u626B\uFF0C\u4E5F\u4E0D\u65B0\u5EFA\uFF09\uFF0C\u6CA1\u6709\u624D\u5EFA\u4E00\u5F20\u5E76**\u5F02\u6B65**\u8D77\u73AF\u5883\u626B\u63CF\u3002\u4E00\u4E2A persona \u540C\u65F6\u53EA\u6709\u4E00\u5F20\u5355\uFF0C\u8981\u91CD\u626B\u8D70 deploy:rescan\uFF1Bowner-only",
|
|
23844
23852
|
args: DeployStartArgsSchema
|
|
23845
23853
|
},
|
|
23854
|
+
"deploy:rescan": {
|
|
23855
|
+
summary: "\u5C31\u5730\u91CD\u626B\u4E00\u5F20\u5DF2\u6709\u7684\u90E8\u7F72\u5355\uFF1A\u6E05\u6389\u4E0A\u6B21\u626B\u51FA\u6765\u7684\u6E05\u5355 / \u8BC1\u636E / \u5B58\u7591\u9879\uFF0C\u72B6\u6001\u56DE scanning\uFF0C\u8D77\u4E00\u4E2A\u65B0\u7684\u626B\u63CF\u4F1A\u8BDD\u3002**\u5DF2\u586B\u7684\u51ED\u636E\u503C\u548C\u5C65\u7EA6\u9009\u62E9\u539F\u6837\u4FDD\u7559**\uFF08\u5B83\u4EEC\u6309\u5355\u636E id \u5B58\uFF0C\u4E0D\u968F\u626B\u63CF\u7ED3\u679C\u8D70\uFF09\uFF0C\u6240\u4EE5\u91CD\u626B\u4E0D\u4F1A\u8BA9\u4EBA\u767D\u586B\u4E00\u904D\uFF1Bowner-only",
|
|
23856
|
+
args: DeployIdArgsSchema
|
|
23857
|
+
},
|
|
23846
23858
|
"deploy:list": {
|
|
23847
23859
|
summary: "\u5217\u51FA\u5168\u90E8\u90E8\u7F72\u5355\uFF08\u65B0\u7684\u5728\u524D\uFF09\uFF1Bowner-only\u3002\u65E0\u53C2\u6570",
|
|
23848
23860
|
args: NO_ARGS
|