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.
Files changed (58) hide show
  1. package/dist/cli.js +119 -9
  2. package/dist/cli.js.map +2 -2
  3. package/dist/daemon.js +268 -21
  4. package/dist/daemon.js.map +4 -4
  5. package/dist/package.json +1 -1
  6. package/dist/webui/_app/immutable/assets/0.DLmCZ2fP.css +2 -0
  7. package/dist/webui/_app/immutable/assets/CreatorWorkspace.CvDsme_1.css +1 -0
  8. package/dist/webui/_app/immutable/chunks/{CdjBDc_u.js → B8aGNSaH.js} +1 -1
  9. package/dist/webui/_app/immutable/chunks/{CvO5eq4f.js → BDMeqoYB.js} +1 -1
  10. package/dist/webui/_app/immutable/chunks/{BgJCuTDs.js → BTMBuftG.js} +1 -1
  11. package/dist/webui/_app/immutable/chunks/Ba9GVGQ5.js +6 -0
  12. package/dist/webui/_app/immutable/chunks/{D6s79OPW.js → BchFBl6r.js} +1 -1
  13. package/dist/webui/_app/immutable/chunks/BhCD2hsN.js +8 -0
  14. package/dist/webui/_app/immutable/chunks/{hIGXQE4_.js → Bynub5xW.js} +1 -1
  15. package/dist/webui/_app/immutable/chunks/CYhuNS_d.js +11 -0
  16. package/dist/webui/_app/immutable/chunks/{Bd1_Ly7G.js → C_mgfJl-.js} +1 -1
  17. package/dist/webui/_app/immutable/chunks/{CIxXWvxF.js → ClW_LCBS.js} +1 -1
  18. package/dist/webui/_app/immutable/chunks/{Do_MDwCJ.js → Cy5ABld-.js} +1 -1
  19. package/dist/webui/_app/immutable/chunks/CzkhJhvt.js +1 -0
  20. package/dist/webui/_app/immutable/chunks/{BTuMeN4z.js → DBNjJ5Iw.js} +1 -1
  21. package/dist/webui/_app/immutable/chunks/DC5f4JBB.js +5 -0
  22. package/dist/webui/_app/immutable/chunks/DF_TIB7n.js +1 -0
  23. package/dist/webui/_app/immutable/chunks/DH8yd93-.js +1 -0
  24. package/dist/webui/_app/immutable/chunks/DSbDiml2.js +28 -0
  25. package/dist/webui/_app/immutable/chunks/{Du6-3Tbt.js → DTzqg7c9.js} +1 -1
  26. package/dist/webui/_app/immutable/chunks/{DGJ9QIPN.js → DVv6BdWV.js} +1 -1
  27. package/dist/webui/_app/immutable/chunks/{CBFLFfGb.js → DYbgoqwH.js} +1 -1
  28. package/dist/webui/_app/immutable/chunks/DdHvRi0A.js +1 -0
  29. package/dist/webui/_app/immutable/chunks/{B0stYqX9.js → DjZ7hdjX.js} +1 -1
  30. package/dist/webui/_app/immutable/chunks/DvWG9eQi.js +1 -0
  31. package/dist/webui/_app/immutable/chunks/DzfSSVEB.js +2 -0
  32. package/dist/webui/_app/immutable/chunks/GHFnehdP.js +5 -0
  33. package/dist/webui/_app/immutable/chunks/VnziGBZO.js +2 -0
  34. package/dist/webui/_app/immutable/chunks/a0LlqeqU.js +1 -0
  35. package/dist/webui/_app/immutable/chunks/eFUKcYMv.js +1 -0
  36. package/dist/webui/_app/immutable/chunks/{DlsPNMHX.js → pd7EK5wP.js} +2 -2
  37. package/dist/webui/_app/immutable/chunks/{Dcf0klrH.js → xAjQV7BZ.js} +2 -2
  38. package/dist/webui/_app/immutable/entry/{app.SX0t6ojk.js → app.DlQ53I3_.js} +2 -2
  39. package/dist/webui/_app/immutable/entry/start.CNmXm9ox.js +1 -0
  40. package/dist/webui/_app/immutable/nodes/0.BXeEkneG.js +229 -0
  41. package/dist/webui/_app/immutable/nodes/{1.BY0DmHLP.js → 1.DzYWdh98.js} +1 -1
  42. package/dist/webui/_app/immutable/nodes/{2._osi8D6m.js → 2.Dl1DQV0d.js} +1 -1
  43. package/dist/webui/_app/version.json +1 -1
  44. package/dist/webui/index.html +23 -21
  45. package/package.json +5 -5
  46. package/dist/webui/_app/immutable/assets/0.B4ZC2KQW.css +0 -2
  47. package/dist/webui/_app/immutable/chunks/B_gnhZ39.js +0 -1
  48. package/dist/webui/_app/immutable/chunks/BcvferwH.js +0 -8
  49. package/dist/webui/_app/immutable/chunks/CD-NpLjk.js +0 -6
  50. package/dist/webui/_app/immutable/chunks/COXgCOd9.js +0 -2
  51. package/dist/webui/_app/immutable/chunks/Ccj5eiVa.js +0 -1
  52. package/dist/webui/_app/immutable/chunks/Cp0lquqA.js +0 -1
  53. package/dist/webui/_app/immutable/chunks/Crg8KRap.js +0 -5
  54. package/dist/webui/_app/immutable/chunks/D7DTLcps.js +0 -1
  55. package/dist/webui/_app/immutable/chunks/oJ4aK8PG.js +0 -1
  56. package/dist/webui/_app/immutable/chunks/vry1W47_.js +0 -7
  57. package/dist/webui/_app/immutable/entry/start.gejSBBnR.js +0 -1
  58. package/dist/webui/_app/immutable/nodes/0.BTXc1wYu.js +0 -229
package/dist/cli.js CHANGED
@@ -54947,7 +54947,7 @@ var init_agent_queue = __esm({
54947
54947
 
54948
54948
  // src/shared/contracts/agent.ts
54949
54949
  import { z as z39 } from "zod";
54950
- var AgentSessionStatusSchema, AgentSessionSummarySchema, AgentSessionSeedMetadataSchema, AgentSessionCreateInputSchema, AgentSessionCreateResultSchema, AgentPromptImageSchema, AgentPromptFileSchema, AgentPromptReferenceSchema, AgentSessionPromptInputSchema, AgentSessionPromptResultSchema, AgentSessionSetModeInputSchema, AgentSessionSetModeResultSchema, AgentSessionCancelInputSchema, AgentSessionCancelResultSchema, AgentSessionStreamInputSchema, AgentSessionStreamResultSchema, AgentQueueItemSchema, AgentQueueListInputSchema, AgentQueueListResultSchema, AgentQueueUpdateInputSchema, AgentQueueUpdateResultSchema, AgentSessionsStreamsInputSchema, AgentSessionsCleanupInputSchema, AgentSessionsCleanupResultSchema, AgentApprovalQuestionSchema, AgentSessionAnswerInputSchema, AgentSessionAnswerResultSchema, AgentCardGetInputSchema, AgentCardGetResultSchema, AgentMcpProposalViewSchema, AgentProposalDecisionInputSchema, AgentFilesListInputSchema, AgentFilesEntrySchema, AgentFilesListResultSchema, AgentFilesPreviewInputSchema, AgentFilesPreviewResultSchema;
54950
+ var AgentSessionStatusSchema, AgentSessionSummarySchema, AgentSessionSeedMetadataSchema, AgentSessionCreateInputSchema, AgentSessionCreateResultSchema, AgentPromptImageSchema, AgentPromptFileSchema, AgentPromptReferenceSchema, AgentSessionPromptInputSchema, AgentSessionPromptResultSchema, AgentSessionSetModeInputSchema, AgentSessionSetModeResultSchema, AgentSessionCancelInputSchema, AgentSessionCancelResultSchema, AgentSessionStreamInputSchema, AgentSessionStreamResultSchema, AgentQueueItemSchema, AgentQueueListInputSchema, AgentQueueListResultSchema, AgentQueueUpdateInputSchema, AgentQueueUpdateResultSchema, AgentSessionsStreamsInputSchema, AgentSessionsCleanupInputSchema, AgentSessionsCleanupResultSchema, AgentApprovalQuestionSchema, AgentSessionAnswerInputSchema, AgentSessionAnswerResultSchema, AgentCardGetInputSchema, AgentCardGetResultSchema, AgentMcpProposalViewSchema, AgentProposalDecisionInputSchema, AgentFilesListInputSchema, AgentFilesEntrySchema, AgentFilesListResultSchema, AgentFilesPreviewInputSchema, AgentFilesPreviewResultSchema, UnifiedProposalViewSchema;
54951
54951
  var init_agent = __esm({
54952
54952
  "src/shared/contracts/agent.ts"() {
54953
54953
  "use strict";
@@ -55223,6 +55223,47 @@ var init_agent = __esm({
55223
55223
  size: z39.number().int().nonnegative()
55224
55224
  })
55225
55225
  ]);
55226
+ UnifiedProposalViewSchema = z39.strictObject({
55227
+ /** `mcp:<原proposalId>` | `si:<pr_ id>`——路由键。 */
55228
+ id: z39.string().min(1),
55229
+ source: z39.enum(["mcp", "skill-intelligence"]),
55230
+ /** mcp: 原 capability 名(wiki.distill_apply 过滤等消费方依赖);si: null。 */
55231
+ capability: z39.string().nullable(),
55232
+ /** 底层载荷(mcp: proposal input;si: 草稿 payload)——审批 UI 的展开面。 */
55233
+ payload: z39.unknown().optional(),
55234
+ origin: z39.literal("agent-tool"),
55235
+ /** si: edit/disable/split/merge;mcp: capability slug(dots→dashes,如 wiki-append)。 */
55236
+ kind: z39.string().min(1),
55237
+ /** 主目标(无技能目标的 capability 面 → null)。 */
55238
+ target: z39.strictObject({
55239
+ workspaceId: WorkspaceIdSchema,
55240
+ providerId: ProviderIdSchema,
55241
+ skillId: SkillIdSchema
55242
+ }).nullable(),
55243
+ /** split/merge 多源(与 observedRevisions 对齐)。 */
55244
+ targets: z39.array(
55245
+ z39.strictObject({
55246
+ workspaceId: WorkspaceIdSchema,
55247
+ providerId: ProviderIdSchema,
55248
+ skillId: SkillIdSchema
55249
+ })
55250
+ ).optional(),
55251
+ observedRevision: z39.string().nullable(),
55252
+ observedRevisions: z39.array(z39.string()).optional(),
55253
+ before: z39.string().nullable(),
55254
+ after: z39.string().nullable(),
55255
+ finding: z39.strictObject({ id: z39.string().min(1), summary: z39.string() }).nullable(),
55256
+ validation: z39.strictObject({
55257
+ success: z39.boolean(),
55258
+ errors: z39.array(z39.string()),
55259
+ warnings: z39.array(z39.string())
55260
+ }).nullable(),
55261
+ status: z39.enum(["pending", "approved", "rejected", "executed", "failed"]),
55262
+ rejectCause: z39.enum(["user", "stale"]).optional(),
55263
+ result: z39.strictObject({ applied: z39.boolean(), error: z39.string().optional() }).optional(),
55264
+ createdAt: z39.string().min(1),
55265
+ decidedAt: z39.string().optional()
55266
+ });
55226
55267
  }
55227
55268
  });
55228
55269
 
@@ -73549,8 +73590,6 @@ var init_rpc_contract = __esm({
73549
73590
  skillIntelligence: {
73550
73591
  /** Read-only multi-skill analysis locked to observed revisions. */
73551
73592
  analyze: oc.input(AnalyzeInputSchema).output(AnalyzeResultSchema),
73552
- /** Store a Manager-owned proposal draft; never mutates Providers. */
73553
- propose: oc.input(ProposeInputSchema).output(ProposeResultSchema),
73554
73593
  /** List pending proposal drafts (newest first). */
73555
73594
  list: oc.input(z45.object({})).output(ListProposalsResultSchema),
73556
73595
  /** Delete one proposal draft. */
@@ -73597,9 +73636,9 @@ var init_rpc_contract = __esm({
73597
73636
  },
73598
73637
  /** MCP mutation proposal 审批链(task 4.4;Manager authority 的决定面)。 */
73599
73638
  proposals: {
73600
- list: oc.input(z45.object({})).output(z45.object({ proposals: z45.array(AgentMcpProposalViewSchema) })),
73601
- approve: oc.input(AgentProposalDecisionInputSchema).output(z45.object({ proposal: AgentMcpProposalViewSchema })),
73602
- reject: oc.input(AgentProposalDecisionInputSchema).output(z45.object({ proposal: AgentMcpProposalViewSchema }))
73639
+ list: oc.input(z45.object({})).output(z45.object({ proposals: z45.array(UnifiedProposalViewSchema) })),
73640
+ approve: oc.input(AgentProposalDecisionInputSchema).output(z45.object({ proposal: UnifiedProposalViewSchema })),
73641
+ reject: oc.input(AgentProposalDecisionInputSchema).output(z45.object({ proposal: UnifiedProposalViewSchema }))
73603
73642
  },
73604
73643
  /** 面板会话:内核 agent 会话的生命周期投影(task 2.2;旧 dsh.* 收敛并入)。 */
73605
73644
  sessions: {
@@ -74019,16 +74058,68 @@ function createDomainCapabilities(domain) {
74019
74058
  input: DistillApplyInputSchema,
74020
74059
  // N:enqueue 并等待队列任务终态——不走 invoke 的 ok 包装(结果即闭合 result)。
74021
74060
  handler: (input) => domain.wikiDistill.apply(input)
74022
- }
74061
+ },
74062
+ // intelligence-proposal-parity(工作计划 Ch4 / C′1):四动作 proposal 一律经
74063
+ // agent tool call 产生——kernel 工具行与 MCP 同名注册(authority=proposal,
74064
+ // 名字本身即 propose 语义,无 mutation 变体后缀)。WebUI 直连创建路径退役。
74065
+ ...[
74066
+ ["edit", EditProposalPayloadSchema],
74067
+ ["disable", DisableProposalPayloadSchema]
74068
+ ].map(([action, payloadSchema]) => ({
74069
+ name: `intelligence_propose_${action}`,
74070
+ description: `Draft an ${action} proposal for the skill addressed in the finding (agent-originated; approval happens in the Skill Creator UI).`,
74071
+ authority: "proposal",
74072
+ input: IntelligenceProposeSingleInputSchema(action, payloadSchema),
74073
+ handler: (input) => invoke(async () => {
74074
+ const parsed = IntelligenceProposeSingleInputSchema(action, payloadSchema).parse(input);
74075
+ const { proposal } = await domain.skillIntelligence.propose({
74076
+ payload: parsed.payload,
74077
+ findingIds: [parsed.findingId],
74078
+ rationale: parsed.rationale
74079
+ });
74080
+ return { proposalId: proposal.id, observedRevisions: proposal.observedRevisions };
74081
+ })
74082
+ })),
74083
+ ...["split", "merge"].map((action) => ({
74084
+ name: `intelligence_propose_${action}`,
74085
+ description: `Draft a ${action} proposal across the addressed skills (agent-originated; multi-source revisions are validated against the payload).`,
74086
+ authority: "proposal",
74087
+ input: IntelligenceProposeMultiInputSchema,
74088
+ handler: (input) => invoke(async () => {
74089
+ const parsed = IntelligenceProposeMultiInputSchema.parse(input);
74090
+ if (parsed.action !== action) {
74091
+ throw new DomainError(
74092
+ "INVALID_OPERATION",
74093
+ `payload kind ${action} required for this tool`
74094
+ );
74095
+ }
74096
+ const { proposal } = await domain.skillIntelligence.propose({
74097
+ payload: parsed.payload,
74098
+ findingIds: [parsed.findingId],
74099
+ rationale: parsed.rationale
74100
+ });
74101
+ return { proposalId: proposal.id, observedRevisions: proposal.observedRevisions };
74102
+ })
74103
+ }))
74023
74104
  ];
74024
74105
  }
74025
- var RESULT_CODE_MAP, none;
74106
+ function IntelligenceProposeSingleInputSchema(action, payloadSchema) {
74107
+ return z46.strictObject({
74108
+ action: z46.literal(action),
74109
+ findingId: FindingIdSchema,
74110
+ observedRevision: z46.string().min(1),
74111
+ rationale: z46.string().min(1),
74112
+ payload: payloadSchema
74113
+ });
74114
+ }
74115
+ var RESULT_CODE_MAP, none, IntelligenceProposeMultiInputSchema;
74026
74116
  var init_domain_capabilities = __esm({
74027
74117
  "src/daemon/capability/domain-capabilities.ts"() {
74028
74118
  "use strict";
74029
74119
  init_config();
74030
74120
  init_domain_error();
74031
74121
  init_rpc_contract();
74122
+ init_skill_intelligence();
74032
74123
  init_creator();
74033
74124
  init_wiki();
74034
74125
  init_wiki_distill();
@@ -74041,6 +74132,24 @@ var init_domain_capabilities = __esm({
74041
74132
  UNAVAILABLE: "UNAVAILABLE"
74042
74133
  };
74043
74134
  none = z46.object({});
74135
+ IntelligenceProposeMultiInputSchema = z46.discriminatedUnion("action", [
74136
+ z46.strictObject({
74137
+ action: z46.literal("split"),
74138
+ findingId: FindingIdSchema,
74139
+ targets: z46.array(SkillSelectionSchema).min(1),
74140
+ observedRevisions: z46.array(z46.string().min(1)).min(1),
74141
+ rationale: z46.string().min(1),
74142
+ payload: SplitProposalPayloadSchema
74143
+ }),
74144
+ z46.strictObject({
74145
+ action: z46.literal("merge"),
74146
+ findingId: FindingIdSchema,
74147
+ targets: z46.array(SkillSelectionSchema).min(1),
74148
+ observedRevisions: z46.array(z46.string().min(1)).min(1),
74149
+ rationale: z46.string().min(1),
74150
+ payload: MergeProposalPayloadSchema
74151
+ })
74152
+ ]);
74044
74153
  }
74045
74154
  });
74046
74155
 
@@ -78155,7 +78264,8 @@ function createSkillCreatorMcpServer(deps) {
78155
78264
  type: "text",
78156
78265
  text: safeJson({
78157
78266
  kind: "proposed",
78158
- proposalId: view.proposalId,
78267
+ // C′2:统一审批路由键(agent.proposals.approve 按 mcp: 前缀分发)。
78268
+ proposalId: `mcp:${view.proposalId}`,
78159
78269
  capability: view.capability,
78160
78270
  status: view.status,
78161
78271
  note: "Awaiting human approval in the Skill Creator UI."