skill-creator 2.4.0 → 2.5.0
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.js +119 -9
- package/dist/cli.js.map +2 -2
- package/dist/daemon.js +268 -21
- package/dist/daemon.js.map +4 -4
- package/dist/package.json +1 -1
- package/dist/webui/_app/immutable/assets/0.DLmCZ2fP.css +2 -0
- package/dist/webui/_app/immutable/assets/CreatorWorkspace.CvDsme_1.css +1 -0
- package/dist/webui/_app/immutable/chunks/{CdjBDc_u.js → B8aGNSaH.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CvO5eq4f.js → BDMeqoYB.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BgJCuTDs.js → BTMBuftG.js} +1 -1
- package/dist/webui/_app/immutable/chunks/Ba9GVGQ5.js +6 -0
- package/dist/webui/_app/immutable/chunks/{D6s79OPW.js → BchFBl6r.js} +1 -1
- package/dist/webui/_app/immutable/chunks/BhCD2hsN.js +8 -0
- package/dist/webui/_app/immutable/chunks/{hIGXQE4_.js → Bynub5xW.js} +1 -1
- package/dist/webui/_app/immutable/chunks/CYhuNS_d.js +11 -0
- package/dist/webui/_app/immutable/chunks/{Bd1_Ly7G.js → C_mgfJl-.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CIxXWvxF.js → ClW_LCBS.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{Do_MDwCJ.js → Cy5ABld-.js} +1 -1
- package/dist/webui/_app/immutable/chunks/CzkhJhvt.js +1 -0
- package/dist/webui/_app/immutable/chunks/{BTuMeN4z.js → DBNjJ5Iw.js} +1 -1
- package/dist/webui/_app/immutable/chunks/DC5f4JBB.js +5 -0
- package/dist/webui/_app/immutable/chunks/DF_TIB7n.js +1 -0
- package/dist/webui/_app/immutable/chunks/DH8yd93-.js +1 -0
- package/dist/webui/_app/immutable/chunks/DSbDiml2.js +28 -0
- package/dist/webui/_app/immutable/chunks/{Du6-3Tbt.js → DTzqg7c9.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{DGJ9QIPN.js → DVv6BdWV.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CBFLFfGb.js → DYbgoqwH.js} +1 -1
- package/dist/webui/_app/immutable/chunks/DdHvRi0A.js +1 -0
- package/dist/webui/_app/immutable/chunks/{B0stYqX9.js → DjZ7hdjX.js} +1 -1
- package/dist/webui/_app/immutable/chunks/DvWG9eQi.js +1 -0
- package/dist/webui/_app/immutable/chunks/DzfSSVEB.js +2 -0
- package/dist/webui/_app/immutable/chunks/GHFnehdP.js +5 -0
- package/dist/webui/_app/immutable/chunks/VnziGBZO.js +2 -0
- package/dist/webui/_app/immutable/chunks/a0LlqeqU.js +1 -0
- package/dist/webui/_app/immutable/chunks/eFUKcYMv.js +1 -0
- package/dist/webui/_app/immutable/chunks/{DlsPNMHX.js → pd7EK5wP.js} +2 -2
- package/dist/webui/_app/immutable/chunks/{Dcf0klrH.js → xAjQV7BZ.js} +2 -2
- package/dist/webui/_app/immutable/entry/{app.SX0t6ojk.js → app.DlQ53I3_.js} +2 -2
- package/dist/webui/_app/immutable/entry/start.CNmXm9ox.js +1 -0
- package/dist/webui/_app/immutable/nodes/0.BXeEkneG.js +229 -0
- package/dist/webui/_app/immutable/nodes/{1.BY0DmHLP.js → 1.DzYWdh98.js} +1 -1
- package/dist/webui/_app/immutable/nodes/{2._osi8D6m.js → 2.Dl1DQV0d.js} +1 -1
- package/dist/webui/_app/version.json +1 -1
- package/dist/webui/index.html +23 -21
- package/package.json +5 -5
- package/dist/webui/_app/immutable/assets/0.B4ZC2KQW.css +0 -2
- package/dist/webui/_app/immutable/chunks/B_gnhZ39.js +0 -1
- package/dist/webui/_app/immutable/chunks/BcvferwH.js +0 -8
- package/dist/webui/_app/immutable/chunks/CD-NpLjk.js +0 -6
- package/dist/webui/_app/immutable/chunks/COXgCOd9.js +0 -2
- package/dist/webui/_app/immutable/chunks/Ccj5eiVa.js +0 -1
- package/dist/webui/_app/immutable/chunks/Cp0lquqA.js +0 -1
- package/dist/webui/_app/immutable/chunks/Crg8KRap.js +0 -5
- package/dist/webui/_app/immutable/chunks/D7DTLcps.js +0 -1
- package/dist/webui/_app/immutable/chunks/oJ4aK8PG.js +0 -1
- package/dist/webui/_app/immutable/chunks/vry1W47_.js +0 -7
- package/dist/webui/_app/immutable/entry/start.gejSBBnR.js +0 -1
- package/dist/webui/_app/immutable/nodes/0.BTXc1wYu.js +0 -229
package/dist/daemon.js
CHANGED
|
@@ -39075,6 +39075,47 @@ var AgentFilesPreviewResultSchema = z10.discriminatedUnion("kind", [
|
|
|
39075
39075
|
size: z10.number().int().nonnegative()
|
|
39076
39076
|
})
|
|
39077
39077
|
]);
|
|
39078
|
+
var UnifiedProposalViewSchema = z10.strictObject({
|
|
39079
|
+
/** `mcp:<原proposalId>` | `si:<pr_ id>`——路由键。 */
|
|
39080
|
+
id: z10.string().min(1),
|
|
39081
|
+
source: z10.enum(["mcp", "skill-intelligence"]),
|
|
39082
|
+
/** mcp: 原 capability 名(wiki.distill_apply 过滤等消费方依赖);si: null。 */
|
|
39083
|
+
capability: z10.string().nullable(),
|
|
39084
|
+
/** 底层载荷(mcp: proposal input;si: 草稿 payload)——审批 UI 的展开面。 */
|
|
39085
|
+
payload: z10.unknown().optional(),
|
|
39086
|
+
origin: z10.literal("agent-tool"),
|
|
39087
|
+
/** si: edit/disable/split/merge;mcp: capability slug(dots→dashes,如 wiki-append)。 */
|
|
39088
|
+
kind: z10.string().min(1),
|
|
39089
|
+
/** 主目标(无技能目标的 capability 面 → null)。 */
|
|
39090
|
+
target: z10.strictObject({
|
|
39091
|
+
workspaceId: WorkspaceIdSchema,
|
|
39092
|
+
providerId: ProviderIdSchema,
|
|
39093
|
+
skillId: SkillIdSchema
|
|
39094
|
+
}).nullable(),
|
|
39095
|
+
/** split/merge 多源(与 observedRevisions 对齐)。 */
|
|
39096
|
+
targets: z10.array(
|
|
39097
|
+
z10.strictObject({
|
|
39098
|
+
workspaceId: WorkspaceIdSchema,
|
|
39099
|
+
providerId: ProviderIdSchema,
|
|
39100
|
+
skillId: SkillIdSchema
|
|
39101
|
+
})
|
|
39102
|
+
).optional(),
|
|
39103
|
+
observedRevision: z10.string().nullable(),
|
|
39104
|
+
observedRevisions: z10.array(z10.string()).optional(),
|
|
39105
|
+
before: z10.string().nullable(),
|
|
39106
|
+
after: z10.string().nullable(),
|
|
39107
|
+
finding: z10.strictObject({ id: z10.string().min(1), summary: z10.string() }).nullable(),
|
|
39108
|
+
validation: z10.strictObject({
|
|
39109
|
+
success: z10.boolean(),
|
|
39110
|
+
errors: z10.array(z10.string()),
|
|
39111
|
+
warnings: z10.array(z10.string())
|
|
39112
|
+
}).nullable(),
|
|
39113
|
+
status: z10.enum(["pending", "approved", "rejected", "executed", "failed"]),
|
|
39114
|
+
rejectCause: z10.enum(["user", "stale"]).optional(),
|
|
39115
|
+
result: z10.strictObject({ applied: z10.boolean(), error: z10.string().optional() }).optional(),
|
|
39116
|
+
createdAt: z10.string().min(1),
|
|
39117
|
+
decidedAt: z10.string().optional()
|
|
39118
|
+
});
|
|
39078
39119
|
|
|
39079
39120
|
// src/shared/contracts/agent-steward.ts
|
|
39080
39121
|
import { z as z12 } from "zod";
|
|
@@ -40850,8 +40891,6 @@ var rpcContract = oc.errors(RpcErrorDefinitions).router({
|
|
|
40850
40891
|
skillIntelligence: {
|
|
40851
40892
|
/** Read-only multi-skill analysis locked to observed revisions. */
|
|
40852
40893
|
analyze: oc.input(AnalyzeInputSchema).output(AnalyzeResultSchema),
|
|
40853
|
-
/** Store a Manager-owned proposal draft; never mutates Providers. */
|
|
40854
|
-
propose: oc.input(ProposeInputSchema).output(ProposeResultSchema),
|
|
40855
40894
|
/** List pending proposal drafts (newest first). */
|
|
40856
40895
|
list: oc.input(z20.object({})).output(ListProposalsResultSchema),
|
|
40857
40896
|
/** Delete one proposal draft. */
|
|
@@ -40898,9 +40937,9 @@ var rpcContract = oc.errors(RpcErrorDefinitions).router({
|
|
|
40898
40937
|
},
|
|
40899
40938
|
/** MCP mutation proposal 审批链(task 4.4;Manager authority 的决定面)。 */
|
|
40900
40939
|
proposals: {
|
|
40901
|
-
list: oc.input(z20.object({})).output(z20.object({ proposals: z20.array(
|
|
40902
|
-
approve: oc.input(AgentProposalDecisionInputSchema).output(z20.object({ proposal:
|
|
40903
|
-
reject: oc.input(AgentProposalDecisionInputSchema).output(z20.object({ proposal:
|
|
40940
|
+
list: oc.input(z20.object({})).output(z20.object({ proposals: z20.array(UnifiedProposalViewSchema) })),
|
|
40941
|
+
approve: oc.input(AgentProposalDecisionInputSchema).output(z20.object({ proposal: UnifiedProposalViewSchema })),
|
|
40942
|
+
reject: oc.input(AgentProposalDecisionInputSchema).output(z20.object({ proposal: UnifiedProposalViewSchema }))
|
|
40904
40943
|
},
|
|
40905
40944
|
/** 面板会话:内核 agent 会话的生命周期投影(task 2.2;旧 dsh.* 收敛并入)。 */
|
|
40906
40945
|
sessions: {
|
|
@@ -73301,9 +73340,78 @@ function createDomainCapabilities(domain) {
|
|
|
73301
73340
|
input: DistillApplyInputSchema,
|
|
73302
73341
|
// N:enqueue 并等待队列任务终态——不走 invoke 的 ok 包装(结果即闭合 result)。
|
|
73303
73342
|
handler: (input) => domain.wikiDistill.apply(input)
|
|
73304
|
-
}
|
|
73343
|
+
},
|
|
73344
|
+
// intelligence-proposal-parity(工作计划 Ch4 / C′1):四动作 proposal 一律经
|
|
73345
|
+
// agent tool call 产生——kernel 工具行与 MCP 同名注册(authority=proposal,
|
|
73346
|
+
// 名字本身即 propose 语义,无 mutation 变体后缀)。WebUI 直连创建路径退役。
|
|
73347
|
+
...[
|
|
73348
|
+
["edit", EditProposalPayloadSchema],
|
|
73349
|
+
["disable", DisableProposalPayloadSchema]
|
|
73350
|
+
].map(([action, payloadSchema]) => ({
|
|
73351
|
+
name: `intelligence_propose_${action}`,
|
|
73352
|
+
description: `Draft an ${action} proposal for the skill addressed in the finding (agent-originated; approval happens in the Skill Creator UI).`,
|
|
73353
|
+
authority: "proposal",
|
|
73354
|
+
input: IntelligenceProposeSingleInputSchema(action, payloadSchema),
|
|
73355
|
+
handler: (input) => invoke(async () => {
|
|
73356
|
+
const parsed = IntelligenceProposeSingleInputSchema(action, payloadSchema).parse(input);
|
|
73357
|
+
const { proposal } = await domain.skillIntelligence.propose({
|
|
73358
|
+
payload: parsed.payload,
|
|
73359
|
+
findingIds: [parsed.findingId],
|
|
73360
|
+
rationale: parsed.rationale
|
|
73361
|
+
});
|
|
73362
|
+
return { proposalId: proposal.id, observedRevisions: proposal.observedRevisions };
|
|
73363
|
+
})
|
|
73364
|
+
})),
|
|
73365
|
+
...["split", "merge"].map((action) => ({
|
|
73366
|
+
name: `intelligence_propose_${action}`,
|
|
73367
|
+
description: `Draft a ${action} proposal across the addressed skills (agent-originated; multi-source revisions are validated against the payload).`,
|
|
73368
|
+
authority: "proposal",
|
|
73369
|
+
input: IntelligenceProposeMultiInputSchema,
|
|
73370
|
+
handler: (input) => invoke(async () => {
|
|
73371
|
+
const parsed = IntelligenceProposeMultiInputSchema.parse(input);
|
|
73372
|
+
if (parsed.action !== action) {
|
|
73373
|
+
throw new DomainError(
|
|
73374
|
+
"INVALID_OPERATION",
|
|
73375
|
+
`payload kind ${action} required for this tool`
|
|
73376
|
+
);
|
|
73377
|
+
}
|
|
73378
|
+
const { proposal } = await domain.skillIntelligence.propose({
|
|
73379
|
+
payload: parsed.payload,
|
|
73380
|
+
findingIds: [parsed.findingId],
|
|
73381
|
+
rationale: parsed.rationale
|
|
73382
|
+
});
|
|
73383
|
+
return { proposalId: proposal.id, observedRevisions: proposal.observedRevisions };
|
|
73384
|
+
})
|
|
73385
|
+
}))
|
|
73305
73386
|
];
|
|
73306
73387
|
}
|
|
73388
|
+
function IntelligenceProposeSingleInputSchema(action, payloadSchema) {
|
|
73389
|
+
return z44.strictObject({
|
|
73390
|
+
action: z44.literal(action),
|
|
73391
|
+
findingId: FindingIdSchema,
|
|
73392
|
+
observedRevision: z44.string().min(1),
|
|
73393
|
+
rationale: z44.string().min(1),
|
|
73394
|
+
payload: payloadSchema
|
|
73395
|
+
});
|
|
73396
|
+
}
|
|
73397
|
+
var IntelligenceProposeMultiInputSchema = z44.discriminatedUnion("action", [
|
|
73398
|
+
z44.strictObject({
|
|
73399
|
+
action: z44.literal("split"),
|
|
73400
|
+
findingId: FindingIdSchema,
|
|
73401
|
+
targets: z44.array(SkillSelectionSchema).min(1),
|
|
73402
|
+
observedRevisions: z44.array(z44.string().min(1)).min(1),
|
|
73403
|
+
rationale: z44.string().min(1),
|
|
73404
|
+
payload: SplitProposalPayloadSchema
|
|
73405
|
+
}),
|
|
73406
|
+
z44.strictObject({
|
|
73407
|
+
action: z44.literal("merge"),
|
|
73408
|
+
findingId: FindingIdSchema,
|
|
73409
|
+
targets: z44.array(SkillSelectionSchema).min(1),
|
|
73410
|
+
observedRevisions: z44.array(z44.string().min(1)).min(1),
|
|
73411
|
+
rationale: z44.string().min(1),
|
|
73412
|
+
payload: MergeProposalPayloadSchema
|
|
73413
|
+
})
|
|
73414
|
+
]);
|
|
73307
73415
|
|
|
73308
73416
|
// src/daemon/mcp/cards.ts
|
|
73309
73417
|
function escapeHtml(value) {
|
|
@@ -74808,6 +74916,83 @@ import { WebSocketServer } from "ws";
|
|
|
74808
74916
|
// src/daemon/rpc-router.ts
|
|
74809
74917
|
import { implement, ORPCError } from "@orpc/server";
|
|
74810
74918
|
|
|
74919
|
+
// src/daemon/agent-proposals-projection.ts
|
|
74920
|
+
function capabilityKind(capability) {
|
|
74921
|
+
return capability.replaceAll(/[._]/g, "-");
|
|
74922
|
+
}
|
|
74923
|
+
function projectMcpProposal(view) {
|
|
74924
|
+
return {
|
|
74925
|
+
id: `mcp:${view.proposalId}`,
|
|
74926
|
+
source: "mcp",
|
|
74927
|
+
origin: "agent-tool",
|
|
74928
|
+
capability: view.capability,
|
|
74929
|
+
payload: view.input,
|
|
74930
|
+
kind: capabilityKind(view.capability),
|
|
74931
|
+
target: null,
|
|
74932
|
+
observedRevision: null,
|
|
74933
|
+
before: null,
|
|
74934
|
+
after: null,
|
|
74935
|
+
finding: null,
|
|
74936
|
+
validation: null,
|
|
74937
|
+
status: view.status,
|
|
74938
|
+
...view.rejectedCause !== void 0 ? { rejectCause: "user" } : {},
|
|
74939
|
+
...view.result !== void 0 ? {
|
|
74940
|
+
result: {
|
|
74941
|
+
applied: view.result.kind === "ok",
|
|
74942
|
+
...view.result.kind === "failed" ? { error: view.result.message || "capability failed" } : {}
|
|
74943
|
+
}
|
|
74944
|
+
} : {},
|
|
74945
|
+
createdAt: view.createdAt,
|
|
74946
|
+
...view.decidedAt !== void 0 ? { decidedAt: view.decidedAt } : {}
|
|
74947
|
+
};
|
|
74948
|
+
}
|
|
74949
|
+
function projectIntelligenceDraft(draft) {
|
|
74950
|
+
const selections = selectionsOf(draft);
|
|
74951
|
+
const primary = selections[0] ?? null;
|
|
74952
|
+
return {
|
|
74953
|
+
id: `si:${draft.id}`,
|
|
74954
|
+
source: "skill-intelligence",
|
|
74955
|
+
origin: "agent-tool",
|
|
74956
|
+
capability: null,
|
|
74957
|
+
payload: draft.payload,
|
|
74958
|
+
kind: draft.payload.kind,
|
|
74959
|
+
target: primary ? {
|
|
74960
|
+
workspaceId: primary.workspaceId,
|
|
74961
|
+
providerId: primary.providerId,
|
|
74962
|
+
skillId: primary.skillId
|
|
74963
|
+
} : null,
|
|
74964
|
+
...selections.length > 1 ? {
|
|
74965
|
+
targets: selections.map((selection) => ({
|
|
74966
|
+
workspaceId: selection.workspaceId,
|
|
74967
|
+
providerId: selection.providerId,
|
|
74968
|
+
skillId: selection.skillId
|
|
74969
|
+
}))
|
|
74970
|
+
} : {},
|
|
74971
|
+
observedRevision: draft.observedRevisions[0]?.revision ?? null,
|
|
74972
|
+
...draft.observedRevisions.length > 1 ? { observedRevisions: draft.observedRevisions.map((entry) => entry.revision) } : {},
|
|
74973
|
+
before: null,
|
|
74974
|
+
after: null,
|
|
74975
|
+
finding: draft.findingIds.length > 0 ? { id: draft.findingIds[0], summary: draft.rationale.slice(0, 200) } : null,
|
|
74976
|
+
validation: null,
|
|
74977
|
+
status: "pending",
|
|
74978
|
+
createdAt: draft.createdAt
|
|
74979
|
+
};
|
|
74980
|
+
}
|
|
74981
|
+
function selectionsOf(draft) {
|
|
74982
|
+
return draft.observedRevisions.map((entry) => ({
|
|
74983
|
+
workspaceId: entry.workspaceId,
|
|
74984
|
+
providerId: entry.providerId,
|
|
74985
|
+
skillId: entry.skillId
|
|
74986
|
+
}));
|
|
74987
|
+
}
|
|
74988
|
+
function parseUnifiedProposalRef(id) {
|
|
74989
|
+
if (id.startsWith("mcp:")) return { source: "mcp", id: id.slice(4) };
|
|
74990
|
+
if (id.startsWith("si:")) return { source: "skill-intelligence", id: id.slice(3) };
|
|
74991
|
+
throw new Error(
|
|
74992
|
+
`INVALID_OPERATION: unified proposal id must carry an mcp:|si: prefix (got ${id})`
|
|
74993
|
+
);
|
|
74994
|
+
}
|
|
74995
|
+
|
|
74811
74996
|
// src/daemon/self-skill.ts
|
|
74812
74997
|
import { createHash as createHash19 } from "node:crypto";
|
|
74813
74998
|
import fs42 from "node:fs";
|
|
@@ -75297,9 +75482,8 @@ function createRpcRouter(deps) {
|
|
|
75297
75482
|
analyze: rpc.skillIntelligence.analyze.handler(
|
|
75298
75483
|
async ({ input }) => domain.skillIntelligence.analyze(input)
|
|
75299
75484
|
),
|
|
75300
|
-
propose
|
|
75301
|
-
|
|
75302
|
-
),
|
|
75485
|
+
// propose 直连面已退役(intelligence-proposal-parity):创建向量唯一 =
|
|
75486
|
+
// agent 会话中的 intelligence_propose_* 工具调用(capability 投影)。
|
|
75303
75487
|
list: rpc.skillIntelligence.list.handler(() => domain.skillIntelligence.list()),
|
|
75304
75488
|
reject: rpc.skillIntelligence.reject.handler(
|
|
75305
75489
|
async ({ input }) => domain.skillIntelligence.reject(input.proposalId)
|
|
@@ -75351,19 +75535,76 @@ function createRpcRouter(deps) {
|
|
|
75351
75535
|
}))
|
|
75352
75536
|
},
|
|
75353
75537
|
proposals: {
|
|
75538
|
+
// intelligence-proposal-parity C′2:统一审批入口——mcp:|si: 双源合并投影;
|
|
75539
|
+
// approve/reject 按前缀路由(McpProposalStore / skillIntelligence 服务)。
|
|
75354
75540
|
list: rpc.agent.proposals.list.handler(() => ({
|
|
75355
|
-
proposals:
|
|
75356
|
-
|
|
75357
|
-
|
|
75358
|
-
|
|
75541
|
+
proposals: [
|
|
75542
|
+
...domain.mcpProposals.list().map(projectMcpProposal),
|
|
75543
|
+
...domain.skillIntelligence.list().proposals.map(projectIntelligenceDraft)
|
|
75544
|
+
]
|
|
75359
75545
|
})),
|
|
75546
|
+
approve: rpc.agent.proposals.approve.handler(async ({ input }) => {
|
|
75547
|
+
const ref = parseUnifiedProposalRef(input.proposalId);
|
|
75548
|
+
if (ref.source === "mcp") {
|
|
75549
|
+
const result3 = await domain.mcpProposals.approve(ref.id);
|
|
75550
|
+
return { proposal: projectMcpProposal(result3.view) };
|
|
75551
|
+
}
|
|
75552
|
+
const result2 = await domain.skillIntelligence.approve({ proposalId: ref.id });
|
|
75553
|
+
const draft = domain.skillIntelligence.list().proposals.find((entry) => entry.id === ref.id);
|
|
75554
|
+
const base = draft !== void 0 ? projectIntelligenceDraft(draft) : null;
|
|
75555
|
+
const failedEntry = result2.results.find((entry) => entry.status === "failed");
|
|
75556
|
+
return {
|
|
75557
|
+
proposal: base === null || result2.applied > 0 ? {
|
|
75558
|
+
...base ?? {
|
|
75559
|
+
id: input.proposalId,
|
|
75560
|
+
source: "skill-intelligence",
|
|
75561
|
+
origin: "agent-tool",
|
|
75562
|
+
capability: null,
|
|
75563
|
+
kind: "unknown",
|
|
75564
|
+
target: null,
|
|
75565
|
+
observedRevision: null,
|
|
75566
|
+
before: null,
|
|
75567
|
+
after: null,
|
|
75568
|
+
finding: null,
|
|
75569
|
+
validation: null,
|
|
75570
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
75571
|
+
},
|
|
75572
|
+
status: failedEntry || result2.failed > 0 ? "failed" : "executed",
|
|
75573
|
+
result: {
|
|
75574
|
+
applied: result2.applied > 0,
|
|
75575
|
+
...failedEntry?.error !== void 0 ? { error: failedEntry.error } : {}
|
|
75576
|
+
}
|
|
75577
|
+
} : {
|
|
75578
|
+
...base,
|
|
75579
|
+
validation: {
|
|
75580
|
+
success: false,
|
|
75581
|
+
errors: ["revision stale \u2014 refresh and re-propose"],
|
|
75582
|
+
warnings: []
|
|
75583
|
+
}
|
|
75584
|
+
}
|
|
75585
|
+
};
|
|
75586
|
+
}),
|
|
75360
75587
|
// reject 变 await 语义(N/U):late reject → typed PROPOSAL_STALE(data =
|
|
75361
75588
|
// CapabilityFailureDetail.currentView);ledger 迁移 IO 失败 → DISTILL_IO。
|
|
75362
75589
|
reject: rpc.agent.proposals.reject.handler(async ({ input }) => {
|
|
75363
|
-
const
|
|
75364
|
-
if (
|
|
75365
|
-
|
|
75366
|
-
|
|
75590
|
+
const ref = parseUnifiedProposalRef(input.proposalId);
|
|
75591
|
+
if (ref.source === "mcp") {
|
|
75592
|
+
const rejected = await domain.mcpProposals.reject(ref.id);
|
|
75593
|
+
if (!rejected) throw new DomainError("NOT_FOUND", `proposal not found: ${ref.id}`);
|
|
75594
|
+
return { proposal: projectMcpProposal(rejected.view) };
|
|
75595
|
+
}
|
|
75596
|
+
const drafts = domain.skillIntelligence.list().proposals;
|
|
75597
|
+
const draft = drafts.find((entry) => entry.id === ref.id);
|
|
75598
|
+
if (draft === void 0)
|
|
75599
|
+
throw new DomainError("NOT_FOUND", `proposal not found: ${ref.id}`);
|
|
75600
|
+
domain.skillIntelligence.reject(ref.id);
|
|
75601
|
+
return {
|
|
75602
|
+
proposal: {
|
|
75603
|
+
...projectIntelligenceDraft(draft),
|
|
75604
|
+
status: "rejected",
|
|
75605
|
+
rejectCause: "user"
|
|
75606
|
+
}
|
|
75607
|
+
};
|
|
75367
75608
|
})
|
|
75368
75609
|
},
|
|
75369
75610
|
sessions: {
|
|
@@ -76034,7 +76275,8 @@ function createSkillCreatorMcpServer(deps) {
|
|
|
76034
76275
|
type: "text",
|
|
76035
76276
|
text: safeJson({
|
|
76036
76277
|
kind: "proposed",
|
|
76037
|
-
|
|
76278
|
+
// C′2:统一审批路由键(agent.proposals.approve 按 mcp: 前缀分发)。
|
|
76279
|
+
proposalId: `mcp:${view.proposalId}`,
|
|
76038
76280
|
capability: view.capability,
|
|
76039
76281
|
status: view.status,
|
|
76040
76282
|
note: "Awaiting human approval in the Skill Creator UI."
|
|
@@ -76267,7 +76509,7 @@ async function mountWebTray(opts) {
|
|
|
76267
76509
|
const appIcon = resolveAppIcon(opts.webuiDir);
|
|
76268
76510
|
const icon = iconPath ? {
|
|
76269
76511
|
"darwin-icon-only": { type: "file", path: iconPath, isTemplate: true },
|
|
76270
|
-
"win32-icon-only": { type: "file", path: iconPath },
|
|
76512
|
+
"win32-icon-only": { type: "file", path: iconPath, isTemplate: true },
|
|
76271
76513
|
"linux-icon-only": { type: "file", path: iconPath }
|
|
76272
76514
|
} : void 0;
|
|
76273
76515
|
const trayOptions = {
|
|
@@ -76335,9 +76577,10 @@ async function mountWindowedTray(opts) {
|
|
|
76335
76577
|
const appIcon = resolveAppIcon(opts.webuiDir);
|
|
76336
76578
|
const windowIcon = resolveWindowIcon(opts.webuiDir);
|
|
76337
76579
|
const icon = iconPath ? {
|
|
76338
|
-
// macOS template icon
|
|
76580
|
+
// macOS template icon:透明背景单色图,系统按深浅色自适应反相;
|
|
76581
|
+
// win32 同一张单色图声明 isTemplate,由 daemon 侧按任务栏主题着色。
|
|
76339
76582
|
"darwin-icon-only": { type: "file", path: iconPath, isTemplate: true },
|
|
76340
|
-
"win32-icon-only": { type: "file", path: iconPath },
|
|
76583
|
+
"win32-icon-only": { type: "file", path: iconPath, isTemplate: true },
|
|
76341
76584
|
"linux-icon-only": { type: "file", path: iconPath }
|
|
76342
76585
|
} : void 0;
|
|
76343
76586
|
const trayOptions = {
|
|
@@ -76370,6 +76613,10 @@ async function mountWindowedTray(opts) {
|
|
|
76370
76613
|
// 系统绘制 caption 按钮并投影 titlebar-area 几何(macOS NSWindow overlay /
|
|
76371
76614
|
// win32 AppWindow ExtendsContentIntoTitlebar)。frameless 保持 false——
|
|
76372
76615
|
// 边框/阴影/resize 与 caption 所有权仍归系统(§2 约束 7)。
|
|
76616
|
+
// 2026-10-01 win32 带区输入回流:opentray 清除了 udk 默认整条 caption 命中
|
|
76617
|
+
// (SetDragRects 退化 rect),带区点击直达页面;区域行为(拖拽 + 双击最大化/
|
|
76618
|
+
// 还原)由平台注入 JS 的 bindWindowRegion 声明式承载,webui WindowDragRegion
|
|
76619
|
+
// 仅声明区域。
|
|
76373
76620
|
windowControlsOverlay,
|
|
76374
76621
|
// win32 窗口身份(WM_SETICON:任务栏/alt-tab);与 overlay 正交,降级重试仍生效。
|
|
76375
76622
|
...windowIcon === null ? {} : { icon: windowIcon },
|