dsh-daoing-memory 0.1.8 → 0.1.9

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/lib/client.js CHANGED
@@ -4514,6 +4514,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4514
4514
  "createdAt": number(),
4515
4515
  "updatedAt": number()
4516
4516
  }));
4517
+ const dsh_daoing_memory_memory_generateSkillDraft_parameter_0$schema = intersection(string(), unknown());
4518
+ const dsh_daoing_memory_memory_generateSkillDraft_parameter_1$schema = object({
4519
+ "experienceId": string(),
4520
+ "form": union([literal("skill_md"), literal("script_mjs")])
4521
+ });
4522
+ const dsh_daoing_memory_memory_generateSkillDraft_result$schema = object({
4523
+ "id": string(),
4524
+ "parentExperienceId": string(),
4525
+ "form": union([literal("skill_md"), literal("script_mjs")]),
4526
+ "status": union([
4527
+ literal("draft"),
4528
+ literal("pending_review"),
4529
+ literal("approved"),
4530
+ literal("published"),
4531
+ literal("rejected"),
4532
+ literal("deprecated"),
4533
+ literal("file_missing"),
4534
+ literal("draft_lost"),
4535
+ literal("revising"),
4536
+ literal("file_drift")
4537
+ ]),
4538
+ "draftPath": string().optional(),
4539
+ "publishedPath": string().optional(),
4540
+ "version": number(),
4541
+ "useCount": number(),
4542
+ "optimizeCount": number(),
4543
+ "lastFeedback": string().optional(),
4544
+ "contentHash": string().optional(),
4545
+ "createdAt": number(),
4546
+ "updatedAt": number()
4547
+ });
4517
4548
  const dsh_daoing_memory_memory_get_parameter_0$schema = intersection(string(), unknown());
4518
4549
  const dsh_daoing_memory_memory_get_parameter_1$schema = string();
4519
4550
  const dsh_daoing_memory_memory_get_parameter_2$schema = union([_undefined(), number()]);
@@ -4636,6 +4667,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4636
4667
  "tags": array(string()),
4637
4668
  "extracted": boolean()
4638
4669
  }));
4670
+ const dsh_daoing_memory_memory_getSkillArtifact_parameter_0$schema = intersection(string(), unknown());
4671
+ const dsh_daoing_memory_memory_getSkillArtifact_parameter_1$schema = string();
4672
+ const dsh_daoing_memory_memory_getSkillArtifact_result$schema = union([literal(null), object({
4673
+ "id": string(),
4674
+ "parentExperienceId": string(),
4675
+ "form": union([literal("skill_md"), literal("script_mjs")]),
4676
+ "status": union([
4677
+ literal("draft"),
4678
+ literal("pending_review"),
4679
+ literal("approved"),
4680
+ literal("published"),
4681
+ literal("rejected"),
4682
+ literal("deprecated"),
4683
+ literal("file_missing"),
4684
+ literal("draft_lost"),
4685
+ literal("revising"),
4686
+ literal("file_drift")
4687
+ ]),
4688
+ "draftPath": string().optional(),
4689
+ "publishedPath": string().optional(),
4690
+ "version": number(),
4691
+ "useCount": number(),
4692
+ "optimizeCount": number(),
4693
+ "lastFeedback": string().optional(),
4694
+ "contentHash": string().optional(),
4695
+ "createdAt": number(),
4696
+ "updatedAt": number()
4697
+ })]);
4639
4698
  const dsh_daoing_memory_memory_humanAckDiary_parameter_0$schema = intersection(string(), unknown());
4640
4699
  const dsh_daoing_memory_memory_humanAckDiary_parameter_1$schema = object({
4641
4700
  "diaryId": string(),
@@ -5252,6 +5311,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5252
5311
  "beta": number()
5253
5312
  })
5254
5313
  });
5314
+ const dsh_daoing_memory_memory_isSkillCandidate_parameter_0$schema = intersection(string(), unknown());
5315
+ const dsh_daoing_memory_memory_isSkillCandidate_parameter_1$schema = string();
5316
+ const dsh_daoing_memory_memory_isSkillCandidate_result$schema = boolean();
5255
5317
  const dsh_daoing_memory_memory_ledgerQuery_parameter_0$schema = intersection(string(), unknown());
5256
5318
  const dsh_daoing_memory_memory_ledgerQuery_parameter_1$schema = object({
5257
5319
  "objectType": union([
@@ -5487,6 +5549,66 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5487
5549
  const dsh_daoing_memory_memory_listFactsCount_parameter_1$schema = string();
5488
5550
  const dsh_daoing_memory_memory_listFactsCount_parameter_2$schema = boolean();
5489
5551
  const dsh_daoing_memory_memory_listFactsCount_result$schema = number();
5552
+ const dsh_daoing_memory_memory_listSkillArtifacts_parameter_0$schema = intersection(string(), unknown());
5553
+ const dsh_daoing_memory_memory_listSkillArtifacts_parameter_1$schema = string();
5554
+ const dsh_daoing_memory_memory_listSkillArtifacts_parameter_2$schema = string();
5555
+ const dsh_daoing_memory_memory_listSkillArtifacts_result$schema = array(object({
5556
+ "id": string(),
5557
+ "parentExperienceId": string(),
5558
+ "form": union([literal("skill_md"), literal("script_mjs")]),
5559
+ "status": union([
5560
+ literal("draft"),
5561
+ literal("pending_review"),
5562
+ literal("approved"),
5563
+ literal("published"),
5564
+ literal("rejected"),
5565
+ literal("deprecated"),
5566
+ literal("file_missing"),
5567
+ literal("draft_lost"),
5568
+ literal("revising"),
5569
+ literal("file_drift")
5570
+ ]),
5571
+ "draftPath": string().optional(),
5572
+ "publishedPath": string().optional(),
5573
+ "version": number(),
5574
+ "useCount": number(),
5575
+ "optimizeCount": number(),
5576
+ "lastFeedback": string().optional(),
5577
+ "contentHash": string().optional(),
5578
+ "createdAt": number(),
5579
+ "updatedAt": number()
5580
+ }));
5581
+ const dsh_daoing_memory_memory_publishSkill_parameter_0$schema = intersection(string(), unknown());
5582
+ const dsh_daoing_memory_memory_publishSkill_parameter_1$schema = object({
5583
+ "id": string(),
5584
+ "reason": string()
5585
+ });
5586
+ const dsh_daoing_memory_memory_publishSkill_result$schema = object({
5587
+ "id": string(),
5588
+ "parentExperienceId": string(),
5589
+ "form": union([literal("skill_md"), literal("script_mjs")]),
5590
+ "status": union([
5591
+ literal("draft"),
5592
+ literal("pending_review"),
5593
+ literal("approved"),
5594
+ literal("published"),
5595
+ literal("rejected"),
5596
+ literal("deprecated"),
5597
+ literal("file_missing"),
5598
+ literal("draft_lost"),
5599
+ literal("revising"),
5600
+ literal("file_drift")
5601
+ ]),
5602
+ "draftPath": string().optional(),
5603
+ "publishedPath": string().optional(),
5604
+ "version": number(),
5605
+ "useCount": number(),
5606
+ "optimizeCount": number(),
5607
+ "lastFeedback": string().optional(),
5608
+ "contentHash": string().optional(),
5609
+ "createdAt": number(),
5610
+ "updatedAt": number()
5611
+ });
5490
5612
  const dsh_daoing_memory_memory_recall_parameter_0$schema = intersection(string(), unknown());
5491
5613
  const dsh_daoing_memory_memory_recall_parameter_1$schema = object({
5492
5614
  "situation": string(),
@@ -5784,6 +5906,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5784
5906
  "adopted": boolean(),
5785
5907
  "cooled": boolean().optional()
5786
5908
  });
5909
+ const dsh_daoing_memory_memory_reviewSkill_parameter_0$schema = intersection(string(), unknown());
5910
+ const dsh_daoing_memory_memory_reviewSkill_parameter_1$schema = object({
5911
+ "id": string(),
5912
+ "decision": union([literal("approve"), literal("reject")]),
5913
+ "reason": string()
5914
+ });
5915
+ const dsh_daoing_memory_memory_reviewSkill_result$schema = object({
5916
+ "id": string(),
5917
+ "parentExperienceId": string(),
5918
+ "form": union([literal("skill_md"), literal("script_mjs")]),
5919
+ "status": union([
5920
+ literal("draft"),
5921
+ literal("pending_review"),
5922
+ literal("approved"),
5923
+ literal("published"),
5924
+ literal("rejected"),
5925
+ literal("deprecated"),
5926
+ literal("file_missing"),
5927
+ literal("draft_lost"),
5928
+ literal("revising"),
5929
+ literal("file_drift")
5930
+ ]),
5931
+ "draftPath": string().optional(),
5932
+ "publishedPath": string().optional(),
5933
+ "version": number(),
5934
+ "useCount": number(),
5935
+ "optimizeCount": number(),
5936
+ "lastFeedback": string().optional(),
5937
+ "contentHash": string().optional(),
5938
+ "createdAt": number(),
5939
+ "updatedAt": number()
5940
+ });
5787
5941
  const dsh_daoing_memory_memory_revise_parameter_0$schema = intersection(string(), unknown());
5788
5942
  const dsh_daoing_memory_memory_revise_parameter_1$schema = object({
5789
5943
  "id": string(),
@@ -6068,7 +6222,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6068
6222
  },
6069
6223
  sourceLocation: {
6070
6224
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6071
- "line": 147,
6225
+ "line": 156,
6072
6226
  "column": 3
6073
6227
  }
6074
6228
  },
@@ -6109,7 +6263,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6109
6263
  },
6110
6264
  sourceLocation: {
6111
6265
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6112
- "line": 327,
6266
+ "line": 336,
6113
6267
  "column": 3
6114
6268
  }
6115
6269
  },
@@ -6141,7 +6295,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6141
6295
  },
6142
6296
  sourceLocation: {
6143
6297
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6144
- "line": 334,
6298
+ "line": 343,
6145
6299
  "column": 3
6146
6300
  }
6147
6301
  },
@@ -6173,7 +6327,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6173
6327
  },
6174
6328
  sourceLocation: {
6175
6329
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6176
- "line": 376,
6330
+ "line": 385,
6177
6331
  "column": 3
6178
6332
  }
6179
6333
  },
@@ -6214,7 +6368,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6214
6368
  },
6215
6369
  sourceLocation: {
6216
6370
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6217
- "line": 153,
6371
+ "line": 162,
6218
6372
  "column": 9
6219
6373
  }
6220
6374
  },
@@ -6268,7 +6422,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6268
6422
  },
6269
6423
  sourceLocation: {
6270
6424
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6271
- "line": 313,
6425
+ "line": 322,
6272
6426
  "column": 3
6273
6427
  }
6274
6428
  },
@@ -6300,7 +6454,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6300
6454
  },
6301
6455
  sourceLocation: {
6302
6456
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6303
- "line": 320,
6457
+ "line": 329,
6304
6458
  "column": 3
6305
6459
  }
6306
6460
  },
@@ -6341,10 +6495,51 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6341
6495
  },
6342
6496
  sourceLocation: {
6343
6497
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6344
- "line": 140,
6498
+ "line": 149,
6345
6499
  "column": 3
6346
6500
  }
6347
6501
  },
6502
+ {
6503
+ id: "dsh-daoing-memory#memory/generateSkillDraft",
6504
+ service: "memory",
6505
+ namespace: "memory",
6506
+ method: "generateSkillDraft",
6507
+ invocation: { kind: "direct" },
6508
+ scope: {
6509
+ context: "agent",
6510
+ wire: "agentId"
6511
+ },
6512
+ parameters: [{
6513
+ name: "agent",
6514
+ wire: "agentId",
6515
+ source: "lookup",
6516
+ lookup: "agent",
6517
+ codec: {
6518
+ mode: "strict",
6519
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
6520
+ schema: dsh_daoing_memory_memory_generateSkillDraft_parameter_0$schema
6521
+ }
6522
+ }, {
6523
+ name: "request",
6524
+ wire: "request",
6525
+ source: "json",
6526
+ codec: {
6527
+ mode: "strict",
6528
+ typeSymbol: "dsh-daoing-memory/types#GenerateSkillDraftRequest",
6529
+ schema: dsh_daoing_memory_memory_generateSkillDraft_parameter_1$schema
6530
+ }
6531
+ }],
6532
+ result: {
6533
+ mode: "strict",
6534
+ typeSymbol: "dsh-daoing-memory/types#SkillArtifact",
6535
+ schema: dsh_daoing_memory_memory_generateSkillDraft_result$schema
6536
+ },
6537
+ sourceLocation: {
6538
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6539
+ "line": 515,
6540
+ "column": 9
6541
+ }
6542
+ },
6348
6543
  {
6349
6544
  id: "dsh-daoing-memory#memory/get",
6350
6545
  service: "memory",
@@ -6396,7 +6591,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6396
6591
  },
6397
6592
  sourceLocation: {
6398
6593
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6399
- "line": 126,
6594
+ "line": 135,
6400
6595
  "column": 3
6401
6596
  }
6402
6597
  },
@@ -6428,7 +6623,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6428
6623
  },
6429
6624
  sourceLocation: {
6430
6625
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6431
- "line": 259,
6626
+ "line": 268,
6432
6627
  "column": 3
6433
6628
  }
6434
6629
  },
@@ -6469,7 +6664,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6469
6664
  },
6470
6665
  sourceLocation: {
6471
6666
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6472
- "line": 273,
6667
+ "line": 282,
6668
+ "column": 3
6669
+ }
6670
+ },
6671
+ {
6672
+ id: "dsh-daoing-memory#memory/getSkillArtifact",
6673
+ service: "memory",
6674
+ namespace: "memory",
6675
+ method: "getSkillArtifact",
6676
+ invocation: { kind: "direct" },
6677
+ scope: {
6678
+ context: "agent",
6679
+ wire: "agentId"
6680
+ },
6681
+ parameters: [{
6682
+ name: "agent",
6683
+ wire: "agentId",
6684
+ source: "lookup",
6685
+ lookup: "agent",
6686
+ codec: {
6687
+ mode: "strict",
6688
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
6689
+ schema: dsh_daoing_memory_memory_getSkillArtifact_parameter_0$schema
6690
+ }
6691
+ }, {
6692
+ name: "id",
6693
+ wire: "id",
6694
+ source: "json",
6695
+ codec: {
6696
+ mode: "strict",
6697
+ typeSymbol: "dsh-daoing-memory#memory/getSkillArtifact:id",
6698
+ schema: dsh_daoing_memory_memory_getSkillArtifact_parameter_1$schema
6699
+ }
6700
+ }],
6701
+ result: {
6702
+ mode: "strict",
6703
+ typeSymbol: "dsh-daoing-memory#memory/getSkillArtifact:result",
6704
+ schema: dsh_daoing_memory_memory_getSkillArtifact_result$schema
6705
+ },
6706
+ sourceLocation: {
6707
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6708
+ "line": 571,
6473
6709
  "column": 3
6474
6710
  }
6475
6711
  },
@@ -6510,7 +6746,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6510
6746
  },
6511
6747
  sourceLocation: {
6512
6748
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6513
- "line": 481,
6749
+ "line": 490,
6514
6750
  "column": 3
6515
6751
  }
6516
6752
  },
@@ -6551,7 +6787,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6551
6787
  },
6552
6788
  sourceLocation: {
6553
6789
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6554
- "line": 424,
6790
+ "line": 433,
6555
6791
  "column": 3
6556
6792
  }
6557
6793
  },
@@ -6592,7 +6828,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6592
6828
  },
6593
6829
  sourceLocation: {
6594
6830
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6595
- "line": 452,
6831
+ "line": 461,
6596
6832
  "column": 3
6597
6833
  }
6598
6834
  },
@@ -6633,7 +6869,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6633
6869
  },
6634
6870
  sourceLocation: {
6635
6871
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6636
- "line": 409,
6872
+ "line": 418,
6637
6873
  "column": 3
6638
6874
  }
6639
6875
  },
@@ -6674,7 +6910,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6674
6910
  },
6675
6911
  sourceLocation: {
6676
6912
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6677
- "line": 474,
6913
+ "line": 483,
6678
6914
  "column": 3
6679
6915
  }
6680
6916
  },
@@ -6715,7 +6951,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6715
6951
  },
6716
6952
  sourceLocation: {
6717
6953
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6718
- "line": 496,
6954
+ "line": 505,
6719
6955
  "column": 3
6720
6956
  }
6721
6957
  },
@@ -6756,7 +6992,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6756
6992
  },
6757
6993
  sourceLocation: {
6758
6994
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6759
- "line": 401,
6995
+ "line": 410,
6760
6996
  "column": 3
6761
6997
  }
6762
6998
  },
@@ -6797,7 +7033,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6797
7033
  },
6798
7034
  sourceLocation: {
6799
7035
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6800
- "line": 466,
7036
+ "line": 475,
6801
7037
  "column": 3
6802
7038
  }
6803
7039
  },
@@ -6838,7 +7074,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6838
7074
  },
6839
7075
  sourceLocation: {
6840
7076
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6841
- "line": 417,
7077
+ "line": 426,
6842
7078
  "column": 3
6843
7079
  }
6844
7080
  },
@@ -6879,7 +7115,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6879
7115
  },
6880
7116
  sourceLocation: {
6881
7117
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6882
- "line": 459,
7118
+ "line": 468,
6883
7119
  "column": 3
6884
7120
  }
6885
7121
  },
@@ -6920,7 +7156,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6920
7156
  },
6921
7157
  sourceLocation: {
6922
7158
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6923
- "line": 394,
7159
+ "line": 403,
6924
7160
  "column": 3
6925
7161
  }
6926
7162
  },
@@ -6974,7 +7210,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6974
7210
  },
6975
7211
  sourceLocation: {
6976
7212
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
6977
- "line": 431,
7213
+ "line": 440,
6978
7214
  "column": 3
6979
7215
  }
6980
7216
  },
@@ -7015,7 +7251,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7015
7251
  },
7016
7252
  sourceLocation: {
7017
7253
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7018
- "line": 438,
7254
+ "line": 447,
7019
7255
  "column": 3
7020
7256
  }
7021
7257
  },
@@ -7056,7 +7292,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7056
7292
  },
7057
7293
  sourceLocation: {
7058
7294
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7059
- "line": 445,
7295
+ "line": 454,
7060
7296
  "column": 3
7061
7297
  }
7062
7298
  },
@@ -7097,7 +7333,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7097
7333
  },
7098
7334
  sourceLocation: {
7099
7335
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7100
- "line": 488,
7336
+ "line": 497,
7101
7337
  "column": 3
7102
7338
  }
7103
7339
  },
@@ -7138,7 +7374,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7138
7374
  },
7139
7375
  sourceLocation: {
7140
7376
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7141
- "line": 102,
7377
+ "line": 111,
7378
+ "column": 3
7379
+ }
7380
+ },
7381
+ {
7382
+ id: "dsh-daoing-memory#memory/isSkillCandidate",
7383
+ service: "memory",
7384
+ namespace: "memory",
7385
+ method: "isSkillCandidate",
7386
+ invocation: { kind: "direct" },
7387
+ scope: {
7388
+ context: "agent",
7389
+ wire: "agentId"
7390
+ },
7391
+ parameters: [{
7392
+ name: "agent",
7393
+ wire: "agentId",
7394
+ source: "lookup",
7395
+ lookup: "agent",
7396
+ codec: {
7397
+ mode: "strict",
7398
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
7399
+ schema: dsh_daoing_memory_memory_isSkillCandidate_parameter_0$schema
7400
+ }
7401
+ }, {
7402
+ name: "experienceId",
7403
+ wire: "experienceId",
7404
+ source: "json",
7405
+ codec: {
7406
+ mode: "strict",
7407
+ typeSymbol: "dsh-daoing-memory#memory/isSkillCandidate:experienceId",
7408
+ schema: dsh_daoing_memory_memory_isSkillCandidate_parameter_1$schema
7409
+ }
7410
+ }],
7411
+ result: {
7412
+ mode: "strict",
7413
+ typeSymbol: "dsh-daoing-memory#memory/isSkillCandidate:result",
7414
+ schema: dsh_daoing_memory_memory_isSkillCandidate_result$schema
7415
+ },
7416
+ sourceLocation: {
7417
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7418
+ "line": 578,
7142
7419
  "column": 3
7143
7420
  }
7144
7421
  },
@@ -7179,7 +7456,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7179
7456
  },
7180
7457
  sourceLocation: {
7181
7458
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7182
- "line": 341,
7459
+ "line": 350,
7183
7460
  "column": 3
7184
7461
  }
7185
7462
  },
@@ -7220,7 +7497,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7220
7497
  },
7221
7498
  sourceLocation: {
7222
7499
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7223
- "line": 348,
7500
+ "line": 357,
7224
7501
  "column": 3
7225
7502
  }
7226
7503
  },
@@ -7261,7 +7538,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7261
7538
  },
7262
7539
  sourceLocation: {
7263
7540
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7264
- "line": 133,
7541
+ "line": 142,
7265
7542
  "column": 3
7266
7543
  }
7267
7544
  },
@@ -7335,7 +7612,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7335
7612
  },
7336
7613
  sourceLocation: {
7337
7614
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7338
- "line": 294,
7615
+ "line": 303,
7339
7616
  "column": 3
7340
7617
  }
7341
7618
  },
@@ -7389,7 +7666,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7389
7666
  },
7390
7667
  sourceLocation: {
7391
7668
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7392
- "line": 301,
7669
+ "line": 310,
7393
7670
  "column": 3
7394
7671
  }
7395
7672
  },
@@ -7453,7 +7730,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7453
7730
  },
7454
7731
  sourceLocation: {
7455
7732
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7456
- "line": 266,
7733
+ "line": 275,
7457
7734
  "column": 3
7458
7735
  }
7459
7736
  },
@@ -7527,7 +7804,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7527
7804
  },
7528
7805
  sourceLocation: {
7529
7806
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7530
- "line": 280,
7807
+ "line": 289,
7531
7808
  "column": 3
7532
7809
  }
7533
7810
  },
@@ -7581,7 +7858,102 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7581
7858
  },
7582
7859
  sourceLocation: {
7583
7860
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7584
- "line": 287,
7861
+ "line": 296,
7862
+ "column": 3
7863
+ }
7864
+ },
7865
+ {
7866
+ id: "dsh-daoing-memory#memory/listSkillArtifacts",
7867
+ service: "memory",
7868
+ namespace: "memory",
7869
+ method: "listSkillArtifacts",
7870
+ invocation: { kind: "direct" },
7871
+ scope: {
7872
+ context: "agent",
7873
+ wire: "agentId"
7874
+ },
7875
+ parameters: [
7876
+ {
7877
+ name: "agent",
7878
+ wire: "agentId",
7879
+ source: "lookup",
7880
+ lookup: "agent",
7881
+ codec: {
7882
+ mode: "strict",
7883
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
7884
+ schema: dsh_daoing_memory_memory_listSkillArtifacts_parameter_0$schema
7885
+ }
7886
+ },
7887
+ {
7888
+ name: "parentExperienceId",
7889
+ wire: "parentExperienceId",
7890
+ source: "json",
7891
+ codec: {
7892
+ mode: "strict",
7893
+ typeSymbol: "dsh-daoing-memory#memory/listSkillArtifacts:parentExperienceId",
7894
+ schema: dsh_daoing_memory_memory_listSkillArtifacts_parameter_1$schema
7895
+ }
7896
+ },
7897
+ {
7898
+ name: "status",
7899
+ wire: "status",
7900
+ source: "json",
7901
+ codec: {
7902
+ mode: "strict",
7903
+ typeSymbol: "dsh-daoing-memory#memory/listSkillArtifacts:status",
7904
+ schema: dsh_daoing_memory_memory_listSkillArtifacts_parameter_2$schema
7905
+ }
7906
+ }
7907
+ ],
7908
+ result: {
7909
+ mode: "strict",
7910
+ typeSymbol: "dsh-daoing-memory#memory/listSkillArtifacts:result",
7911
+ schema: dsh_daoing_memory_memory_listSkillArtifacts_result$schema
7912
+ },
7913
+ sourceLocation: {
7914
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7915
+ "line": 561,
7916
+ "column": 3
7917
+ }
7918
+ },
7919
+ {
7920
+ id: "dsh-daoing-memory#memory/publishSkill",
7921
+ service: "memory",
7922
+ namespace: "memory",
7923
+ method: "publishSkill",
7924
+ invocation: { kind: "direct" },
7925
+ scope: {
7926
+ context: "agent",
7927
+ wire: "agentId"
7928
+ },
7929
+ parameters: [{
7930
+ name: "agent",
7931
+ wire: "agentId",
7932
+ source: "lookup",
7933
+ lookup: "agent",
7934
+ codec: {
7935
+ mode: "strict",
7936
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
7937
+ schema: dsh_daoing_memory_memory_publishSkill_parameter_0$schema
7938
+ }
7939
+ }, {
7940
+ name: "request",
7941
+ wire: "request",
7942
+ source: "json",
7943
+ codec: {
7944
+ mode: "strict",
7945
+ typeSymbol: "dsh-daoing-memory/types#PublishSkillRequest",
7946
+ schema: dsh_daoing_memory_memory_publishSkill_parameter_1$schema
7947
+ }
7948
+ }],
7949
+ result: {
7950
+ mode: "strict",
7951
+ typeSymbol: "dsh-daoing-memory/types#SkillArtifact",
7952
+ schema: dsh_daoing_memory_memory_publishSkill_result$schema
7953
+ },
7954
+ sourceLocation: {
7955
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7956
+ "line": 541,
7585
7957
  "column": 3
7586
7958
  }
7587
7959
  },
@@ -7622,7 +7994,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7622
7994
  },
7623
7995
  sourceLocation: {
7624
7996
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7625
- "line": 90,
7997
+ "line": 99,
7626
7998
  "column": 3
7627
7999
  }
7628
8000
  },
@@ -7663,7 +8035,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7663
8035
  },
7664
8036
  sourceLocation: {
7665
8037
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7666
- "line": 84,
8038
+ "line": 93,
7667
8039
  "column": 3
7668
8040
  }
7669
8041
  },
@@ -7704,7 +8076,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7704
8076
  },
7705
8077
  sourceLocation: {
7706
8078
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7707
- "line": 96,
8079
+ "line": 105,
8080
+ "column": 3
8081
+ }
8082
+ },
8083
+ {
8084
+ id: "dsh-daoing-memory#memory/reviewSkill",
8085
+ service: "memory",
8086
+ namespace: "memory",
8087
+ method: "reviewSkill",
8088
+ invocation: { kind: "direct" },
8089
+ scope: {
8090
+ context: "agent",
8091
+ wire: "agentId"
8092
+ },
8093
+ parameters: [{
8094
+ name: "agent",
8095
+ wire: "agentId",
8096
+ source: "lookup",
8097
+ lookup: "agent",
8098
+ codec: {
8099
+ mode: "strict",
8100
+ typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
8101
+ schema: dsh_daoing_memory_memory_reviewSkill_parameter_0$schema
8102
+ }
8103
+ }, {
8104
+ name: "request",
8105
+ wire: "request",
8106
+ source: "json",
8107
+ codec: {
8108
+ mode: "strict",
8109
+ typeSymbol: "dsh-daoing-memory/types#ReviewSkillRequest",
8110
+ schema: dsh_daoing_memory_memory_reviewSkill_parameter_1$schema
8111
+ }
8112
+ }],
8113
+ result: {
8114
+ mode: "strict",
8115
+ typeSymbol: "dsh-daoing-memory/types#SkillArtifact",
8116
+ schema: dsh_daoing_memory_memory_reviewSkill_result$schema
8117
+ },
8118
+ sourceLocation: {
8119
+ "file": "packages/memory/dsh-daoing-memory/src/service.ts",
8120
+ "line": 535,
7708
8121
  "column": 3
7709
8122
  }
7710
8123
  },
@@ -7745,7 +8158,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7745
8158
  },
7746
8159
  sourceLocation: {
7747
8160
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7748
- "line": 108,
8161
+ "line": 117,
7749
8162
  "column": 3
7750
8163
  }
7751
8164
  },
@@ -7786,7 +8199,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7786
8199
  },
7787
8200
  sourceLocation: {
7788
8201
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7789
- "line": 120,
8202
+ "line": 129,
7790
8203
  "column": 3
7791
8204
  }
7792
8205
  },
@@ -7818,7 +8231,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7818
8231
  },
7819
8232
  sourceLocation: {
7820
8233
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7821
- "line": 239,
8234
+ "line": 248,
7822
8235
  "column": 9
7823
8236
  }
7824
8237
  },
@@ -7850,7 +8263,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7850
8263
  },
7851
8264
  sourceLocation: {
7852
8265
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7853
- "line": 362,
8266
+ "line": 371,
7854
8267
  "column": 3
7855
8268
  }
7856
8269
  },
@@ -7882,7 +8295,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7882
8295
  },
7883
8296
  sourceLocation: {
7884
8297
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7885
- "line": 355,
8298
+ "line": 364,
7886
8299
  "column": 3
7887
8300
  }
7888
8301
  },
@@ -7923,7 +8336,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7923
8336
  },
7924
8337
  sourceLocation: {
7925
8338
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7926
- "line": 114,
8339
+ "line": 123,
7927
8340
  "column": 3
7928
8341
  }
7929
8342
  },
@@ -7955,7 +8368,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7955
8368
  },
7956
8369
  sourceLocation: {
7957
8370
  "file": "packages/memory/dsh-daoing-memory/src/service.ts",
7958
- "line": 369,
8371
+ "line": 378,
7959
8372
  "column": 3
7960
8373
  }
7961
8374
  }
@@ -8048,7 +8461,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8048
8461
  humanSetConcernStatus: (request) => remote.humanSetConcernStatus(session, request),
8049
8462
  humanDeleteConcern: (request) => remote.humanDeleteConcern(session, request),
8050
8463
  humanReleaseCold: (request) => remote.humanReleaseCold(session, request),
8051
- ingest: (request) => remote.ingest(session, request)
8464
+ ingest: (request) => remote.ingest(session, request),
8465
+ generateSkillDraft: (request) => remote.generateSkillDraft(session, request),
8466
+ reviewSkill: (request) => remote.reviewSkill(session, request),
8467
+ publishSkill: (request) => remote.publishSkill(session, request),
8468
+ listSkillArtifacts: (parentExperienceId, status) => remote.listSkillArtifacts(session, parentExperienceId, status),
8469
+ isSkillCandidate: (experienceId) => remote.isSkillCandidate(session, experienceId)
8052
8470
  };
8053
8471
  }
8054
8472
  //#endregion
@@ -8145,61 +8563,61 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8145
8563
  document.head.appendChild(tag);
8146
8564
  }
8147
8565
  var Workbench_module_css_default = {
8148
- "subtitle": "KAfEAG_subtitle",
8149
- "cardDetail": "KAfEAG_cardDetail",
8150
- "workbenchTabs": "KAfEAG_workbenchTabs",
8151
- "btn": "KAfEAG_btn",
8152
- "valueCell": "KAfEAG_valueCell",
8153
- "check": "KAfEAG_check",
8154
- "detailLabel": "KAfEAG_detailLabel",
8155
- "payloadFull": "KAfEAG_payloadFull",
8156
- "workbenchTab": "KAfEAG_workbenchTab",
8157
- "cardMeta": "KAfEAG_cardMeta",
8158
- "statusLive": "KAfEAG_statusLive",
8159
- "statusOther": "KAfEAG_statusOther",
8160
- "tabs": "KAfEAG_tabs",
8566
+ "list": "KAfEAG_list",
8567
+ "detailRow": "KAfEAG_detailRow",
8568
+ "okLine": "KAfEAG_okLine",
8569
+ "cardTitle": "KAfEAG_cardTitle",
8570
+ "badgePositive": "KAfEAG_badgePositive",
8571
+ "badgeConflict": "KAfEAG_badgeConflict",
8572
+ "table": "KAfEAG_table",
8573
+ "badgeNegative": "KAfEAG_badgeNegative",
8161
8574
  "concernBg": "KAfEAG_concernBg",
8575
+ "error": "KAfEAG_error",
8576
+ "titleBlock": "KAfEAG_titleBlock",
8577
+ "page": "KAfEAG_page",
8162
8578
  "actions": "KAfEAG_actions",
8163
- "historyTitle": "KAfEAG_historyTitle",
8164
- "card": "KAfEAG_card",
8165
- "columns": "KAfEAG_columns",
8166
- "form": "KAfEAG_form",
8167
- "cardHead": "KAfEAG_cardHead",
8168
- "panel": "KAfEAG_panel",
8579
+ "body": "KAfEAG_body",
8580
+ "subtitle": "KAfEAG_subtitle",
8581
+ "cellActions": "KAfEAG_cellActions",
8169
8582
  "workbenchTabActive": "KAfEAG_workbenchTabActive",
8170
- "title": "KAfEAG_title",
8583
+ "btn": "KAfEAG_btn",
8584
+ "cardMeta": "KAfEAG_cardMeta",
8585
+ "badgePinned": "KAfEAG_badgePinned",
8171
8586
  "empty": "KAfEAG_empty",
8172
- "payloadToggle": "KAfEAG_payloadToggle",
8173
- "cellActions": "KAfEAG_cellActions",
8174
- "badge": "KAfEAG_badge",
8175
- "body": "KAfEAG_body",
8176
- "badgeConflict": "KAfEAG_badgeConflict",
8587
+ "cardHead": "KAfEAG_cardHead",
8588
+ "btnDanger": "KAfEAG_btnDanger",
8177
8589
  "statusCandidate": "KAfEAG_statusCandidate",
8178
- "sectionTitle": "KAfEAG_sectionTitle",
8179
- "titleBlock": "KAfEAG_titleBlock",
8180
- "cardTitle": "KAfEAG_cardTitle",
8181
- "cardSub": "KAfEAG_cardSub",
8182
- "toolbar": "KAfEAG_toolbar",
8183
- "badgePositive": "KAfEAG_badgePositive",
8184
- "rules": "KAfEAG_rules",
8185
8590
  "trust": "KAfEAG_trust",
8186
- "badgePinned": "KAfEAG_badgePinned",
8187
- "detailRow": "KAfEAG_detailRow",
8188
- "btnDanger": "KAfEAG_btnDanger",
8189
- "error": "KAfEAG_error",
8591
+ "toolbar": "KAfEAG_toolbar",
8592
+ "check": "KAfEAG_check",
8593
+ "title": "KAfEAG_title",
8594
+ "historyTitle": "KAfEAG_historyTitle",
8595
+ "badge": "KAfEAG_badge",
8596
+ "column": "KAfEAG_column",
8190
8597
  "tab": "KAfEAG_tab",
8191
8598
  "tabActive": "KAfEAG_tabActive",
8192
- "statline": "KAfEAG_statline",
8193
- "list": "KAfEAG_list",
8194
- "badgeNegative": "KAfEAG_badgeNegative",
8195
- "header": "KAfEAG_header",
8599
+ "sectionTitle": "KAfEAG_sectionTitle",
8600
+ "card": "KAfEAG_card",
8196
8601
  "field": "KAfEAG_field",
8197
- "okLine": "KAfEAG_okLine",
8602
+ "statusLive": "KAfEAG_statusLive",
8603
+ "detailLabel": "KAfEAG_detailLabel",
8604
+ "form": "KAfEAG_form",
8605
+ "payloadToggle": "KAfEAG_payloadToggle",
8606
+ "workbenchTab": "KAfEAG_workbenchTab",
8607
+ "workbenchTabs": "KAfEAG_workbenchTabs",
8198
8608
  "warnLine": "KAfEAG_warnLine",
8199
- "page": "KAfEAG_page",
8200
- "table": "KAfEAG_table",
8609
+ "cardSub": "KAfEAG_cardSub",
8201
8610
  "statusChallenged": "KAfEAG_statusChallenged",
8202
- "column": "KAfEAG_column"
8611
+ "columns": "KAfEAG_columns",
8612
+ "cardDetail": "KAfEAG_cardDetail",
8613
+ "tabs": "KAfEAG_tabs",
8614
+ "rules": "KAfEAG_rules",
8615
+ "statline": "KAfEAG_statline",
8616
+ "panel": "KAfEAG_panel",
8617
+ "header": "KAfEAG_header",
8618
+ "statusOther": "KAfEAG_statusOther",
8619
+ "valueCell": "KAfEAG_valueCell",
8620
+ "payloadFull": "KAfEAG_payloadFull"
8203
8621
  };
8204
8622
  //#endregion
8205
8623
  //#region src/client/ExperiencePage.tsx
@@ -8216,6 +8634,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8216
8634
  archived: "已归档",
8217
8635
  cold: "冷宫"
8218
8636
  };
8637
+ const SKILL_STATUS_LABELS = {
8638
+ draft: "草稿",
8639
+ pending_review: "待审",
8640
+ approved: "已通过",
8641
+ published: "已发布",
8642
+ rejected: "已拒绝",
8643
+ deprecated: "已废弃",
8644
+ file_missing: "文件缺失",
8645
+ draft_lost: "草稿丢失",
8646
+ revising: "修订中",
8647
+ file_drift: "文件漂移"
8648
+ };
8219
8649
  const KIND_LABELS = {
8220
8650
  positive: "正经验",
8221
8651
  negative: "负经验"
@@ -8255,6 +8685,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8255
8685
  const [expanded, setExpanded] = (0, react.useState)(null);
8256
8686
  const [history, setHistory] = (0, react.useState)([]);
8257
8687
  const [error, setError] = (0, react.useState)(null);
8688
+ const [skillArtifacts, setSkillArtifacts] = (0, react.useState)([]);
8689
+ const refreshSkills = (0, react.useCallback)((experienceId) => {
8690
+ actions.listSkillArtifacts(experienceId, "").then(setSkillArtifacts).catch(() => {
8691
+ setSkillArtifacts([]);
8692
+ });
8693
+ }, [actions]);
8258
8694
  const refresh = (0, react.useCallback)(() => {
8259
8695
  const filter = {};
8260
8696
  if (statusFilter !== "") filter.status = statusFilter;
@@ -8279,13 +8715,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8279
8715
  if (expanded === key) {
8280
8716
  setExpanded(null);
8281
8717
  setHistory([]);
8718
+ setSkillArtifacts([]);
8282
8719
  return;
8283
8720
  }
8284
8721
  setExpanded(key);
8285
8722
  actions.family(item.id).then(setHistory).catch(() => {
8286
8723
  setHistory([]);
8287
8724
  });
8288
- }, [actions, expanded]);
8725
+ refreshSkills(item.id);
8726
+ }, [
8727
+ actions,
8728
+ expanded,
8729
+ refreshSkills
8730
+ ]);
8289
8731
  const runPin = (0, react.useCallback)(async (item) => {
8290
8732
  const reason = await promptReason(item.pinned ? "取消永久标记" : "永久标记(置顶信任,豁免预算)");
8291
8733
  if (reason === void 0) return;
@@ -8364,6 +8806,63 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8364
8806
  onChanged,
8365
8807
  refresh
8366
8808
  ]);
8809
+ const runGenerateSkill = (0, react.useCallback)(async (item, form) => {
8810
+ try {
8811
+ await actions.generateSkillDraft({
8812
+ experienceId: item.id,
8813
+ form
8814
+ });
8815
+ refreshSkills(item.id);
8816
+ onChanged();
8817
+ } catch (e) {
8818
+ setError(e instanceof Error ? e.message : String(e));
8819
+ }
8820
+ }, [
8821
+ actions,
8822
+ onChanged,
8823
+ refreshSkills
8824
+ ]);
8825
+ const runReviewSkill = (0, react.useCallback)(async (skillId, decision) => {
8826
+ const reason = await promptReason(decision === "approve" ? "通过 skill 草稿" : "拒绝 skill 草稿");
8827
+ if (reason === void 0) return;
8828
+ try {
8829
+ await actions.reviewSkill({
8830
+ id: skillId,
8831
+ decision,
8832
+ reason
8833
+ });
8834
+ const sa = skillArtifacts.find((s) => s.id === skillId);
8835
+ if (sa) refreshSkills(sa.parentExperienceId);
8836
+ onChanged();
8837
+ } catch (e) {
8838
+ setError(e instanceof Error ? e.message : String(e));
8839
+ }
8840
+ }, [
8841
+ actions,
8842
+ onChanged,
8843
+ refreshSkills,
8844
+ skillArtifacts
8845
+ ]);
8846
+ const runPublishSkill = (0, react.useCallback)(async (skillId) => {
8847
+ const reason = await promptReason("发布 skill 到 $DSH_HOME/skills/");
8848
+ if (reason === void 0) return;
8849
+ try {
8850
+ await actions.publishSkill({
8851
+ id: skillId,
8852
+ reason
8853
+ });
8854
+ const sa = skillArtifacts.find((s) => s.id === skillId);
8855
+ if (sa) refreshSkills(sa.parentExperienceId);
8856
+ onChanged();
8857
+ } catch (e) {
8858
+ setError(e instanceof Error ? e.message : String(e));
8859
+ }
8860
+ }, [
8861
+ actions,
8862
+ onChanged,
8863
+ refreshSkills,
8864
+ skillArtifacts
8865
+ ]);
8367
8866
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8368
8867
  className: Workbench_module_css_default.page,
8369
8868
  children: [
@@ -8615,9 +9114,93 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8615
9114
  runDelete(item);
8616
9115
  },
8617
9116
  children: "删除"
9117
+ }),
9118
+ item.status === "live" && item.path.length >= 3 && item.verifiedCount >= 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9119
+ type: "button",
9120
+ className: Workbench_module_css_default.btn,
9121
+ onClick: () => {
9122
+ runGenerateSkill(item, "skill_md");
9123
+ },
9124
+ title: "从经验生成 DSH skill 文档草稿",
9125
+ children: "生成 Skill"
9126
+ }),
9127
+ item.status === "live" && item.path.length >= 3 && item.verifiedCount >= 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9128
+ type: "button",
9129
+ className: Workbench_module_css_default.btn,
9130
+ onClick: () => {
9131
+ runGenerateSkill(item, "script_mjs");
9132
+ },
9133
+ title: "从经验生成可执行脚本草稿",
9134
+ children: "生成脚本"
8618
9135
  })
8619
9136
  ]
8620
9137
  }),
9138
+ skillArtifacts.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9139
+ className: Workbench_module_css_default.historyTitle,
9140
+ children: [
9141
+ "关联 Skill/脚本(",
9142
+ String(skillArtifacts.length),
9143
+ ")"
9144
+ ]
9145
+ }),
9146
+ skillArtifacts.map((sa) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9147
+ className: Workbench_module_css_default.cardDetail,
9148
+ children: [
9149
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9150
+ className: Workbench_module_css_default.detailRow,
9151
+ children: [
9152
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9153
+ className: Workbench_module_css_default.detailLabel,
9154
+ children: sa.form === "skill_md" ? "Skill" : "脚本"
9155
+ }),
9156
+ "v",
9157
+ String(sa.version),
9158
+ " · ",
9159
+ SKILL_STATUS_LABELS[sa.status] ?? sa.status,
9160
+ " · 使用 ",
9161
+ String(sa.useCount),
9162
+ " · 优化 ",
9163
+ String(sa.optimizeCount)
9164
+ ]
9165
+ }),
9166
+ sa.status === "draft" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9167
+ className: Workbench_module_css_default.actions,
9168
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9169
+ type: "button",
9170
+ className: Workbench_module_css_default.btn,
9171
+ onClick: () => {
9172
+ runReviewSkill(sa.id, "approve");
9173
+ },
9174
+ children: "通过"
9175
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9176
+ type: "button",
9177
+ className: `${Workbench_module_css_default.btn} ${Workbench_module_css_default.btnDanger}`,
9178
+ onClick: () => {
9179
+ runReviewSkill(sa.id, "reject");
9180
+ },
9181
+ children: "拒绝"
9182
+ })]
9183
+ }),
9184
+ sa.status === "approved" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9185
+ className: Workbench_module_css_default.actions,
9186
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9187
+ type: "button",
9188
+ className: Workbench_module_css_default.btn,
9189
+ onClick: () => {
9190
+ runPublishSkill(sa.id);
9191
+ },
9192
+ children: "发布到 $DSH_HOME/skills/"
9193
+ })
9194
+ }),
9195
+ sa.status === "published" && sa.publishedPath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9196
+ className: Workbench_module_css_default.detailRow,
9197
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9198
+ className: Workbench_module_css_default.detailLabel,
9199
+ children: "路径"
9200
+ }), sa.publishedPath]
9201
+ })
9202
+ ]
9203
+ }, sa.id)),
8621
9204
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8622
9205
  className: Workbench_module_css_default.historyTitle,
8623
9206
  children: "修订历史(superseded 为只读索引,可回滚)"
@@ -8676,17 +9259,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8676
9259
  document.head.appendChild(tag);
8677
9260
  }
8678
9261
  var ReasonDialog_module_css_default = {
8679
- "header": "L4KK8a_header",
8680
- "dialog": "L4KK8a_dialog",
8681
- "buttons": "L4KK8a_buttons",
8682
- "overlay": "L4KK8a_overlay",
8683
- "footer": "L4KK8a_footer",
8684
9262
  "btnCancel": "L4KK8a_btnCancel",
9263
+ "btnConfirm": "L4KK8a_btnConfirm",
8685
9264
  "textarea": "L4KK8a_textarea",
8686
- "subtitle": "L4KK8a_subtitle",
8687
9265
  "hint": "L4KK8a_hint",
8688
- "btnConfirm": "L4KK8a_btnConfirm",
8689
- "title": "L4KK8a_title"
9266
+ "dialog": "L4KK8a_dialog",
9267
+ "overlay": "L4KK8a_overlay",
9268
+ "title": "L4KK8a_title",
9269
+ "buttons": "L4KK8a_buttons",
9270
+ "header": "L4KK8a_header",
9271
+ "subtitle": "L4KK8a_subtitle",
9272
+ "footer": "L4KK8a_footer"
8690
9273
  };
8691
9274
  //#endregion
8692
9275
  //#region src/client/ReasonDialog.tsx
@@ -10731,7 +11314,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10731
11314
  unwrap(await memory.humanDeleteConcern(session, request));
10732
11315
  },
10733
11316
  humanReleaseCold: async (session, request) => unwrap(await memory.humanReleaseCold(session, request)),
10734
- ingest: async (session, request) => unwrap(await memory.ingest(session, request))
11317
+ ingest: async (session, request) => unwrap(await memory.ingest(session, request)),
11318
+ generateSkillDraft: async (session, request) => unwrap(await memory.generateSkillDraft(session, request)),
11319
+ reviewSkill: async (session, request) => unwrap(await memory.reviewSkill(session, request)),
11320
+ publishSkill: async (session, request) => unwrap(await memory.publishSkill(session, request)),
11321
+ listSkillArtifacts: async (session, parentExperienceId, status) => unwrap(await memory.listSkillArtifacts(session, parentExperienceId, status)),
11322
+ isSkillCandidate: async (session, experienceId) => unwrap(await memory.isSkillCandidate(session, experienceId))
10735
11323
  };
10736
11324
  const disposeNav = ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
10737
11325
  name: "conversation.session.header.utilities",