dsh-agent-team-presets 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +29 -0
- package/README.md +48 -7
- package/README.zh.md +47 -6
- package/assets/card-patches/dsh-better-sidebar-0.32.0.client.js.gz +0 -0
- package/assets/card-patches/dsh-context-0.84.0.client.js.gz +0 -0
- package/assets/card-patches/licenses/dsh-better-sidebar-LICENSE +21 -0
- package/assets/card-patches/licenses/dsh-context-LICENSE +201 -0
- package/lib/client.js +1037 -57
- package/lib/index.js +461 -1
- package/lib/typert.host.js +295 -3
- package/lib/typert.remote-client.d.ts +13 -1
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +295 -3
- package/lib/types/card-patches.d.ts +104 -0
- package/lib/types/card-patches.js +275 -0
- package/lib/types/client/CardPatchView.d.ts +27 -0
- package/lib/types/client/CardPatchView.js +80 -0
- package/lib/types/client/TeamPresetsSection.js +13 -5
- package/lib/types/client/agent-card-badges.d.ts +47 -0
- package/lib/types/client/agent-card-badges.js +61 -0
- package/lib/types/client/card-patches-controller.d.ts +152 -0
- package/lib/types/client/card-patches-controller.js +211 -0
- package/lib/types/client/index.js +10 -4
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/locales.js +58 -0
- package/lib/types/client/team-presets-controller.d.ts +2 -0
- package/lib/types/index.js +1 -0
- package/lib/types/member-runtime.d.ts +8 -0
- package/lib/types/member-runtime.js +15 -0
- package/lib/types/member-store.d.ts +9 -0
- package/lib/types/member-store.js +13 -1
- package/lib/types/tool-catalog.d.ts +48 -1
- package/lib/types/tool-catalog.js +87 -0
- package/lib/types/types.d.ts +40 -0
- package/package.json +2 -1
package/lib/client.js
CHANGED
|
@@ -18831,6 +18831,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18831
18831
|
return this.projection.value;
|
|
18832
18832
|
}
|
|
18833
18833
|
};
|
|
18834
|
+
let dsh_agent_team_presets_teamPresets_cardPatches_result$schema$value;
|
|
18835
|
+
const dsh_agent_team_presets_teamPresets_cardPatches_result$schema = () => dsh_agent_team_presets_teamPresets_cardPatches_result$schema$value ??= array(object({
|
|
18836
|
+
"id": string$1().readonly().describe("Stable identity."),
|
|
18837
|
+
"packageName": string$1().readonly().describe("Package the row is about."),
|
|
18838
|
+
"source": string$1().readonly().describe("Upstream revision the prebuilt replacement came from."),
|
|
18839
|
+
"supportedVersion": string$1().readonly().describe("The version this build ships a replacement for."),
|
|
18840
|
+
"installedVersion": string$1().readonly().optional().describe("Installed version, when the package is present."),
|
|
18841
|
+
"state": union([
|
|
18842
|
+
literal("absent"),
|
|
18843
|
+
literal("unsupported"),
|
|
18844
|
+
literal("pristine"),
|
|
18845
|
+
literal("patched"),
|
|
18846
|
+
literal("foreign")
|
|
18847
|
+
]).readonly().describe("Installed bundle state."),
|
|
18848
|
+
"detail": string$1().readonly().optional().describe("Why the row cannot be acted on, when `state` refuses.")
|
|
18849
|
+
}));
|
|
18834
18850
|
let dsh_agent_team_presets_teamPresets_catalog_result$schema$value;
|
|
18835
18851
|
const dsh_agent_team_presets_teamPresets_catalog_result$schema = () => dsh_agent_team_presets_teamPresets_catalog_result$schema$value ??= object({ "tools": array(object({
|
|
18836
18852
|
"name": string$1().describe("Capability name the strict execution policy accepts verbatim."),
|
|
@@ -18856,6 +18872,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18856
18872
|
"pendingSessions": number$1().describe("Sessions whose applied definition or selection the next Team task has not adopted yet. A member route or accent color saved meanwhile is read live, so it is no reason to wait."),
|
|
18857
18873
|
"notes": array(string$1()).describe("Disclosures about how the applied Team runs, in a stable order. An empty list means no applied Session needed one. The only note today says that a Team whose custom tool policy needed a native surface overrode the Session's PTC batch-calling presentation, which the page must state instead of claiming the preset's transport is intact.")
|
|
18858
18874
|
})).describe("One row per Team the Host reports, ordered by Team identity.") });
|
|
18875
|
+
let dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0$schema$value;
|
|
18876
|
+
const dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0$schema = () => dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0$schema$value ??= string$1();
|
|
18877
|
+
let dsh_agent_team_presets_teamPresets_installCardPatch_result$schema$value;
|
|
18878
|
+
const dsh_agent_team_presets_teamPresets_installCardPatch_result$schema = () => dsh_agent_team_presets_teamPresets_installCardPatch_result$schema$value ??= object({
|
|
18879
|
+
"ok": boolean$1().readonly().describe("Whether the bundle file was replaced."),
|
|
18880
|
+
"id": string$1().readonly().describe("The target that was acted on."),
|
|
18881
|
+
"state": union([
|
|
18882
|
+
literal("absent"),
|
|
18883
|
+
literal("unsupported"),
|
|
18884
|
+
literal("pristine"),
|
|
18885
|
+
literal("patched"),
|
|
18886
|
+
literal("foreign")
|
|
18887
|
+
]).readonly().describe("Bundle state after the attempt; unchanged when it was refused."),
|
|
18888
|
+
"detail": string$1().readonly().optional().describe("Why nothing changed, or what an operator should know about a success.")
|
|
18889
|
+
});
|
|
18890
|
+
let dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0$schema$value;
|
|
18891
|
+
const dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0$schema = () => dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0$schema$value ??= string$1();
|
|
18892
|
+
let dsh_agent_team_presets_teamPresets_isPresetMember_result$schema$value;
|
|
18893
|
+
const dsh_agent_team_presets_teamPresets_isPresetMember_result$schema = () => dsh_agent_team_presets_teamPresets_isPresetMember_result$schema$value ??= boolean$1();
|
|
18859
18894
|
let dsh_agent_team_presets_teamPresets_roster_parameter_0$schema$value;
|
|
18860
18895
|
const dsh_agent_team_presets_teamPresets_roster_parameter_0$schema = () => dsh_agent_team_presets_teamPresets_roster_parameter_0$schema$value ??= string$1();
|
|
18861
18896
|
let dsh_agent_team_presets_teamPresets_roster_result$schema$value;
|
|
@@ -18874,6 +18909,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18874
18909
|
}).readonly().optional().describe("The route this member was frozen with, when it configured one."),
|
|
18875
18910
|
"model": string$1().readonly().optional().describe("Model the row runs on when it has no frozen route (the Lead uses the Session's).")
|
|
18876
18911
|
})).readonly() });
|
|
18912
|
+
let dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0$schema$value;
|
|
18913
|
+
const dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0$schema = () => dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0$schema$value ??= string$1();
|
|
18914
|
+
let dsh_agent_team_presets_teamPresets_uninstallCardPatch_result$schema$value;
|
|
18915
|
+
const dsh_agent_team_presets_teamPresets_uninstallCardPatch_result$schema = () => dsh_agent_team_presets_teamPresets_uninstallCardPatch_result$schema$value ??= object({
|
|
18916
|
+
"ok": boolean$1().readonly().describe("Whether the bundle file was replaced."),
|
|
18917
|
+
"id": string$1().readonly().describe("The target that was acted on."),
|
|
18918
|
+
"state": union([
|
|
18919
|
+
literal("absent"),
|
|
18920
|
+
literal("unsupported"),
|
|
18921
|
+
literal("pristine"),
|
|
18922
|
+
literal("patched"),
|
|
18923
|
+
literal("foreign")
|
|
18924
|
+
]).readonly().describe("Bundle state after the attempt; unchanged when it was refused."),
|
|
18925
|
+
"detail": string$1().readonly().optional().describe("Why nothing changed, or what an operator should know about a success.")
|
|
18926
|
+
});
|
|
18877
18927
|
let dsh_agent_team_presets_teamSkills_assignRole_parameter_0$schema$value;
|
|
18878
18928
|
const dsh_agent_team_presets_teamSkills_assignRole_parameter_0$schema = () => dsh_agent_team_presets_teamSkills_assignRole_parameter_0$schema$value ??= string$1();
|
|
18879
18929
|
let dsh_agent_team_presets_teamSkills_assignRole_parameter_1$schema$value;
|
|
@@ -19502,8 +19552,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19502
19552
|
"reason": string$1().readonly().describe("Machine-readable reason."),
|
|
19503
19553
|
"detail": string$1().readonly().describe("Human-readable detail, already specific.")
|
|
19504
19554
|
})]);
|
|
19555
|
+
let dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0_strict$schema$value;
|
|
19556
|
+
const dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0_strict$schema = () => dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0_strict$schema$value ??= string$1();
|
|
19557
|
+
let dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0_strict$schema$value;
|
|
19558
|
+
const dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0_strict$schema = () => dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0_strict$schema$value ??= string$1();
|
|
19505
19559
|
let dsh_agent_team_presets_teamPresets_roster_parameter_0_strict$schema$value;
|
|
19506
19560
|
const dsh_agent_team_presets_teamPresets_roster_parameter_0_strict$schema = () => dsh_agent_team_presets_teamPresets_roster_parameter_0_strict$schema$value ??= string$1();
|
|
19561
|
+
let dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0_strict$schema$value;
|
|
19562
|
+
const dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0_strict$schema = () => dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0_strict$schema$value ??= string$1();
|
|
19507
19563
|
let dsh_agent_team_presets_teamSkills_assignRole_parameter_0_strict$schema$value;
|
|
19508
19564
|
const dsh_agent_team_presets_teamSkills_assignRole_parameter_0_strict$schema = () => dsh_agent_team_presets_teamSkills_assignRole_parameter_0_strict$schema$value ??= string$1();
|
|
19509
19565
|
let dsh_agent_team_presets_teamSkills_assignRole_parameter_1_strict$schema$value;
|
|
@@ -19561,6 +19617,74 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19561
19617
|
const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
19562
19618
|
package: "dsh-agent-team-presets",
|
|
19563
19619
|
methods: {
|
|
19620
|
+
"teamPresets/cardPatches": {
|
|
19621
|
+
service: "teamPresetsToolCatalog",
|
|
19622
|
+
description: "Read every supported card patch and its installed bundle state. The list is the catalog this build ships, not what happens to be installed, so the settings page can name a target that is missing or pinned to another version instead of hiding it.",
|
|
19623
|
+
invocation: { kind: "direct" },
|
|
19624
|
+
parameters: [],
|
|
19625
|
+
result: {
|
|
19626
|
+
mode: "strict",
|
|
19627
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/cardPatches:result",
|
|
19628
|
+
create: dsh_agent_team_presets_teamPresets_cardPatches_result$schema,
|
|
19629
|
+
description: "one row per supported target, in catalog order.",
|
|
19630
|
+
jsonSchema: {
|
|
19631
|
+
"type": "array",
|
|
19632
|
+
"items": {
|
|
19633
|
+
"type": "object",
|
|
19634
|
+
"properties": {
|
|
19635
|
+
"id": {
|
|
19636
|
+
"type": "string",
|
|
19637
|
+
"description": "Stable identity."
|
|
19638
|
+
},
|
|
19639
|
+
"packageName": {
|
|
19640
|
+
"type": "string",
|
|
19641
|
+
"description": "Package the row is about."
|
|
19642
|
+
},
|
|
19643
|
+
"source": {
|
|
19644
|
+
"type": "string",
|
|
19645
|
+
"description": "Upstream revision the prebuilt replacement came from."
|
|
19646
|
+
},
|
|
19647
|
+
"supportedVersion": {
|
|
19648
|
+
"type": "string",
|
|
19649
|
+
"description": "The version this build ships a replacement for."
|
|
19650
|
+
},
|
|
19651
|
+
"installedVersion": {
|
|
19652
|
+
"type": "string",
|
|
19653
|
+
"description": "Installed version, when the package is present."
|
|
19654
|
+
},
|
|
19655
|
+
"state": {
|
|
19656
|
+
"type": "string",
|
|
19657
|
+
"enum": [
|
|
19658
|
+
"absent",
|
|
19659
|
+
"unsupported",
|
|
19660
|
+
"pristine",
|
|
19661
|
+
"patched",
|
|
19662
|
+
"foreign"
|
|
19663
|
+
],
|
|
19664
|
+
"description": "Installed bundle state."
|
|
19665
|
+
},
|
|
19666
|
+
"detail": {
|
|
19667
|
+
"type": "string",
|
|
19668
|
+
"description": "Why the row cannot be acted on, when `state` refuses."
|
|
19669
|
+
}
|
|
19670
|
+
},
|
|
19671
|
+
"required": [
|
|
19672
|
+
"id",
|
|
19673
|
+
"packageName",
|
|
19674
|
+
"source",
|
|
19675
|
+
"supportedVersion",
|
|
19676
|
+
"state"
|
|
19677
|
+
],
|
|
19678
|
+
"additionalProperties": true
|
|
19679
|
+
}
|
|
19680
|
+
}
|
|
19681
|
+
},
|
|
19682
|
+
sourceLocation: {
|
|
19683
|
+
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19684
|
+
"line": 262,
|
|
19685
|
+
"column": 9
|
|
19686
|
+
}
|
|
19687
|
+
},
|
|
19564
19688
|
"teamPresets/catalog": {
|
|
19565
19689
|
service: "teamPresetsToolCatalog",
|
|
19566
19690
|
description: "List global, standing-preset and fixed Team capability choices. Two kinds of name are deliberately absent. The reserved PTC mode transport is excluded because `ctx.tools.restrict()` refuses it, so offering it as a checkbox would produce a selection the summon path rejects. The implicit tools (`skill`) are excluded because a Team policy always admits them: they are a precondition of a Team Skill assignment, not a capability an operator could withhold, so a checkbox for one would be a control that cannot do anything.",
|
|
@@ -19619,7 +19743,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19619
19743
|
},
|
|
19620
19744
|
sourceLocation: {
|
|
19621
19745
|
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19622
|
-
"line":
|
|
19746
|
+
"line": 163,
|
|
19623
19747
|
"column": 9
|
|
19624
19748
|
}
|
|
19625
19749
|
},
|
|
@@ -19689,10 +19813,111 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19689
19813
|
},
|
|
19690
19814
|
sourceLocation: {
|
|
19691
19815
|
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19692
|
-
"line":
|
|
19816
|
+
"line": 299,
|
|
19693
19817
|
"column": 3
|
|
19694
19818
|
}
|
|
19695
19819
|
},
|
|
19820
|
+
"teamPresets/installCardPatch": {
|
|
19821
|
+
service: "teamPresetsToolCatalog",
|
|
19822
|
+
description: "Replace one target's browser bundle with this build's prebuilt replacement.",
|
|
19823
|
+
invocation: { kind: "direct" },
|
|
19824
|
+
parameters: [{
|
|
19825
|
+
name: "id",
|
|
19826
|
+
description: "the target identity from {@link cardPatches}.",
|
|
19827
|
+
source: "json",
|
|
19828
|
+
codec: {
|
|
19829
|
+
mode: "strict",
|
|
19830
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/installCardPatch:id",
|
|
19831
|
+
create: dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0$schema,
|
|
19832
|
+
jsonSchema: { "type": "string" }
|
|
19833
|
+
},
|
|
19834
|
+
strictCodec: {
|
|
19835
|
+
mode: "strict",
|
|
19836
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/installCardPatch:id",
|
|
19837
|
+
create: dsh_agent_team_presets_teamPresets_installCardPatch_parameter_0_strict$schema,
|
|
19838
|
+
jsonSchema: { "type": "string" }
|
|
19839
|
+
}
|
|
19840
|
+
}],
|
|
19841
|
+
result: {
|
|
19842
|
+
mode: "strict",
|
|
19843
|
+
typeSymbol: "dsh-agent-team-presets/types#CardPatchResult",
|
|
19844
|
+
create: dsh_agent_team_presets_teamPresets_installCardPatch_result$schema,
|
|
19845
|
+
description: "the outcome, or a refusal naming why nothing changed.",
|
|
19846
|
+
jsonSchema: {
|
|
19847
|
+
"type": "object",
|
|
19848
|
+
"properties": {
|
|
19849
|
+
"ok": {
|
|
19850
|
+
"type": "boolean",
|
|
19851
|
+
"description": "Whether the bundle file was replaced."
|
|
19852
|
+
},
|
|
19853
|
+
"id": {
|
|
19854
|
+
"type": "string",
|
|
19855
|
+
"description": "The target that was acted on."
|
|
19856
|
+
},
|
|
19857
|
+
"state": {
|
|
19858
|
+
"type": "string",
|
|
19859
|
+
"enum": [
|
|
19860
|
+
"absent",
|
|
19861
|
+
"unsupported",
|
|
19862
|
+
"pristine",
|
|
19863
|
+
"patched",
|
|
19864
|
+
"foreign"
|
|
19865
|
+
],
|
|
19866
|
+
"description": "Bundle state after the attempt; unchanged when it was refused."
|
|
19867
|
+
},
|
|
19868
|
+
"detail": {
|
|
19869
|
+
"type": "string",
|
|
19870
|
+
"description": "Why nothing changed, or what an operator should know about a success."
|
|
19871
|
+
}
|
|
19872
|
+
},
|
|
19873
|
+
"required": [
|
|
19874
|
+
"ok",
|
|
19875
|
+
"id",
|
|
19876
|
+
"state"
|
|
19877
|
+
],
|
|
19878
|
+
"additionalProperties": true
|
|
19879
|
+
}
|
|
19880
|
+
},
|
|
19881
|
+
sourceLocation: {
|
|
19882
|
+
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19883
|
+
"line": 272,
|
|
19884
|
+
"column": 9
|
|
19885
|
+
}
|
|
19886
|
+
},
|
|
19887
|
+
"teamPresets/isPresetMember": {
|
|
19888
|
+
service: "teamPresetsToolCatalog",
|
|
19889
|
+
description: "Read preset ownership for a card without loading or resuming its Agent.",
|
|
19890
|
+
invocation: { kind: "direct" },
|
|
19891
|
+
parameters: [{
|
|
19892
|
+
name: "sessionId",
|
|
19893
|
+
description: "the card's real child Session identity.",
|
|
19894
|
+
source: "json",
|
|
19895
|
+
codec: {
|
|
19896
|
+
mode: "strict",
|
|
19897
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/isPresetMember:sessionId",
|
|
19898
|
+
create: dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0$schema,
|
|
19899
|
+
jsonSchema: { "type": "string" }
|
|
19900
|
+
},
|
|
19901
|
+
strictCodec: {
|
|
19902
|
+
mode: "strict",
|
|
19903
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/isPresetMember:sessionId",
|
|
19904
|
+
create: dsh_agent_team_presets_teamPresets_isPresetMember_parameter_0_strict$schema,
|
|
19905
|
+
jsonSchema: { "type": "string" }
|
|
19906
|
+
}
|
|
19907
|
+
}],
|
|
19908
|
+
result: {
|
|
19909
|
+
mode: "strict",
|
|
19910
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/isPresetMember:result",
|
|
19911
|
+
create: dsh_agent_team_presets_teamPresets_isPresetMember_result$schema,
|
|
19912
|
+
description: "whether this plugin recorded creation of that exact child.",
|
|
19913
|
+
jsonSchema: { "type": "boolean" }
|
|
19914
|
+
},
|
|
19915
|
+
sourceLocation: {
|
|
19916
|
+
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19917
|
+
"line": 229,
|
|
19918
|
+
"column": 9
|
|
19919
|
+
}
|
|
19920
|
+
},
|
|
19696
19921
|
"teamPresets/roster": {
|
|
19697
19922
|
service: "teamPresetsToolCatalog",
|
|
19698
19923
|
description: "List the preset members one Session's Team has summoned. Progressive disclosure: the header control is absent until this answers at least one member, so an unsummoned Team adds nothing to the session chrome.",
|
|
@@ -19792,7 +20017,74 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19792
20017
|
},
|
|
19793
20018
|
sourceLocation: {
|
|
19794
20019
|
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
19795
|
-
"line":
|
|
20020
|
+
"line": 219,
|
|
20021
|
+
"column": 9
|
|
20022
|
+
}
|
|
20023
|
+
},
|
|
20024
|
+
"teamPresets/uninstallCardPatch": {
|
|
20025
|
+
service: "teamPresetsToolCatalog",
|
|
20026
|
+
description: "Restore one target's published browser bundle from this plugin's backup.",
|
|
20027
|
+
invocation: { kind: "direct" },
|
|
20028
|
+
parameters: [{
|
|
20029
|
+
name: "id",
|
|
20030
|
+
description: "the target identity from {@link cardPatches}.",
|
|
20031
|
+
source: "json",
|
|
20032
|
+
codec: {
|
|
20033
|
+
mode: "strict",
|
|
20034
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/uninstallCardPatch:id",
|
|
20035
|
+
create: dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0$schema,
|
|
20036
|
+
jsonSchema: { "type": "string" }
|
|
20037
|
+
},
|
|
20038
|
+
strictCodec: {
|
|
20039
|
+
mode: "strict",
|
|
20040
|
+
typeSymbol: "dsh-agent-team-presets#teamPresets/uninstallCardPatch:id",
|
|
20041
|
+
create: dsh_agent_team_presets_teamPresets_uninstallCardPatch_parameter_0_strict$schema,
|
|
20042
|
+
jsonSchema: { "type": "string" }
|
|
20043
|
+
}
|
|
20044
|
+
}],
|
|
20045
|
+
result: {
|
|
20046
|
+
mode: "strict",
|
|
20047
|
+
typeSymbol: "dsh-agent-team-presets/types#CardPatchResult",
|
|
20048
|
+
create: dsh_agent_team_presets_teamPresets_uninstallCardPatch_result$schema,
|
|
20049
|
+
description: "the outcome, or a refusal naming why nothing changed.",
|
|
20050
|
+
jsonSchema: {
|
|
20051
|
+
"type": "object",
|
|
20052
|
+
"properties": {
|
|
20053
|
+
"ok": {
|
|
20054
|
+
"type": "boolean",
|
|
20055
|
+
"description": "Whether the bundle file was replaced."
|
|
20056
|
+
},
|
|
20057
|
+
"id": {
|
|
20058
|
+
"type": "string",
|
|
20059
|
+
"description": "The target that was acted on."
|
|
20060
|
+
},
|
|
20061
|
+
"state": {
|
|
20062
|
+
"type": "string",
|
|
20063
|
+
"enum": [
|
|
20064
|
+
"absent",
|
|
20065
|
+
"unsupported",
|
|
20066
|
+
"pristine",
|
|
20067
|
+
"patched",
|
|
20068
|
+
"foreign"
|
|
20069
|
+
],
|
|
20070
|
+
"description": "Bundle state after the attempt; unchanged when it was refused."
|
|
20071
|
+
},
|
|
20072
|
+
"detail": {
|
|
20073
|
+
"type": "string",
|
|
20074
|
+
"description": "Why nothing changed, or what an operator should know about a success."
|
|
20075
|
+
}
|
|
20076
|
+
},
|
|
20077
|
+
"required": [
|
|
20078
|
+
"ok",
|
|
20079
|
+
"id",
|
|
20080
|
+
"state"
|
|
20081
|
+
],
|
|
20082
|
+
"additionalProperties": true
|
|
20083
|
+
}
|
|
20084
|
+
},
|
|
20085
|
+
sourceLocation: {
|
|
20086
|
+
"file": "packages/experimental/agent-team-presets/src/tool-catalog.ts",
|
|
20087
|
+
"line": 288,
|
|
19796
20088
|
"column": 9
|
|
19797
20089
|
}
|
|
19798
20090
|
},
|
|
@@ -22577,6 +22869,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22577
22869
|
current: "Current chat",
|
|
22578
22870
|
"memberStatus.running": "Running",
|
|
22579
22871
|
"memberStatus.inactive": "Inactive",
|
|
22872
|
+
presetMemberBadge: "Preset",
|
|
22873
|
+
presetMemberBadgeHint: "Created from an Agent Team preset",
|
|
22580
22874
|
composerTitle: "Team",
|
|
22581
22875
|
composerNone: "No preset",
|
|
22582
22876
|
composerHint: "Apply one Team preset to this session.",
|
|
@@ -22625,6 +22919,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22625
22919
|
skillsDescriptionPlaceholder: "When should this method apply?",
|
|
22626
22920
|
skillsRoot: "Private library",
|
|
22627
22921
|
skillsRefresh: "Refresh",
|
|
22922
|
+
tabLinks: "Integrations",
|
|
22923
|
+
patchIntro: "These optional patches mark the subagents a Team created on another plugin's cards. Each patch replaces that plugin's installed browser bundle with one built from the same source plus a small registration service; the original is kept so the change can be undone.",
|
|
22924
|
+
patchUnavailable: "This session cannot read the integrations state.",
|
|
22925
|
+
patchStateAbsent: "not installed",
|
|
22926
|
+
patchStateUnsupported: "version not supported",
|
|
22927
|
+
patchStatePristine: "not patched",
|
|
22928
|
+
patchStatePatched: "patched",
|
|
22929
|
+
patchStateForeign: "modified by something else",
|
|
22930
|
+
patchActive: "active",
|
|
22931
|
+
patchSupported: "Patch built for",
|
|
22932
|
+
patchInstalledVersion: "Installed version",
|
|
22933
|
+
patchSource: "Built from",
|
|
22934
|
+
patchPendingHint: "Written. The page is loading the new module; this row turns active within a second. If it stays like this, reload the page.",
|
|
22935
|
+
patchInstall: "Install patch",
|
|
22936
|
+
patchUninstall: "Remove patch",
|
|
22937
|
+
patchWorking: "Working…",
|
|
22938
|
+
patchApplying: "Backing up the published bundle and writing the replacement…",
|
|
22939
|
+
patchWaiting: "Waiting for the page to load the new module…",
|
|
22940
|
+
patchInstallTitle: "Install this patch?",
|
|
22941
|
+
patchInstallBody: "The target plugin's installed browser bundle is replaced by this plugin's build. The original is backed up first, and Remove patch restores it. No restart is needed: the running page reloads that plugin in place.",
|
|
22942
|
+
patchUninstallTitle: "Remove this patch?",
|
|
22943
|
+
patchUninstallBody: "The published browser bundle is restored from this plugin's backup, and the backup is then deleted. No restart is needed: the running page drops the replacement in place.",
|
|
22944
|
+
patchPackage: "Package",
|
|
22945
|
+
patchFile: "File replaced",
|
|
22946
|
+
patchInstalledOk: "Patch installed.",
|
|
22947
|
+
patchRemovedOk: "Patch removed.",
|
|
22948
|
+
patchRefused: "Nothing changed.",
|
|
22628
22949
|
skillsScan: "Scan import folder",
|
|
22629
22950
|
skillsScanHint: "Folder path:",
|
|
22630
22951
|
skillsScanSummary: "Scanned {scanned}: imported {imported}, already present {existing}, refused {invalid}.",
|
|
@@ -22887,6 +23208,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22887
23208
|
current: "当前会话",
|
|
22888
23209
|
"memberStatus.running": "运行中",
|
|
22889
23210
|
"memberStatus.inactive": "未运行",
|
|
23211
|
+
presetMemberBadge: "预设",
|
|
23212
|
+
presetMemberBadgeHint: "由团队预设创建的子代理",
|
|
22890
23213
|
composerTitle: "团队",
|
|
22891
23214
|
composerNone: "不加载预设",
|
|
22892
23215
|
composerHint: "为本会话启用一个团队预设。",
|
|
@@ -22935,6 +23258,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22935
23258
|
skillsDescriptionPlaceholder: "这个方法在什么情况下适用?",
|
|
22936
23259
|
skillsRoot: "私有库目录",
|
|
22937
23260
|
skillsRefresh: "刷新",
|
|
23261
|
+
tabLinks: "插件联动",
|
|
23262
|
+
patchIntro: "这些可选补丁让其他插件的子代理卡片标出由团队预设创建的子代理。每个补丁用「同一份源码 + 一个很小的注册服务」重建该插件已安装的浏览器包并替换它,原包会被保留,因此随时可以撤回。",
|
|
23263
|
+
patchUnavailable: "当前会话无法读取插件联动状态。",
|
|
23264
|
+
patchStateAbsent: "未安装",
|
|
23265
|
+
patchStateUnsupported: "版本不支持",
|
|
23266
|
+
patchStatePristine: "未打补丁",
|
|
23267
|
+
patchStatePatched: "已打补丁",
|
|
23268
|
+
patchStateForeign: "已被其他改动修改",
|
|
23269
|
+
patchActive: "已生效",
|
|
23270
|
+
patchSupported: "适配版本",
|
|
23271
|
+
patchInstalledVersion: "已安装版本",
|
|
23272
|
+
patchSource: "构建来源",
|
|
23273
|
+
patchPendingHint: "已写入。页面正在加载新模块,约一秒后本行会变为「已生效」;若一直停在此状态,请刷新页面。",
|
|
23274
|
+
patchInstall: "安装补丁",
|
|
23275
|
+
patchUninstall: "卸载补丁",
|
|
23276
|
+
patchWorking: "处理中…",
|
|
23277
|
+
patchApplying: "正在备份原包并写入替换包…",
|
|
23278
|
+
patchWaiting: "等待页面加载新模块…",
|
|
23279
|
+
patchInstallTitle: "确定安装该补丁?",
|
|
23280
|
+
patchInstallBody: "目标插件已安装的浏览器包会被替换为本插件的构建产物。替换前会先备份原包,「卸载补丁」可将其还原。无需重启:当前页面会就地重新加载该插件。",
|
|
23281
|
+
patchUninstallTitle: "确定卸载该补丁?",
|
|
23282
|
+
patchUninstallBody: "将从本插件的备份还原目标插件发布时的浏览器包,并删除该备份。无需重启:当前页面会就地卸载该替换。",
|
|
23283
|
+
patchPackage: "目标插件",
|
|
23284
|
+
patchFile: "被替换的文件",
|
|
23285
|
+
patchInstalledOk: "补丁已安装。",
|
|
23286
|
+
patchRemovedOk: "补丁已卸载。",
|
|
23287
|
+
patchRefused: "未做任何修改。",
|
|
22938
23288
|
skillsScan: "扫描导入目录",
|
|
22939
23289
|
skillsScanHint: "目录路径:",
|
|
22940
23290
|
skillsScanSummary: "已检查 {scanned} 个:新增 {imported},已存在 {existing},无法导入 {invalid}。",
|
|
@@ -23146,10 +23496,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23146
23496
|
}
|
|
23147
23497
|
|
|
23148
23498
|
|
|
23149
|
-
const key$
|
|
23499
|
+
const key$5 = "dsh-agent-team-presets:client/ComposerTeamSelect.module.css";
|
|
23150
23500
|
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/ComposerTeamSelect.module.css\"]")) {
|
|
23151
23501
|
const style = document.createElement("style");
|
|
23152
|
-
style.dataset.teamPresetsStyle = key$
|
|
23502
|
+
style.dataset.teamPresetsStyle = key$5;
|
|
23153
23503
|
style.textContent = ".Q4LFCW_popover,.Q4LFCW_popover *,.Q4LFCW_popover :before,.Q4LFCW_popover :after,.Q4LFCW_dock,.Q4LFCW_dock *,.Q4LFCW_dock :before,.Q4LFCW_dock :after{box-sizing:border-box}.Q4LFCW_wrap{display:inline-flex;position:relative}.Q4LFCW_trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:160px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;outline:none;align-items:center;gap:4px;padding:0 4px 0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.Q4LFCW_triggerMember{max-width:240px}.Q4LFCW_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.Q4LFCW_trigger:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}.Q4LFCW_trigger:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}.Q4LFCW_triggerIcon{flex:none;display:inline-flex}.Q4LFCW_triggerIcon svg{width:14px;height:14px}.Q4LFCW_triggerLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Q4LFCW_accentDot{border-radius:50%;flex:none;width:8px;height:8px}.Q4LFCW_failure{text-overflow:ellipsis;white-space:nowrap;max-width:220px;color:var(--dsw-alias-state-warn-label);font-size:11px;line-height:17px;overflow:hidden}.Q4LFCW_dock{--team-popover-width:min(268px, calc(100vw - 76px));width:var(--team-popover-width);z-index:40;align-items:flex-end;display:flex;position:absolute;bottom:40px;left:0}.Q4LFCW_popover{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);background:rgb(from var(--dsw-specific-menu,var(--dsw-alias-bg-layer-3)) r g b / 1);border:1px solid var(--dsw-alias-border-l3);width:100%;box-shadow:var(--dsw-elevation-prominent);border-radius:13px;flex-direction:column;gap:8px;max-height:calc(100dvh - 120px);padding:12px;display:flex;position:relative;overflow:hidden}.Q4LFCW_memberPanel{width:var(--team-popover-width);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l3);max-height:360px;box-shadow:var(--dsw-elevation-prominent);border-radius:13px;flex-direction:column;gap:2px;padding:10px;display:flex;position:absolute;bottom:0;left:calc(100% + 8px);overflow:auto}.Q4LFCW_memberPanelLeft{left:auto;right:calc(100% + 8px)}.Q4LFCW_memberPanelOverlay{width:auto;max-height:46vh;bottom:calc(100% + 8px);left:0;right:0}@media (width<=720px){.Q4LFCW_memberPanel,.Q4LFCW_memberPanelLeft,.Q4LFCW_memberPanelOverlay{width:auto;max-height:46vh;bottom:calc(100% + 8px);left:0;right:0}}.Q4LFCW_panelHead{justify-content:space-between;align-items:baseline;gap:8px;padding:0 4px 4px;display:flex}.Q4LFCW_panelTitle{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:550}.Q4LFCW_panelTeam{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary);font-size:11px;overflow:hidden}.Q4LFCW_panelSection{color:var(--dsw-alias-label-tertiary);padding:6px 4px 2px;font-size:11px}.Q4LFCW_panelRow{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;flex-direction:column;gap:2px;padding:7px 8px;display:flex}.Q4LFCW_panelRow:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.Q4LFCW_panelRow:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}.Q4LFCW_panelRow:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}.Q4LFCW_panelRowActive{background:var(--dsw-alias-interactive-bg-active)}.Q4LFCW_panelRowHead{align-items:center;gap:6px;min-width:0;display:flex}.Q4LFCW_panelDot{background:var(--dsw-alias-label-dimmed);border-radius:50%;flex:none;width:7px;height:7px}.Q4LFCW_panelName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12.5px;font-weight:500;overflow:hidden}.Q4LFCW_panelBadge{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-secondary);border-radius:6px;flex:none;margin-left:auto;padding:1px 6px;font-size:10px;line-height:15px}.Q4LFCW_panelRoute{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.Q4LFCW_panelSkillTags{flex-wrap:wrap;gap:4px;min-width:0;margin-top:2px;display:flex}.Q4LFCW_panelSkillTag{white-space:nowrap;border:1px solid #0000;border-radius:6px;padding:0 6px;font-size:11px;line-height:17px}.Q4LFCW_panelDesc{-webkit-line-clamp:2;color:var(--dsw-alias-label-tertiary);-webkit-box-orient:vertical;font-size:11px;line-height:16px;display:-webkit-box;overflow:hidden}.Q4LFCW_panelEmpty{color:var(--dsw-alias-label-secondary);padding:6px 8px;font-size:11.5px}.Q4LFCW_panelHint{border-top:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-tertiary);margin-top:4px;padding:6px 4px 2px;font-size:10.5px;line-height:15px}.Q4LFCW_popHead{justify-content:space-between;align-items:center;font-size:13px;font-weight:550;display:flex}.Q4LFCW_popClose{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:2px 4px;font-size:12px}.Q4LFCW_popSearch{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:100%;max-width:100%;color:var(--dsw-alias-label-primary);border-radius:9px;outline:none;padding:7px 10px;font-size:13px}.Q4LFCW_popFilters{flex-direction:column;gap:6px;display:flex}.Q4LFCW_popFilterRow{align-items:center;gap:8px;min-width:0;display:flex}.Q4LFCW_popSelect{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-2);min-width:0;height:26px;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 6px;font-size:12px;line-height:16px}.Q4LFCW_popChips{box-sizing:border-box;flex-wrap:wrap;gap:4px;display:flex}.Q4LFCW_popChip{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:7px;padding:6px 10px;font-size:12px}.Q4LFCW_popChipActive{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary)}.Q4LFCW_popList{box-sizing:border-box;flex-direction:column;flex:auto;min-height:0;max-height:200px;display:flex;overflow:auto}.Q4LFCW_popGroup{color:var(--dsw-alias-label-secondary);padding:6px 8px 2px;font-size:11px}.Q4LFCW_popOption{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;padding:8px 9px;display:block}.Q4LFCW_popOption:hover{background:var(--dsw-alias-interactive-bg-hover)}.Q4LFCW_popOptionActive{background:var(--dsw-alias-interactive-bg-active);font-weight:550}.Q4LFCW_popOptionName{font-size:13px;display:block}.Q4LFCW_popOptionSub{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:11px;display:block;overflow:hidden}.Q4LFCW_popEmpty{color:var(--dsw-alias-label-secondary);text-align:center;padding:14px 8px;font-size:12.5px}.Q4LFCW_popFilterLabel{color:var(--dsw-alias-label-secondary);align-self:center;margin-right:2px;font-size:12px}";
|
|
23154
23504
|
document.head.appendChild(style);
|
|
23155
23505
|
}
|
|
@@ -23758,10 +24108,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
23758
24108
|
}
|
|
23759
24109
|
|
|
23760
24110
|
|
|
23761
|
-
const key$
|
|
24111
|
+
const key$4 = "dsh-agent-team-presets:client/TeamRosterAction.module.css";
|
|
23762
24112
|
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/TeamRosterAction.module.css\"]")) {
|
|
23763
24113
|
const style = document.createElement("style");
|
|
23764
|
-
style.dataset.teamPresetsStyle = key$
|
|
24114
|
+
style.dataset.teamPresetsStyle = key$4;
|
|
23765
24115
|
style.textContent = ".VMYYEq_root{position:relative}.VMYYEq_trigger{anchor-name:var(--dsh-team-roster-anchor,--dsh-team-fallback);min-height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;align-items:center;gap:5px;padding:3px 7px;font-size:12px;display:inline-flex}.VMYYEq_trigger:focus-visible{color:var(--dsw-alias-label-primary)}@media (hover:hover){.VMYYEq_trigger:hover{color:var(--dsw-alias-label-primary)}}@container (width<=480px){.VMYYEq_triggerLabel{display:none}}.VMYYEq_count{color:var(--dsw-alias-label-caption);font-variant-numeric:tabular-nums;font-size:12px;font-weight:400;line-height:16px}.VMYYEq_panel{position-anchor:var(--dsh-team-roster-anchor,--dsh-team-fallback);top:calc(anchor(bottom) + 5px);left:anchor(left);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);z-index:100;box-sizing:border-box;width:min(500px,100vw - 32px);max-height:min(680px, calc(100vh - 32px), var(--dsh-anchored-max-height,100vh));--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);max-width:var(--dsh-anchored-max-width,none);border:0;border-radius:12px;flex-direction:column;padding:8px 2px 0;display:flex;position:fixed;overflow:hidden}.VMYYEq_panel:before{content:\"\";z-index:-1;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);border-radius:12px;position:absolute;inset:0}.VMYYEq_panelCompact{width:min(320px,100vw - 32px)}.VMYYEq_panelCompact .VMYYEq_roster{grid-template-columns:minmax(0,1fr)}.VMYYEq_body{--dsh-scrollbar-track-margin:8px;scrollbar-gutter:stable;flex:auto;min-height:0;padding:0 9px 16px 14px;overflow-y:auto}.VMYYEq_taskTitle{align-items:center;gap:8px;display:flex}.VMYYEq_taskTitle strong{font-size:13px;font-weight:500}.VMYYEq_panel h3{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;margin:16px 0 8px 4px;font-size:13px;font-weight:500;display:flex}.VMYYEq_body section:first-of-type h3{margin-top:8px}.VMYYEq_roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.VMYYEq_member{--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);min-width:0;box-shadow:var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;border:0;border-radius:8px;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.VMYYEq_member:disabled,.VMYYEq_memberStatic{cursor:default}.VMYYEq_memberCurrent{--dsw-elevation-stroke-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 40%, transparent);box-shadow:var(--dsw-elevation-stroke-color), inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-business-primary) 40%, transparent)}.VMYYEq_member:not(:disabled):focus-visible{--dsw-elevation-stroke-color:var(--dsw-alias-border-l3);box-shadow:var(--dsw-elevation-panel)}@media (hover:hover){.VMYYEq_member:not(:disabled):hover{--dsw-elevation-stroke-color:var(--dsw-alias-border-l3);box-shadow:var(--dsw-elevation-panel)}}.VMYYEq_memberDot{flex:none;align-items:center;height:1lh;display:inline-flex}.VMYYEq_inactiveIcon{color:var(--dsw-alias-label-tertiary)}.VMYYEq_memberText{flex-direction:column;min-width:0;display:flex}.VMYYEq_memberName{align-items:center;gap:5px;min-width:0;display:inline-flex}.VMYYEq_memberNameText,.VMYYEq_memberText small{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.VMYYEq_memberModel{display:none}.VMYYEq_member:focus-visible .VMYYEq_memberModel{display:inline}@media (hover:hover){.VMYYEq_member:hover .VMYYEq_memberModel{display:inline}}.VMYYEq_currentTag{text-overflow:ellipsis;flex:0 999 auto;min-width:0;padding:0 4px;font-size:10px;line-height:15px;display:inline-block;overflow:hidden}.VMYYEq_memberText small,.VMYYEq_meta{color:var(--dsw-alias-label-tertiary);font-size:11px}.VMYYEq_diagnostic,.VMYYEq_error,.VMYYEq_warning{color:var(--dsw-alias-state-error-primary)}.VMYYEq_tasks{flex-direction:column;gap:7px;display:flex}.VMYYEq_emptyNotice{color:var(--dsw-alias-label-tertiary);margin:16px 0 0 4px;font-size:12px}.VMYYEq_task{border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:9px;padding:11px 13px}.VMYYEq_taskState{color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;margin-left:auto;font-size:11px;display:inline-flex}.VMYYEq_task p{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;margin:5px 0;font-size:12px;line-height:18px}.VMYYEq_clampedDescription{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.VMYYEq_expandToggle{float:right;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;gap:2px;margin-left:10px;padding:0;font-size:11px;line-height:20px;display:inline-flex}.VMYYEq_expandToggle:focus-visible{color:var(--dsw-alias-label-primary)}@media (hover:hover){.VMYYEq_expandToggle:hover{color:var(--dsw-alias-label-primary)}}.VMYYEq_expandToggle svg{transition:transform .12s}.VMYYEq_expandToggleOpen{transform:rotate(180deg)}.VMYYEq_meta{line-height:20px}.VMYYEq_meta>span{margin-right:10px}.VMYYEq_notice,.VMYYEq_error{align-items:center;gap:6px;padding:9px;font-size:12px;display:flex}@media (hover:none){.VMYYEq_memberModel{display:inline}}";
|
|
23766
24116
|
document.head.appendChild(style);
|
|
23767
24117
|
}
|
|
@@ -24132,6 +24482,92 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
24132
24482
|
}
|
|
24133
24483
|
|
|
24134
24484
|
|
|
24485
|
+
const key$3 = "dsh-agent-team-presets:client/agent-card-badges.module.css";
|
|
24486
|
+
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/agent-card-badges.module.css\"]")) {
|
|
24487
|
+
const style = document.createElement("style");
|
|
24488
|
+
style.dataset.teamPresetsStyle = key$3;
|
|
24489
|
+
style.textContent = ".FCVkAW_badge{border:1px solid var(--dsw-alias-border-l2);min-width:0;max-width:6em;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);white-space:nowrap;text-overflow:ellipsis;vertical-align:middle;border-radius:4px;flex:0 auto;align-items:center;padding:0 4px;font-size:10px;font-weight:500;line-height:14px;display:inline-flex;overflow:hidden}";
|
|
24490
|
+
document.head.appendChild(style);
|
|
24491
|
+
}
|
|
24492
|
+
var agent_card_badges_module_css_default = { "badge": "FCVkAW_badge" };
|
|
24493
|
+
|
|
24494
|
+
|
|
24495
|
+
/**
|
|
24496
|
+
* Decide whether a card shows the tag.
|
|
24497
|
+
*
|
|
24498
|
+
* A card is reused by the target when its node is reused or its position
|
|
24499
|
+
* changes, so an answer about the PREVIOUS Session must never paint the next
|
|
24500
|
+
* one: the identity has to match as well as the answer being positive.
|
|
24501
|
+
* @param answer - the last resolved ownership answer, if any.
|
|
24502
|
+
* @param sessionId - the Session the card currently stands for.
|
|
24503
|
+
* @returns whether the tag belongs on this card right now.
|
|
24504
|
+
*/
|
|
24505
|
+
function showsPresetBadge(answer, sessionId) {
|
|
24506
|
+
return answer !== void 0 && answer.sessionId === sessionId && answer.managed;
|
|
24507
|
+
}
|
|
24508
|
+
/** Inline text stays empty until durable creation identity is confirmed. */
|
|
24509
|
+
function PresetMemberBadge({ sessionId, read, t }) {
|
|
24510
|
+
const [answer, setAnswer] = (0, react.useState)();
|
|
24511
|
+
(0, react.useEffect)(() => {
|
|
24512
|
+
let active = true;
|
|
24513
|
+
read(sessionId).then((managed) => {
|
|
24514
|
+
if (active) setAnswer({
|
|
24515
|
+
sessionId,
|
|
24516
|
+
managed
|
|
24517
|
+
});
|
|
24518
|
+
}, (error) => {
|
|
24519
|
+
if (active) console.warn("[team-presets] could not read card ownership:", error);
|
|
24520
|
+
});
|
|
24521
|
+
return () => {
|
|
24522
|
+
active = false;
|
|
24523
|
+
};
|
|
24524
|
+
}, [sessionId, read]);
|
|
24525
|
+
if (!showsPresetBadge(answer, sessionId)) return null;
|
|
24526
|
+
return (0, react_jsx_runtime.jsx)("span", {
|
|
24527
|
+
className: agent_card_badges_module_css_default.badge,
|
|
24528
|
+
title: t("presetMemberBadgeHint"),
|
|
24529
|
+
children: t("presetMemberBadge")
|
|
24530
|
+
});
|
|
24531
|
+
}
|
|
24532
|
+
/**
|
|
24533
|
+
* Bind each adapter independently. Missing targets leave only a pending Cordis
|
|
24534
|
+
* injection; their removal releases the registration and its mounted content.
|
|
24535
|
+
* The target packages are deliberately absent from dsh.client.inject and imports.
|
|
24536
|
+
* @param ctx - the original plugin context, before creating fixed injection scopes.
|
|
24537
|
+
*/
|
|
24538
|
+
function registerAgentCardBadgeAdapters(ctx) {
|
|
24539
|
+
const scopes = ["contextAgentCardBadges", "betterSidebarAgentCardBadges"].map((service) => ctx.inject([
|
|
24540
|
+
"remote.teamPresets",
|
|
24541
|
+
"locale",
|
|
24542
|
+
service
|
|
24543
|
+
], (scope) => {
|
|
24544
|
+
const registry = scope[service];
|
|
24545
|
+
if (registry.version !== 1) {
|
|
24546
|
+
console.warn(`[team-presets] unsupported ${service} version:`, registry.version);
|
|
24547
|
+
return;
|
|
24548
|
+
}
|
|
24549
|
+
const read = async (sessionId) => {
|
|
24550
|
+
const result = await scope.remote.teamPresets.isPresetMember(sessionId);
|
|
24551
|
+
if (!result.ok) throw new Error(result.error.message);
|
|
24552
|
+
return result.value;
|
|
24553
|
+
};
|
|
24554
|
+
const t = scope.locale.bind(NS);
|
|
24555
|
+
const Component = (props) => (0, react_jsx_runtime.jsx)(PresetMemberBadge, {
|
|
24556
|
+
...props,
|
|
24557
|
+
read,
|
|
24558
|
+
t
|
|
24559
|
+
});
|
|
24560
|
+
scope.effect(() => registry.register({
|
|
24561
|
+
id: "dsh-agent-team-presets",
|
|
24562
|
+
Component
|
|
24563
|
+
}), `agent-team-presets: ${service}`);
|
|
24564
|
+
}));
|
|
24565
|
+
return async () => {
|
|
24566
|
+
await Promise.all(scopes.map((scope) => scope.dispose()));
|
|
24567
|
+
};
|
|
24568
|
+
}
|
|
24569
|
+
|
|
24570
|
+
|
|
24135
24571
|
/**
|
|
24136
24572
|
* Accent colors this plugin publishes to the Agent Teams roster.
|
|
24137
24573
|
*
|
|
@@ -26314,10 +26750,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26314
26750
|
}
|
|
26315
26751
|
|
|
26316
26752
|
|
|
26317
|
-
const key$
|
|
26753
|
+
const key$2 = "dsh-agent-team-presets:client/TeamPresetsSection.module.css";
|
|
26318
26754
|
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/TeamPresetsSection.module.css\"]")) {
|
|
26319
26755
|
const style = document.createElement("style");
|
|
26320
|
-
style.dataset.teamPresetsStyle = key$
|
|
26756
|
+
style.dataset.teamPresetsStyle = key$2;
|
|
26321
26757
|
style.textContent = "._628ArG_section{--tp-accent-violet:#8d6bff;min-height:100%;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex}._628ArG_page{flex-direction:column;gap:10px;max-width:520px;padding-bottom:8px;display:flex}._628ArG_pageHead{flex-direction:column;gap:2px;display:flex}._628ArG_crumb{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;align-self:flex-start;align-items:center;gap:4px;padding:0;font-size:12px;line-height:18px;display:inline-flex}._628ArG_crumb:hover{color:var(--dsw-alias-label-primary)}._628ArG_title{margin:0;font-size:15px;font-weight:500;line-height:22px}._628ArG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._628ArG_empty{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}._628ArG_sectionTitle{color:var(--dsw-alias-label-secondary);padding-top:2px;font-size:12px;line-height:18px}._628ArG_tabs{border-bottom:1px solid var(--dsw-alias-border-l2);gap:6px;margin-bottom:10px;display:flex}._628ArG_actionRow{gap:8px;display:flex}._628ArG_toolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:0;display:flex}._628ArG_toolbarGroup{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_resultsHead{flex-direction:column;gap:2px;margin:0 0 8px;display:flex}._628ArG_resultCount{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_resultNote{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:17px}._628ArG_dialogCopy{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;margin:0;font-size:13px;line-height:20px}._628ArG_dialogNote{color:var(--dsw-alias-label-tertiary);margin:10px 0 0;font-size:12px;line-height:18px}._628ArG_fileInput{display:none}._628ArG_conflict{flex-direction:column;gap:6px;display:flex}._628ArG_conflict+._628ArG_conflict{margin-top:16px}._628ArG_conflictLead{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._628ArG_conflictName{overflow-wrap:anywhere;font-size:13px;font-weight:500;line-height:18px}._628ArG_conflictMember{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;display:flex}._628ArG_choiceRow{flex-wrap:wrap;gap:12px;display:flex}._628ArG_choice{cursor:pointer;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}._628ArG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:10px;padding:10px 12px;display:flex}._628ArG_cardHead{justify-content:space-between;align-items:center;gap:8px;display:flex}._628ArG_cardTitle{font-size:13px;font-weight:500;line-height:20px}._628ArG_rows{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:17px;flex-direction:column;margin:0;padding:0;list-style:none;display:flex;overflow:hidden}._628ArG_rows>._628ArG_card{box-sizing:border-box;box-shadow:none;background:0 0;border:0;border-radius:0;flex-direction:row;align-items:center;gap:4px;min-height:64px;padding:6px 10px 6px 14px}._628ArG_rows>._628ArG_card:not(:last-child){border-bottom:1px solid var(--dsw-alias-border-l1)}._628ArG_rows>._628ArG_card:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_plainRows{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}._628ArG_plainRows>._628ArG_card{flex-direction:row;align-items:center;gap:4px;padding:8px 12px}._628ArG_entry{align-items:center;gap:4px;display:flex}._628ArG_entryRow,._628ArG_rowMain{min-width:0;color:inherit;font:inherit;text-align:left;border-radius:var(--dsw-radius-md);cursor:pointer;background:0 0;border:none;flex:auto;align-items:center;gap:8px;padding:4px 2px;display:flex}._628ArG_rowMain:hover,._628ArG_entryRow:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_rowText{flex-direction:column;flex:auto;min-width:0;display:flex}._628ArG_rowName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;overflow:hidden}._628ArG_rowMeta{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow:hidden}._628ArG_rowActions{flex:none;gap:2px;display:flex}._628ArG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;font-size:14px;line-height:18px}._628ArG_dot{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:10px;height:10px}._628ArG_field{flex-direction:column;gap:4px;min-width:0;display:flex}._628ArG_field>*{box-sizing:border-box;min-width:0;max-width:100%}._628ArG_field input,._628ArG_field textarea,._628ArG_field select{box-sizing:border-box;width:100%;min-width:0;max-width:100%}._628ArG_fieldLabel{color:var(--dsw-alias-label-secondary);margin:10px 0 4px;font-size:12px;line-height:18px;display:block}._628ArG_input{box-sizing:border-box;width:100%;max-width:100%}._628ArG_textInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:inherit;border-radius:8px;outline:none;padding:0 10px;font-size:13px}._628ArG_textInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}select._628ArG_select{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);background-color:var(--dsw-specific-input-major);width:100%;height:32px;color:inherit;font:inherit;appearance:none;cursor:pointer;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23818a96' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 10px center;background-repeat:no-repeat;border-radius:8px;padding:0 30px 0 10px;font-size:13px}select._628ArG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}select._628ArG_select:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._628ArG_toolGroup{flex-direction:column;gap:6px;min-width:0;display:flex}._628ArG_toolGroupHead{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._628ArG_toolGroupToggle{min-width:0;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;padding:0;display:flex}._628ArG_toolGroupCount{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}._628ArG_toolGrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:10px 12px;min-width:0;display:grid}._628ArG_toolCheckbox{align-items:flex-start;min-width:0}._628ArG_toolCheckbox>span{overflow-wrap:anywhere}._628ArG_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:17px}._628ArG_warn{color:var(--dsw-alias-state-warn-label);margin:0;font-size:11px;line-height:17px}._628ArG_select{border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;height:30px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:6px;padding:0 8px;font-size:12px;display:flex}select._628ArG_select:disabled{opacity:.5;cursor:default}._628ArG_selectLabel{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._628ArG_prompt{box-sizing:border-box;border-radius:var(--dsw-radius-lg);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-specific-input-major);width:100%;color:var(--dsw-alias-label-primary);font:inherit;resize:vertical;padding:8px;font-size:12px;line-height:18px}._628ArG_prompt:disabled{opacity:.6}._628ArG_swatches{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._628ArG_swatch,._628ArG_swatchNone{border:.5px solid var(--dsw-alias-settings-card-stroke);cursor:pointer;border-radius:50%;width:18px;height:18px;padding:0}._628ArG_swatch[aria-pressed=true],._628ArG_swatchNone[aria-pressed=true]{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}._628ArG_swatchNone{background:0 0}._628ArG_footer{background:var(--dsw-alias-bg-base);border-top:1px solid var(--dsw-alias-border-l1);justify-content:flex-end;align-items:center;gap:10px;margin-top:auto;padding:8px 0 6px;display:flex}._628ArG_footerNotes{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;margin-right:auto;padding:6px 10px;display:flex}._628ArG_footerActions{white-space:nowrap;flex-shrink:0;align-items:center;gap:10px;display:flex}._628ArG_footerNote{color:var(--dsw-alias-label-tertiary);background:0 0;border:0;padding:0;font-size:11px;line-height:17px}._628ArG_sepTitle{margin:18px 0 8px;font-size:13px;font-weight:550}._628ArG_skillGrid{grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:9px;margin:10px 0 13px;display:grid}._628ArG_skillCard input{width:16px;height:16px;accent-color:var(--dsw-alias-state-business-primary);flex:none;margin:0}._628ArG_skillCard{cursor:pointer;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-direction:column;gap:8px;min-width:0;min-height:128px;padding:11px;transition:border-color .15s,background .15s,box-shadow .15s;display:flex;position:relative}._628ArG_skillCard:hover{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 6%, var(--dsw-alias-settings-card-fill));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 38%, transparent)}._628ArG_skillCard:has(input:checked){background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, var(--dsw-alias-settings-card-fill));border-color:var(--dsw-alias-state-business-primary);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-business-primary) 45%, transparent)}._628ArG_skillCardTop{justify-content:space-between;align-items:flex-start;gap:6px;display:flex}._628ArG_skillCardName{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font-size:12px;font-weight:550;line-height:1.45}._628ArG_skillCardDesc{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.5;display:-webkit-box;overflow:hidden}._628ArG_skillCardTag{margin-top:auto}@media (width<=820px){._628ArG_skillGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}._628ArG_listToolbar{gap:8px;margin:0;display:flex}._628ArG_listSearch{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);min-width:0;color:var(--dsw-alias-label-primary);border-radius:9px;outline:none;flex:1;padding:8px 11px;font-size:13px}._628ArG_chipRow{flex-wrap:wrap;gap:4px;margin-bottom:8px;display:flex}._628ArG_chip{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border-radius:7px;padding:6px 10px;font-size:12px}._628ArG_chipActive{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary)}._628ArG_categoryPanel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:10px;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;padding:9px 10px;display:flex}._628ArG_categoryPill{border:1px solid var(--dsw-alias-border-l3);border-radius:999px;align-items:center;gap:4px;padding:2px 4px 2px 9px;font-size:12px;display:inline-flex}._628ArG_pillInput{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:92px;color:var(--dsw-alias-label-primary);border-radius:6px;padding:1px 6px;font-size:12px}._628ArG_panel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-settings-card-fill);border-radius:12px;margin:12px 0;padding:12px 14px}._628ArG_muted{color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.55}._628ArG_filters{flex-direction:column;gap:6px;display:flex}._628ArG_filterRow{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._628ArG_filterLabel{color:var(--dsw-alias-label-secondary);flex:none;min-width:32px;font-size:12px}._628ArG_addRow{align-items:center;gap:8px;margin:10px 0 12px;display:flex}._628ArG_addRow ._628ArG_textInput{flex:auto;width:auto;min-width:0}._628ArG_addRow>*{white-space:nowrap;flex:none}._628ArG_selectWrap{position:relative}._628ArG_selectValue{text-overflow:ellipsis;white-space:nowrap;padding-right:4px;display:block;overflow:hidden}._628ArG_selectPop{z-index:30;border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-3);background:rgb(from var(--dsw-specific-menu,var(--dsw-alias-bg-layer-3)) r g b / 1);box-shadow:var(--dsw-elevation-prominent);border-radius:10px;max-height:232px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow:auto}._628ArG_selectOption{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:0;border-radius:7px;padding:7px 10px;font-size:13px;display:block;overflow:hidden}._628ArG_selectOption:hover{background:var(--dsw-alias-interactive-bg-hover)}._628ArG_selectOptionActive{background:var(--dsw-alias-interactive-bg-active);font-weight:550}._628ArG_rowsEmpty{text-align:center;color:var(--dsw-alias-label-secondary);padding:22px 14px;font-size:12.5px;list-style:none}._628ArG_emptyPage{text-align:center;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l3);border-radius:9px;margin:12px 0;padding:18px;font-size:13px}._628ArG_originTag{white-space:nowrap;border:1px solid #0000;border-radius:5px;align-self:flex-start;align-items:center;padding:0 6px;font-size:11px;line-height:18px;display:inline-flex}._628ArG_originBuiltin{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 34%, transparent)}._628ArG_originCustom{color:color-mix(in srgb, var(--tp-accent-violet) 62%, var(--dsw-alias-label-primary));background:color-mix(in srgb, var(--tp-accent-violet) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--tp-accent-violet) 34%, transparent)}._628ArG_originOverride{color:var(--dsw-alias-state-warn-label);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 34%, transparent)}";
|
|
26322
26758
|
document.head.appendChild(style);
|
|
26323
26759
|
}
|
|
@@ -28086,10 +28522,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28086
28522
|
}
|
|
28087
28523
|
|
|
28088
28524
|
|
|
28089
|
-
const key = "dsh-agent-team-presets:client/TeamSkillsView.module.css";
|
|
28525
|
+
const key$1 = "dsh-agent-team-presets:client/TeamSkillsView.module.css";
|
|
28090
28526
|
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/TeamSkillsView.module.css\"]")) {
|
|
28091
28527
|
const style = document.createElement("style");
|
|
28092
|
-
style.dataset.teamPresetsStyle = key;
|
|
28528
|
+
style.dataset.teamPresetsStyle = key$1;
|
|
28093
28529
|
style.textContent = "._5P1EWa_page,._5P1EWa_page *,._5P1EWa_page :before,._5P1EWa_page :after{box-sizing:border-box}._5P1EWa_page{--tp-accent-violet:#8d6bff;flex-direction:column;gap:4px;display:flex}._5P1EWa_crumb{color:var(--dsw-alias-label-secondary);text-align:left;cursor:pointer;background:0 0;border:0;padding:2px 0;font-size:13px}._5P1EWa_crumb:hover{color:var(--dsw-alias-label-primary)}._5P1EWa_headRow{justify-content:space-between;align-items:flex-start;gap:14px;display:flex}._5P1EWa_headText{min-width:0}._5P1EWa_titleActions{flex-shrink:0;gap:8px;padding-top:4px;display:flex}._5P1EWa_title{margin:2px 0 0;font-size:21px;font-weight:550}._5P1EWa_sub{color:var(--dsw-alias-label-secondary);margin:0 0 4px;font-size:13px}._5P1EWa_actions{flex-wrap:wrap;gap:9px;margin:10px 0;display:flex}._5P1EWa_info{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);border-radius:10px;gap:8px;margin:8px 0;padding:10px 12px;font-size:12.5px;line-height:1.55;display:flex}._5P1EWa_infoError{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, var(--dsw-alias-bg-layer-1));border-color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 38%, transparent)}._5P1EWa_toolbar{flex-wrap:wrap;gap:9px;margin:10px 0;display:flex}._5P1EWa_search{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);min-width:190px;color:inherit;border-radius:9px;outline:none;flex:1;padding:8px 12px}._5P1EWa_search:focus{border-color:var(--dsw-alias-state-business-primary)}._5P1EWa_segment{flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:8px;display:flex}._5P1EWa_active{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary);font-weight:550}._5P1EWa_rowlist{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-2);border-radius:17px;overflow:hidden}._5P1EWa_row{background:var(--dsw-alias-bg-layer-2);text-align:left;cursor:pointer;border:0;align-items:center;gap:11px;width:100%;min-height:64px;padding:12px 14px;display:flex}._5P1EWa_row:not(:last-child){border-bottom:1px solid var(--dsw-alias-border-l1)}._5P1EWa_row:hover{background:var(--dsw-alias-interactive-bg-hover)}._5P1EWa_dot{background:var(--dsw-alias-state-business-primary);border-radius:5px;flex-shrink:0;width:12px;height:12px}._5P1EWa_dotCustom{background:var(--tp-accent-violet)}._5P1EWa_main{flex:1;min-width:0;display:block}._5P1EWa_rowTitle{flex-wrap:wrap;align-items:center;gap:6px;font-size:14px;font-weight:520;display:flex}._5P1EWa_rowSub{color:var(--dsw-alias-label-secondary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;display:block;overflow:hidden}._5P1EWa_chev{color:var(--dsw-alias-label-tertiary);font-size:18px;font-weight:300}._5P1EWa_tag{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border-radius:5px;padding:0 5px;font-size:11px;font-weight:400}._5P1EWa_tagOrigin{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 34%, transparent);color:var(--dsw-alias-state-business-primary)}._5P1EWa_tagWarn{color:var(--dsw-alias-state-warn-label);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 34%, transparent)}._5P1EWa_tagOk{background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 14%, var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 34%, transparent)}._5P1EWa_pills{flex-wrap:wrap;gap:6px;margin:6px 0 12px;display:flex}._5P1EWa_sectionTitle{margin:18px 0 8px;font-size:13px;font-weight:550}._5P1EWa_fileArea{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-2);border-radius:11px;min-height:260px;display:flex;overflow:hidden}._5P1EWa_fileTree{border-right:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);flex-shrink:0;width:200px;max-width:43%;padding:9px 8px;overflow:auto}._5P1EWa_fileTree button{text-align:left;width:100%;color:var(--dsw-alias-label-secondary);cursor:pointer;word-break:break-all;background:0 0;border:0;border-radius:6px;padding:7px;font-size:12px;display:block}._5P1EWa_fileTree button:hover{background:var(--dsw-alias-interactive-bg-hover)}._5P1EWa_fileTree button._5P1EWa_active{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary);font-weight:550}._5P1EWa_fileEditor{flex-direction:column;flex:1;min-width:0;display:flex}._5P1EWa_fileTop{color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);justify-content:space-between;gap:8px;padding:7px 10px;font-size:12px;display:flex}._5P1EWa_code{resize:vertical;background:var(--dsw-alias-markdown-code-block);width:100%;min-height:220px;color:inherit;border:0;outline:none;flex:1;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.55}._5P1EWa_panel{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-2);border-radius:12px;margin:12px 0;padding:12px 14px}._5P1EWa_panelTitle{margin-bottom:6px;font-size:13px;font-weight:550}._5P1EWa_bindRow{align-items:center;gap:10px;padding:8px 0;display:flex}._5P1EWa_bindRow:not(:last-child){border-bottom:1px solid var(--dsw-alias-border-l1)}._5P1EWa_mini{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:4px 6px;font-size:12px}._5P1EWa_mini:hover{color:var(--dsw-alias-label-primary);text-decoration:underline}._5P1EWa_muted{color:var(--dsw-alias-label-secondary);font-size:12.5px}._5P1EWa_empty{text-align:center;color:var(--dsw-alias-label-tertiary);border:1px dashed var(--dsw-alias-border-l3);border-radius:9px;padding:18px;font-size:13px}._5P1EWa_message{margin-top:10px;font-size:12.5px}._5P1EWa_messageFailed{color:var(--dsw-alias-state-error-primary)}._5P1EWa_dialogBackdrop{background:var(--dsw-alias-bg-mask-2);z-index:40;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}._5P1EWa_dialog{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);width:min(510px,100%);max-height:85vh;box-shadow:var(--dsw-elevation-prominent);border-radius:15px;padding:20px;overflow:auto}._5P1EWa_dialog h2{margin:0 0 9px;font-size:17px;font-weight:570}._5P1EWa_dialogActions{justify-content:flex-end;gap:8px;margin-top:16px;display:flex}._5P1EWa_field{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-specific-input-major);width:100%;color:inherit;border-radius:9px;margin:4px 0 10px;padding:8px 11px}._5P1EWa_label{color:var(--dsw-alias-label-secondary);font-size:12.5px}._5P1EWa_scan{border:1px solid var(--dsw-alias-border-l3);border-radius:8px;flex-direction:column;gap:6px;margin:10px 0;padding:10px 12px;font-size:12.5px;display:flex}._5P1EWa_scanHead{font-weight:600}._5P1EWa_scanList{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}._5P1EWa_scanRow{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._5P1EWa_scanFolder{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}";
|
|
28094
28530
|
document.head.appendChild(style);
|
|
28095
28531
|
}
|
|
@@ -28849,6 +29285,241 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28849
29285
|
}
|
|
28850
29286
|
|
|
28851
29287
|
|
|
29288
|
+
const key = "dsh-agent-team-presets:client/CardPatchView.module.css";
|
|
29289
|
+
if (typeof document !== "undefined" && !document.querySelector("style[data-team-presets-style=\"dsh-agent-team-presets:client/CardPatchView.module.css\"]")) {
|
|
29290
|
+
const style = document.createElement("style");
|
|
29291
|
+
style.dataset.teamPresetsStyle = key;
|
|
29292
|
+
style.textContent = ".mB0vYq_page{flex-direction:column;gap:12px;padding:4px 0 24px;display:flex}.mB0vYq_intro{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:1.6}.mB0vYq_empty{color:var(--dsw-alias-label-secondary);margin:24px 0;font-size:13px}.mB0vYq_rows{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.mB0vYq_row{--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);box-shadow:var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border-radius:8px;flex-direction:column;gap:8px;padding:14px 16px;display:flex}.mB0vYq_rowHead{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.mB0vYq_packageName{font-size:13px;font-weight:600}.mB0vYq_badge{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);border-radius:4px;padding:0 6px;font-size:11px;line-height:18px}.mB0vYq_badge[data-state=patched]{border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary)}.mB0vYq_badge[data-state=unsupported],.mB0vYq_badge[data-state=foreign]{border-color:var(--dsw-alias-state-warn-label);color:var(--dsw-alias-state-warn-label)}.mB0vYq_live{color:var(--dsw-alias-state-business-primary);font-size:11px}.mB0vYq_meta{grid-template-columns:max-content minmax(0,1fr);gap:2px 12px;margin:0;font-size:12px;display:grid}.mB0vYq_meta dt{color:var(--dsw-alias-label-tertiary)}.mB0vYq_meta dd{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-secondary);margin:0;overflow:hidden}.mB0vYq_detail{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.mB0vYq_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.mB0vYq_actions{gap:8px;display:flex}.mB0vYq_result{color:var(--dsw-alias-state-business-primary);margin:0;font-size:12px}.mB0vYq_resultFailed{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.mB0vYq_progress{color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;margin:0;font-size:12px;display:flex}";
|
|
29293
|
+
document.head.appendChild(style);
|
|
29294
|
+
}
|
|
29295
|
+
var CardPatchView_module_css_default = {
|
|
29296
|
+
"actions": "mB0vYq_actions",
|
|
29297
|
+
"badge": "mB0vYq_badge",
|
|
29298
|
+
"detail": "mB0vYq_detail",
|
|
29299
|
+
"empty": "mB0vYq_empty",
|
|
29300
|
+
"hint": "mB0vYq_hint",
|
|
29301
|
+
"intro": "mB0vYq_intro",
|
|
29302
|
+
"live": "mB0vYq_live",
|
|
29303
|
+
"meta": "mB0vYq_meta",
|
|
29304
|
+
"packageName": "mB0vYq_packageName",
|
|
29305
|
+
"page": "mB0vYq_page",
|
|
29306
|
+
"progress": "mB0vYq_progress",
|
|
29307
|
+
"result": "mB0vYq_result",
|
|
29308
|
+
"resultFailed": "mB0vYq_resultFailed",
|
|
29309
|
+
"row": "mB0vYq_row",
|
|
29310
|
+
"rowHead": "mB0vYq_rowHead",
|
|
29311
|
+
"rows": "mB0vYq_rows"
|
|
29312
|
+
};
|
|
29313
|
+
|
|
29314
|
+
|
|
29315
|
+
/**
|
|
29316
|
+
* The card-patch integrations page: one row per supported target plugin, what
|
|
29317
|
+
* its installed bundle currently is, and the one action that state allows.
|
|
29318
|
+
*
|
|
29319
|
+
* The page never decides whether a patch is applicable — the Host classifies the
|
|
29320
|
+
* installed bytes — and it never claims a patch is working on its own: a row is
|
|
29321
|
+
* "active" only when the running browser actually has the replacement's service,
|
|
29322
|
+
* which happens after a restart and a reload, not when the file is written.
|
|
29323
|
+
*/
|
|
29324
|
+
/** Locale key naming one bundle state. */
|
|
29325
|
+
const STATE_KEYS = {
|
|
29326
|
+
absent: "patchStateAbsent",
|
|
29327
|
+
unsupported: "patchStateUnsupported",
|
|
29328
|
+
pristine: "patchStatePristine",
|
|
29329
|
+
patched: "patchStatePatched",
|
|
29330
|
+
foreign: "patchStateForeign"
|
|
29331
|
+
};
|
|
29332
|
+
/**
|
|
29333
|
+
* Render the integrations page.
|
|
29334
|
+
* @param props - the controller and the page copy.
|
|
29335
|
+
* @returns the target rows and the confirmation dialog.
|
|
29336
|
+
*/
|
|
29337
|
+
function CardPatchView({ controller, t }) {
|
|
29338
|
+
const [state, setState] = (0, react.useState)(controller.getSnapshot());
|
|
29339
|
+
const [pending, setPending] = (0, react.useState)(void 0);
|
|
29340
|
+
(0, react.useEffect)(() => {
|
|
29341
|
+
setState(controller.getSnapshot());
|
|
29342
|
+
return controller.subscribe(() => {
|
|
29343
|
+
setState(controller.getSnapshot());
|
|
29344
|
+
});
|
|
29345
|
+
}, [controller]);
|
|
29346
|
+
if (state.status === "unavailable") return (0, react_jsx_runtime.jsx)("p", {
|
|
29347
|
+
className: CardPatchView_module_css_default.empty,
|
|
29348
|
+
role: "status",
|
|
29349
|
+
children: t("patchUnavailable")
|
|
29350
|
+
});
|
|
29351
|
+
if (state.status === "loading") return (0, react_jsx_runtime.jsx)("p", {
|
|
29352
|
+
className: CardPatchView_module_css_default.empty,
|
|
29353
|
+
role: "status",
|
|
29354
|
+
children: t("loading")
|
|
29355
|
+
});
|
|
29356
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
29357
|
+
className: CardPatchView_module_css_default.page,
|
|
29358
|
+
children: [
|
|
29359
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
29360
|
+
className: CardPatchView_module_css_default.intro,
|
|
29361
|
+
children: t("patchIntro")
|
|
29362
|
+
}),
|
|
29363
|
+
state.result !== void 0 && (0, react_jsx_runtime.jsx)(ResultLine, {
|
|
29364
|
+
result: state.result,
|
|
29365
|
+
t
|
|
29366
|
+
}),
|
|
29367
|
+
(0, react_jsx_runtime.jsx)("ul", {
|
|
29368
|
+
className: CardPatchView_module_css_default.rows,
|
|
29369
|
+
children: state.targets.map((target) => (0, react_jsx_runtime.jsx)(Row, {
|
|
29370
|
+
target,
|
|
29371
|
+
live: state.live.includes(target.id),
|
|
29372
|
+
busy: state.busy === target.id,
|
|
29373
|
+
phase: state.busy === target.id ? state.phase : void 0,
|
|
29374
|
+
t,
|
|
29375
|
+
onAct: (action) => {
|
|
29376
|
+
setPending({
|
|
29377
|
+
target,
|
|
29378
|
+
action
|
|
29379
|
+
});
|
|
29380
|
+
}
|
|
29381
|
+
}, target.id))
|
|
29382
|
+
}),
|
|
29383
|
+
pending === void 0 ? null : (0, react_jsx_runtime.jsx)(ConfirmDialog, {
|
|
29384
|
+
target: pending.target,
|
|
29385
|
+
action: pending.action,
|
|
29386
|
+
t,
|
|
29387
|
+
onCancel: () => {
|
|
29388
|
+
setPending(void 0);
|
|
29389
|
+
},
|
|
29390
|
+
onConfirm: () => {
|
|
29391
|
+
const { target, action } = pending;
|
|
29392
|
+
setPending(void 0);
|
|
29393
|
+
action === "install" ? controller.install(target.id) : controller.uninstall(target.id);
|
|
29394
|
+
}
|
|
29395
|
+
})
|
|
29396
|
+
]
|
|
29397
|
+
});
|
|
29398
|
+
}
|
|
29399
|
+
/**
|
|
29400
|
+
* Report the last install or restore.
|
|
29401
|
+
* @param props - the outcome and the page copy.
|
|
29402
|
+
* @returns the status line.
|
|
29403
|
+
*/
|
|
29404
|
+
function ResultLine({ result, t }) {
|
|
29405
|
+
const text = result.ok ? t(result.state === "patched" ? "patchInstalledOk" : "patchRemovedOk") : t("patchRefused");
|
|
29406
|
+
return (0, react_jsx_runtime.jsxs)("p", {
|
|
29407
|
+
className: result.ok ? CardPatchView_module_css_default.result : CardPatchView_module_css_default.resultFailed,
|
|
29408
|
+
role: "status",
|
|
29409
|
+
children: [text, result.detail === void 0 ? null : (0, react_jsx_runtime.jsxs)("span", {
|
|
29410
|
+
className: CardPatchView_module_css_default.detail,
|
|
29411
|
+
children: [" — ", result.detail]
|
|
29412
|
+
})]
|
|
29413
|
+
});
|
|
29414
|
+
}
|
|
29415
|
+
/**
|
|
29416
|
+
* Render one target with its state and the action that state allows.
|
|
29417
|
+
* @param props - the row facts and the action callback.
|
|
29418
|
+
* @returns the row.
|
|
29419
|
+
*/
|
|
29420
|
+
function Row({ target, live, busy, phase, t, onAct }) {
|
|
29421
|
+
const action = target.state === "pristine" ? "install" : target.state === "patched" ? "uninstall" : void 0;
|
|
29422
|
+
const waiting = target.state === "patched" && !live;
|
|
29423
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
29424
|
+
className: CardPatchView_module_css_default.row,
|
|
29425
|
+
children: [
|
|
29426
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
29427
|
+
className: CardPatchView_module_css_default.rowHead,
|
|
29428
|
+
children: [
|
|
29429
|
+
(0, react_jsx_runtime.jsx)("code", {
|
|
29430
|
+
className: CardPatchView_module_css_default.packageName,
|
|
29431
|
+
children: target.packageName
|
|
29432
|
+
}),
|
|
29433
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
29434
|
+
className: CardPatchView_module_css_default.badge,
|
|
29435
|
+
"data-state": target.state,
|
|
29436
|
+
children: t(STATE_KEYS[target.state])
|
|
29437
|
+
}),
|
|
29438
|
+
target.state === "patched" && live ? (0, react_jsx_runtime.jsx)("span", {
|
|
29439
|
+
className: CardPatchView_module_css_default.live,
|
|
29440
|
+
children: t("patchActive")
|
|
29441
|
+
}) : null
|
|
29442
|
+
]
|
|
29443
|
+
}),
|
|
29444
|
+
(0, react_jsx_runtime.jsxs)("dl", {
|
|
29445
|
+
className: CardPatchView_module_css_default.meta,
|
|
29446
|
+
children: [
|
|
29447
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchSupported") }),
|
|
29448
|
+
(0, react_jsx_runtime.jsx)("dd", { children: target.supportedVersion }),
|
|
29449
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchInstalledVersion") }),
|
|
29450
|
+
(0, react_jsx_runtime.jsx)("dd", { children: target.installedVersion ?? "—" }),
|
|
29451
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchSource") }),
|
|
29452
|
+
(0, react_jsx_runtime.jsx)("dd", {
|
|
29453
|
+
className: CardPatchView_module_css_default.source,
|
|
29454
|
+
children: target.source
|
|
29455
|
+
})
|
|
29456
|
+
]
|
|
29457
|
+
}),
|
|
29458
|
+
target.detail === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
29459
|
+
className: CardPatchView_module_css_default.detail,
|
|
29460
|
+
children: target.detail
|
|
29461
|
+
}),
|
|
29462
|
+
busy && phase !== void 0 ? (0, react_jsx_runtime.jsxs)("p", {
|
|
29463
|
+
className: CardPatchView_module_css_default.progress,
|
|
29464
|
+
role: "status",
|
|
29465
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
|
|
29466
|
+
state: "ongoing",
|
|
29467
|
+
size: 13
|
|
29468
|
+
}), phase === "applying" ? t("patchApplying") : t("patchWaiting")]
|
|
29469
|
+
}) : null,
|
|
29470
|
+
waiting ? (0, react_jsx_runtime.jsx)("p", {
|
|
29471
|
+
className: CardPatchView_module_css_default.hint,
|
|
29472
|
+
children: t("patchPendingHint")
|
|
29473
|
+
}) : null,
|
|
29474
|
+
action === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
29475
|
+
className: CardPatchView_module_css_default.actions,
|
|
29476
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29477
|
+
variant: action === "install" ? "primary" : "outline",
|
|
29478
|
+
disabled: busy,
|
|
29479
|
+
onClick: () => {
|
|
29480
|
+
onAct(action);
|
|
29481
|
+
},
|
|
29482
|
+
children: busy ? t("patchWorking") : t(action === "install" ? "patchInstall" : "patchUninstall")
|
|
29483
|
+
})
|
|
29484
|
+
})
|
|
29485
|
+
]
|
|
29486
|
+
});
|
|
29487
|
+
}
|
|
29488
|
+
/**
|
|
29489
|
+
* Ask before touching another plugin's installed files.
|
|
29490
|
+
* @param props - the row, the action, and the two outcomes.
|
|
29491
|
+
* @returns the dialog.
|
|
29492
|
+
*/
|
|
29493
|
+
function ConfirmDialog({ target, action, t, onCancel, onConfirm }) {
|
|
29494
|
+
return (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
29495
|
+
open: true,
|
|
29496
|
+
onClose: onCancel,
|
|
29497
|
+
title: t(action === "install" ? "patchInstallTitle" : "patchUninstallTitle"),
|
|
29498
|
+
closeLabel: t("close"),
|
|
29499
|
+
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29500
|
+
variant: "outline",
|
|
29501
|
+
onClick: onCancel,
|
|
29502
|
+
children: t("cancel")
|
|
29503
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
29504
|
+
variant: "primary",
|
|
29505
|
+
onClick: onConfirm,
|
|
29506
|
+
children: t(action === "install" ? "patchInstall" : "patchUninstall")
|
|
29507
|
+
})] }),
|
|
29508
|
+
children: [(0, react_jsx_runtime.jsx)("p", { children: t(action === "install" ? "patchInstallBody" : "patchUninstallBody") }), (0, react_jsx_runtime.jsxs)("dl", {
|
|
29509
|
+
className: CardPatchView_module_css_default.meta,
|
|
29510
|
+
children: [
|
|
29511
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchPackage") }),
|
|
29512
|
+
(0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: target.packageName }) }),
|
|
29513
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchFile") }),
|
|
29514
|
+
(0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: `${target.packageName}/lib/client.js` }) }),
|
|
29515
|
+
(0, react_jsx_runtime.jsx)("dt", { children: t("patchSupported") }),
|
|
29516
|
+
(0, react_jsx_runtime.jsx)("dd", { children: target.supportedVersion })
|
|
29517
|
+
]
|
|
29518
|
+
})]
|
|
29519
|
+
});
|
|
29520
|
+
}
|
|
29521
|
+
|
|
29522
|
+
|
|
28852
29523
|
/**
|
|
28853
29524
|
* Browser file plumbing for the fixed Team preset format: read one chosen
|
|
28854
29525
|
* document, and offer one Team as a download.
|
|
@@ -28999,23 +29670,63 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28999
29670
|
if (tab === "skills" && props.skills !== void 0) return (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
29000
29671
|
role: "tablist",
|
|
29001
29672
|
className: TeamPresetsSection_module_css_default.tabs,
|
|
29002
|
-
children: [
|
|
29003
|
-
|
|
29004
|
-
|
|
29005
|
-
|
|
29006
|
-
|
|
29007
|
-
|
|
29008
|
-
|
|
29009
|
-
|
|
29010
|
-
|
|
29011
|
-
|
|
29012
|
-
|
|
29013
|
-
|
|
29014
|
-
|
|
29673
|
+
children: [
|
|
29674
|
+
(0, react_jsx_runtime.jsx)(TabButton, {
|
|
29675
|
+
active: false,
|
|
29676
|
+
onClick: () => {
|
|
29677
|
+
setTab("teams");
|
|
29678
|
+
},
|
|
29679
|
+
children: t("tabTeams")
|
|
29680
|
+
}),
|
|
29681
|
+
(0, react_jsx_runtime.jsx)(TabButton, {
|
|
29682
|
+
active: true,
|
|
29683
|
+
onClick: () => {
|
|
29684
|
+
setTab("skills");
|
|
29685
|
+
},
|
|
29686
|
+
children: t("tabSkills")
|
|
29687
|
+
}),
|
|
29688
|
+
props.cardPatches === void 0 ? null : (0, react_jsx_runtime.jsx)(TabButton, {
|
|
29689
|
+
active: false,
|
|
29690
|
+
onClick: () => {
|
|
29691
|
+
setTab("links");
|
|
29692
|
+
},
|
|
29693
|
+
children: t("tabLinks")
|
|
29694
|
+
})
|
|
29695
|
+
]
|
|
29015
29696
|
}), (0, react_jsx_runtime.jsx)(TeamSkillsView, {
|
|
29016
29697
|
controller: props.skills,
|
|
29017
29698
|
t
|
|
29018
29699
|
})] });
|
|
29700
|
+
if (tab === "links" && props.cardPatches !== void 0) return (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
29701
|
+
role: "tablist",
|
|
29702
|
+
className: TeamPresetsSection_module_css_default.tabs,
|
|
29703
|
+
children: [
|
|
29704
|
+
(0, react_jsx_runtime.jsx)(TabButton, {
|
|
29705
|
+
active: false,
|
|
29706
|
+
onClick: () => {
|
|
29707
|
+
setTab("teams");
|
|
29708
|
+
},
|
|
29709
|
+
children: t("tabTeams")
|
|
29710
|
+
}),
|
|
29711
|
+
props.skills === void 0 ? null : (0, react_jsx_runtime.jsx)(TabButton, {
|
|
29712
|
+
active: false,
|
|
29713
|
+
onClick: () => {
|
|
29714
|
+
setTab("skills");
|
|
29715
|
+
},
|
|
29716
|
+
children: t("tabSkills")
|
|
29717
|
+
}),
|
|
29718
|
+
(0, react_jsx_runtime.jsx)(TabButton, {
|
|
29719
|
+
active: true,
|
|
29720
|
+
onClick: () => {
|
|
29721
|
+
setTab("links");
|
|
29722
|
+
},
|
|
29723
|
+
children: t("tabLinks")
|
|
29724
|
+
})
|
|
29725
|
+
]
|
|
29726
|
+
}), (0, react_jsx_runtime.jsx)(CardPatchView, {
|
|
29727
|
+
controller: props.cardPatches,
|
|
29728
|
+
t
|
|
29729
|
+
})] });
|
|
29019
29730
|
if (state.status !== "ready") {
|
|
29020
29731
|
const issue = state.formIssue === void 0 ? void 0 : t(FORM_ISSUE_KEYS[state.formIssue]);
|
|
29021
29732
|
return (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -29087,19 +29798,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29087
29798
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
29088
29799
|
role: "tablist",
|
|
29089
29800
|
className: TeamPresetsSection_module_css_default.tabs,
|
|
29090
|
-
children: [
|
|
29091
|
-
|
|
29092
|
-
|
|
29093
|
-
|
|
29094
|
-
|
|
29095
|
-
|
|
29096
|
-
|
|
29097
|
-
|
|
29098
|
-
|
|
29099
|
-
|
|
29100
|
-
|
|
29101
|
-
|
|
29102
|
-
|
|
29801
|
+
children: [
|
|
29802
|
+
(0, react_jsx_runtime.jsx)(TabButton, {
|
|
29803
|
+
active: tab === "teams",
|
|
29804
|
+
onClick: () => {
|
|
29805
|
+
setTab("teams");
|
|
29806
|
+
},
|
|
29807
|
+
children: t("tabTeams")
|
|
29808
|
+
}),
|
|
29809
|
+
props.skills === void 0 ? null : (0, react_jsx_runtime.jsx)(TabButton, {
|
|
29810
|
+
active: tab === "skills",
|
|
29811
|
+
onClick: () => {
|
|
29812
|
+
setTab("skills");
|
|
29813
|
+
},
|
|
29814
|
+
children: t("tabSkills")
|
|
29815
|
+
}),
|
|
29816
|
+
props.cardPatches === void 0 ? null : (0, react_jsx_runtime.jsx)(TabButton, {
|
|
29817
|
+
active: tab === "links",
|
|
29818
|
+
onClick: () => {
|
|
29819
|
+
setTab("links");
|
|
29820
|
+
},
|
|
29821
|
+
children: t("tabLinks")
|
|
29822
|
+
})
|
|
29823
|
+
]
|
|
29103
29824
|
}),
|
|
29104
29825
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
29105
29826
|
className: TeamPresetsSection_module_css_default.page,
|
|
@@ -29319,7 +30040,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29319
30040
|
* @param result - the wrapped answer.
|
|
29320
30041
|
* @returns the value, or the failure text.
|
|
29321
30042
|
*/
|
|
29322
|
-
function unwrap(result) {
|
|
30043
|
+
function unwrap$1(result) {
|
|
29323
30044
|
if (result.ok) return result.value;
|
|
29324
30045
|
throw new Error(result.error.message ?? "the Host refused the call");
|
|
29325
30046
|
}
|
|
@@ -29424,7 +30145,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29424
30145
|
failed: false
|
|
29425
30146
|
});
|
|
29426
30147
|
try {
|
|
29427
|
-
const answer = unwrap(await this.api().prepareImportFolder());
|
|
30148
|
+
const answer = unwrap$1(await this.api().prepareImportFolder());
|
|
29428
30149
|
if (!("path" in answer)) {
|
|
29429
30150
|
this.publish({
|
|
29430
30151
|
busy: false,
|
|
@@ -29491,7 +30212,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29491
30212
|
async refresh() {
|
|
29492
30213
|
this.publish({ status: this.state.library === void 0 ? "loading" : "ready" });
|
|
29493
30214
|
try {
|
|
29494
|
-
const library = unwrap(await this.api().library());
|
|
30215
|
+
const library = unwrap$1(await this.api().library());
|
|
29495
30216
|
const issue = library.issue;
|
|
29496
30217
|
if (issue !== void 0) {
|
|
29497
30218
|
this.publish({
|
|
@@ -29526,7 +30247,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29526
30247
|
selectedId: assetId,
|
|
29527
30248
|
detail: void 0
|
|
29528
30249
|
});
|
|
29529
|
-
const answer = unwrap(await this.api().detail(assetId));
|
|
30250
|
+
const answer = unwrap$1(await this.api().detail(assetId));
|
|
29530
30251
|
if (this.disposed || this.state.selectedId !== assetId) return;
|
|
29531
30252
|
if (!isDetail(answer)) {
|
|
29532
30253
|
this.publish({
|
|
@@ -29550,7 +30271,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29550
30271
|
fileText: void 0
|
|
29551
30272
|
});
|
|
29552
30273
|
try {
|
|
29553
|
-
const answer = unwrap(await this.api().readFile(assetId, path));
|
|
30274
|
+
const answer = unwrap$1(await this.api().readFile(assetId, path));
|
|
29554
30275
|
if (this.state.file !== path) return;
|
|
29555
30276
|
if ("text" in answer) this.publish({ fileText: answer.text });
|
|
29556
30277
|
else this.publish({
|
|
@@ -29573,7 +30294,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29573
30294
|
const assetId = this.state.selectedId;
|
|
29574
30295
|
if (assetId === void 0) return;
|
|
29575
30296
|
await this.run(async () => {
|
|
29576
|
-
const answer = unwrap(await this.api().writeFile(assetId, path, text));
|
|
30297
|
+
const answer = unwrap$1(await this.api().writeFile(assetId, path, text));
|
|
29577
30298
|
if (!isDetail(answer)) return answer.detail;
|
|
29578
30299
|
this.publish({ detail: answer });
|
|
29579
30300
|
await this.refresh();
|
|
@@ -29588,7 +30309,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29588
30309
|
*/
|
|
29589
30310
|
async create(skillId, description) {
|
|
29590
30311
|
await this.run(async () => {
|
|
29591
|
-
const answer = unwrap(await this.api().createSkill(skillId, description));
|
|
30312
|
+
const answer = unwrap$1(await this.api().createSkill(skillId, description));
|
|
29592
30313
|
if (!isDetail(answer)) return answer.detail;
|
|
29593
30314
|
this.publish({
|
|
29594
30315
|
detail: answer,
|
|
@@ -29609,7 +30330,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29609
30330
|
base64: encodeBase64(file.content)
|
|
29610
30331
|
}));
|
|
29611
30332
|
await this.run(async () => {
|
|
29612
|
-
const answer = unwrap(await this.api().importSkill(payload));
|
|
30333
|
+
const answer = unwrap$1(await this.api().importSkill(payload));
|
|
29613
30334
|
if (!isDetail(answer)) return answer.detail;
|
|
29614
30335
|
this.publish({
|
|
29615
30336
|
detail: answer,
|
|
@@ -29627,7 +30348,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29627
30348
|
*/
|
|
29628
30349
|
async scanImportFolder() {
|
|
29629
30350
|
await this.run(async () => {
|
|
29630
|
-
const answer = unwrap(await this.api().scanImportFolder());
|
|
30351
|
+
const answer = unwrap$1(await this.api().scanImportFolder());
|
|
29631
30352
|
if (!("entries" in answer)) {
|
|
29632
30353
|
this.publish({ scan: void 0 });
|
|
29633
30354
|
return answer.detail;
|
|
@@ -29643,7 +30364,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29643
30364
|
*/
|
|
29644
30365
|
async createOverride(skillId) {
|
|
29645
30366
|
await this.run(async () => {
|
|
29646
|
-
const answer = unwrap(await this.api().overrideSkill(skillId));
|
|
30367
|
+
const answer = unwrap$1(await this.api().overrideSkill(skillId));
|
|
29647
30368
|
if (!isDetail(answer)) return answer.detail;
|
|
29648
30369
|
this.publish({
|
|
29649
30370
|
detail: answer,
|
|
@@ -29659,7 +30380,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29659
30380
|
*/
|
|
29660
30381
|
async resetOverride(assetId) {
|
|
29661
30382
|
await this.run(async () => {
|
|
29662
|
-
const answer = unwrap(await this.api().resetSkill(assetId));
|
|
30383
|
+
const answer = unwrap$1(await this.api().resetSkill(assetId));
|
|
29663
30384
|
if (!isDetail(answer)) return answer.detail;
|
|
29664
30385
|
this.publish({ detail: answer });
|
|
29665
30386
|
await this.refresh();
|
|
@@ -29674,7 +30395,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29674
30395
|
async remove(assetId) {
|
|
29675
30396
|
let outcome;
|
|
29676
30397
|
await this.run(async () => {
|
|
29677
|
-
outcome = unwrap(await this.api().deleteAsset(assetId));
|
|
30398
|
+
outcome = unwrap$1(await this.api().deleteAsset(assetId));
|
|
29678
30399
|
await this.refresh();
|
|
29679
30400
|
if (!outcome.ok) return outcome.blockers.map((blocker) => `${blocker.kind}: ${blocker.detail}`).join("; ");
|
|
29680
30401
|
this.publish({
|
|
@@ -29693,7 +30414,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29693
30414
|
*/
|
|
29694
30415
|
async assignSkill(teamId, roleId, assetId) {
|
|
29695
30416
|
await this.run(async () => {
|
|
29696
|
-
const answer = unwrap(await this.api().assignRole(teamId, roleId, assetId));
|
|
30417
|
+
const answer = unwrap$1(await this.api().assignRole(teamId, roleId, assetId));
|
|
29697
30418
|
this.publish({ library: answer.library });
|
|
29698
30419
|
return answer.ok ? "assigned" : answer.detail;
|
|
29699
30420
|
});
|
|
@@ -29706,7 +30427,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29706
30427
|
*/
|
|
29707
30428
|
async unassignSkill(teamId, roleId, assetId) {
|
|
29708
30429
|
await this.run(async () => {
|
|
29709
|
-
this.publish({ library: unwrap(await this.api().unassignRole(teamId, roleId, assetId)) });
|
|
30430
|
+
this.publish({ library: unwrap$1(await this.api().unassignRole(teamId, roleId, assetId)) });
|
|
29710
30431
|
return "unassigned";
|
|
29711
30432
|
});
|
|
29712
30433
|
}
|
|
@@ -29719,7 +30440,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29719
30440
|
const assetId = this.state.selectedId;
|
|
29720
30441
|
if (assetId === void 0) return;
|
|
29721
30442
|
await this.run(async () => {
|
|
29722
|
-
const answer = unwrap(await this.api().assignRole(teamId, roleId, assetId));
|
|
30443
|
+
const answer = unwrap$1(await this.api().assignRole(teamId, roleId, assetId));
|
|
29723
30444
|
this.publish({ library: answer.library });
|
|
29724
30445
|
if (this.state.selectedId !== void 0) await this.select(this.state.selectedId);
|
|
29725
30446
|
return answer.ok ? "assigned" : answer.detail;
|
|
@@ -29732,7 +30453,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29732
30453
|
*/
|
|
29733
30454
|
async unassign(teamId, roleId) {
|
|
29734
30455
|
await this.run(async () => {
|
|
29735
|
-
const library = unwrap(await this.api().unassignRole(teamId, roleId));
|
|
30456
|
+
const library = unwrap$1(await this.api().unassignRole(teamId, roleId));
|
|
29736
30457
|
this.publish({ library });
|
|
29737
30458
|
if (this.state.selectedId !== void 0) await this.select(this.state.selectedId);
|
|
29738
30459
|
return "unassigned";
|
|
@@ -29741,7 +30462,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29741
30462
|
/** Restore official default skill bindings for built-in teams. */
|
|
29742
30463
|
async restoreBuiltinBindings(teamIds) {
|
|
29743
30464
|
await this.run(async () => {
|
|
29744
|
-
const library = unwrap(await this.api().restoreBuiltinBindings(teamIds ? [...teamIds] : void 0));
|
|
30465
|
+
const library = unwrap$1(await this.api().restoreBuiltinBindings(teamIds ? [...teamIds] : void 0));
|
|
29745
30466
|
this.publish({ library });
|
|
29746
30467
|
if (this.state.selectedId !== void 0) await this.select(this.state.selectedId);
|
|
29747
30468
|
return "restored-bindings";
|
|
@@ -29798,6 +30519,257 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29798
30519
|
}
|
|
29799
30520
|
|
|
29800
30521
|
|
|
30522
|
+
/**
|
|
30523
|
+
* Page state for the card-patch integrations page.
|
|
30524
|
+
*
|
|
30525
|
+
* The controller holds no rules of its own: it asks the Host what each target's
|
|
30526
|
+
* bundle is, asks it to install or restore one, and keeps the last answer. Every
|
|
30527
|
+
* refusal (an unsupported target version, a bundle somebody else already edited)
|
|
30528
|
+
* is displayed exactly as the Host described it, because only the Host can see
|
|
30529
|
+
* the installed bytes.
|
|
30530
|
+
*
|
|
30531
|
+
* It adds one fact the Host cannot know: whether the replacement is LIVE in this
|
|
30532
|
+
* browser. A patched bundle only registers its service after `dsh web` has been
|
|
30533
|
+
* restarted and the page reloaded, so "installed" and "active" are different
|
|
30534
|
+
* states and the page must not conflate them.
|
|
30535
|
+
* @module dsh-agent-team-presets/client/card-patches-controller
|
|
30536
|
+
*/
|
|
30537
|
+
/** How long the page may take to load or drop a replacement. */
|
|
30538
|
+
const SETTLE_TIMEOUT_MS = 6e3;
|
|
30539
|
+
/** How often that wait re-reads the registered services. */
|
|
30540
|
+
const SETTLE_POLL_MS = 250;
|
|
30541
|
+
/** Services a patched target registers, by target identity. */
|
|
30542
|
+
const SERVICES = {
|
|
30543
|
+
"dsh-context": "contextAgentCardBadges",
|
|
30544
|
+
"dsh-better-sidebar": "betterSidebarAgentCardBadges"
|
|
30545
|
+
};
|
|
30546
|
+
/**
|
|
30547
|
+
* Unwrap one Remote answer.
|
|
30548
|
+
* @param result - the wrapped answer.
|
|
30549
|
+
* @returns the value.
|
|
30550
|
+
* @throws when the transport itself failed.
|
|
30551
|
+
*/
|
|
30552
|
+
function unwrap(result) {
|
|
30553
|
+
if (result.ok) return result.value;
|
|
30554
|
+
throw new Error(result.error.message ?? "the Host refused the call");
|
|
30555
|
+
}
|
|
30556
|
+
/** The card-patch page state. */
|
|
30557
|
+
var CardPatchesController = class {
|
|
30558
|
+
ctx;
|
|
30559
|
+
state = {
|
|
30560
|
+
status: "loading",
|
|
30561
|
+
targets: [],
|
|
30562
|
+
busy: void 0,
|
|
30563
|
+
phase: void 0,
|
|
30564
|
+
result: void 0,
|
|
30565
|
+
live: []
|
|
30566
|
+
};
|
|
30567
|
+
/**
|
|
30568
|
+
* The Team presets Remote namespace, captured from the injection scope.
|
|
30569
|
+
*
|
|
30570
|
+
* A namespaced service resolves only for a context that declares it, so the
|
|
30571
|
+
* plugin's own context must never be used to read it: this field is the whole
|
|
30572
|
+
* read path, and a build without the namespace leaves the page unavailable.
|
|
30573
|
+
*/
|
|
30574
|
+
namespace;
|
|
30575
|
+
listeners = /* @__PURE__ */ new Set();
|
|
30576
|
+
settleTimeoutMs;
|
|
30577
|
+
settlePollMs;
|
|
30578
|
+
/**
|
|
30579
|
+
* @param ctx - the browser plugin context.
|
|
30580
|
+
* @param options - how long to wait for the page to apply a write.
|
|
30581
|
+
*/
|
|
30582
|
+
constructor(ctx, options = {}) {
|
|
30583
|
+
this.ctx = ctx;
|
|
30584
|
+
this.settleTimeoutMs = options.settleTimeoutMs ?? SETTLE_TIMEOUT_MS;
|
|
30585
|
+
this.settlePollMs = options.settlePollMs ?? SETTLE_POLL_MS;
|
|
30586
|
+
try {
|
|
30587
|
+
ctx.inject(["remote", "remote.teamPresets"], (scope) => {
|
|
30588
|
+
this.namespace = scope.remote.teamPresets;
|
|
30589
|
+
this.refresh(this.namespace);
|
|
30590
|
+
return () => {
|
|
30591
|
+
this.namespace = void 0;
|
|
30592
|
+
};
|
|
30593
|
+
});
|
|
30594
|
+
} catch (error) {
|
|
30595
|
+
this.state = {
|
|
30596
|
+
...this.state,
|
|
30597
|
+
status: "unavailable"
|
|
30598
|
+
};
|
|
30599
|
+
console.warn("[team-presets] card patch page is unavailable:", error);
|
|
30600
|
+
}
|
|
30601
|
+
}
|
|
30602
|
+
/** Current snapshot, stable between changes. */
|
|
30603
|
+
getSnapshot = () => this.state;
|
|
30604
|
+
/**
|
|
30605
|
+
* Subscribe to snapshot changes.
|
|
30606
|
+
* @param listener - called on every change.
|
|
30607
|
+
* @returns the unsubscribe function.
|
|
30608
|
+
*/
|
|
30609
|
+
subscribe = (listener) => {
|
|
30610
|
+
this.listeners.add(listener);
|
|
30611
|
+
return () => {
|
|
30612
|
+
this.listeners.delete(listener);
|
|
30613
|
+
};
|
|
30614
|
+
};
|
|
30615
|
+
/** Publish one new snapshot. */
|
|
30616
|
+
publish() {
|
|
30617
|
+
for (const listener of [...this.listeners]) listener();
|
|
30618
|
+
}
|
|
30619
|
+
/**
|
|
30620
|
+
* Read which targets' replacements this browser has registered.
|
|
30621
|
+
*
|
|
30622
|
+
* A target's service is the only proof the patch is in effect: the file swap
|
|
30623
|
+
* alone changes nothing until the server restarts and the page reloads.
|
|
30624
|
+
* @returns the live target identities, in catalog order.
|
|
30625
|
+
*/
|
|
30626
|
+
liveTargets() {
|
|
30627
|
+
return Object.entries(SERVICES).filter(([, service]) => this.ctx.get(service) !== void 0).map(([id]) => id);
|
|
30628
|
+
}
|
|
30629
|
+
/**
|
|
30630
|
+
* Re-read every target's installed state.
|
|
30631
|
+
* @param remote - the Team presets Remote namespace to read through.
|
|
30632
|
+
* @returns resolution after the snapshot was published.
|
|
30633
|
+
*/
|
|
30634
|
+
async refresh(remote = this.namespace) {
|
|
30635
|
+
if (remote === void 0) {
|
|
30636
|
+
this.state = {
|
|
30637
|
+
...this.state,
|
|
30638
|
+
status: "unavailable",
|
|
30639
|
+
live: this.liveTargets()
|
|
30640
|
+
};
|
|
30641
|
+
this.publish();
|
|
30642
|
+
return;
|
|
30643
|
+
}
|
|
30644
|
+
try {
|
|
30645
|
+
const targets = unwrap(await remote.cardPatches());
|
|
30646
|
+
this.state = {
|
|
30647
|
+
...this.state,
|
|
30648
|
+
status: "ready",
|
|
30649
|
+
targets,
|
|
30650
|
+
live: this.liveTargets()
|
|
30651
|
+
};
|
|
30652
|
+
} catch (error) {
|
|
30653
|
+
this.state = {
|
|
30654
|
+
...this.state,
|
|
30655
|
+
status: "unavailable",
|
|
30656
|
+
live: this.liveTargets()
|
|
30657
|
+
};
|
|
30658
|
+
console.warn("[team-presets] could not read card patch state:", error);
|
|
30659
|
+
}
|
|
30660
|
+
this.publish();
|
|
30661
|
+
}
|
|
30662
|
+
/**
|
|
30663
|
+
* Install one target's replacement, then re-read every row.
|
|
30664
|
+
* @param id - the target identity.
|
|
30665
|
+
* @returns resolution after the outcome was published.
|
|
30666
|
+
*/
|
|
30667
|
+
async install(id) {
|
|
30668
|
+
const namespace = this.namespace;
|
|
30669
|
+
if (namespace === void 0) return this.refuseMissingNamespace(id);
|
|
30670
|
+
await this.act(id, () => namespace.installCardPatch(id));
|
|
30671
|
+
}
|
|
30672
|
+
/**
|
|
30673
|
+
* Restore one target's published bundle, then re-read every row.
|
|
30674
|
+
* @param id - the target identity.
|
|
30675
|
+
* @returns resolution after the outcome was published.
|
|
30676
|
+
*/
|
|
30677
|
+
async uninstall(id) {
|
|
30678
|
+
const namespace = this.namespace;
|
|
30679
|
+
if (namespace === void 0) return this.refuseMissingNamespace(id);
|
|
30680
|
+
await this.act(id, () => namespace.uninstallCardPatch(id));
|
|
30681
|
+
}
|
|
30682
|
+
/**
|
|
30683
|
+
* Report a write that cannot start because this build has no Remote.
|
|
30684
|
+
* @param id - the target the reader asked to write.
|
|
30685
|
+
*/
|
|
30686
|
+
refuseMissingNamespace(id) {
|
|
30687
|
+
this.state = {
|
|
30688
|
+
...this.state,
|
|
30689
|
+
busy: void 0,
|
|
30690
|
+
phase: void 0,
|
|
30691
|
+
result: {
|
|
30692
|
+
ok: false,
|
|
30693
|
+
id,
|
|
30694
|
+
state: "absent",
|
|
30695
|
+
detail: "the Team presets Remote is not mounted in this session"
|
|
30696
|
+
}
|
|
30697
|
+
};
|
|
30698
|
+
this.publish();
|
|
30699
|
+
}
|
|
30700
|
+
/**
|
|
30701
|
+
* Run one write and publish its outcome.
|
|
30702
|
+
* @param id - the target being written.
|
|
30703
|
+
* @param run - the Remote call.
|
|
30704
|
+
* @returns resolution after the rows were re-read.
|
|
30705
|
+
*/
|
|
30706
|
+
async act(id, run) {
|
|
30707
|
+
this.state = {
|
|
30708
|
+
...this.state,
|
|
30709
|
+
busy: id,
|
|
30710
|
+
phase: "applying",
|
|
30711
|
+
result: void 0
|
|
30712
|
+
};
|
|
30713
|
+
this.publish();
|
|
30714
|
+
let result;
|
|
30715
|
+
try {
|
|
30716
|
+
result = unwrap(await run());
|
|
30717
|
+
} catch (error) {
|
|
30718
|
+
result = {
|
|
30719
|
+
ok: false,
|
|
30720
|
+
id,
|
|
30721
|
+
state: "absent",
|
|
30722
|
+
detail: String(error)
|
|
30723
|
+
};
|
|
30724
|
+
}
|
|
30725
|
+
this.state = {
|
|
30726
|
+
...this.state,
|
|
30727
|
+
busy: void 0,
|
|
30728
|
+
phase: result.ok ? "waiting" : void 0,
|
|
30729
|
+
result
|
|
30730
|
+
};
|
|
30731
|
+
this.publish();
|
|
30732
|
+
await this.refresh();
|
|
30733
|
+
if (result.ok) await this.settle(id, result.state === "patched");
|
|
30734
|
+
this.state = {
|
|
30735
|
+
...this.state,
|
|
30736
|
+
phase: void 0
|
|
30737
|
+
};
|
|
30738
|
+
this.publish();
|
|
30739
|
+
}
|
|
30740
|
+
/**
|
|
30741
|
+
* Wait for the page to load or drop one replacement, publishing each change.
|
|
30742
|
+
*
|
|
30743
|
+
* The Host republishes the bundle and the page swaps the plugin in place, so a
|
|
30744
|
+
* successful write becomes visible within a poll interval. Waiting here is what
|
|
30745
|
+
* lets the row say "active" on its own instead of asking the reader to reload.
|
|
30746
|
+
* @param id - the target that was written.
|
|
30747
|
+
* @param expected - whether its service should now be registered.
|
|
30748
|
+
* @returns resolution once the expectation holds or the budget expires.
|
|
30749
|
+
*/
|
|
30750
|
+
async settle(id, expected) {
|
|
30751
|
+
const deadline = Date.now() + this.settleTimeoutMs;
|
|
30752
|
+
for (;;) {
|
|
30753
|
+
const live = this.liveTargets();
|
|
30754
|
+
const settled = live.includes(id) === expected;
|
|
30755
|
+
this.state = {
|
|
30756
|
+
...this.state,
|
|
30757
|
+
live
|
|
30758
|
+
};
|
|
30759
|
+
this.publish();
|
|
30760
|
+
if (settled || Date.now() >= deadline) return;
|
|
30761
|
+
await new Promise((resolve) => {
|
|
30762
|
+
setTimeout(resolve, this.settlePollMs);
|
|
30763
|
+
});
|
|
30764
|
+
}
|
|
30765
|
+
}
|
|
30766
|
+
/** Release the page's listeners. */
|
|
30767
|
+
dispose() {
|
|
30768
|
+
this.listeners.clear();
|
|
30769
|
+
}
|
|
30770
|
+
};
|
|
30771
|
+
|
|
30772
|
+
|
|
29801
30773
|
/**
|
|
29802
30774
|
* Browser half of the Agent Team presets plugin: the Settings page that
|
|
29803
30775
|
* configures Teams and the composer control that selects one per Session.
|
|
@@ -29860,6 +30832,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29860
30832
|
async function applyUi(ctx) {
|
|
29861
30833
|
const disposeRemote = await ctx.remote.$mount(TYPERT_REMOTE);
|
|
29862
30834
|
const skills = new TeamSkillsController(ctx);
|
|
30835
|
+
const cardPatches = new CardPatchesController(ctx);
|
|
30836
|
+
const disposeCardBadges = registerAgentCardBadgeAdapters(ctx);
|
|
29863
30837
|
const ui = ctx.inject([
|
|
29864
30838
|
"remote.teamPresets",
|
|
29865
30839
|
"slots",
|
|
@@ -29869,16 +30843,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29869
30843
|
"remote.settings",
|
|
29870
30844
|
"sessions",
|
|
29871
30845
|
"uiWorkspace"
|
|
29872
|
-
], (scope) => registerUi(scope, skills));
|
|
30846
|
+
], (scope) => registerUi(scope, skills, cardPatches));
|
|
29873
30847
|
try {
|
|
29874
30848
|
await ui;
|
|
29875
30849
|
} catch (error) {
|
|
29876
30850
|
await ui.dispose();
|
|
30851
|
+
await disposeCardBadges();
|
|
29877
30852
|
await disposeRemote();
|
|
29878
30853
|
throw error;
|
|
29879
30854
|
}
|
|
29880
30855
|
return async () => {
|
|
29881
30856
|
await ui.dispose();
|
|
30857
|
+
await disposeCardBadges();
|
|
29882
30858
|
await disposeRemote();
|
|
29883
30859
|
};
|
|
29884
30860
|
}
|
|
@@ -29905,7 +30881,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29905
30881
|
});
|
|
29906
30882
|
};
|
|
29907
30883
|
}
|
|
29908
|
-
function registerUi(ctx, skills) {
|
|
30884
|
+
function registerUi(ctx, skills, cardPatches) {
|
|
29909
30885
|
const t = ctx.locale.bind(NS);
|
|
29910
30886
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
29911
30887
|
zh,
|
|
@@ -29915,6 +30891,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29915
30891
|
ctx.effect(() => () => {
|
|
29916
30892
|
skills.dispose();
|
|
29917
30893
|
}, "agent-team-presets: skills controller");
|
|
30894
|
+
ctx.effect(() => () => {
|
|
30895
|
+
cardPatches.dispose();
|
|
30896
|
+
}, "agent-team-presets: card patches controller");
|
|
29918
30897
|
ctx.effect(() => () => {
|
|
29919
30898
|
controller.dispose();
|
|
29920
30899
|
}, "agent-team-presets: form subscription");
|
|
@@ -29930,7 +30909,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29930
30909
|
locale: NS,
|
|
29931
30910
|
inject: () => ({
|
|
29932
30911
|
...controller.inject(),
|
|
29933
|
-
skills
|
|
30912
|
+
skills,
|
|
30913
|
+
cardPatches
|
|
29934
30914
|
})
|
|
29935
30915
|
}, TeamPresetsSection)), "agent-team-presets: settings page");
|
|
29936
30916
|
ctx.inject(["agentTeamAppearance"], (scope) => {
|