dsh-agent-team-presets 0.3.3 → 0.3.4
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/NOTICE +4 -3
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/assets/card-patches/catalog.json +10 -0
- package/assets/card-patches/dsh-context-0.87.0.client.js.gz +0 -0
- package/docs/builtin-team-skills.md +4 -4
- package/docs/builtin-team-skills.zh.md +4 -4
- package/docs/guide/install.md +1 -1
- package/docs/guide/install.zh.md +1 -1
- package/docs/guide/integrations.md +1 -1
- package/docs/guide/integrations.zh.md +1 -1
- package/docs/guide/team-skills.md +21 -9
- package/docs/guide/team-skills.zh.md +21 -9
- package/icon.webp +0 -0
- package/lib/client.js +952 -176
- package/lib/index.js +560 -297
- package/lib/typert.host.js +402 -29
- package/lib/typert.remote-client.d.ts +9 -9
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +402 -29
- package/lib/types/client/TeamImportDialog.d.ts +4 -15
- package/lib/types/client/TeamImportDialog.js +29 -25
- package/lib/types/client/TeamPresetsSection.js +14 -5
- package/lib/types/client/TeamSkillsView.d.ts +3 -3
- package/lib/types/client/TeamSkillsView.js +56 -12
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/locales.js +60 -8
- package/lib/types/client/team-presets-controller.d.ts +15 -2
- package/lib/types/client/team-presets-controller.js +86 -30
- package/lib/types/client/team-skills-controller.d.ts +14 -5
- package/lib/types/client/team-skills-controller.js +71 -37
- package/lib/types/index.js +5 -7
- package/lib/types/preset-editor.js +3 -4
- package/lib/types/preset-transfer.d.ts +1 -1
- package/lib/types/presets.d.ts +21 -23
- package/lib/types/presets.js +72 -36
- package/lib/types/team-skills/import.d.ts +17 -7
- package/lib/types/team-skills/import.js +115 -21
- package/lib/types/team-skills/index.d.ts +1 -12
- package/lib/types/team-skills/index.js +3 -26
- package/lib/types/team-skills/manager.d.ts +3 -3
- package/lib/types/team-skills/manager.js +39 -81
- package/lib/types/team-skills/official-bindings.d.ts +29 -0
- package/lib/types/team-skills/official-bindings.js +51 -0
- package/lib/types/team-skills/service.d.ts +7 -12
- package/lib/types/team-skills/service.js +125 -56
- package/lib/types/team-skills/store.d.ts +16 -6
- package/lib/types/team-skills/store.js +119 -14
- package/lib/types/types.d.ts +18 -4
- package/package.json +4 -1
package/lib/client.js
CHANGED
|
@@ -18970,6 +18970,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18970
18970
|
})).readonly().describe("The captain slot plus every member slot, in Team order.")
|
|
18971
18971
|
})).readonly().describe("Every Team and its addressable roles."),
|
|
18972
18972
|
"official": array(string$1()).readonly().describe("Shipped skill ids this deployment provides."),
|
|
18973
|
+
"inboxChanges": array(object({
|
|
18974
|
+
"folder": string$1().readonly().describe("Folder name inside the scan root."),
|
|
18975
|
+
"status": union([
|
|
18976
|
+
literal("missing"),
|
|
18977
|
+
literal("imported"),
|
|
18978
|
+
literal("updated"),
|
|
18979
|
+
literal("existing"),
|
|
18980
|
+
literal("invalid")
|
|
18981
|
+
]).readonly().describe("How the source compares to the installed version."),
|
|
18982
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields preserved without applying them as dependencies."),
|
|
18983
|
+
"skillId": string$1().readonly().optional().describe("Skill name read from its `SKILL.md`, when the folder was readable."),
|
|
18984
|
+
"assetId": string$1().readonly().optional().describe("Asset identity for an imported or already-present skill."),
|
|
18985
|
+
"reason": string$1().readonly().optional().describe("Machine-readable refusal reason, or `duplicate` for an existing name."),
|
|
18986
|
+
"detail": string$1().readonly().optional().describe("Path or other detail that explains the reason.")
|
|
18987
|
+
})).readonly().optional().describe("Source folders with changes or conflicts found during a read-only check."),
|
|
18973
18988
|
"issue": string$1().readonly().optional().describe("Why the store is unusable, when this deployment could not open it.")
|
|
18974
18989
|
})
|
|
18975
18990
|
});
|
|
@@ -19006,7 +19021,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19006
19021
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19007
19022
|
})).readonly().describe("Every file, path-ordered."),
|
|
19008
19023
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19009
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19024
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19025
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19026
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19010
19027
|
"dependencies": object({
|
|
19011
19028
|
"executables": array(object({
|
|
19012
19029
|
"name": string$1().readonly(),
|
|
@@ -19072,7 +19089,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19072
19089
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19073
19090
|
})).readonly().describe("Every file, path-ordered."),
|
|
19074
19091
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19075
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19092
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19093
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19094
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19076
19095
|
"dependencies": object({
|
|
19077
19096
|
"executables": array(object({
|
|
19078
19097
|
"name": string$1().readonly(),
|
|
@@ -19130,7 +19149,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19130
19149
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19131
19150
|
})).readonly().describe("Every file, path-ordered."),
|
|
19132
19151
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19133
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19152
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19153
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19154
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19134
19155
|
"dependencies": object({
|
|
19135
19156
|
"executables": array(object({
|
|
19136
19157
|
"name": string$1().readonly(),
|
|
@@ -19154,6 +19175,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19154
19175
|
"reason": string$1().readonly().describe("Machine-readable reason."),
|
|
19155
19176
|
"detail": string$1().readonly().describe("Human-readable detail, already specific.")
|
|
19156
19177
|
})]);
|
|
19178
|
+
let dsh_agent_team_presets_teamSkills_library_parameter_0$schema$value;
|
|
19179
|
+
const dsh_agent_team_presets_teamSkills_library_parameter_0$schema = () => dsh_agent_team_presets_teamSkills_library_parameter_0$schema$value ??= union([
|
|
19180
|
+
_undefined(),
|
|
19181
|
+
literal(false),
|
|
19182
|
+
literal(true)
|
|
19183
|
+
]);
|
|
19157
19184
|
let dsh_agent_team_presets_teamSkills_library_result$schema$value;
|
|
19158
19185
|
const dsh_agent_team_presets_teamSkills_library_result$schema = () => dsh_agent_team_presets_teamSkills_library_result$schema$value ??= object({
|
|
19159
19186
|
"root": string$1().readonly().describe("Absolute private root, shown so the user can open it in a file manager."),
|
|
@@ -19188,10 +19215,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19188
19215
|
})).readonly().describe("The captain slot plus every member slot, in Team order.")
|
|
19189
19216
|
})).readonly().describe("Every Team and its addressable roles."),
|
|
19190
19217
|
"official": array(string$1()).readonly().describe("Shipped skill ids this deployment provides."),
|
|
19218
|
+
"inboxChanges": array(object({
|
|
19219
|
+
"folder": string$1().readonly().describe("Folder name inside the scan root."),
|
|
19220
|
+
"status": union([
|
|
19221
|
+
literal("missing"),
|
|
19222
|
+
literal("imported"),
|
|
19223
|
+
literal("updated"),
|
|
19224
|
+
literal("existing"),
|
|
19225
|
+
literal("invalid")
|
|
19226
|
+
]).readonly().describe("How the source compares to the installed version."),
|
|
19227
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields preserved without applying them as dependencies."),
|
|
19228
|
+
"skillId": string$1().readonly().optional().describe("Skill name read from its `SKILL.md`, when the folder was readable."),
|
|
19229
|
+
"assetId": string$1().readonly().optional().describe("Asset identity for an imported or already-present skill."),
|
|
19230
|
+
"reason": string$1().readonly().optional().describe("Machine-readable refusal reason, or `duplicate` for an existing name."),
|
|
19231
|
+
"detail": string$1().readonly().optional().describe("Path or other detail that explains the reason.")
|
|
19232
|
+
})).readonly().optional().describe("Source folders with changes or conflicts found during a read-only check."),
|
|
19191
19233
|
"issue": string$1().readonly().optional().describe("Why the store is unusable, when this deployment could not open it.")
|
|
19192
19234
|
});
|
|
19193
19235
|
let dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0$schema$value;
|
|
19194
19236
|
const dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0$schema = () => dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0$schema$value ??= string$1();
|
|
19237
|
+
let dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1$schema$value;
|
|
19238
|
+
const dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1$schema = () => dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1$schema$value ??= union([
|
|
19239
|
+
_undefined(),
|
|
19240
|
+
literal(false),
|
|
19241
|
+
literal(true)
|
|
19242
|
+
]);
|
|
19195
19243
|
let dsh_agent_team_presets_teamSkills_overrideSkill_result$schema$value;
|
|
19196
19244
|
const dsh_agent_team_presets_teamSkills_overrideSkill_result$schema = () => dsh_agent_team_presets_teamSkills_overrideSkill_result$schema$value ??= union([object({
|
|
19197
19245
|
"asset": object({
|
|
@@ -19221,7 +19269,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19221
19269
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19222
19270
|
})).readonly().describe("Every file, path-ordered."),
|
|
19223
19271
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19224
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19272
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19273
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19274
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19225
19275
|
"dependencies": object({
|
|
19226
19276
|
"executables": array(object({
|
|
19227
19277
|
"name": string$1().readonly(),
|
|
@@ -19300,7 +19350,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19300
19350
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19301
19351
|
})).readonly().describe("Every file, path-ordered."),
|
|
19302
19352
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19303
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19353
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19354
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19355
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19304
19356
|
"dependencies": object({
|
|
19305
19357
|
"executables": array(object({
|
|
19306
19358
|
"name": string$1().readonly(),
|
|
@@ -19360,6 +19412,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19360
19412
|
})).readonly().describe("The captain slot plus every member slot, in Team order.")
|
|
19361
19413
|
})).readonly().describe("Every Team and its addressable roles."),
|
|
19362
19414
|
"official": array(string$1()).readonly().describe("Shipped skill ids this deployment provides."),
|
|
19415
|
+
"inboxChanges": array(object({
|
|
19416
|
+
"folder": string$1().readonly().describe("Folder name inside the scan root."),
|
|
19417
|
+
"status": union([
|
|
19418
|
+
literal("missing"),
|
|
19419
|
+
literal("imported"),
|
|
19420
|
+
literal("updated"),
|
|
19421
|
+
literal("existing"),
|
|
19422
|
+
literal("invalid")
|
|
19423
|
+
]).readonly().describe("How the source compares to the installed version."),
|
|
19424
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields preserved without applying them as dependencies."),
|
|
19425
|
+
"skillId": string$1().readonly().optional().describe("Skill name read from its `SKILL.md`, when the folder was readable."),
|
|
19426
|
+
"assetId": string$1().readonly().optional().describe("Asset identity for an imported or already-present skill."),
|
|
19427
|
+
"reason": string$1().readonly().optional().describe("Machine-readable refusal reason, or `duplicate` for an existing name."),
|
|
19428
|
+
"detail": string$1().readonly().optional().describe("Path or other detail that explains the reason.")
|
|
19429
|
+
})).readonly().optional().describe("Source folders with changes or conflicts found during a read-only check."),
|
|
19363
19430
|
"issue": string$1().readonly().optional().describe("Why the store is unusable, when this deployment could not open it.")
|
|
19364
19431
|
});
|
|
19365
19432
|
let dsh_agent_team_presets_teamSkills_scanImportFolder_result$schema$value;
|
|
@@ -19372,15 +19439,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19372
19439
|
"root": string$1().readonly().describe("Absolute directory that was scanned."),
|
|
19373
19440
|
"scanned": number$1().readonly().describe("Folders examined."),
|
|
19374
19441
|
"imported": number$1().readonly().describe("Folders published as new custom assets."),
|
|
19375
|
-
"
|
|
19442
|
+
"updated": number$1().readonly().describe("Installed custom skills that received a new version."),
|
|
19443
|
+
"existing": number$1().readonly().describe("Folders whose published package is identical."),
|
|
19444
|
+
"missing": number$1().readonly().describe("Known source folders no longer providing the installed skill."),
|
|
19376
19445
|
"invalid": number$1().readonly().describe("Folders refused with a reason."),
|
|
19377
19446
|
"entries": array(object({
|
|
19378
19447
|
"folder": string$1().readonly().describe("Folder name inside the scan root."),
|
|
19379
19448
|
"status": union([
|
|
19449
|
+
literal("missing"),
|
|
19380
19450
|
literal("imported"),
|
|
19451
|
+
literal("updated"),
|
|
19381
19452
|
literal("existing"),
|
|
19382
19453
|
literal("invalid")
|
|
19383
|
-
]).readonly().describe("
|
|
19454
|
+
]).readonly().describe("How the source compares to the installed version."),
|
|
19455
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields preserved without applying them as dependencies."),
|
|
19384
19456
|
"skillId": string$1().readonly().optional().describe("Skill name read from its `SKILL.md`, when the folder was readable."),
|
|
19385
19457
|
"assetId": string$1().readonly().optional().describe("Asset identity for an imported or already-present skill."),
|
|
19386
19458
|
"reason": string$1().readonly().optional().describe("Machine-readable refusal reason, or `duplicate` for an existing name."),
|
|
@@ -19427,6 +19499,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19427
19499
|
})).readonly().describe("The captain slot plus every member slot, in Team order.")
|
|
19428
19500
|
})).readonly().describe("Every Team and its addressable roles."),
|
|
19429
19501
|
"official": array(string$1()).readonly().describe("Shipped skill ids this deployment provides."),
|
|
19502
|
+
"inboxChanges": array(object({
|
|
19503
|
+
"folder": string$1().readonly().describe("Folder name inside the scan root."),
|
|
19504
|
+
"status": union([
|
|
19505
|
+
literal("missing"),
|
|
19506
|
+
literal("imported"),
|
|
19507
|
+
literal("updated"),
|
|
19508
|
+
literal("existing"),
|
|
19509
|
+
literal("invalid")
|
|
19510
|
+
]).readonly().describe("How the source compares to the installed version."),
|
|
19511
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields preserved without applying them as dependencies."),
|
|
19512
|
+
"skillId": string$1().readonly().optional().describe("Skill name read from its `SKILL.md`, when the folder was readable."),
|
|
19513
|
+
"assetId": string$1().readonly().optional().describe("Asset identity for an imported or already-present skill."),
|
|
19514
|
+
"reason": string$1().readonly().optional().describe("Machine-readable refusal reason, or `duplicate` for an existing name."),
|
|
19515
|
+
"detail": string$1().readonly().optional().describe("Path or other detail that explains the reason.")
|
|
19516
|
+
})).readonly().optional().describe("Source folders with changes or conflicts found during a read-only check."),
|
|
19430
19517
|
"issue": string$1().readonly().optional().describe("Why the store is unusable, when this deployment could not open it.")
|
|
19431
19518
|
});
|
|
19432
19519
|
let dsh_agent_team_presets_teamSkills_updateDependencies_parameter_0$schema$value;
|
|
@@ -19471,7 +19558,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19471
19558
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19472
19559
|
})).readonly().describe("Every file, path-ordered."),
|
|
19473
19560
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19474
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19561
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19562
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19563
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19475
19564
|
"dependencies": object({
|
|
19476
19565
|
"executables": array(object({
|
|
19477
19566
|
"name": string$1().readonly(),
|
|
@@ -19501,6 +19590,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19501
19590
|
const dsh_agent_team_presets_teamSkills_writeFile_parameter_1$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_1$schema$value ??= string$1();
|
|
19502
19591
|
let dsh_agent_team_presets_teamSkills_writeFile_parameter_2$schema$value;
|
|
19503
19592
|
const dsh_agent_team_presets_teamSkills_writeFile_parameter_2$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_2$schema$value ??= string$1();
|
|
19593
|
+
let dsh_agent_team_presets_teamSkills_writeFile_parameter_3$schema$value;
|
|
19594
|
+
const dsh_agent_team_presets_teamSkills_writeFile_parameter_3$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_3$schema$value ??= union([_undefined(), string$1()]);
|
|
19504
19595
|
let dsh_agent_team_presets_teamSkills_writeFile_result$schema$value;
|
|
19505
19596
|
const dsh_agent_team_presets_teamSkills_writeFile_result$schema = () => dsh_agent_team_presets_teamSkills_writeFile_result$schema$value ??= union([object({
|
|
19506
19597
|
"asset": object({
|
|
@@ -19530,7 +19621,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19530
19621
|
"text": boolean$1().readonly().describe("Whether the page may show it as text.")
|
|
19531
19622
|
})).readonly().describe("Every file, path-ordered."),
|
|
19532
19623
|
"body": string$1().readonly().describe("The `SKILL.md` body, without frontmatter."),
|
|
19533
|
-
"directory": string$1().readonly().describe("Absolute directory
|
|
19624
|
+
"directory": string$1().readonly().describe("Absolute source directory for scanned assets, or the published version's directory."),
|
|
19625
|
+
"ignoredDependencyFields": array(string$1()).readonly().optional().describe("Frontmatter fields the importer preserves without applying as dependencies."),
|
|
19626
|
+
"bindingSwitchIssue": string$1().readonly().optional().describe("The copy was created, but moving the existing role bindings failed."),
|
|
19534
19627
|
"dependencies": object({
|
|
19535
19628
|
"executables": array(object({
|
|
19536
19629
|
"name": string$1().readonly(),
|
|
@@ -19581,8 +19674,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19581
19674
|
"path": string$1().describe("POSIX-relative path inside the imported folder."),
|
|
19582
19675
|
"base64": string$1().describe("Base64 of the bytes.")
|
|
19583
19676
|
}));
|
|
19677
|
+
let dsh_agent_team_presets_teamSkills_library_parameter_0_strict$schema$value;
|
|
19678
|
+
const dsh_agent_team_presets_teamSkills_library_parameter_0_strict$schema = () => dsh_agent_team_presets_teamSkills_library_parameter_0_strict$schema$value ??= union([
|
|
19679
|
+
_undefined(),
|
|
19680
|
+
literal(false),
|
|
19681
|
+
literal(true)
|
|
19682
|
+
]);
|
|
19584
19683
|
let dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0_strict$schema$value;
|
|
19585
19684
|
const dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0_strict$schema = () => dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0_strict$schema$value ??= string$1();
|
|
19685
|
+
let dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1_strict$schema$value;
|
|
19686
|
+
const dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1_strict$schema = () => dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1_strict$schema$value ??= union([
|
|
19687
|
+
_undefined(),
|
|
19688
|
+
literal(false),
|
|
19689
|
+
literal(true)
|
|
19690
|
+
]);
|
|
19586
19691
|
let dsh_agent_team_presets_teamSkills_readFile_parameter_0_strict$schema$value;
|
|
19587
19692
|
const dsh_agent_team_presets_teamSkills_readFile_parameter_0_strict$schema = () => dsh_agent_team_presets_teamSkills_readFile_parameter_0_strict$schema$value ??= string$1();
|
|
19588
19693
|
let dsh_agent_team_presets_teamSkills_readFile_parameter_1_strict$schema$value;
|
|
@@ -19616,6 +19721,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19616
19721
|
const dsh_agent_team_presets_teamSkills_writeFile_parameter_1_strict$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_1_strict$schema$value ??= string$1();
|
|
19617
19722
|
let dsh_agent_team_presets_teamSkills_writeFile_parameter_2_strict$schema$value;
|
|
19618
19723
|
const dsh_agent_team_presets_teamSkills_writeFile_parameter_2_strict$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_2_strict$schema$value ??= string$1();
|
|
19724
|
+
let dsh_agent_team_presets_teamSkills_writeFile_parameter_3_strict$schema$value;
|
|
19725
|
+
const dsh_agent_team_presets_teamSkills_writeFile_parameter_3_strict$schema = () => dsh_agent_team_presets_teamSkills_writeFile_parameter_3_strict$schema$value ??= union([_undefined(), string$1()]);
|
|
19619
19726
|
const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
19620
19727
|
package: "dsh-agent-team-presets",
|
|
19621
19728
|
methods: {
|
|
@@ -20343,6 +20450,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20343
20450
|
"items": { "type": "string" },
|
|
20344
20451
|
"description": "Shipped skill ids this deployment provides."
|
|
20345
20452
|
},
|
|
20453
|
+
"inboxChanges": {
|
|
20454
|
+
"type": "array",
|
|
20455
|
+
"items": {
|
|
20456
|
+
"type": "object",
|
|
20457
|
+
"properties": {
|
|
20458
|
+
"folder": {
|
|
20459
|
+
"type": "string",
|
|
20460
|
+
"description": "Folder name inside the scan root."
|
|
20461
|
+
},
|
|
20462
|
+
"status": {
|
|
20463
|
+
"type": "string",
|
|
20464
|
+
"enum": [
|
|
20465
|
+
"missing",
|
|
20466
|
+
"imported",
|
|
20467
|
+
"updated",
|
|
20468
|
+
"existing",
|
|
20469
|
+
"invalid"
|
|
20470
|
+
],
|
|
20471
|
+
"description": "How the source compares to the installed version."
|
|
20472
|
+
},
|
|
20473
|
+
"ignoredDependencyFields": {
|
|
20474
|
+
"type": "array",
|
|
20475
|
+
"items": { "type": "string" },
|
|
20476
|
+
"description": "Frontmatter fields preserved without applying them as dependencies."
|
|
20477
|
+
},
|
|
20478
|
+
"skillId": {
|
|
20479
|
+
"type": "string",
|
|
20480
|
+
"description": "Skill name read from its `SKILL.md`, when the folder was readable."
|
|
20481
|
+
},
|
|
20482
|
+
"assetId": {
|
|
20483
|
+
"type": "string",
|
|
20484
|
+
"description": "Asset identity for an imported or already-present skill."
|
|
20485
|
+
},
|
|
20486
|
+
"reason": {
|
|
20487
|
+
"type": "string",
|
|
20488
|
+
"description": "Machine-readable refusal reason, or `duplicate` for an existing name."
|
|
20489
|
+
},
|
|
20490
|
+
"detail": {
|
|
20491
|
+
"type": "string",
|
|
20492
|
+
"description": "Path or other detail that explains the reason."
|
|
20493
|
+
}
|
|
20494
|
+
},
|
|
20495
|
+
"required": ["folder", "status"],
|
|
20496
|
+
"additionalProperties": true
|
|
20497
|
+
},
|
|
20498
|
+
"description": "Source folders with changes or conflicts found during a read-only check."
|
|
20499
|
+
},
|
|
20346
20500
|
"issue": {
|
|
20347
20501
|
"type": "string",
|
|
20348
20502
|
"description": "Why the store is unusable, when this deployment could not open it."
|
|
@@ -20367,7 +20521,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20367
20521
|
},
|
|
20368
20522
|
sourceLocation: {
|
|
20369
20523
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20370
|
-
"line":
|
|
20524
|
+
"line": 506,
|
|
20371
20525
|
"column": 9
|
|
20372
20526
|
}
|
|
20373
20527
|
},
|
|
@@ -20417,7 +20571,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20417
20571
|
},
|
|
20418
20572
|
sourceLocation: {
|
|
20419
20573
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20420
|
-
"line":
|
|
20574
|
+
"line": 247,
|
|
20421
20575
|
"column": 9
|
|
20422
20576
|
}
|
|
20423
20577
|
},
|
|
@@ -20483,7 +20637,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20483
20637
|
},
|
|
20484
20638
|
sourceLocation: {
|
|
20485
20639
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20486
|
-
"line":
|
|
20640
|
+
"line": 477,
|
|
20487
20641
|
"column": 9
|
|
20488
20642
|
}
|
|
20489
20643
|
},
|
|
@@ -20517,7 +20671,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20517
20671
|
},
|
|
20518
20672
|
sourceLocation: {
|
|
20519
20673
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20520
|
-
"line":
|
|
20674
|
+
"line": 171,
|
|
20521
20675
|
"column": 9
|
|
20522
20676
|
}
|
|
20523
20677
|
},
|
|
@@ -20585,7 +20739,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20585
20739
|
},
|
|
20586
20740
|
sourceLocation: {
|
|
20587
20741
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20588
|
-
"line":
|
|
20742
|
+
"line": 268,
|
|
20589
20743
|
"column": 9
|
|
20590
20744
|
}
|
|
20591
20745
|
},
|
|
@@ -20593,7 +20747,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20593
20747
|
service: "teamSkills",
|
|
20594
20748
|
description: "List the library, the roster, and the shipped skill ids.",
|
|
20595
20749
|
invocation: { kind: "direct" },
|
|
20596
|
-
parameters: [
|
|
20750
|
+
parameters: [{
|
|
20751
|
+
name: "checkInbox",
|
|
20752
|
+
source: "json",
|
|
20753
|
+
acceptsUndefined: true,
|
|
20754
|
+
codec: {
|
|
20755
|
+
mode: "strict",
|
|
20756
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/library:checkInbox",
|
|
20757
|
+
create: dsh_agent_team_presets_teamSkills_library_parameter_0$schema,
|
|
20758
|
+
jsonSchema: {
|
|
20759
|
+
"type": "boolean",
|
|
20760
|
+
"enum": [false, true]
|
|
20761
|
+
}
|
|
20762
|
+
},
|
|
20763
|
+
strictCodec: {
|
|
20764
|
+
mode: "strict",
|
|
20765
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/library:checkInbox",
|
|
20766
|
+
create: dsh_agent_team_presets_teamSkills_library_parameter_0_strict$schema,
|
|
20767
|
+
jsonSchema: {
|
|
20768
|
+
"type": "boolean",
|
|
20769
|
+
"enum": [false, true]
|
|
20770
|
+
}
|
|
20771
|
+
}
|
|
20772
|
+
}],
|
|
20597
20773
|
result: {
|
|
20598
20774
|
mode: "strict",
|
|
20599
20775
|
typeSymbol: "dsh-agent-team-presets/types#TeamSkillLibraryView",
|
|
@@ -20770,6 +20946,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20770
20946
|
"items": { "type": "string" },
|
|
20771
20947
|
"description": "Shipped skill ids this deployment provides."
|
|
20772
20948
|
},
|
|
20949
|
+
"inboxChanges": {
|
|
20950
|
+
"type": "array",
|
|
20951
|
+
"items": {
|
|
20952
|
+
"type": "object",
|
|
20953
|
+
"properties": {
|
|
20954
|
+
"folder": {
|
|
20955
|
+
"type": "string",
|
|
20956
|
+
"description": "Folder name inside the scan root."
|
|
20957
|
+
},
|
|
20958
|
+
"status": {
|
|
20959
|
+
"type": "string",
|
|
20960
|
+
"enum": [
|
|
20961
|
+
"missing",
|
|
20962
|
+
"imported",
|
|
20963
|
+
"updated",
|
|
20964
|
+
"existing",
|
|
20965
|
+
"invalid"
|
|
20966
|
+
],
|
|
20967
|
+
"description": "How the source compares to the installed version."
|
|
20968
|
+
},
|
|
20969
|
+
"ignoredDependencyFields": {
|
|
20970
|
+
"type": "array",
|
|
20971
|
+
"items": { "type": "string" },
|
|
20972
|
+
"description": "Frontmatter fields preserved without applying them as dependencies."
|
|
20973
|
+
},
|
|
20974
|
+
"skillId": {
|
|
20975
|
+
"type": "string",
|
|
20976
|
+
"description": "Skill name read from its `SKILL.md`, when the folder was readable."
|
|
20977
|
+
},
|
|
20978
|
+
"assetId": {
|
|
20979
|
+
"type": "string",
|
|
20980
|
+
"description": "Asset identity for an imported or already-present skill."
|
|
20981
|
+
},
|
|
20982
|
+
"reason": {
|
|
20983
|
+
"type": "string",
|
|
20984
|
+
"description": "Machine-readable refusal reason, or `duplicate` for an existing name."
|
|
20985
|
+
},
|
|
20986
|
+
"detail": {
|
|
20987
|
+
"type": "string",
|
|
20988
|
+
"description": "Path or other detail that explains the reason."
|
|
20989
|
+
}
|
|
20990
|
+
},
|
|
20991
|
+
"required": ["folder", "status"],
|
|
20992
|
+
"additionalProperties": true
|
|
20993
|
+
},
|
|
20994
|
+
"description": "Source folders with changes or conflicts found during a read-only check."
|
|
20995
|
+
},
|
|
20773
20996
|
"issue": {
|
|
20774
20997
|
"type": "string",
|
|
20775
20998
|
"description": "Why the store is unusable, when this deployment could not open it."
|
|
@@ -20786,7 +21009,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20786
21009
|
},
|
|
20787
21010
|
sourceLocation: {
|
|
20788
21011
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20789
|
-
"line":
|
|
21012
|
+
"line": 143,
|
|
20790
21013
|
"column": 9
|
|
20791
21014
|
}
|
|
20792
21015
|
},
|
|
@@ -20810,6 +21033,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20810
21033
|
create: dsh_agent_team_presets_teamSkills_overrideSkill_parameter_0_strict$schema,
|
|
20811
21034
|
jsonSchema: { "type": "string" }
|
|
20812
21035
|
}
|
|
21036
|
+
}, {
|
|
21037
|
+
name: "switchBindings",
|
|
21038
|
+
source: "json",
|
|
21039
|
+
acceptsUndefined: true,
|
|
21040
|
+
codec: {
|
|
21041
|
+
mode: "strict",
|
|
21042
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/overrideSkill:switchBindings",
|
|
21043
|
+
create: dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1$schema,
|
|
21044
|
+
jsonSchema: {
|
|
21045
|
+
"type": "boolean",
|
|
21046
|
+
"enum": [false, true]
|
|
21047
|
+
}
|
|
21048
|
+
},
|
|
21049
|
+
strictCodec: {
|
|
21050
|
+
mode: "strict",
|
|
21051
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/overrideSkill:switchBindings",
|
|
21052
|
+
create: dsh_agent_team_presets_teamSkills_overrideSkill_parameter_1_strict$schema,
|
|
21053
|
+
jsonSchema: {
|
|
21054
|
+
"type": "boolean",
|
|
21055
|
+
"enum": [false, true]
|
|
21056
|
+
}
|
|
21057
|
+
}
|
|
20813
21058
|
}],
|
|
20814
21059
|
result: {
|
|
20815
21060
|
mode: "strict",
|
|
@@ -20820,7 +21065,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20820
21065
|
},
|
|
20821
21066
|
sourceLocation: {
|
|
20822
21067
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20823
|
-
"line":
|
|
21068
|
+
"line": 414,
|
|
20824
21069
|
"column": 9
|
|
20825
21070
|
}
|
|
20826
21071
|
},
|
|
@@ -20884,7 +21129,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20884
21129
|
},
|
|
20885
21130
|
sourceLocation: {
|
|
20886
21131
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20887
|
-
"line":
|
|
21132
|
+
"line": 301,
|
|
20888
21133
|
"column": 9
|
|
20889
21134
|
}
|
|
20890
21135
|
},
|
|
@@ -20973,7 +21218,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20973
21218
|
},
|
|
20974
21219
|
sourceLocation: {
|
|
20975
21220
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
20976
|
-
"line":
|
|
21221
|
+
"line": 204,
|
|
20977
21222
|
"column": 9
|
|
20978
21223
|
}
|
|
20979
21224
|
},
|
|
@@ -21007,7 +21252,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21007
21252
|
},
|
|
21008
21253
|
sourceLocation: {
|
|
21009
21254
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21010
|
-
"line":
|
|
21255
|
+
"line": 453,
|
|
21011
21256
|
"column": 9
|
|
21012
21257
|
}
|
|
21013
21258
|
},
|
|
@@ -21215,6 +21460,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21215
21460
|
"items": { "type": "string" },
|
|
21216
21461
|
"description": "Shipped skill ids this deployment provides."
|
|
21217
21462
|
},
|
|
21463
|
+
"inboxChanges": {
|
|
21464
|
+
"type": "array",
|
|
21465
|
+
"items": {
|
|
21466
|
+
"type": "object",
|
|
21467
|
+
"properties": {
|
|
21468
|
+
"folder": {
|
|
21469
|
+
"type": "string",
|
|
21470
|
+
"description": "Folder name inside the scan root."
|
|
21471
|
+
},
|
|
21472
|
+
"status": {
|
|
21473
|
+
"type": "string",
|
|
21474
|
+
"enum": [
|
|
21475
|
+
"missing",
|
|
21476
|
+
"imported",
|
|
21477
|
+
"updated",
|
|
21478
|
+
"existing",
|
|
21479
|
+
"invalid"
|
|
21480
|
+
],
|
|
21481
|
+
"description": "How the source compares to the installed version."
|
|
21482
|
+
},
|
|
21483
|
+
"ignoredDependencyFields": {
|
|
21484
|
+
"type": "array",
|
|
21485
|
+
"items": { "type": "string" },
|
|
21486
|
+
"description": "Frontmatter fields preserved without applying them as dependencies."
|
|
21487
|
+
},
|
|
21488
|
+
"skillId": {
|
|
21489
|
+
"type": "string",
|
|
21490
|
+
"description": "Skill name read from its `SKILL.md`, when the folder was readable."
|
|
21491
|
+
},
|
|
21492
|
+
"assetId": {
|
|
21493
|
+
"type": "string",
|
|
21494
|
+
"description": "Asset identity for an imported or already-present skill."
|
|
21495
|
+
},
|
|
21496
|
+
"reason": {
|
|
21497
|
+
"type": "string",
|
|
21498
|
+
"description": "Machine-readable refusal reason, or `duplicate` for an existing name."
|
|
21499
|
+
},
|
|
21500
|
+
"detail": {
|
|
21501
|
+
"type": "string",
|
|
21502
|
+
"description": "Path or other detail that explains the reason."
|
|
21503
|
+
}
|
|
21504
|
+
},
|
|
21505
|
+
"required": ["folder", "status"],
|
|
21506
|
+
"additionalProperties": true
|
|
21507
|
+
},
|
|
21508
|
+
"description": "Source folders with changes or conflicts found during a read-only check."
|
|
21509
|
+
},
|
|
21218
21510
|
"issue": {
|
|
21219
21511
|
"type": "string",
|
|
21220
21512
|
"description": "Why the store is unusable, when this deployment could not open it."
|
|
@@ -21231,20 +21523,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21231
21523
|
},
|
|
21232
21524
|
sourceLocation: {
|
|
21233
21525
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21234
|
-
"line":
|
|
21526
|
+
"line": 542,
|
|
21235
21527
|
"column": 9
|
|
21236
21528
|
}
|
|
21237
21529
|
},
|
|
21238
21530
|
"teamSkills/scanImportFolder": {
|
|
21239
21531
|
service: "teamSkills",
|
|
21240
|
-
description: "
|
|
21532
|
+
description: "Validate sources, publishing changed packages as new versions only on this explicit request.",
|
|
21241
21533
|
invocation: { kind: "direct" },
|
|
21242
21534
|
parameters: [],
|
|
21243
21535
|
result: {
|
|
21244
21536
|
mode: "strict",
|
|
21245
21537
|
typeSymbol: "dsh-agent-team-presets#teamSkills/scanImportFolder:result",
|
|
21246
21538
|
create: dsh_agent_team_presets_teamSkills_scanImportFolder_result$schema,
|
|
21247
|
-
description: "one row per folder, or a refusal when the store is unavailable.",
|
|
21248
21539
|
jsonSchema: { "oneOf": [{
|
|
21249
21540
|
"type": "object",
|
|
21250
21541
|
"properties": {
|
|
@@ -21288,9 +21579,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21288
21579
|
"type": "number",
|
|
21289
21580
|
"description": "Folders published as new custom assets."
|
|
21290
21581
|
},
|
|
21582
|
+
"updated": {
|
|
21583
|
+
"type": "number",
|
|
21584
|
+
"description": "Installed custom skills that received a new version."
|
|
21585
|
+
},
|
|
21291
21586
|
"existing": {
|
|
21292
21587
|
"type": "number",
|
|
21293
|
-
"description": "Folders whose
|
|
21588
|
+
"description": "Folders whose published package is identical."
|
|
21589
|
+
},
|
|
21590
|
+
"missing": {
|
|
21591
|
+
"type": "number",
|
|
21592
|
+
"description": "Known source folders no longer providing the installed skill."
|
|
21294
21593
|
},
|
|
21295
21594
|
"invalid": {
|
|
21296
21595
|
"type": "number",
|
|
@@ -21308,11 +21607,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21308
21607
|
"status": {
|
|
21309
21608
|
"type": "string",
|
|
21310
21609
|
"enum": [
|
|
21610
|
+
"missing",
|
|
21311
21611
|
"imported",
|
|
21612
|
+
"updated",
|
|
21312
21613
|
"existing",
|
|
21313
21614
|
"invalid"
|
|
21314
21615
|
],
|
|
21315
|
-
"description": "
|
|
21616
|
+
"description": "How the source compares to the installed version."
|
|
21617
|
+
},
|
|
21618
|
+
"ignoredDependencyFields": {
|
|
21619
|
+
"type": "array",
|
|
21620
|
+
"items": { "type": "string" },
|
|
21621
|
+
"description": "Frontmatter fields preserved without applying them as dependencies."
|
|
21316
21622
|
},
|
|
21317
21623
|
"skillId": {
|
|
21318
21624
|
"type": "string",
|
|
@@ -21342,7 +21648,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21342
21648
|
"root",
|
|
21343
21649
|
"scanned",
|
|
21344
21650
|
"imported",
|
|
21651
|
+
"updated",
|
|
21345
21652
|
"existing",
|
|
21653
|
+
"missing",
|
|
21346
21654
|
"invalid",
|
|
21347
21655
|
"entries"
|
|
21348
21656
|
],
|
|
@@ -21351,7 +21659,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21351
21659
|
},
|
|
21352
21660
|
sourceLocation: {
|
|
21353
21661
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21354
|
-
"line":
|
|
21662
|
+
"line": 374,
|
|
21355
21663
|
"column": 9
|
|
21356
21664
|
}
|
|
21357
21665
|
},
|
|
@@ -21588,6 +21896,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21588
21896
|
"items": { "type": "string" },
|
|
21589
21897
|
"description": "Shipped skill ids this deployment provides."
|
|
21590
21898
|
},
|
|
21899
|
+
"inboxChanges": {
|
|
21900
|
+
"type": "array",
|
|
21901
|
+
"items": {
|
|
21902
|
+
"type": "object",
|
|
21903
|
+
"properties": {
|
|
21904
|
+
"folder": {
|
|
21905
|
+
"type": "string",
|
|
21906
|
+
"description": "Folder name inside the scan root."
|
|
21907
|
+
},
|
|
21908
|
+
"status": {
|
|
21909
|
+
"type": "string",
|
|
21910
|
+
"enum": [
|
|
21911
|
+
"missing",
|
|
21912
|
+
"imported",
|
|
21913
|
+
"updated",
|
|
21914
|
+
"existing",
|
|
21915
|
+
"invalid"
|
|
21916
|
+
],
|
|
21917
|
+
"description": "How the source compares to the installed version."
|
|
21918
|
+
},
|
|
21919
|
+
"ignoredDependencyFields": {
|
|
21920
|
+
"type": "array",
|
|
21921
|
+
"items": { "type": "string" },
|
|
21922
|
+
"description": "Frontmatter fields preserved without applying them as dependencies."
|
|
21923
|
+
},
|
|
21924
|
+
"skillId": {
|
|
21925
|
+
"type": "string",
|
|
21926
|
+
"description": "Skill name read from its `SKILL.md`, when the folder was readable."
|
|
21927
|
+
},
|
|
21928
|
+
"assetId": {
|
|
21929
|
+
"type": "string",
|
|
21930
|
+
"description": "Asset identity for an imported or already-present skill."
|
|
21931
|
+
},
|
|
21932
|
+
"reason": {
|
|
21933
|
+
"type": "string",
|
|
21934
|
+
"description": "Machine-readable refusal reason, or `duplicate` for an existing name."
|
|
21935
|
+
},
|
|
21936
|
+
"detail": {
|
|
21937
|
+
"type": "string",
|
|
21938
|
+
"description": "Path or other detail that explains the reason."
|
|
21939
|
+
}
|
|
21940
|
+
},
|
|
21941
|
+
"required": ["folder", "status"],
|
|
21942
|
+
"additionalProperties": true
|
|
21943
|
+
},
|
|
21944
|
+
"description": "Source folders with changes or conflicts found during a read-only check."
|
|
21945
|
+
},
|
|
21591
21946
|
"issue": {
|
|
21592
21947
|
"type": "string",
|
|
21593
21948
|
"description": "Why the store is unusable, when this deployment could not open it."
|
|
@@ -21604,7 +21959,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21604
21959
|
},
|
|
21605
21960
|
sourceLocation: {
|
|
21606
21961
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21607
|
-
"line":
|
|
21962
|
+
"line": 528,
|
|
21608
21963
|
"column": 9
|
|
21609
21964
|
}
|
|
21610
21965
|
},
|
|
@@ -21738,7 +22093,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21738
22093
|
},
|
|
21739
22094
|
sourceLocation: {
|
|
21740
22095
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21741
|
-
"line":
|
|
22096
|
+
"line": 438,
|
|
21742
22097
|
"column": 9
|
|
21743
22098
|
}
|
|
21744
22099
|
},
|
|
@@ -21797,6 +22152,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21797
22152
|
create: dsh_agent_team_presets_teamSkills_writeFile_parameter_2_strict$schema,
|
|
21798
22153
|
jsonSchema: { "type": "string" }
|
|
21799
22154
|
}
|
|
22155
|
+
},
|
|
22156
|
+
{
|
|
22157
|
+
name: "expectedVersion",
|
|
22158
|
+
description: "the version the editor has open.",
|
|
22159
|
+
source: "json",
|
|
22160
|
+
acceptsUndefined: true,
|
|
22161
|
+
codec: {
|
|
22162
|
+
mode: "strict",
|
|
22163
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/writeFile:expectedVersion",
|
|
22164
|
+
create: dsh_agent_team_presets_teamSkills_writeFile_parameter_3$schema,
|
|
22165
|
+
jsonSchema: { "type": "string" }
|
|
22166
|
+
},
|
|
22167
|
+
strictCodec: {
|
|
22168
|
+
mode: "strict",
|
|
22169
|
+
typeSymbol: "dsh-agent-team-presets#teamSkills/writeFile:expectedVersion",
|
|
22170
|
+
create: dsh_agent_team_presets_teamSkills_writeFile_parameter_3_strict$schema,
|
|
22171
|
+
jsonSchema: { "type": "string" }
|
|
22172
|
+
}
|
|
21800
22173
|
}
|
|
21801
22174
|
],
|
|
21802
22175
|
result: {
|
|
@@ -21808,7 +22181,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21808
22181
|
},
|
|
21809
22182
|
sourceLocation: {
|
|
21810
22183
|
"file": "packages/experimental/agent-team-presets/src/team-skills/service.ts",
|
|
21811
|
-
"line":
|
|
22184
|
+
"line": 223,
|
|
21812
22185
|
"column": 9
|
|
21813
22186
|
}
|
|
21814
22187
|
}
|
|
@@ -21830,28 +22203,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21830
22203
|
function toolMode(agent) {
|
|
21831
22204
|
return agent.toolMode ?? (agent.tools.length === 0 ? "all" : "custom");
|
|
21832
22205
|
}
|
|
21833
|
-
/** The
|
|
22206
|
+
/** The grammar and length of a configured member's summon target. */
|
|
21834
22207
|
const MEMBER_TARGET = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
22208
|
+
const MEMBER_TARGET_LIMIT = 64;
|
|
22209
|
+
/** Return the member's normalized name when it can be used as a target. */
|
|
22210
|
+
function preferredMemberTarget(member) {
|
|
22211
|
+
const target = member.name.trim().toLowerCase();
|
|
22212
|
+
return target !== "lead" && target.length <= MEMBER_TARGET_LIMIT && MEMBER_TARGET.test(target) ? target : void 0;
|
|
22213
|
+
}
|
|
21835
22214
|
/**
|
|
21836
|
-
*
|
|
21837
|
-
*
|
|
21838
|
-
* Teammate names are permanent, lower-kebab-case, and never reused, so a
|
|
21839
|
-
* display name that already satisfies the grammar is kept and any other name
|
|
21840
|
-
* is transliterated to `member-<index>`. The display name still reaches the
|
|
21841
|
-
* captain through the roster.
|
|
22215
|
+
* Claim a target for one member after the Team's preferred targets are reserved.
|
|
21842
22216
|
* @param member - the configured member.
|
|
21843
22217
|
* @param index - zero-based position in the Team's member list.
|
|
21844
22218
|
* @param used - targets already taken in this Team; the returned target is added.
|
|
21845
22219
|
* @returns the teammate target this member is summoned under.
|
|
21846
22220
|
*/
|
|
21847
22221
|
function memberTarget(member, index, used) {
|
|
21848
|
-
const
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
target =
|
|
21854
|
-
|
|
22222
|
+
const preferred = preferredMemberTarget(member);
|
|
22223
|
+
let target;
|
|
22224
|
+
if (preferred === void 0) {
|
|
22225
|
+
let number = index + 1;
|
|
22226
|
+
while (used.has(`member-${number}`)) number += 1;
|
|
22227
|
+
target = `member-${number}`;
|
|
22228
|
+
} else {
|
|
22229
|
+
target = preferred;
|
|
22230
|
+
let suffix = 2;
|
|
22231
|
+
while (used.has(target)) {
|
|
22232
|
+
const tail = `-${suffix}`;
|
|
22233
|
+
target = `${preferred.slice(0, MEMBER_TARGET_LIMIT - tail.length).replace(/-+$/u, "")}${tail}`;
|
|
22234
|
+
suffix += 1;
|
|
22235
|
+
}
|
|
21855
22236
|
}
|
|
21856
22237
|
used.add(target);
|
|
21857
22238
|
return target;
|
|
@@ -21863,9 +22244,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21863
22244
|
*/
|
|
21864
22245
|
function memberTargets(team) {
|
|
21865
22246
|
const used = /* @__PURE__ */ new Set();
|
|
22247
|
+
const preferred = team.members.map(preferredMemberTarget);
|
|
22248
|
+
const targets = preferred.map((target) => {
|
|
22249
|
+
if (target === void 0 || used.has(target)) return void 0;
|
|
22250
|
+
used.add(target);
|
|
22251
|
+
return target;
|
|
22252
|
+
});
|
|
22253
|
+
for (const [index, target] of preferred.entries()) {
|
|
22254
|
+
if (target !== void 0) continue;
|
|
22255
|
+
const fallback = `member-${index + 1}`;
|
|
22256
|
+
if (used.has(fallback)) continue;
|
|
22257
|
+
used.add(fallback);
|
|
22258
|
+
targets[index] = fallback;
|
|
22259
|
+
}
|
|
21866
22260
|
return team.members.map((member, index) => ({
|
|
21867
22261
|
member,
|
|
21868
|
-
target: memberTarget(member, index, used)
|
|
22262
|
+
target: targets[index] ?? memberTarget(member, index, used)
|
|
21869
22263
|
}));
|
|
21870
22264
|
}
|
|
21871
22265
|
/**
|
|
@@ -23103,7 +23497,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23103
23497
|
composerMissingHint: "This is not No team. An unapplicable selection denies tools; a running task keeps its old policy until idle. Choose a valid Team or No team.",
|
|
23104
23498
|
importPreset: "Import preset",
|
|
23105
23499
|
exportPreset: "Export",
|
|
23106
|
-
importNote: "A shared document carries names, descriptions, system prompts, and
|
|
23500
|
+
importNote: "A shared document carries names, descriptions, system prompts, colors, display metadata, and built-in skill declarations. Model routes and tool permissions stay local.",
|
|
23501
|
+
importDraftNote: "Import stages the preset as a draft. Save to apply it. Skill defaults respect existing local overrides and manual unbinding.",
|
|
23107
23502
|
restoreDefaults: "Restore built-in presets",
|
|
23108
23503
|
restoreDefaultsHint: "Puts every preset this plugin ships back to its shipped name, description, prompts, colors, and roster. The model routes and tool permissions you configured stay as they are, and teams you created yourself are not touched.",
|
|
23109
23504
|
defaultsRestored: "Default presets restored in this draft. Save to apply them.",
|
|
@@ -23123,6 +23518,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23123
23518
|
importMemberConflict: "These members already exist in that team",
|
|
23124
23519
|
importMemberReplace: "Replace that member",
|
|
23125
23520
|
importMemberRename: "Add it renamed",
|
|
23521
|
+
importPreviewTitle: "Review preset import",
|
|
23522
|
+
importSkillDeclarations: "Preset skill declarations",
|
|
23523
|
+
importSkillCatalog: "Built-in team defaults",
|
|
23524
|
+
importSkillUnknown: "Invalid declaration. Only built-in skills are supported.",
|
|
23525
|
+
importSkillRoleMissing: "Invalid declaration. The role does not exist.",
|
|
23526
|
+
importSkillRoleAmbiguous: "Invalid declaration. The role does not resolve to a unique slot.",
|
|
23527
|
+
importSkillCatalogIgnored: "This team ID uses the built-in catalog rules.",
|
|
23528
|
+
importSkillEligible: "Eligible for automatic binding after saving.",
|
|
23529
|
+
importSkillAssetMissing: "The built-in asset is missing. The declaration is kept for automatic binding when the asset becomes available.",
|
|
23530
|
+
importSkillLibraryUnavailable: "Asset availability could not be checked. The declaration is kept.",
|
|
23531
|
+
importSkillLocalOverride: "This role’s existing local override takes precedence.",
|
|
23126
23532
|
importInvalidJson: "That file is not valid JSON.",
|
|
23127
23533
|
importInvalidFormat: "That file is not a Team preset document.",
|
|
23128
23534
|
importUnsupportedVersion: "That document was written by a newer version of this plugin.",
|
|
@@ -23175,11 +23581,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23175
23581
|
patchRefused: "Nothing changed.",
|
|
23176
23582
|
skillsScan: "Scan import folder",
|
|
23177
23583
|
skillsScanHint: "Folder path:",
|
|
23178
|
-
skillsScanSummary: "Scanned {scanned}
|
|
23584
|
+
skillsScanSummary: "Scanned {scanned}. Imported {imported}, updated {updated}, unchanged {existing}, missing {missing}, refused {invalid}.",
|
|
23179
23585
|
skillsScanEmpty: "No skill folder was found in the import folder.",
|
|
23180
23586
|
skillsScanImported: "imported",
|
|
23181
|
-
skillsScanExisting: "
|
|
23587
|
+
skillsScanExisting: "unchanged",
|
|
23588
|
+
skillsScanUpdated: "updated",
|
|
23182
23589
|
skillsScanInvalid: "refused",
|
|
23590
|
+
skillsScanSourceMissing: "source missing",
|
|
23183
23591
|
skillsScanMissingSkill: "missing SKILL.md",
|
|
23184
23592
|
skillsScanInvalidFrontmatter: "invalid frontmatter",
|
|
23185
23593
|
skillsScanInvalidName: "name is not kebab-case",
|
|
@@ -23190,6 +23598,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23190
23598
|
skillsScanUnreadable: "cannot be read",
|
|
23191
23599
|
skillsScanDuplicate: "same skill name",
|
|
23192
23600
|
skillsScanInstallRefused: "publish refused",
|
|
23601
|
+
skillsScanBuiltinNameConflict: "name matches a built-in skill",
|
|
23602
|
+
skillsScanCopyNameConflict: "name matches an existing local copy",
|
|
23603
|
+
skillsScanDuplicateSourceName: "another source folder declares this skill name",
|
|
23604
|
+
skillsScanSourceMissingReason: "the previously imported source folder is missing",
|
|
23605
|
+
skillsScanSourceChanged: "source changed during the scan. Scan again.",
|
|
23606
|
+
skillsInboxChanges: "Changes in the import folder ({count})",
|
|
23607
|
+
skillsInboxNew: "new skill",
|
|
23608
|
+
skillsInboxUpdated: "update available",
|
|
23609
|
+
skillsIgnoredDependencyFields: "Dependency fields ignored on import ({fields}). Use set_team_skill_dependencies to configure this skill’s dependencies.",
|
|
23193
23610
|
skillsOpenScanFolder: "Open scan folder",
|
|
23194
23611
|
skillsCopyScanFolder: "Copy scan folder path",
|
|
23195
23612
|
skillsScanFolderOpened: "The scan folder is open. Put one skill folder inside it, then scan.",
|
|
@@ -23219,7 +23636,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23219
23636
|
skillsEditable: "editable",
|
|
23220
23637
|
skillsReadonly: "read-only original",
|
|
23221
23638
|
skillsMakeCopy: "Create an editable copy",
|
|
23222
|
-
|
|
23639
|
+
skillsMakeCopyTitle: "Create an editable copy of {skill}?",
|
|
23640
|
+
skillsMakeCopySwitchBindings: "Switch currently bound roles to the copy ({count})",
|
|
23641
|
+
skillsMakeCopySwitchIssue: "The editable copy was created. Role bindings could not be switched. {issue}",
|
|
23642
|
+
skillsResetCopy: "Reset copy and switch roles back to the built-in skill",
|
|
23223
23643
|
skillsNoBinding: "Not assigned to any member yet",
|
|
23224
23644
|
skillsUnbind: "Remove",
|
|
23225
23645
|
skillsDeps: "MCP and runtime dependencies",
|
|
@@ -23463,7 +23883,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23463
23883
|
composerMissingHint: "这不是“不使用团队”。无法应用时权限保持拒绝;进行中的任务保留旧策略直到空闲。请改选有效团队或“不使用团队”。",
|
|
23464
23884
|
importPreset: "导入预设",
|
|
23465
23885
|
exportPreset: "导出",
|
|
23466
|
-
importNote: "
|
|
23886
|
+
importNote: "共享文档携带名称、描述、系统提示词、颜色、展示信息和内置技能声明。模型路由与工具权限保留在本地。",
|
|
23887
|
+
importDraftNote: "导入会暂存为草稿,保存后生效。技能默认规则会保留已有的本地副本绑定和手动解绑。",
|
|
23467
23888
|
restoreDefaults: "恢复内置预设",
|
|
23468
23889
|
restoreDefaultsHint: "把插件自带的预设全部恢复到出厂的名称、说明、提示词、颜色和成员名单;你为它们配置的模型路由与工具权限保持不变,你自己创建的团队完全不受影响。",
|
|
23469
23890
|
defaultsRestored: "默认预设已恢复到草稿,保存后生效。",
|
|
@@ -23483,6 +23904,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23483
23904
|
importMemberConflict: "该团队已存在这些队员",
|
|
23484
23905
|
importMemberReplace: "替换该队员",
|
|
23485
23906
|
importMemberRename: "重命名后新增",
|
|
23907
|
+
importPreviewTitle: "预览预设导入",
|
|
23908
|
+
importSkillDeclarations: "预设技能声明",
|
|
23909
|
+
importSkillCatalog: "内置团队默认技能",
|
|
23910
|
+
importSkillUnknown: "声明无效,仅支持插件内置技能。",
|
|
23911
|
+
importSkillRoleMissing: "声明无效,找不到该角色。",
|
|
23912
|
+
importSkillRoleAmbiguous: "声明无效,无法唯一确定该角色。",
|
|
23913
|
+
importSkillCatalogIgnored: "该团队 ID 使用内置团队默认规则。",
|
|
23914
|
+
importSkillEligible: "保存后符合自动绑定条件。",
|
|
23915
|
+
importSkillAssetMissing: "当前缺少该内置资产。声明会保留,资产可用后可自动补绑。",
|
|
23916
|
+
importSkillLibraryUnavailable: "暂时无法核实资产是否可用。声明会保留。",
|
|
23917
|
+
importSkillLocalOverride: "该角色已有对应的本地副本绑定,将优先保留。",
|
|
23486
23918
|
importInvalidJson: "该文件不是合法的 JSON。",
|
|
23487
23919
|
importInvalidFormat: "该文件不是团队预设文档。",
|
|
23488
23920
|
importUnsupportedVersion: "该文档由更新版本的插件生成。",
|
|
@@ -23535,11 +23967,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23535
23967
|
patchRefused: "未做任何修改。",
|
|
23536
23968
|
skillsScan: "扫描导入目录",
|
|
23537
23969
|
skillsScanHint: "目录路径:",
|
|
23538
|
-
skillsScanSummary: "
|
|
23970
|
+
skillsScanSummary: "已扫描 {scanned} 个目录。导入 {imported},更新 {updated},无变化 {existing},来源缺失 {missing},无法导入 {invalid}。",
|
|
23539
23971
|
skillsScanEmpty: "导入目录里没有发现技能文件夹。",
|
|
23540
23972
|
skillsScanImported: "已导入",
|
|
23541
|
-
skillsScanExisting: "
|
|
23973
|
+
skillsScanExisting: "无变化",
|
|
23974
|
+
skillsScanUpdated: "已更新",
|
|
23542
23975
|
skillsScanInvalid: "无法导入",
|
|
23976
|
+
skillsScanSourceMissing: "来源缺失",
|
|
23543
23977
|
skillsScanMissingSkill: "缺少 SKILL.md",
|
|
23544
23978
|
skillsScanInvalidFrontmatter: "frontmatter 格式不正确",
|
|
23545
23979
|
skillsScanInvalidName: "name 不符合 kebab-case",
|
|
@@ -23550,6 +23984,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23550
23984
|
skillsScanUnreadable: "无法读取",
|
|
23551
23985
|
skillsScanDuplicate: "技能名重复",
|
|
23552
23986
|
skillsScanInstallRefused: "发布被拒绝",
|
|
23987
|
+
skillsScanBuiltinNameConflict: "与内置技能同名",
|
|
23988
|
+
skillsScanCopyNameConflict: "与已有本地副本同名",
|
|
23989
|
+
skillsScanDuplicateSourceName: "另一个来源目录已声明此技能名",
|
|
23990
|
+
skillsScanSourceMissingReason: "此前导入该技能的来源目录已缺失",
|
|
23991
|
+
skillsScanSourceChanged: "来源在扫描期间发生了变化,请重新扫描。",
|
|
23992
|
+
skillsInboxChanges: "导入目录有变动({count})",
|
|
23993
|
+
skillsInboxNew: "新技能",
|
|
23994
|
+
skillsInboxUpdated: "有更新",
|
|
23995
|
+
skillsIgnoredDependencyFields: "导入时已忽略依赖字段({fields})。请使用 set_team_skill_dependencies 配置此技能的依赖。",
|
|
23553
23996
|
skillsOpenScanFolder: "打开扫描技能目录",
|
|
23554
23997
|
skillsCopyScanFolder: "复制扫描技能目录",
|
|
23555
23998
|
skillsScanFolderOpened: "已打开扫描目录。把一个技能文件夹放进去后点扫描即可。",
|
|
@@ -23579,7 +24022,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23579
24022
|
skillsEditable: "可编辑",
|
|
23580
24023
|
skillsReadonly: "只读原版",
|
|
23581
24024
|
skillsMakeCopy: "创建本地可编辑副本",
|
|
23582
|
-
|
|
24025
|
+
skillsMakeCopyTitle: "创建「{skill}」的本地可编辑副本?",
|
|
24026
|
+
skillsMakeCopySwitchBindings: "将当前绑定此技能的角色切换到副本({count})",
|
|
24027
|
+
skillsMakeCopySwitchIssue: "已创建可编辑副本。未能切换角色绑定。{issue}",
|
|
24028
|
+
skillsResetCopy: "重置副本并将角色切回内置技能",
|
|
23583
24029
|
skillsNoBinding: "尚未分配给任何成员",
|
|
23584
24030
|
skillsUnbind: "解除绑定",
|
|
23585
24031
|
skillsDeps: "MCP 及运行环境依赖",
|
|
@@ -23948,7 +24394,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23948
24394
|
* slot too. It mirrors the Host's own sentinel rather than a member's id: the
|
|
23949
24395
|
* captain slot is not a member and is addressed by this name in every binding.
|
|
23950
24396
|
*/
|
|
23951
|
-
const CAPTAIN_ROLE = "captain";
|
|
24397
|
+
const CAPTAIN_ROLE$1 = "captain";
|
|
23952
24398
|
/**
|
|
23953
24399
|
* Render one member's configured route as `provider · model`.
|
|
23954
24400
|
*
|
|
@@ -24027,14 +24473,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
24027
24473
|
if (hoverTeamId === void 0) return byRole;
|
|
24028
24474
|
for (const asset of assets) for (const binding of asset.bindings) {
|
|
24029
24475
|
if (binding.teamId !== hoverTeamId) continue;
|
|
24030
|
-
const bindingRoleId = binding.captain ? CAPTAIN_ROLE : binding.roleId;
|
|
24476
|
+
const bindingRoleId = binding.captain ? CAPTAIN_ROLE$1 : binding.roleId;
|
|
24031
24477
|
const names = byRole.get(bindingRoleId) ?? [];
|
|
24032
24478
|
if (!names.includes(asset.skillId)) names.push(asset.skillId);
|
|
24033
24479
|
byRole.set(bindingRoleId, names);
|
|
24034
24480
|
}
|
|
24035
24481
|
return byRole;
|
|
24036
24482
|
}, [skillsState.library, hoverTeamId]);
|
|
24037
|
-
const captainSkillIds = hoverTeamId === void 0 ? [] : skillNamesByRole.get(CAPTAIN_ROLE) ?? [];
|
|
24483
|
+
const captainSkillIds = hoverTeamId === void 0 ? [] : skillNamesByRole.get(CAPTAIN_ROLE$1) ?? [];
|
|
24038
24484
|
/** Cancel a pending panel close, so a hover that continues keeps the panel up. */
|
|
24039
24485
|
const cancelHoverClose = () => {
|
|
24040
24486
|
if (hoverTimer.current === void 0) return;
|
|
@@ -25712,6 +26158,61 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
25712
26158
|
changed
|
|
25713
26159
|
};
|
|
25714
26160
|
}
|
|
26161
|
+
const officialIds = new Set([
|
|
26162
|
+
"agent-leader-communication",
|
|
26163
|
+
"leader-medium-task-workflow",
|
|
26164
|
+
"leader-long-task-orchestration",
|
|
26165
|
+
"agent-subagent-orchestration",
|
|
26166
|
+
"fullstack-advisor",
|
|
26167
|
+
"executor-short-task-workflow",
|
|
26168
|
+
"github-repository-presentation",
|
|
26169
|
+
"git-release-hygiene",
|
|
26170
|
+
"frontend-engineering-workflow",
|
|
26171
|
+
"backend-architecture-workflow",
|
|
26172
|
+
"independent-code-review-workflow",
|
|
26173
|
+
"grilling",
|
|
26174
|
+
"research"
|
|
26175
|
+
]);
|
|
26176
|
+
/** The binding slot reserved for a captain. */
|
|
26177
|
+
const CAPTAIN_ROLE = "captain";
|
|
26178
|
+
/** Shipped identities always use the catalog, including records from earlier releases. */
|
|
26179
|
+
function officialSkillDefaults(team) {
|
|
26180
|
+
const entry = builtinEntry(team.id);
|
|
26181
|
+
return entry === void 0 ? {
|
|
26182
|
+
source: "preset",
|
|
26183
|
+
declarations: team.officialSkills ?? []
|
|
26184
|
+
} : {
|
|
26185
|
+
source: "catalog",
|
|
26186
|
+
declarations: entry.officialSkillBindings
|
|
26187
|
+
};
|
|
26188
|
+
}
|
|
26189
|
+
/** A declaration can address only an unambiguous name and an unambiguous binding slot. */
|
|
26190
|
+
function officialSkillTarget(team, declaration) {
|
|
26191
|
+
if (!officialIds.has(declaration.skillId)) return { status: "unknown-skill" };
|
|
26192
|
+
const roles = [{
|
|
26193
|
+
name: team.captain.name,
|
|
26194
|
+
id: CAPTAIN_ROLE
|
|
26195
|
+
}, ...team.members.map((member) => ({
|
|
26196
|
+
name: member.name,
|
|
26197
|
+
id: member.id ?? member.name
|
|
26198
|
+
}))];
|
|
26199
|
+
const [role, otherMatch] = roles.filter((candidate) => candidate.name === declaration.roleName);
|
|
26200
|
+
if (role === void 0) return { status: "missing-role" };
|
|
26201
|
+
if (otherMatch !== void 0 || roles.filter((candidate) => candidate.id === role.id).length !== 1) return { status: "ambiguous-role" };
|
|
26202
|
+
return {
|
|
26203
|
+
status: "valid",
|
|
26204
|
+
roleId: role.id,
|
|
26205
|
+
assetId: `builtin:${declaration.skillId}`
|
|
26206
|
+
};
|
|
26207
|
+
}
|
|
26208
|
+
/** A default can seed only the shipped asset with the declared identity. */
|
|
26209
|
+
function isOfficialSkillAsset(asset, assetId) {
|
|
26210
|
+
return asset.origin === "builtin" && asset.id === assetId;
|
|
26211
|
+
}
|
|
26212
|
+
/** A role that already holds a derived override keeps its explicit assignment. */
|
|
26213
|
+
function isOfficialSkillOverride(asset, skillId) {
|
|
26214
|
+
return asset.origin === "override" && asset.officialSkillId === skillId;
|
|
26215
|
+
}
|
|
25715
26216
|
|
|
25716
26217
|
|
|
25717
26218
|
/**
|
|
@@ -25790,7 +26291,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
25790
26291
|
function mergeTransfer(target, plan, resolution) {
|
|
25791
26292
|
const members = [...target.members];
|
|
25792
26293
|
const importedNames = /* @__PURE__ */ new Map();
|
|
25793
|
-
for (const incoming of plan.
|
|
26294
|
+
for (const incoming of plan.incoming.members) {
|
|
25794
26295
|
const key = slotNameKey(incoming.name);
|
|
25795
26296
|
const at = key === "" ? -1 : members.findIndex((member) => slotNameKey(member.name) === key);
|
|
25796
26297
|
if (at >= 0 && (resolution.members[incoming.name] ?? "replace") === "replace") {
|
|
@@ -25802,29 +26303,104 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
25802
26303
|
}
|
|
25803
26304
|
}
|
|
25804
26305
|
const name = uniqueName(incoming.name, members.map((member) => member.name));
|
|
25805
|
-
members.push(
|
|
26306
|
+
members.push({
|
|
25806
26307
|
...incoming,
|
|
25807
26308
|
name
|
|
25808
|
-
})
|
|
26309
|
+
});
|
|
25809
26310
|
importedNames.set(incoming.name, name);
|
|
25810
26311
|
}
|
|
25811
26312
|
const captain = plan.transfer.team.captain;
|
|
25812
26313
|
const captainName = resolution.captain === "rename" ? plan.suggestedCaptainName : captain.name;
|
|
25813
26314
|
importedNames.set(captain.name, captainName);
|
|
25814
26315
|
return {
|
|
25815
|
-
|
|
25816
|
-
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
...
|
|
25821
|
-
|
|
25822
|
-
|
|
25823
|
-
|
|
25824
|
-
|
|
25825
|
-
|
|
25826
|
-
}
|
|
25827
|
-
|
|
26316
|
+
importedNames,
|
|
26317
|
+
team: {
|
|
26318
|
+
...target,
|
|
26319
|
+
name: plan.transfer.team.name,
|
|
26320
|
+
description: plan.transfer.team.description,
|
|
26321
|
+
...plan.transfer.version < 2 ? {} : { metadata: structuredClone(plan.transfer.team.metadata ?? {}) },
|
|
26322
|
+
captain: applySharedFields(target.captain, {
|
|
26323
|
+
...captain,
|
|
26324
|
+
name: captainName
|
|
26325
|
+
}),
|
|
26326
|
+
members
|
|
26327
|
+
}
|
|
26328
|
+
};
|
|
26329
|
+
}
|
|
26330
|
+
function skillRow(team, declaration, source, assets) {
|
|
26331
|
+
const row = {
|
|
26332
|
+
...declaration,
|
|
26333
|
+
source
|
|
26334
|
+
};
|
|
26335
|
+
const target = officialSkillTarget(team, declaration);
|
|
26336
|
+
if (target.status !== "valid") return {
|
|
26337
|
+
...row,
|
|
26338
|
+
status: target.status
|
|
26339
|
+
};
|
|
26340
|
+
if (assets === void 0) return {
|
|
26341
|
+
...row,
|
|
26342
|
+
status: "library-unavailable"
|
|
26343
|
+
};
|
|
26344
|
+
if (assets.some((asset) => isOfficialSkillOverride(asset, declaration.skillId) && asset.bindings.some((binding) => binding.teamId === team.id && binding.roleId === target.roleId))) return {
|
|
26345
|
+
...row,
|
|
26346
|
+
status: "local-override"
|
|
26347
|
+
};
|
|
26348
|
+
const available = assets.some((asset) => isOfficialSkillAsset(asset, target.assetId));
|
|
26349
|
+
return {
|
|
26350
|
+
...row,
|
|
26351
|
+
status: available ? "eligible" : "asset-missing"
|
|
26352
|
+
};
|
|
26353
|
+
}
|
|
26354
|
+
/** Build the same proposed roster and declaration set for preview and staging. */
|
|
26355
|
+
function projectImport(teams, plan, resolution, assets) {
|
|
26356
|
+
const target = resolution.team === "replace" ? teams.find((team) => team.id === plan.targetId) : void 0;
|
|
26357
|
+
const replacement = target === void 0 ? void 0 : mergeTransfer(target, plan, resolution);
|
|
26358
|
+
const preferred = resolution.teamName.trim() === "" ? plan.transfer.team.name : resolution.teamName;
|
|
26359
|
+
const team = replacement?.team ?? {
|
|
26360
|
+
...plan.incoming,
|
|
26361
|
+
name: uniqueName(preferred, teams.map((candidate) => candidate.name))
|
|
26362
|
+
};
|
|
26363
|
+
const defaults = officialSkillDefaults(team);
|
|
26364
|
+
const declarations = plan.transfer.team.officialSkills;
|
|
26365
|
+
const rows = [];
|
|
26366
|
+
const retained = [];
|
|
26367
|
+
for (const declaration of declarations ?? []) {
|
|
26368
|
+
const original = officialSkillTarget(plan.incoming, declaration);
|
|
26369
|
+
if (original.status !== "valid") {
|
|
26370
|
+
rows.push({
|
|
26371
|
+
...declaration,
|
|
26372
|
+
source: "preset",
|
|
26373
|
+
status: original.status
|
|
26374
|
+
});
|
|
26375
|
+
continue;
|
|
26376
|
+
}
|
|
26377
|
+
if (defaults.source === "catalog") {
|
|
26378
|
+
rows.push({
|
|
26379
|
+
...declaration,
|
|
26380
|
+
source: "preset",
|
|
26381
|
+
status: "catalog-ignored"
|
|
26382
|
+
});
|
|
26383
|
+
continue;
|
|
26384
|
+
}
|
|
26385
|
+
const resolved = {
|
|
26386
|
+
...declaration,
|
|
26387
|
+
roleName: replacement?.importedNames.get(declaration.roleName) ?? declaration.roleName
|
|
26388
|
+
};
|
|
26389
|
+
const row = skillRow(team, resolved, "preset", assets);
|
|
26390
|
+
rows.push(row);
|
|
26391
|
+
if (row.status !== "missing-role" && row.status !== "ambiguous-role") retained.push(resolved);
|
|
26392
|
+
}
|
|
26393
|
+
if (defaults.source === "catalog" || declarations === void 0) rows.push(...defaults.declarations.map((declaration) => skillRow(team, declaration, defaults.source, assets)));
|
|
26394
|
+
return {
|
|
26395
|
+
team: defaults.source === "catalog" ? {
|
|
26396
|
+
...team,
|
|
26397
|
+
officialSkills: defaults.declarations.map((declaration) => ({ ...declaration }))
|
|
26398
|
+
} : declarations === void 0 ? team : {
|
|
26399
|
+
...team,
|
|
26400
|
+
officialSkills: retained
|
|
26401
|
+
},
|
|
26402
|
+
target,
|
|
26403
|
+
rows
|
|
25828
26404
|
};
|
|
25829
26405
|
}
|
|
25830
26406
|
/**
|
|
@@ -26350,6 +26926,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26350
26926
|
},
|
|
26351
26927
|
exportTeam: (index) => this.exportTeam(index),
|
|
26352
26928
|
inspectImport: (text) => this.inspectImport(text),
|
|
26929
|
+
previewImport: (plan, resolution, assets) => this.previewImport(plan, resolution, assets),
|
|
26353
26930
|
applyImport: (plan, resolution) => {
|
|
26354
26931
|
return this.applyImport(plan, resolution);
|
|
26355
26932
|
},
|
|
@@ -26667,8 +27244,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26667
27244
|
exportTeam(index) {
|
|
26668
27245
|
const team = this.visibleTeams()[index];
|
|
26669
27246
|
if (team === void 0) return void 0;
|
|
26670
|
-
|
|
26671
|
-
return serializeTeamPreset(team, officialSkills === void 0 ? {} : { officialSkills });
|
|
27247
|
+
return serializeTeamPreset(team, { officialSkills: officialSkillDefaults(team).declarations });
|
|
26672
27248
|
}
|
|
26673
27249
|
/**
|
|
26674
27250
|
* Read one document and work out what importing it would collide with.
|
|
@@ -26681,14 +27257,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26681
27257
|
inspectImport(text) {
|
|
26682
27258
|
const parsed = parseTeamPresetText(text);
|
|
26683
27259
|
if (!parsed.ok) return parsed;
|
|
27260
|
+
const teams = this.visibleTeams();
|
|
27261
|
+
const conflicts = importConflicts(teams, parsed.transfer);
|
|
26684
27262
|
return {
|
|
26685
27263
|
ok: true,
|
|
26686
27264
|
plan: {
|
|
26687
27265
|
transfer: parsed.transfer,
|
|
26688
|
-
|
|
27266
|
+
incoming: teamFromTransfer(parsed.transfer, ""),
|
|
27267
|
+
targetId: conflicts.targetIndex === void 0 ? void 0 : teams[conflicts.targetIndex]?.id,
|
|
27268
|
+
...conflicts
|
|
26689
27269
|
}
|
|
26690
27270
|
};
|
|
26691
27271
|
}
|
|
27272
|
+
/** Inspect the draft that the selected collision choices would stage. */
|
|
27273
|
+
previewImport(plan, resolution, assets) {
|
|
27274
|
+
return projectImport(this.visibleTeams(), plan, resolution, assets).rows;
|
|
27275
|
+
}
|
|
26692
27276
|
/**
|
|
26693
27277
|
* Stage one inspected document onto the draft.
|
|
26694
27278
|
*
|
|
@@ -26701,17 +27285,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26701
27285
|
*/
|
|
26702
27286
|
applyImport(plan, resolution) {
|
|
26703
27287
|
const draft = this.beginDraft();
|
|
26704
|
-
const
|
|
26705
|
-
if (
|
|
26706
|
-
|
|
26707
|
-
this.draft = draft.map((team, position) => position === plan.targetIndex ? merged : team);
|
|
27288
|
+
const projected = projectImport(draft, plan, resolution);
|
|
27289
|
+
if (projected.target !== void 0) {
|
|
27290
|
+
this.draft = draft.map((team) => team === projected.target ? projected.team : team);
|
|
26708
27291
|
this.publish();
|
|
26709
|
-
return
|
|
27292
|
+
return projected.team.id;
|
|
26710
27293
|
}
|
|
26711
|
-
const name = uniqueName(resolution.teamName.trim() === "" ? plan.transfer.team.name : resolution.teamName, draft.map((team) => team.name));
|
|
26712
27294
|
const created = {
|
|
26713
|
-
...
|
|
26714
|
-
|
|
27295
|
+
...projected.team,
|
|
27296
|
+
id: createTeamPreset(draft).id
|
|
26715
27297
|
};
|
|
26716
27298
|
this.draft = [...draft, created];
|
|
26717
27299
|
this.publish();
|
|
@@ -28470,15 +29052,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28470
29052
|
}
|
|
28471
29053
|
|
|
28472
29054
|
|
|
28473
|
-
/**
|
|
28474
|
-
* Conflict dialog for one Team import.
|
|
28475
|
-
*
|
|
28476
|
-
* The document's Team name, captain name, and member names are the keys an
|
|
28477
|
-
* import matches on, so each one that the target Team already uses is resolved
|
|
28478
|
-
* here: overwrite the configured agent, or add the imported one under a name
|
|
28479
|
-
* that is still free. Choosing a new Team name makes the whole document a new
|
|
28480
|
-
* Team, which is why the agent collisions disappear with that choice.
|
|
28481
|
-
*/
|
|
29055
|
+
/** Review one Team import and resolve any naming conflicts before staging. */
|
|
28482
29056
|
/**
|
|
28483
29057
|
* Render one pair of collision choices.
|
|
28484
29058
|
* @param name - radio group name, unique across the dialog.
|
|
@@ -28515,11 +29089,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28515
29089
|
})]
|
|
28516
29090
|
});
|
|
28517
29091
|
}
|
|
28518
|
-
|
|
28519
|
-
|
|
28520
|
-
|
|
28521
|
-
|
|
28522
|
-
|
|
29092
|
+
const skillStatusKeys = {
|
|
29093
|
+
"unknown-skill": "importSkillUnknown",
|
|
29094
|
+
"missing-role": "importSkillRoleMissing",
|
|
29095
|
+
"ambiguous-role": "importSkillRoleAmbiguous",
|
|
29096
|
+
"catalog-ignored": "importSkillCatalogIgnored",
|
|
29097
|
+
"eligible": "importSkillEligible",
|
|
29098
|
+
"asset-missing": "importSkillAssetMissing",
|
|
29099
|
+
"library-unavailable": "importSkillLibraryUnavailable",
|
|
29100
|
+
"local-override": "importSkillLocalOverride"
|
|
29101
|
+
};
|
|
29102
|
+
/** Render a pending import, including any declaration that could not resolve. */
|
|
28523
29103
|
function TeamImportDialog(props) {
|
|
28524
29104
|
const { plan, t } = props;
|
|
28525
29105
|
const [teamChoice, setTeamChoice] = (0, react.useState)("replace");
|
|
@@ -28527,11 +29107,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28527
29107
|
const [captainChoice, setCaptainChoice] = (0, react.useState)("replace");
|
|
28528
29108
|
const [memberChoices, setMemberChoices] = (0, react.useState)({});
|
|
28529
29109
|
const memberChoice = (name) => memberChoices[name] ?? "replace";
|
|
28530
|
-
const
|
|
29110
|
+
const teamCollision = plan.targetIndex !== void 0;
|
|
29111
|
+
const agentCollisions = teamCollision && teamChoice === "replace" && (plan.captainConflict !== "" || plan.memberConflicts.length > 0);
|
|
29112
|
+
const resolution = {
|
|
29113
|
+
team: teamCollision ? teamChoice : "rename",
|
|
29114
|
+
teamName,
|
|
29115
|
+
captain: captainChoice,
|
|
29116
|
+
members: Object.fromEntries(plan.memberConflicts.map((name) => [name, memberChoice(name)]))
|
|
29117
|
+
};
|
|
29118
|
+
const rows = props.previewSkills(resolution);
|
|
28531
29119
|
return (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
28532
29120
|
open: true,
|
|
28533
29121
|
onClose: props.onCancel,
|
|
28534
|
-
title: t("importConflictTitle"),
|
|
29122
|
+
title: t(teamCollision ? "importConflictTitle" : "importPreviewTitle"),
|
|
28535
29123
|
closeLabel: t("close"),
|
|
28536
29124
|
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
28537
29125
|
variant: "outline",
|
|
@@ -28540,17 +29128,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28540
29128
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
28541
29129
|
variant: "primary",
|
|
28542
29130
|
onClick: () => {
|
|
28543
|
-
props.onConfirm(
|
|
28544
|
-
team: teamChoice,
|
|
28545
|
-
teamName,
|
|
28546
|
-
captain: captainChoice,
|
|
28547
|
-
members: Object.fromEntries(plan.memberConflicts.map((name) => [name, memberChoice(name)]))
|
|
28548
|
-
});
|
|
29131
|
+
props.onConfirm(resolution);
|
|
28549
29132
|
},
|
|
28550
29133
|
children: t("importConfirm")
|
|
28551
29134
|
})] }),
|
|
28552
29135
|
children: [
|
|
28553
|
-
(0, react_jsx_runtime.jsxs)("section", {
|
|
29136
|
+
teamCollision && (0, react_jsx_runtime.jsxs)("section", {
|
|
28554
29137
|
className: TeamPresetsSection_module_css_default.conflict,
|
|
28555
29138
|
children: [
|
|
28556
29139
|
(0, react_jsx_runtime.jsx)("span", {
|
|
@@ -28620,9 +29203,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28620
29203
|
}, name))
|
|
28621
29204
|
})]
|
|
28622
29205
|
})] }),
|
|
29206
|
+
["preset", "catalog"].map((source) => {
|
|
29207
|
+
const group = rows.filter((row) => row.source === source);
|
|
29208
|
+
if (group.length === 0) return null;
|
|
29209
|
+
return (0, react_jsx_runtime.jsxs)("section", {
|
|
29210
|
+
className: TeamPresetsSection_module_css_default.conflict,
|
|
29211
|
+
"aria-live": "polite",
|
|
29212
|
+
children: [(0, react_jsx_runtime.jsx)("h3", {
|
|
29213
|
+
className: TeamPresetsSection_module_css_default.conflictLead,
|
|
29214
|
+
children: t(source === "preset" ? "importSkillDeclarations" : "importSkillCatalog")
|
|
29215
|
+
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
29216
|
+
className: TeamPresetsSection_module_css_default.plainRows,
|
|
29217
|
+
children: group.map((row, index) => (0, react_jsx_runtime.jsxs)("li", {
|
|
29218
|
+
className: TeamPresetsSection_module_css_default.conflictMember,
|
|
29219
|
+
children: [(0, react_jsx_runtime.jsxs)("strong", {
|
|
29220
|
+
className: TeamPresetsSection_module_css_default.conflictName,
|
|
29221
|
+
children: [
|
|
29222
|
+
row.skillId,
|
|
29223
|
+
" · ",
|
|
29224
|
+
row.roleName
|
|
29225
|
+
]
|
|
29226
|
+
}), (0, react_jsx_runtime.jsx)("span", { children: t(skillStatusKeys[row.status]) })]
|
|
29227
|
+
}, `${row.skillId}:${row.roleName}:${index}`))
|
|
29228
|
+
})]
|
|
29229
|
+
}, source);
|
|
29230
|
+
}),
|
|
28623
29231
|
(0, react_jsx_runtime.jsx)("p", {
|
|
28624
29232
|
className: TeamPresetsSection_module_css_default.dialogNote,
|
|
28625
|
-
children: t("
|
|
29233
|
+
children: t("importDraftNote")
|
|
28626
29234
|
})
|
|
28627
29235
|
]
|
|
28628
29236
|
});
|
|
@@ -29006,8 +29614,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29006
29614
|
* The library page owns discovery: search, the built-in/custom segment, and the
|
|
29007
29615
|
* three actions the prototype puts in the title row. The detail page owns one
|
|
29008
29616
|
* skill: its file tree and editor, its member references, and the deletion the
|
|
29009
|
-
* Host refuses while a member still holds it.
|
|
29010
|
-
*
|
|
29617
|
+
* Host refuses while a member still holds it. A built-in skill can be copied
|
|
29618
|
+
* here with the option to move its role bindings to the editable copy.
|
|
29011
29619
|
* @module dsh-agent-team-presets/client/TeamSkillsView
|
|
29012
29620
|
*/
|
|
29013
29621
|
/**
|
|
@@ -29036,7 +29644,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29036
29644
|
"unreadable": "skillsScanUnreadable",
|
|
29037
29645
|
"duplicate": "skillsScanDuplicate",
|
|
29038
29646
|
"duplicate-path": "skillsScanDuplicate",
|
|
29039
|
-
"install-refused": "skillsScanInstallRefused"
|
|
29647
|
+
"install-refused": "skillsScanInstallRefused",
|
|
29648
|
+
"builtin-name-conflict": "skillsScanBuiltinNameConflict",
|
|
29649
|
+
"copy-name-conflict": "skillsScanCopyNameConflict",
|
|
29650
|
+
"duplicate-source-name": "skillsScanDuplicateSourceName",
|
|
29651
|
+
"source-missing": "skillsScanSourceMissingReason",
|
|
29652
|
+
"source-changed": "skillsScanSourceChanged"
|
|
29653
|
+
};
|
|
29654
|
+
const SCAN_STATUS_KEYS = {
|
|
29655
|
+
imported: "skillsScanImported",
|
|
29656
|
+
existing: "skillsScanExisting",
|
|
29657
|
+
updated: "skillsScanUpdated",
|
|
29658
|
+
invalid: "skillsScanInvalid",
|
|
29659
|
+
missing: "skillsScanSourceMissing"
|
|
29040
29660
|
};
|
|
29041
29661
|
/** One scan row's explanation, localized when the scanner's code is known. */
|
|
29042
29662
|
function scanReasonText(entry, t) {
|
|
@@ -29044,6 +29664,41 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29044
29664
|
const label = entry.reason === void 0 ? "" : key === void 0 ? entry.reason : t(key);
|
|
29045
29665
|
return entry.detail === void 0 ? label : `${label} (${entry.detail})`;
|
|
29046
29666
|
}
|
|
29667
|
+
function ignoredDependencyText(fields, t) {
|
|
29668
|
+
return t("skillsIgnoredDependencyFields").replace("{fields}", () => fields.join(", "));
|
|
29669
|
+
}
|
|
29670
|
+
function ScanRows({ entries, pending = false, t }) {
|
|
29671
|
+
return (0, react_jsx_runtime.jsx)("ul", {
|
|
29672
|
+
className: TeamSkillsView_module_css_default.scanList,
|
|
29673
|
+
children: entries.map((entry) => {
|
|
29674
|
+
const needsAttention = entry.status === "invalid" || entry.status === "missing";
|
|
29675
|
+
const status = pending && entry.status === "imported" ? "skillsInboxNew" : pending && entry.status === "updated" ? "skillsInboxUpdated" : SCAN_STATUS_KEYS[entry.status];
|
|
29676
|
+
const tone = needsAttention ? TeamSkillsView_module_css_default.tagWarn : !pending && entry.status !== "existing" ? TeamSkillsView_module_css_default.tagOk : "";
|
|
29677
|
+
const fields = entry.ignoredDependencyFields ?? [];
|
|
29678
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
29679
|
+
className: TeamSkillsView_module_css_default.scanRow,
|
|
29680
|
+
children: [
|
|
29681
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
29682
|
+
className: TeamSkillsView_module_css_default.scanFolder,
|
|
29683
|
+
children: entry.folder
|
|
29684
|
+
}),
|
|
29685
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
29686
|
+
className: `${TeamSkillsView_module_css_default.tag} ${tone}`,
|
|
29687
|
+
children: t(status)
|
|
29688
|
+
}),
|
|
29689
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
29690
|
+
className: TeamSkillsView_module_css_default.muted,
|
|
29691
|
+
children: needsAttention ? scanReasonText(entry, t) : entry.assetId ?? entry.skillId ?? ""
|
|
29692
|
+
}),
|
|
29693
|
+
fields.length === 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
29694
|
+
className: TeamSkillsView_module_css_default.muted,
|
|
29695
|
+
children: ignoredDependencyText(fields, t)
|
|
29696
|
+
})
|
|
29697
|
+
]
|
|
29698
|
+
}, `${entry.folder}:${entry.status}:${entry.assetId ?? entry.skillId ?? ""}`);
|
|
29699
|
+
})
|
|
29700
|
+
});
|
|
29701
|
+
}
|
|
29047
29702
|
function originLabel(asset, t) {
|
|
29048
29703
|
if (asset.origin === "builtin") return t("originBuiltin");
|
|
29049
29704
|
if (asset.origin === "override") return t("originOverride");
|
|
@@ -29061,13 +29716,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29061
29716
|
const [creating, setCreating] = (0, react.useState)(false);
|
|
29062
29717
|
const [name, setName] = (0, react.useState)("");
|
|
29063
29718
|
const [description, setDescription] = (0, react.useState)("");
|
|
29719
|
+
const [copy, setCopy] = (0, react.useState)(void 0);
|
|
29064
29720
|
const [confirmDelete, setConfirmDelete] = (0, react.useState)(false);
|
|
29065
29721
|
const [deleteOutcome, setDeleteOutcome] = (0, react.useState)(void 0);
|
|
29066
29722
|
(0, react.useEffect)(() => {
|
|
29067
29723
|
const unsubscribe = controller.subscribe(() => {
|
|
29068
29724
|
setState(controller.getSnapshot());
|
|
29069
29725
|
});
|
|
29070
|
-
controller.refresh();
|
|
29726
|
+
controller.refresh(true);
|
|
29071
29727
|
return unsubscribe;
|
|
29072
29728
|
}, [controller]);
|
|
29073
29729
|
(0, react.useEffect)(() => {
|
|
@@ -29086,8 +29742,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29086
29742
|
query,
|
|
29087
29743
|
t
|
|
29088
29744
|
]);
|
|
29089
|
-
const detail = state.detail;
|
|
29090
|
-
const
|
|
29745
|
+
const detail = page.kind === "detail" && state.detail?.asset.id === page.assetId ? state.detail : void 0;
|
|
29746
|
+
const copyTitle = detail === void 0 ? "" : t("skillsMakeCopyTitle").replace("{skill}", () => skillLabel(detail.asset.skillId, t));
|
|
29747
|
+
const ignoredFields = detail?.ignoredDependencyFields ?? [];
|
|
29748
|
+
const inboxChanges = (state.inboxChanges ?? []).filter((entry) => entry.status !== "existing");
|
|
29091
29749
|
/**
|
|
29092
29750
|
* Pick a folder and hand its files to the Host.
|
|
29093
29751
|
* @param list - the picker's files.
|
|
@@ -29103,7 +29761,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29103
29761
|
content: new Uint8Array(await file.arrayBuffer())
|
|
29104
29762
|
});
|
|
29105
29763
|
}
|
|
29106
|
-
await controller.importFolder(files);
|
|
29764
|
+
const assetId = await controller.importFolder(files);
|
|
29765
|
+
if (assetId !== void 0) setPage({
|
|
29766
|
+
kind: "detail",
|
|
29767
|
+
assetId
|
|
29768
|
+
});
|
|
29107
29769
|
};
|
|
29108
29770
|
if (state.status === "unavailable") return (0, react_jsx_runtime.jsxs)("div", {
|
|
29109
29771
|
className: TeamSkillsView_module_css_default.page,
|
|
@@ -29122,11 +29784,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29122
29784
|
className: TeamSkillsView_module_css_default.crumb,
|
|
29123
29785
|
onClick: () => {
|
|
29124
29786
|
setPage({ kind: "list" });
|
|
29787
|
+
setCopy(void 0);
|
|
29125
29788
|
setConfirmDelete(false);
|
|
29126
29789
|
setDeleteOutcome(void 0);
|
|
29127
29790
|
},
|
|
29128
29791
|
children: ["‹ ", t("skillsTitle")]
|
|
29129
|
-
}), detail === void 0
|
|
29792
|
+
}), detail === void 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
29130
29793
|
className: TeamSkillsView_module_css_default.empty,
|
|
29131
29794
|
children: t("skillsEmpty")
|
|
29132
29795
|
}) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
@@ -29207,6 +29870,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29207
29870
|
] })
|
|
29208
29871
|
});
|
|
29209
29872
|
})(),
|
|
29873
|
+
ignoredFields.length === 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
29874
|
+
className: TeamSkillsView_module_css_default.info,
|
|
29875
|
+
children: ignoredDependencyText(ignoredFields, t)
|
|
29876
|
+
}),
|
|
29877
|
+
detail.bindingSwitchIssue === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
29878
|
+
className: `${TeamSkillsView_module_css_default.info} ${TeamSkillsView_module_css_default.infoError}`,
|
|
29879
|
+
role: "status",
|
|
29880
|
+
children: t("skillsMakeCopySwitchIssue").replace("{issue}", () => detail.bindingSwitchIssue ?? "")
|
|
29881
|
+
}),
|
|
29210
29882
|
(0, react_jsx_runtime.jsx)("div", {
|
|
29211
29883
|
className: TeamSkillsView_module_css_default.sectionTitle,
|
|
29212
29884
|
children: t("skillsResources")
|
|
@@ -29248,8 +29920,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29248
29920
|
},
|
|
29249
29921
|
children: t("skillsSaveFile")
|
|
29250
29922
|
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29923
|
+
disabled: state.busy,
|
|
29251
29924
|
onClick: () => {
|
|
29252
|
-
|
|
29925
|
+
setCopy({
|
|
29926
|
+
switchBindings: false,
|
|
29927
|
+
attempted: false
|
|
29928
|
+
});
|
|
29253
29929
|
},
|
|
29254
29930
|
children: t("skillsMakeCopy")
|
|
29255
29931
|
}),
|
|
@@ -29342,10 +30018,70 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29342
30018
|
]
|
|
29343
30019
|
}, row.name))] })]
|
|
29344
30020
|
}),
|
|
29345
|
-
state.message === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
30021
|
+
state.message === void 0 || copy !== void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
29346
30022
|
className: `${TeamSkillsView_module_css_default.message} ${state.failed ? TeamSkillsView_module_css_default.messageFailed : ""}`,
|
|
29347
30023
|
children: state.message
|
|
29348
30024
|
}),
|
|
30025
|
+
copy === void 0 ? null : (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
30026
|
+
open: true,
|
|
30027
|
+
headless: true,
|
|
30028
|
+
title: copyTitle,
|
|
30029
|
+
className: TeamSkillsView_module_css_default.dialog ?? "",
|
|
30030
|
+
backdropBlur: false,
|
|
30031
|
+
onClose: () => {
|
|
30032
|
+
if (!state.busy) setCopy(void 0);
|
|
30033
|
+
},
|
|
30034
|
+
children: [
|
|
30035
|
+
(0, react_jsx_runtime.jsx)("h2", { children: copyTitle }),
|
|
30036
|
+
(0, react_jsx_runtime.jsxs)("label", {
|
|
30037
|
+
className: TeamSkillsView_module_css_default.label,
|
|
30038
|
+
children: [(0, react_jsx_runtime.jsx)("input", {
|
|
30039
|
+
type: "checkbox",
|
|
30040
|
+
"data-modal-autofocus": true,
|
|
30041
|
+
checked: copy.switchBindings,
|
|
30042
|
+
disabled: state.busy,
|
|
30043
|
+
onChange: (event) => {
|
|
30044
|
+
setCopy({
|
|
30045
|
+
...copy,
|
|
30046
|
+
switchBindings: event.target.checked
|
|
30047
|
+
});
|
|
30048
|
+
}
|
|
30049
|
+
}), t("skillsMakeCopySwitchBindings").replace("{count}", String(detail.asset.bindings.length))]
|
|
30050
|
+
}),
|
|
30051
|
+
copy.attempted && state.message !== void 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
30052
|
+
className: `${TeamSkillsView_module_css_default.message} ${TeamSkillsView_module_css_default.messageFailed}`,
|
|
30053
|
+
role: "alert",
|
|
30054
|
+
children: state.message
|
|
30055
|
+
}) : null,
|
|
30056
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
30057
|
+
className: TeamSkillsView_module_css_default.dialogActions,
|
|
30058
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
30059
|
+
disabled: state.busy,
|
|
30060
|
+
onClick: () => {
|
|
30061
|
+
setCopy(void 0);
|
|
30062
|
+
},
|
|
30063
|
+
children: t("skillsCancel")
|
|
30064
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
30065
|
+
disabled: state.busy,
|
|
30066
|
+
onClick: () => {
|
|
30067
|
+
setCopy({
|
|
30068
|
+
...copy,
|
|
30069
|
+
attempted: true
|
|
30070
|
+
});
|
|
30071
|
+
controller.createOverride(detail.asset.skillId, copy.switchBindings).then((assetId) => {
|
|
30072
|
+
if (assetId === void 0) return;
|
|
30073
|
+
setPage({
|
|
30074
|
+
kind: "detail",
|
|
30075
|
+
assetId
|
|
30076
|
+
});
|
|
30077
|
+
setCopy(void 0);
|
|
30078
|
+
});
|
|
30079
|
+
},
|
|
30080
|
+
children: t("skillsMakeCopy")
|
|
30081
|
+
})]
|
|
30082
|
+
})
|
|
30083
|
+
]
|
|
30084
|
+
}),
|
|
29349
30085
|
confirmDelete ? (0, react_jsx_runtime.jsx)("div", {
|
|
29350
30086
|
className: TeamSkillsView_module_css_default.dialogBackdrop,
|
|
29351
30087
|
onClick: () => {
|
|
@@ -29489,11 +30225,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29489
30225
|
style: { display: "none" },
|
|
29490
30226
|
onChange: (event) => {
|
|
29491
30227
|
importFolder(event.target.files);
|
|
30228
|
+
event.target.value = "";
|
|
29492
30229
|
},
|
|
29493
30230
|
webkitdirectory: ""
|
|
29494
30231
|
}),
|
|
29495
30232
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29496
30233
|
variant: "outline",
|
|
30234
|
+
disabled: state.busy,
|
|
29497
30235
|
onClick: () => {
|
|
29498
30236
|
document.getElementById("team-skill-import")?.click();
|
|
29499
30237
|
},
|
|
@@ -29501,6 +30239,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29501
30239
|
}),
|
|
29502
30240
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29503
30241
|
variant: "outline",
|
|
30242
|
+
disabled: state.busy,
|
|
29504
30243
|
onClick: () => {
|
|
29505
30244
|
controller.scanImportFolder();
|
|
29506
30245
|
},
|
|
@@ -29508,12 +30247,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29508
30247
|
})
|
|
29509
30248
|
]
|
|
29510
30249
|
}),
|
|
30250
|
+
inboxChanges.length === 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
30251
|
+
className: TeamSkillsView_module_css_default.scan,
|
|
30252
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
30253
|
+
className: TeamSkillsView_module_css_default.scanHead,
|
|
30254
|
+
role: "status",
|
|
30255
|
+
children: t("skillsInboxChanges").replace("{count}", String(inboxChanges.length))
|
|
30256
|
+
}), (0, react_jsx_runtime.jsx)(ScanRows, {
|
|
30257
|
+
entries: inboxChanges,
|
|
30258
|
+
pending: true,
|
|
30259
|
+
t
|
|
30260
|
+
})]
|
|
30261
|
+
}),
|
|
29511
30262
|
state.scan === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
29512
30263
|
className: TeamSkillsView_module_css_default.scan,
|
|
29513
30264
|
children: [
|
|
29514
30265
|
(0, react_jsx_runtime.jsx)("div", {
|
|
29515
30266
|
className: TeamSkillsView_module_css_default.scanHead,
|
|
29516
|
-
children: t("skillsScanSummary").replace("{scanned}", String(state.scan.scanned)).replace("{imported}", String(state.scan.imported)).replace("{existing}", String(state.scan.existing)).replace("{invalid}", String(state.scan.invalid))
|
|
30267
|
+
children: t("skillsScanSummary").replace("{scanned}", String(state.scan.scanned)).replace("{imported}", String(state.scan.imported)).replace("{updated}", String(state.scan.updated ?? 0)).replace("{existing}", String(state.scan.existing)).replace("{missing}", String(state.scan.missing ?? 0)).replace("{invalid}", String(state.scan.invalid))
|
|
29517
30268
|
}),
|
|
29518
30269
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
29519
30270
|
className: TeamSkillsView_module_css_default.muted,
|
|
@@ -29526,25 +30277,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29526
30277
|
state.scan.entries.length === 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
29527
30278
|
className: TeamSkillsView_module_css_default.muted,
|
|
29528
30279
|
children: t("skillsScanEmpty")
|
|
29529
|
-
}) : (0, react_jsx_runtime.jsx)(
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
className: TeamSkillsView_module_css_default.scanRow,
|
|
29533
|
-
children: [
|
|
29534
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
29535
|
-
className: TeamSkillsView_module_css_default.scanFolder,
|
|
29536
|
-
children: entry.folder
|
|
29537
|
-
}),
|
|
29538
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
29539
|
-
className: `${TeamSkillsView_module_css_default.tag} ${entry.status === "imported" ? TeamSkillsView_module_css_default.tagOk : entry.status === "invalid" ? TeamSkillsView_module_css_default.tagWarn : ""}`,
|
|
29540
|
-
children: t(entry.status === "imported" ? "skillsScanImported" : entry.status === "existing" ? "skillsScanExisting" : "skillsScanInvalid")
|
|
29541
|
-
}),
|
|
29542
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
29543
|
-
className: TeamSkillsView_module_css_default.muted,
|
|
29544
|
-
children: entry.status === "invalid" ? scanReasonText(entry, t) : entry.assetId ?? entry.skillId ?? ""
|
|
29545
|
-
})
|
|
29546
|
-
]
|
|
29547
|
-
}, entry.folder))
|
|
30280
|
+
}) : (0, react_jsx_runtime.jsx)(ScanRows, {
|
|
30281
|
+
entries: state.scan.entries,
|
|
30282
|
+
t
|
|
29548
30283
|
})
|
|
29549
30284
|
]
|
|
29550
30285
|
}),
|
|
@@ -30040,6 +30775,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30040
30775
|
* The Agent Team presets settings page: three stacked pages — the Team list,
|
|
30041
30776
|
* one Team's roster, and one captain or member — with a shared save footer.
|
|
30042
30777
|
*/
|
|
30778
|
+
const noSkillUpdates = () => () => {};
|
|
30779
|
+
const noSkillSnapshot = () => void 0;
|
|
30043
30780
|
/**
|
|
30044
30781
|
* One tab in the section's own tab bar.
|
|
30045
30782
|
* @param props - active state, click handler, and label.
|
|
@@ -30135,7 +30872,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30135
30872
|
const [importError, setImportError] = (0, react.useState)(void 0);
|
|
30136
30873
|
const [importPlan, setImportPlan] = (0, react.useState)(void 0);
|
|
30137
30874
|
const [importGeneration, setImportGeneration] = (0, react.useState)(0);
|
|
30138
|
-
const { refreshCatalogue } = props;
|
|
30875
|
+
const { refreshCatalogue, skills } = props;
|
|
30876
|
+
const skillState = (0, react.useSyncExternalStore)(skills?.subscribe ?? noSkillUpdates, skills?.getSnapshot ?? noSkillSnapshot);
|
|
30877
|
+
const importAssets = skillState?.status === "ready" ? skillState.library?.assets : void 0;
|
|
30139
30878
|
(0, react.useEffect)(() => {
|
|
30140
30879
|
refreshCatalogue();
|
|
30141
30880
|
}, [refreshCatalogue]);
|
|
@@ -30241,12 +30980,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30241
30980
|
return;
|
|
30242
30981
|
}
|
|
30243
30982
|
setImportError(void 0);
|
|
30244
|
-
|
|
30245
|
-
|
|
30983
|
+
const resolution = defaultImportResolution(inspection.plan);
|
|
30984
|
+
const preview = props.previewImport(inspection.plan, resolution, importAssets);
|
|
30985
|
+
if (inspection.plan.targetIndex === void 0 && preview.length === 0) {
|
|
30986
|
+
setImportPlan(void 0);
|
|
30987
|
+
openTeam(props.applyImport(inspection.plan, resolution));
|
|
30246
30988
|
return;
|
|
30247
30989
|
}
|
|
30248
30990
|
setImportGeneration((generation) => generation + 1);
|
|
30249
30991
|
setImportPlan(inspection.plan);
|
|
30992
|
+
if (preview.length > 0) skills?.refresh();
|
|
30250
30993
|
}
|
|
30251
30994
|
/**
|
|
30252
30995
|
* Write one Team out as a shareable document.
|
|
@@ -30413,6 +31156,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30413
31156
|
importPlan === void 0 ? null : (0, react_jsx_runtime.jsx)(TeamImportDialog, {
|
|
30414
31157
|
plan: importPlan,
|
|
30415
31158
|
t,
|
|
31159
|
+
previewSkills: (resolution) => props.previewImport(importPlan, resolution, importAssets),
|
|
30416
31160
|
onCancel: () => {
|
|
30417
31161
|
setImportPlan(void 0);
|
|
30418
31162
|
},
|
|
@@ -30540,6 +31284,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30540
31284
|
issue: void 0,
|
|
30541
31285
|
file: void 0,
|
|
30542
31286
|
fileText: void 0,
|
|
31287
|
+
inboxChanges: [],
|
|
30543
31288
|
scan: void 0,
|
|
30544
31289
|
canOpenScanFolder: false,
|
|
30545
31290
|
scanFolderPath: void 0,
|
|
@@ -30548,6 +31293,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30548
31293
|
listeners = /* @__PURE__ */ new Set();
|
|
30549
31294
|
ctx;
|
|
30550
31295
|
disposed = false;
|
|
31296
|
+
pendingInboxCheck = false;
|
|
31297
|
+
libraryRequest = 0;
|
|
31298
|
+
inboxRequest = 0;
|
|
30551
31299
|
/**
|
|
30552
31300
|
* The Remote namespace, once the gateway announces it.
|
|
30553
31301
|
*
|
|
@@ -30566,7 +31314,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30566
31314
|
try {
|
|
30567
31315
|
ctx.inject(["remote.teamSkills"], (scope) => {
|
|
30568
31316
|
this.service = scope.remote.teamSkills;
|
|
30569
|
-
this.
|
|
31317
|
+
const checkInbox = this.pendingInboxCheck;
|
|
31318
|
+
this.pendingInboxCheck = false;
|
|
31319
|
+
this.refresh(checkInbox);
|
|
30570
31320
|
return () => {
|
|
30571
31321
|
this.service = void 0;
|
|
30572
31322
|
};
|
|
@@ -30683,31 +31433,40 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30683
31433
|
};
|
|
30684
31434
|
for (const listener of this.listeners) listener();
|
|
30685
31435
|
}
|
|
30686
|
-
/** Read the library
|
|
30687
|
-
async refresh() {
|
|
31436
|
+
/** Read the library, optionally checking the inbox for pending changes. */
|
|
31437
|
+
async refresh(checkInbox = false) {
|
|
31438
|
+
if (checkInbox && this.service === void 0) this.pendingInboxCheck = true;
|
|
31439
|
+
const request = ++this.libraryRequest;
|
|
31440
|
+
if (checkInbox) this.inboxRequest = request;
|
|
30688
31441
|
this.publish({ status: this.state.library === void 0 ? "loading" : "ready" });
|
|
30689
31442
|
try {
|
|
30690
|
-
const
|
|
30691
|
-
const
|
|
30692
|
-
if (issue
|
|
31443
|
+
const api = this.api();
|
|
31444
|
+
const library = unwrap$1(await (checkInbox ? api.library(true) : api.library()));
|
|
31445
|
+
if (checkInbox && request === this.inboxRequest && library.issue === void 0) this.publish({ inboxChanges: library.inboxChanges ?? [] });
|
|
31446
|
+
if (request !== this.libraryRequest) return;
|
|
31447
|
+
if (library.issue !== void 0) {
|
|
30693
31448
|
this.publish({
|
|
30694
31449
|
status: "unavailable",
|
|
30695
31450
|
library: void 0,
|
|
30696
|
-
issue
|
|
31451
|
+
issue: library.issue
|
|
30697
31452
|
});
|
|
30698
31453
|
return;
|
|
30699
31454
|
}
|
|
31455
|
+
const selectedId = this.state.selectedId;
|
|
31456
|
+
const selectionGone = selectedId !== void 0 && !library.assets.some((asset) => asset.id === selectedId);
|
|
30700
31457
|
this.publish({
|
|
30701
31458
|
status: "ready",
|
|
30702
31459
|
library,
|
|
30703
|
-
issue: void 0
|
|
30704
|
-
|
|
30705
|
-
|
|
30706
|
-
|
|
30707
|
-
|
|
31460
|
+
issue: void 0,
|
|
31461
|
+
...selectionGone ? {
|
|
31462
|
+
selectedId: void 0,
|
|
31463
|
+
detail: void 0,
|
|
31464
|
+
file: void 0,
|
|
31465
|
+
fileText: void 0
|
|
31466
|
+
} : {}
|
|
30708
31467
|
});
|
|
30709
31468
|
} catch (error) {
|
|
30710
|
-
this.publish({
|
|
31469
|
+
if (request === this.libraryRequest) this.publish({
|
|
30711
31470
|
status: "unavailable",
|
|
30712
31471
|
issue: String(error)
|
|
30713
31472
|
});
|
|
@@ -30720,7 +31479,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30720
31479
|
async select(assetId) {
|
|
30721
31480
|
this.publish({
|
|
30722
31481
|
selectedId: assetId,
|
|
30723
|
-
detail: void 0
|
|
31482
|
+
detail: void 0,
|
|
31483
|
+
file: void 0,
|
|
31484
|
+
fileText: void 0
|
|
30724
31485
|
});
|
|
30725
31486
|
const answer = unwrap$1(await this.api().detail(assetId));
|
|
30726
31487
|
if (this.disposed || this.state.selectedId !== assetId) return;
|
|
@@ -30747,14 +31508,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30747
31508
|
});
|
|
30748
31509
|
try {
|
|
30749
31510
|
const answer = unwrap$1(await this.api().readFile(assetId, path));
|
|
30750
|
-
if (this.state.file !== path) return;
|
|
31511
|
+
if (this.state.selectedId !== assetId || this.state.file !== path) return;
|
|
30751
31512
|
if ("text" in answer) this.publish({ fileText: answer.text });
|
|
30752
31513
|
else this.publish({
|
|
30753
31514
|
message: answer.detail,
|
|
30754
31515
|
failed: true
|
|
30755
31516
|
});
|
|
30756
31517
|
} catch (error) {
|
|
30757
|
-
this.publish({
|
|
31518
|
+
if (this.state.selectedId === assetId && this.state.file === path) this.publish({
|
|
30758
31519
|
message: String(error),
|
|
30759
31520
|
failed: true
|
|
30760
31521
|
});
|
|
@@ -30768,12 +31529,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30768
31529
|
async saveFile(path, text) {
|
|
30769
31530
|
const assetId = this.state.selectedId;
|
|
30770
31531
|
if (assetId === void 0) return;
|
|
31532
|
+
const version = this.state.detail?.asset.version;
|
|
30771
31533
|
await this.run(async () => {
|
|
30772
|
-
const answer = unwrap$1(await this.api().writeFile(assetId, path, text));
|
|
31534
|
+
const answer = unwrap$1(await this.api().writeFile(assetId, path, text, version));
|
|
30773
31535
|
if (!isDetail(answer)) return answer.detail;
|
|
30774
|
-
this.publish({ detail: answer });
|
|
30775
|
-
await this.refresh();
|
|
30776
|
-
await this.openFile(path);
|
|
31536
|
+
if (this.state.selectedId === assetId) this.publish({ detail: answer });
|
|
31537
|
+
await this.refresh(true);
|
|
31538
|
+
if (this.state.selectedId === assetId) await this.openFile(path);
|
|
30777
31539
|
return "saved";
|
|
30778
31540
|
});
|
|
30779
31541
|
}
|
|
@@ -30790,13 +31552,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30790
31552
|
detail: answer,
|
|
30791
31553
|
selectedId: answer.asset.id
|
|
30792
31554
|
});
|
|
30793
|
-
await this.refresh();
|
|
31555
|
+
await this.refresh(true);
|
|
30794
31556
|
return "created";
|
|
30795
31557
|
});
|
|
30796
31558
|
}
|
|
30797
31559
|
/**
|
|
30798
31560
|
* Import one folder the user picked.
|
|
30799
31561
|
* @param files - the picker's files, already carrying relative paths.
|
|
31562
|
+
* @returns the asset identity when the folder was imported.
|
|
30800
31563
|
*/
|
|
30801
31564
|
async importFolder(files) {
|
|
30802
31565
|
if (files.length === 0) return;
|
|
@@ -30804,16 +31567,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30804
31567
|
path: file.path,
|
|
30805
31568
|
base64: encodeBase64(file.content)
|
|
30806
31569
|
}));
|
|
31570
|
+
let importedId;
|
|
30807
31571
|
await this.run(async () => {
|
|
30808
31572
|
const answer = unwrap$1(await this.api().importSkill(payload));
|
|
30809
31573
|
if (!isDetail(answer)) return answer.detail;
|
|
30810
|
-
this.
|
|
30811
|
-
detail: answer,
|
|
30812
|
-
selectedId: answer.asset.id
|
|
30813
|
-
});
|
|
30814
|
-
await this.refresh();
|
|
31574
|
+
importedId = await this.showCreatedAsset(answer);
|
|
30815
31575
|
return "imported";
|
|
30816
31576
|
});
|
|
31577
|
+
return importedId;
|
|
30817
31578
|
}
|
|
30818
31579
|
/**
|
|
30819
31580
|
* Scan the Host's import folder and publish every new legal skill.
|
|
@@ -30829,25 +31590,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30829
31590
|
return answer.detail;
|
|
30830
31591
|
}
|
|
30831
31592
|
this.publish({ scan: answer });
|
|
30832
|
-
await this.refresh();
|
|
31593
|
+
await this.refresh(true);
|
|
30833
31594
|
return "scanned";
|
|
30834
31595
|
});
|
|
30835
31596
|
}
|
|
30836
31597
|
/**
|
|
30837
31598
|
* Copy one shipped skill into an editable override.
|
|
30838
31599
|
* @param skillId - shipped skill id.
|
|
31600
|
+
* @param switchBindings - whether to move current role bindings to the copy.
|
|
31601
|
+
* @returns the copy's asset identity when the Host created it.
|
|
30839
31602
|
*/
|
|
30840
|
-
async createOverride(skillId) {
|
|
31603
|
+
async createOverride(skillId, switchBindings) {
|
|
31604
|
+
let copyId;
|
|
30841
31605
|
await this.run(async () => {
|
|
30842
|
-
const answer = unwrap$1(await this.api().overrideSkill(skillId));
|
|
31606
|
+
const answer = unwrap$1(await this.api().overrideSkill(skillId, switchBindings));
|
|
30843
31607
|
if (!isDetail(answer)) return answer.detail;
|
|
30844
|
-
this.
|
|
30845
|
-
detail: answer,
|
|
30846
|
-
selectedId: answer.asset.id
|
|
30847
|
-
});
|
|
30848
|
-
await this.refresh();
|
|
31608
|
+
copyId = await this.showCreatedAsset(answer);
|
|
30849
31609
|
return "override-created";
|
|
30850
31610
|
});
|
|
31611
|
+
return copyId;
|
|
31612
|
+
}
|
|
31613
|
+
async showCreatedAsset(detail) {
|
|
31614
|
+
await this.refresh(true);
|
|
31615
|
+
const assetId = detail.asset.id;
|
|
31616
|
+
this.publish({
|
|
31617
|
+
selectedId: assetId,
|
|
31618
|
+
detail,
|
|
31619
|
+
file: void 0,
|
|
31620
|
+
fileText: void 0
|
|
31621
|
+
});
|
|
31622
|
+
await this.openFile("SKILL.md");
|
|
31623
|
+
return assetId;
|
|
30851
31624
|
}
|
|
30852
31625
|
/**
|
|
30853
31626
|
* Discard one override's edits by re-copying the shipped skill.
|
|
@@ -30857,7 +31630,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30857
31630
|
await this.run(async () => {
|
|
30858
31631
|
const answer = unwrap$1(await this.api().resetSkill(assetId));
|
|
30859
31632
|
if (!isDetail(answer)) return answer.detail;
|
|
30860
|
-
this.
|
|
31633
|
+
if (this.state.selectedId === assetId) {
|
|
31634
|
+
this.publish({ detail: answer });
|
|
31635
|
+
await this.openFile("SKILL.md");
|
|
31636
|
+
}
|
|
30861
31637
|
await this.refresh();
|
|
30862
31638
|
return "override-reset";
|
|
30863
31639
|
});
|
|
@@ -30871,7 +31647,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30871
31647
|
let outcome;
|
|
30872
31648
|
await this.run(async () => {
|
|
30873
31649
|
outcome = unwrap$1(await this.api().deleteAsset(assetId));
|
|
30874
|
-
await this.refresh();
|
|
31650
|
+
await this.refresh(outcome.ok);
|
|
30875
31651
|
if (!outcome.ok) return outcome.blockers.map((blocker) => `${blocker.kind}: ${blocker.detail}`).join("; ");
|
|
30876
31652
|
this.publish({
|
|
30877
31653
|
selectedId: void 0,
|
|
@@ -30963,7 +31739,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30963
31739
|
});
|
|
30964
31740
|
try {
|
|
30965
31741
|
const message = await work();
|
|
30966
|
-
const succeeded = /^(saved|created|imported|deleted|assigned|unassigned|scanned|override
|
|
31742
|
+
const succeeded = /^(saved|created|imported|deleted|assigned|unassigned|scanned|override-created|override-reset|restored-bindings)$/u.test(message);
|
|
30967
31743
|
this.publish({
|
|
30968
31744
|
busy: false,
|
|
30969
31745
|
message: succeeded ? void 0 : message,
|