@eddyskywalker/dsh-chatgpt-subscription 0.55.0 → 0.56.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/CHANGELOG.md +14 -0
- package/README.md +148 -1268
- package/lib/client.js +242 -17
- package/lib/client.js.map +1 -1
- package/lib/index.js +157 -44
- package/lib/plan-mode.js +3 -7
- package/lib/tool-result-pruner.js +1 -1
- package/lib/types/client/locales-ru/index.d.ts +2 -3
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/minimax-code/commands-contract.d.ts +1 -1
- package/lib/types/client/subagent/SubagentCard.d.ts.map +1 -1
- package/lib/types/client/subagent/locales.d.ts +14 -2
- package/lib/types/client/subagent/locales.d.ts.map +1 -1
- package/lib/types/client/subagent/styles.d.ts +1 -1
- package/lib/types/client/subagent/styles.d.ts.map +1 -1
- package/lib/types/client/subagent/subagent-card-controller.d.ts +26 -3
- package/lib/types/client/subagent/subagent-card-controller.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/entry-plan-mode.d.ts +3 -7
- package/lib/types/entry-plan-mode.d.ts.map +1 -1
- package/lib/types/entry-tool-result-pruner.d.ts +1 -1
- package/lib/types/host/agent-preset.d.ts +5 -0
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- package/lib/types/host/common/llm-compat.d.ts +3 -1
- package/lib/types/host/common/llm-compat.d.ts.map +1 -1
- package/lib/types/host/kimi-code/repeat-breaker.d.ts +1 -1
- package/lib/types/host/plan-mode-cache-guard.d.ts.map +1 -1
- package/lib/types/host/preferences.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/subagent-model-authorization.d.ts +34 -16
- package/lib/types/host/subagent-model-authorization.d.ts.map +1 -1
- package/lib/types/host/subagent-route-audit.d.ts +6 -1
- package/lib/types/host/subagent-route-audit.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +19 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/preferences.d.ts +22 -1
- package/lib/types/shared/preferences.d.ts.map +1 -1
- package/package.json +46 -43
- package/presets/dispatch/README.md +6 -5
- package/presets/dispatch/agent.cordis.yml +18 -14
|
@@ -58,11 +58,15 @@ export declare const zh: {
|
|
|
58
58
|
readonly subagentChipGlobal: "全局默认 ({count})";
|
|
59
59
|
readonly subagentTargetGlobalHint: "正在编辑全局默认子代理模型列表;未单独配置专属列表的主代理将使用此列表。";
|
|
60
60
|
readonly subagentTargetOverrideStatus: "已为该主代理单独配置 {count} 个子代理模型";
|
|
61
|
+
readonly subagentTargetForkOnlyOverrideStatus: "子代理模型列表跟随全局默认;已为该主代理单独配置同源分叉策略";
|
|
61
62
|
readonly subagentTargetFollowGlobalStatus: "当前跟随全局默认列表(勾选或取消下方模型即可为该主代理创建专属列表)";
|
|
62
63
|
readonly subagentResetToGlobal: "恢复跟随全局默认";
|
|
63
64
|
readonly subagentOverrideBadge: "(已覆盖)";
|
|
64
65
|
readonly subagentPreferencesLoadFailed: "无法读取已保存的子代理模型偏好;保存时将以当前界面为准。";
|
|
65
66
|
readonly subagentModelPerTargetRequired: "保存前请至少选择一个模型(或点击「恢复跟随全局默认」)。";
|
|
67
|
+
readonly subagentForkTitle: "同源分叉";
|
|
68
|
+
readonly subagentForkToggle: "允许同源分叉(subagent_fork 继承当前主代理模型)";
|
|
69
|
+
readonly subagentForkHint: "开启后,subagent_fork 可直接继承当前主代理模型以复用会话上下文与前缀缓存,无需将该主模型加入下方冷启动可选列表;不影响冷启动 subagent 与团队派生。";
|
|
66
70
|
};
|
|
67
71
|
/** 本命名空间的字典键联合。 */
|
|
68
72
|
export type SubagentLocaleKey = keyof typeof zh;
|
|
@@ -112,11 +116,15 @@ export declare const dictionaries: {
|
|
|
112
116
|
readonly subagentChipGlobal: "全局默认 ({count})";
|
|
113
117
|
readonly subagentTargetGlobalHint: "正在编辑全局默认子代理模型列表;未单独配置专属列表的主代理将使用此列表。";
|
|
114
118
|
readonly subagentTargetOverrideStatus: "已为该主代理单独配置 {count} 个子代理模型";
|
|
119
|
+
readonly subagentTargetForkOnlyOverrideStatus: "子代理模型列表跟随全局默认;已为该主代理单独配置同源分叉策略";
|
|
115
120
|
readonly subagentTargetFollowGlobalStatus: "当前跟随全局默认列表(勾选或取消下方模型即可为该主代理创建专属列表)";
|
|
116
121
|
readonly subagentResetToGlobal: "恢复跟随全局默认";
|
|
117
122
|
readonly subagentOverrideBadge: "(已覆盖)";
|
|
118
123
|
readonly subagentPreferencesLoadFailed: "无法读取已保存的子代理模型偏好;保存时将以当前界面为准。";
|
|
119
124
|
readonly subagentModelPerTargetRequired: "保存前请至少选择一个模型(或点击「恢复跟随全局默认」)。";
|
|
125
|
+
readonly subagentForkTitle: "同源分叉";
|
|
126
|
+
readonly subagentForkToggle: "允许同源分叉(subagent_fork 继承当前主代理模型)";
|
|
127
|
+
readonly subagentForkHint: "开启后,subagent_fork 可直接继承当前主代理模型以复用会话上下文与前缀缓存,无需将该主模型加入下方冷启动可选列表;不影响冷启动 subagent 与团队派生。";
|
|
120
128
|
};
|
|
121
129
|
'zh-CN': {
|
|
122
130
|
readonly overridden: "已覆盖";
|
|
@@ -160,13 +168,17 @@ export declare const dictionaries: {
|
|
|
160
168
|
readonly subagentChipGlobal: "全局默认 ({count})";
|
|
161
169
|
readonly subagentTargetGlobalHint: "正在编辑全局默认子代理模型列表;未单独配置专属列表的主代理将使用此列表。";
|
|
162
170
|
readonly subagentTargetOverrideStatus: "已为该主代理单独配置 {count} 个子代理模型";
|
|
171
|
+
readonly subagentTargetForkOnlyOverrideStatus: "子代理模型列表跟随全局默认;已为该主代理单独配置同源分叉策略";
|
|
163
172
|
readonly subagentTargetFollowGlobalStatus: "当前跟随全局默认列表(勾选或取消下方模型即可为该主代理创建专属列表)";
|
|
164
173
|
readonly subagentResetToGlobal: "恢复跟随全局默认";
|
|
165
174
|
readonly subagentOverrideBadge: "(已覆盖)";
|
|
166
175
|
readonly subagentPreferencesLoadFailed: "无法读取已保存的子代理模型偏好;保存时将以当前界面为准。";
|
|
167
176
|
readonly subagentModelPerTargetRequired: "保存前请至少选择一个模型(或点击「恢复跟随全局默认」)。";
|
|
177
|
+
readonly subagentForkTitle: "同源分叉";
|
|
178
|
+
readonly subagentForkToggle: "允许同源分叉(subagent_fork 继承当前主代理模型)";
|
|
179
|
+
readonly subagentForkHint: "开启后,subagent_fork 可直接继承当前主代理模型以复用会话上下文与前缀缓存,无需将该主模型加入下方冷启动可选列表;不影响冷启动 subagent 与团队派生。";
|
|
168
180
|
};
|
|
169
|
-
en: Record<"save" | "unavailable" | "reset" | "saving" | "overridden" | "readOnly" | "saveFailed" | "discard" | "subagentTitle" | "subagentDescription" | "subagentLimitsTitle" | "subagentMaxDepth" | "subagentDepthHelpLabel" | "subagentDepthHelp" | "subagentDepthZero" | "subagentDepthOne" | "subagentDepthOverride" | "subagentMaxActive" | "subagentCapacityHelpLabel" | "subagentCapacityHelp" | "subagentDepthInvalid" | "subagentCapacityInvalid" | "subagentModelSelectionTitle" | "subagentModelSelectionToggle" | "subagentModelSelectionChoose" | "subagentModelSelectionAllowed" | "subagentModelSelectionLoading" | "subagentModelSelectionLoadFailed" | "subagentModelSelectionRetry" | "subagentModelSelectionPartial" | "subagentModelSelectionUnavailable" | "subagentModelSelectionUnavailableGroup" | "subagentModelSelectionEmpty" | "subagentModelSelectionRequired" | "subagentModelSelectionOff" | "subagentMainModelLabel" | "subagentMainModelGlobalOption" | "subagentMainModelQuickSwitch" | "subagentChipGlobal" | "subagentTargetGlobalHint" | "subagentTargetOverrideStatus" | "subagentTargetFollowGlobalStatus" | "subagentResetToGlobal" | "subagentOverrideBadge" | "subagentPreferencesLoadFailed" | "subagentModelPerTargetRequired", string>;
|
|
170
|
-
'en-US': Record<"save" | "unavailable" | "reset" | "saving" | "overridden" | "readOnly" | "saveFailed" | "discard" | "subagentTitle" | "subagentDescription" | "subagentLimitsTitle" | "subagentMaxDepth" | "subagentDepthHelpLabel" | "subagentDepthHelp" | "subagentDepthZero" | "subagentDepthOne" | "subagentDepthOverride" | "subagentMaxActive" | "subagentCapacityHelpLabel" | "subagentCapacityHelp" | "subagentDepthInvalid" | "subagentCapacityInvalid" | "subagentModelSelectionTitle" | "subagentModelSelectionToggle" | "subagentModelSelectionChoose" | "subagentModelSelectionAllowed" | "subagentModelSelectionLoading" | "subagentModelSelectionLoadFailed" | "subagentModelSelectionRetry" | "subagentModelSelectionPartial" | "subagentModelSelectionUnavailable" | "subagentModelSelectionUnavailableGroup" | "subagentModelSelectionEmpty" | "subagentModelSelectionRequired" | "subagentModelSelectionOff" | "subagentMainModelLabel" | "subagentMainModelGlobalOption" | "subagentMainModelQuickSwitch" | "subagentChipGlobal" | "subagentTargetGlobalHint" | "subagentTargetOverrideStatus" | "subagentTargetFollowGlobalStatus" | "subagentResetToGlobal" | "subagentOverrideBadge" | "subagentPreferencesLoadFailed" | "subagentModelPerTargetRequired", string>;
|
|
181
|
+
en: Record<"save" | "unavailable" | "reset" | "saving" | "overridden" | "readOnly" | "saveFailed" | "discard" | "subagentTitle" | "subagentDescription" | "subagentLimitsTitle" | "subagentMaxDepth" | "subagentDepthHelpLabel" | "subagentDepthHelp" | "subagentDepthZero" | "subagentDepthOne" | "subagentDepthOverride" | "subagentMaxActive" | "subagentCapacityHelpLabel" | "subagentCapacityHelp" | "subagentDepthInvalid" | "subagentCapacityInvalid" | "subagentModelSelectionTitle" | "subagentModelSelectionToggle" | "subagentModelSelectionChoose" | "subagentModelSelectionAllowed" | "subagentModelSelectionLoading" | "subagentModelSelectionLoadFailed" | "subagentModelSelectionRetry" | "subagentModelSelectionPartial" | "subagentModelSelectionUnavailable" | "subagentModelSelectionUnavailableGroup" | "subagentModelSelectionEmpty" | "subagentModelSelectionRequired" | "subagentModelSelectionOff" | "subagentMainModelLabel" | "subagentMainModelGlobalOption" | "subagentMainModelQuickSwitch" | "subagentChipGlobal" | "subagentTargetGlobalHint" | "subagentTargetOverrideStatus" | "subagentTargetForkOnlyOverrideStatus" | "subagentTargetFollowGlobalStatus" | "subagentResetToGlobal" | "subagentOverrideBadge" | "subagentPreferencesLoadFailed" | "subagentModelPerTargetRequired" | "subagentForkTitle" | "subagentForkToggle" | "subagentForkHint", string>;
|
|
182
|
+
'en-US': Record<"save" | "unavailable" | "reset" | "saving" | "overridden" | "readOnly" | "saveFailed" | "discard" | "subagentTitle" | "subagentDescription" | "subagentLimitsTitle" | "subagentMaxDepth" | "subagentDepthHelpLabel" | "subagentDepthHelp" | "subagentDepthZero" | "subagentDepthOne" | "subagentDepthOverride" | "subagentMaxActive" | "subagentCapacityHelpLabel" | "subagentCapacityHelp" | "subagentDepthInvalid" | "subagentCapacityInvalid" | "subagentModelSelectionTitle" | "subagentModelSelectionToggle" | "subagentModelSelectionChoose" | "subagentModelSelectionAllowed" | "subagentModelSelectionLoading" | "subagentModelSelectionLoadFailed" | "subagentModelSelectionRetry" | "subagentModelSelectionPartial" | "subagentModelSelectionUnavailable" | "subagentModelSelectionUnavailableGroup" | "subagentModelSelectionEmpty" | "subagentModelSelectionRequired" | "subagentModelSelectionOff" | "subagentMainModelLabel" | "subagentMainModelGlobalOption" | "subagentMainModelQuickSwitch" | "subagentChipGlobal" | "subagentTargetGlobalHint" | "subagentTargetOverrideStatus" | "subagentTargetForkOnlyOverrideStatus" | "subagentTargetFollowGlobalStatus" | "subagentResetToGlobal" | "subagentOverrideBadge" | "subagentPreferencesLoadFailed" | "subagentModelPerTargetRequired" | "subagentForkTitle" | "subagentForkToggle" | "subagentForkHint", string>;
|
|
171
183
|
};
|
|
172
184
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAA;AAE3D,sBAAsB;AACtB,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAA;AAE3D,sBAAsB;AACtB,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDL,CAAA;AAEV,mBAAmB;AACnB,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,EAAE,CAAA;AAE/C,sBAAsB;AACtB,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAuDhD,CAAA;AAED,qCAAqC;AACrC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/** 这张表的 `data-plugin-css` 子名。 */
|
|
12
12
|
export declare const STYLE_NAME = "subagent";
|
|
13
13
|
/** 卡片与表单的样式全文。 */
|
|
14
|
-
export declare const SUBAGENT_CSS = "\n.dsh-subagent-form {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.dsh-subagent-readonly-notice,\n.dsh-subagent-unavailable-notice {\n margin: 0 0 12px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-section {\n min-width: 0;\n padding: 16px 0;\n}\n\n.dsh-subagent-heading {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-limits-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));\n gap: 16px;\n}\n\n.dsh-subagent-limit-cell {\n min-width: 0;\n}\n\n.dsh-subagent-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n min-width: 0;\n}\n\n.dsh-subagent-field-head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dsh-subagent-label-group {\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n}\n\n.dsh-subagent-label {\n flex: 0 1 auto;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-help-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 6px);\n background: none;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n\n.dsh-subagent-help-btn[aria-expanded='true'] {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-secondary);\n}\n\n@media (hover: hover) {\n .dsh-subagent-help-btn:hover {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-secondary);\n }\n}\n\n.dsh-subagent-help-box {\n padding: 10px 0 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-help-box > p {\n margin: 0;\n}\n\n.dsh-subagent-help-box > p + p {\n margin-top: 8px;\n}\n\n.dsh-subagent-depth-table {\n width: 100%;\n margin: 8px 0;\n border-collapse: collapse;\n border-block: 0.5px solid var(--dsw-alias-border-l2);\n font: inherit;\n text-align: left;\n}\n\n.dsh-subagent-depth-table th,\n.dsh-subagent-depth-table td {\n padding: 6px 0;\n vertical-align: top;\n}\n\n.dsh-subagent-depth-table th {\n width: 24px;\n padding-right: 8px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-depth-table tr + tr {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.dsh-subagent-badges {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n.dsh-subagent-override-tag {\n display: inline-flex;\n align-items: center;\n padding: 1px 6px;\n border-radius: var(--dsw-radius-sm, 6px);\n background: var(--dsw-alias-bg-layer-4);\n font-size: 11px;\n line-height: 1.4;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-reset-link {\n border: none;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-reset-link:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-reset-link:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-input {\n height: 34px;\n padding: 0 12px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 8px);\n background: var(--dsw-alias-bg-layer-3);\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-primary);\n min-width: 0;\n box-sizing: border-box;\n}\n\n.dsh-subagent-input:focus-visible {\n outline: none;\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.dsh-subagent-input:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n.dsh-subagent-input[aria-invalid='true'] {\n border-color: var(--dsw-alias-state-error-primary);\n}\n\n.dsh-subagent-permission {\n display: grid;\n gap: 6px;\n padding: 12px 0;\n}\n\n.dsh-subagent-toggle-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-toggle-label {\n flex: 1;\n min-width: 0;\n}\n\n.dsh-subagent-switch {\n box-sizing: border-box;\n position: relative;\n flex: 0 0 auto;\n width: 36px;\n height: 20px;\n padding: 2px;\n border: 0;\n border-radius: 999px;\n background: var(--dsw-alias-border-l3);\n cursor: pointer;\n}\n\n.dsh-subagent-switch[aria-checked='true'] {\n background: var(--dsw-alias-brand-primary, #e06c3b);\n}\n\n.dsh-subagent-switch:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-switch:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: 2px;\n}\n\n.dsh-subagent-switch-thumb {\n display: block;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--dsw-alias-label-primary-foreground, #fff);\n transition: transform 120ms ease;\n}\n\n.dsh-subagent-switch[aria-checked='false'] .dsh-subagent-switch-thumb {\n background: var(--dsw-alias-switch-thumb, #fff);\n}\n\n.dsh-subagent-switch[aria-checked='true'] .dsh-subagent-switch-thumb {\n transform: translateX(16px);\n}\n\n.dsh-subagent-selection {\n display: grid;\n gap: 12px;\n min-width: 0;\n}\n\n.dsh-subagent-target-bar {\n display: grid;\n align-content: start;\n gap: 8px;\n min-width: 0;\n margin: 0;\n padding: 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-lg, 10px);\n background: transparent;\n}\n\n.dsh-subagent-target-bar > legend {\n padding: 0 4px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-select {\n height: 34px;\n width: 100%;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-md, 8px);\n background: var(--dsw-alias-bg-layer-1, transparent);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n box-sizing: border-box;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-select:hover:not(:disabled) {\n border-color: var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-2);\n }\n}\n\n.dsh-subagent-select option,\n.dsh-subagent-select optgroup {\n background: var(--dsw-alias-bg-layer-2, #1e1e1e);\n color: var(--dsw-alias-label-primary, #e5e5e5);\n}\n\n.dsh-subagent-select:focus-visible {\n outline: none;\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.dsh-subagent-select:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n.dsh-subagent-chips {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.dsh-subagent-chip {\n padding: 3px 10px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: 999px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n line-height: 1.4;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-chip:hover:not(:disabled):not([aria-pressed='true']) {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-chip[aria-pressed='true'] {\n border-color: var(--dsw-alias-brand-primary, #e06c3b);\n background: color-mix(in srgb, var(--dsw-alias-brand-primary, #e06c3b) 15%, transparent);\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.dsh-subagent-chip:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-status {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-width: 0;\n padding-top: 6px;\n border-top: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n.dsh-subagent-reset {\n padding: 2px 8px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-sm, 6px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n line-height: 1.4;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-reset:hover:not(:disabled) {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-reset:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-hint,\n.dsh-subagent-notice,\n.dsh-subagent-invalid {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.dsh-subagent-hint,\n.dsh-subagent-notice {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-invalid {\n color: var(--dsw-alias-state-error-primary, #e5534b);\n}\n\n.dsh-subagent-catalog-error {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n font-size: 12px;\n color: var(--dsw-alias-state-error-primary, #e5534b);\n}\n\n.dsh-subagent-catalog-error button {\n border: 0;\n padding: 0;\n background: transparent;\n color: var(--dsw-alias-brand-primary, #e06c3b);\n font: inherit;\n cursor: pointer;\n}\n\n.dsh-subagent-models {\n display: grid;\n align-content: start;\n gap: 6px;\n min-width: 0;\n min-height: 180px;\n max-height: clamp(220px, calc(100dvh - 620px), 440px);\n resize: vertical;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-lg, 10px);\n}\n\n.dsh-subagent-models > legend {\n padding: 0 4px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-group {\n display: grid;\n gap: 6px;\n min-width: 0;\n}\n\n.dsh-subagent-group + .dsh-subagent-group {\n margin-top: 4px;\n padding-top: 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n.dsh-subagent-group-name {\n padding: 0 6px;\n font-size: 11px;\n font-weight: 500;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-model {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px;\n border-radius: var(--dsw-radius-md, 8px);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-model:hover {\n background: var(--dsw-alias-bg-layer-4);\n }\n}\n\n.dsh-subagent-model-name,\n.dsh-subagent-model-route {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.dsh-subagent-model-name {\n font-size: 13px;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-model-route {\n margin-top: 2px;\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-model-unavailable {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n white-space: nowrap;\n}\n\n.dsh-subagent-footer {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n\n.dsh-subagent-save {\n appearance: none;\n border: 1px solid transparent;\n border-radius: var(--dsw-radius-md, 8px);\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.dsh-subagent-save:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.dsh-subagent-save:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: 1px;\n}\n\n.dsh-subagent-discard {\n appearance: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 8px);\n padding: 5px 12px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-discard:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.dsh-subagent-failed {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-error, var(--dsw-alias-state-error-primary, #e5534b));\n}\n";
|
|
14
|
+
export declare const SUBAGENT_CSS = "\n.dsh-subagent-form {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.dsh-subagent-readonly-notice,\n.dsh-subagent-unavailable-notice {\n margin: 0 0 12px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-section {\n min-width: 0;\n padding: 16px 0;\n}\n\n.dsh-subagent-heading {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-limits-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));\n gap: 16px;\n}\n\n.dsh-subagent-limit-cell {\n min-width: 0;\n}\n\n.dsh-subagent-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n min-width: 0;\n}\n\n.dsh-subagent-field-head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dsh-subagent-label-group {\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n}\n\n.dsh-subagent-label {\n flex: 0 1 auto;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-help-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 6px);\n background: none;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n\n.dsh-subagent-help-btn[aria-expanded='true'] {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-secondary);\n}\n\n@media (hover: hover) {\n .dsh-subagent-help-btn:hover {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-secondary);\n }\n}\n\n.dsh-subagent-help-box {\n padding: 10px 0 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-help-box > p {\n margin: 0;\n}\n\n.dsh-subagent-help-box > p + p {\n margin-top: 8px;\n}\n\n.dsh-subagent-depth-table {\n width: 100%;\n margin: 8px 0;\n border-collapse: collapse;\n border-block: 0.5px solid var(--dsw-alias-border-l2);\n font: inherit;\n text-align: left;\n}\n\n.dsh-subagent-depth-table th,\n.dsh-subagent-depth-table td {\n padding: 6px 0;\n vertical-align: top;\n}\n\n.dsh-subagent-depth-table th {\n width: 24px;\n padding-right: 8px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-depth-table tr + tr {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.dsh-subagent-badges {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n.dsh-subagent-override-tag {\n display: inline-flex;\n align-items: center;\n padding: 1px 6px;\n border-radius: var(--dsw-radius-sm, 6px);\n background: var(--dsw-alias-bg-layer-4);\n font-size: 11px;\n line-height: 1.4;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-reset-link {\n border: none;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-reset-link:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-reset-link:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-input {\n height: 34px;\n padding: 0 12px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 8px);\n background: var(--dsw-alias-bg-layer-3);\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-primary);\n min-width: 0;\n box-sizing: border-box;\n}\n\n.dsh-subagent-input:focus-visible {\n outline: none;\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.dsh-subagent-input:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n.dsh-subagent-input[aria-invalid='true'] {\n border-color: var(--dsw-alias-state-error-primary);\n}\n\n.dsh-subagent-permission {\n display: grid;\n gap: 6px;\n padding: 12px 0;\n}\n\n.dsh-subagent-toggle-row {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-toggle-label {\n flex: 1;\n min-width: 0;\n}\n\n.dsh-subagent-switch {\n box-sizing: border-box;\n position: relative;\n flex: 0 0 auto;\n width: 36px;\n height: 20px;\n padding: 2px;\n border: 0;\n border-radius: 999px;\n background: var(--dsw-alias-border-l3);\n cursor: pointer;\n}\n\n.dsh-subagent-switch[aria-checked='true'] {\n background: var(--dsw-alias-brand-primary, #e06c3b);\n}\n\n.dsh-subagent-switch:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-switch:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: 2px;\n}\n\n.dsh-subagent-switch-thumb {\n display: block;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--dsw-alias-label-primary-foreground, #fff);\n transition: transform 120ms ease;\n}\n\n.dsh-subagent-switch[aria-checked='false'] .dsh-subagent-switch-thumb {\n background: var(--dsw-alias-switch-thumb, #fff);\n}\n\n.dsh-subagent-switch[aria-checked='true'] .dsh-subagent-switch-thumb {\n transform: translateX(16px);\n}\n\n.dsh-subagent-selection {\n display: grid;\n gap: 12px;\n min-width: 0;\n}\n\n.dsh-subagent-target-bar {\n display: grid;\n align-content: start;\n gap: 8px;\n min-width: 0;\n margin: 0;\n padding: 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-lg, 10px);\n background: transparent;\n}\n\n.dsh-subagent-target-bar > legend {\n padding: 0 4px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-select {\n height: 34px;\n width: 100%;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-md, 8px);\n background: var(--dsw-alias-bg-layer-1, transparent);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n box-sizing: border-box;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-select:hover:not(:disabled) {\n border-color: var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-2);\n }\n}\n\n.dsh-subagent-select option,\n.dsh-subagent-select optgroup {\n background: var(--dsw-alias-bg-layer-2, #1e1e1e);\n color: var(--dsw-alias-label-primary, #e5e5e5);\n}\n\n.dsh-subagent-select:focus-visible {\n outline: none;\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.dsh-subagent-select:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n.dsh-subagent-chips {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.dsh-subagent-chip {\n padding: 3px 10px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: 999px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n line-height: 1.4;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-chip:hover:not(:disabled):not([aria-pressed='true']) {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-chip[aria-pressed='true'] {\n border-color: var(--dsw-alias-brand-primary, #e06c3b);\n background: color-mix(in srgb, var(--dsw-alias-brand-primary, #e06c3b) 15%, transparent);\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.dsh-subagent-chip:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-status {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-width: 0;\n padding-top: 6px;\n border-top: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n.dsh-subagent-reset {\n padding: 2px 8px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-sm, 6px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n line-height: 1.4;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-reset:hover:not(:disabled) {\n background: var(--dsw-alias-bg-layer-4);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.dsh-subagent-reset:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n.dsh-subagent-hint,\n.dsh-subagent-notice,\n.dsh-subagent-invalid {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.dsh-subagent-hint,\n.dsh-subagent-notice {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-invalid {\n color: var(--dsw-alias-state-error-primary, #e5534b);\n}\n\n.dsh-subagent-catalog-error {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n font-size: 12px;\n color: var(--dsw-alias-state-error-primary, #e5534b);\n}\n\n.dsh-subagent-catalog-error button {\n border: 0;\n padding: 0;\n background: transparent;\n color: var(--dsw-alias-brand-primary, #e06c3b);\n font: inherit;\n cursor: pointer;\n}\n\n.dsh-subagent-models {\n display: grid;\n align-content: start;\n gap: 6px;\n min-width: 0;\n min-height: 180px;\n max-height: clamp(220px, calc(100dvh - 620px), 440px);\n resize: vertical;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-lg, 10px);\n}\n\n.dsh-subagent-models > legend,\n.dsh-subagent-fork-card > legend {\n padding: 0 4px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-fork-card {\n display: grid;\n align-content: start;\n gap: 4px;\n min-width: 0;\n margin: 0;\n padding: 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-lg, 10px);\n background: transparent;\n}\n\n.dsh-subagent-fork-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n min-width: 0;\n}\n\n.dsh-subagent-fork-title-group {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.dsh-subagent-fork-label {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-group {\n display: grid;\n gap: 6px;\n min-width: 0;\n}\n\n.dsh-subagent-group + .dsh-subagent-group {\n margin-top: 4px;\n padding-top: 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n.dsh-subagent-group-name {\n padding: 0 6px;\n font-size: 11px;\n font-weight: 500;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-model {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px;\n border-radius: var(--dsw-radius-md, 8px);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .dsh-subagent-model:hover {\n background: var(--dsw-alias-bg-layer-4);\n }\n}\n\n.dsh-subagent-model-name,\n.dsh-subagent-model-route {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.dsh-subagent-model-name {\n font-size: 13px;\n color: var(--dsw-alias-label-primary);\n}\n\n.dsh-subagent-model-route {\n margin-top: 2px;\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.dsh-subagent-model-unavailable {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n white-space: nowrap;\n}\n\n.dsh-subagent-footer {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n\n.dsh-subagent-save {\n appearance: none;\n border: 1px solid transparent;\n border-radius: var(--dsw-radius-md, 8px);\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.dsh-subagent-save:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.dsh-subagent-save:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: 1px;\n}\n\n.dsh-subagent-discard {\n appearance: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 8px);\n padding: 5px 12px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dsh-subagent-discard:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.dsh-subagent-failed {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-error, var(--dsw-alias-state-error-primary, #e5534b));\n}\n";
|
|
15
15
|
/**
|
|
16
16
|
* 安装本卡片的样式表。
|
|
17
17
|
* @returns 卸载函数(样式表由文档持有,这里不做删除)。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,iCAAiC;AACjC,eAAO,MAAM,UAAU,aAAa,CAAA;AAEpC,kBAAkB;AAClB,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,iCAAiC;AACjC,eAAO,MAAM,UAAU,aAAa,CAAA;AAEpC,kBAAkB;AAClB,eAAO,MAAM,YAAY,muZAymBxB,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,IAAI,CAElD"}
|
|
@@ -105,6 +105,14 @@ export interface SubagentSettingsState {
|
|
|
105
105
|
activeTargetOverridden: boolean;
|
|
106
106
|
/** 当前目标生效的条数。 */
|
|
107
107
|
activeTargetCount: number;
|
|
108
|
+
/** 全局默认是否允许同源分叉。 */
|
|
109
|
+
defaultAllowParentFork: boolean;
|
|
110
|
+
/** 按主代理模型单独覆盖的同源分叉策略。 */
|
|
111
|
+
forkOverridesByMainModel: Readonly<Record<string, boolean>>;
|
|
112
|
+
/** 当前目标生效的同源分叉开关态。 */
|
|
113
|
+
activeTargetAllowParentFork: boolean;
|
|
114
|
+
/** 当前目标是否已单独覆盖同源分叉策略。 */
|
|
115
|
+
activeTargetForkOverridden: boolean;
|
|
108
116
|
/** 偏好文档读取状态。 */
|
|
109
117
|
preferencesStatus: 'idle' | 'loading' | 'ready' | 'error';
|
|
110
118
|
}
|
|
@@ -114,8 +122,10 @@ export interface SubagentSettingsActions {
|
|
|
114
122
|
resetLimit: (field: 'maxDepth' | 'maxActiveSubagents') => void;
|
|
115
123
|
toggleEnabled: () => void;
|
|
116
124
|
toggleModel: (key: string) => void;
|
|
125
|
+
toggleAllowParentFork: () => void;
|
|
117
126
|
setActiveTarget: (target: string) => void;
|
|
118
127
|
resetActiveTarget: () => void;
|
|
128
|
+
resetActiveTargetFork: () => void;
|
|
119
129
|
retryCatalog: () => void;
|
|
120
130
|
save: () => void;
|
|
121
131
|
discard: () => void;
|
|
@@ -133,10 +143,12 @@ export interface SubagentCatalogGroup {
|
|
|
133
143
|
name: string;
|
|
134
144
|
}>;
|
|
135
145
|
}
|
|
136
|
-
/**
|
|
146
|
+
/** 偏好文档里与子代理模型有关的四项。 */
|
|
137
147
|
export interface SubagentModelPreferences {
|
|
138
148
|
subagentDefaultModels?: SubagentModelRoute[];
|
|
139
149
|
subagentModelsByMainModel?: Record<string, SubagentModelRoute[] | null>;
|
|
150
|
+
subagentDefaultAllowParentFork?: boolean;
|
|
151
|
+
subagentAllowParentForkByMainModel?: Record<string, boolean | null>;
|
|
140
152
|
}
|
|
141
153
|
/** 一条 configForm 变更指令。 */
|
|
142
154
|
export type SubagentFormOp = {
|
|
@@ -211,7 +223,7 @@ export declare function parseRouteKey(key: string): SubagentModelRoute | undefin
|
|
|
211
223
|
*/
|
|
212
224
|
export declare function normalizeCatalogGroups(rawGroups: readonly unknown[]): SubagentCatalogGroup[];
|
|
213
225
|
/**
|
|
214
|
-
*
|
|
226
|
+
* 读本插件偏好里的子代理模型配置。
|
|
215
227
|
* @returns 偏好切片;读取失败时 undefined(卡片照常可用,只是从空列表起步)。
|
|
216
228
|
*/
|
|
217
229
|
export declare function readSubagentPreferences(): Promise<SubagentModelPreferences | undefined>;
|
|
@@ -258,6 +270,8 @@ export declare class SubagentSettingsController {
|
|
|
258
270
|
private draftEnabled;
|
|
259
271
|
private draftDefault;
|
|
260
272
|
private draftOverrides;
|
|
273
|
+
private draftDefaultFork;
|
|
274
|
+
private draftForkOverrides;
|
|
261
275
|
private draftRevision;
|
|
262
276
|
private activeTarget;
|
|
263
277
|
private saving;
|
|
@@ -294,9 +308,14 @@ export declare class SubagentSettingsController {
|
|
|
294
308
|
private currentDefault;
|
|
295
309
|
/** 每个主代理模型的专属列表(丢弃空数组与非法项)。 */
|
|
296
310
|
private currentOverrides;
|
|
311
|
+
private currentDefaultFork;
|
|
312
|
+
private currentForkOverrides;
|
|
297
313
|
private enabled;
|
|
298
314
|
private defaultRoutes;
|
|
299
315
|
private overrides;
|
|
316
|
+
private defaultAllowParentFork;
|
|
317
|
+
private forkOverrides;
|
|
318
|
+
private activeAllowParentFork;
|
|
300
319
|
/** 当前目标生效的列表(专属列表优先,否则回落到全局默认)。 */
|
|
301
320
|
private activeRoutes;
|
|
302
321
|
private ensureDraft;
|
|
@@ -309,7 +328,11 @@ export declare class SubagentSettingsController {
|
|
|
309
328
|
*/
|
|
310
329
|
private toggleModel;
|
|
311
330
|
private setActiveTarget;
|
|
312
|
-
/**
|
|
331
|
+
/** 切换当前目标的同源分叉(`subagent_fork`)开关。 */
|
|
332
|
+
private toggleAllowParentFork;
|
|
333
|
+
/** 让当前主代理的同源分叉策略单独恢复「跟随全局默认」。 */
|
|
334
|
+
private resetActiveTargetFork;
|
|
335
|
+
/** 让当前目标恢复「跟随全局默认」:删掉它的专属列表与专属同源分叉覆盖。 */
|
|
313
336
|
private resetActiveTarget;
|
|
314
337
|
private discard;
|
|
315
338
|
/** 当前目标的候选行:目录 ∪ 已保存 ∪ 草稿里出现的每一条。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-card-controller.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/subagent-card-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,sBAAsB;AACtB,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAE5C,sBAAsB;AACtB,eAAO,MAAM,2BAA2B,sCAAsC,CAAA;AAE9E,2BAA2B;AAC3B,eAAO,MAAM,aAAa,YAAY,CAAA;AAKtC,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,8BAA8B;AAC9B,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,SAAS,EAAE,OAAO,CAAA;IAClB,oBAAoB;IACpB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAwB;AACxB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CACtF;AAED,oBAAoB;AACpB,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,wBAAwB;IACxB,IAAI,EA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A;CAC1D;AAED,iBAAiB;AACjB,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,oBAAoB,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3E,UAAU,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,oBAAoB,KAAK,IAAI,CAAA;IAC9D,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAwB;AACxB,MAAM,WAAW,wBAAyB,SAAQ,uBAAuB;IACvE,KAAK,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAA;CAC5C;AAED,kEAAkE;AAClE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC5C;AAED,wBAAwB;AACxB,MAAM,WAAW,wBAAwB;IACvC,qBAAqB,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAC5C,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"subagent-card-controller.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/subagent-card-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;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,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
|
|
|
76
76
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
77
77
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
78
78
|
*/
|
|
79
|
-
export declare const PLUGIN_VERSION: "0.
|
|
79
|
+
export declare const PLUGIN_VERSION: "0.56.0";
|
|
80
80
|
export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
|
|
81
81
|
export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
|
|
82
82
|
export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
|
|
@@ -4,13 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* ## 为什么必须 fork
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* 1. 动态 plan:policy 段:systemPrompt.section(...) 的文本在 section 与 '' 之间翻转
|
|
11
|
-
* —— system 段在请求最前面,改一个字就是全前缀作废;
|
|
12
|
-
* 2. exit_plan_mode 用 { when } 逐步准入 —— 工具表一变,native tools 与 PTC
|
|
13
|
-
* tools:sdk 两边同时重建。
|
|
7
|
+
* 官方实现的动态 plan:policy 段在进入/离开计划模式时翻转;exit_plan_mode 也带
|
|
8
|
+
* { when } 逐步准入。0.2.2 起工具在首次进入后会持续保留,减少了后续切换的工具表
|
|
9
|
+
* 变化,但首次准入与 system 段变化仍会重建 native tools 与 PTC tools:sdk 的前缀缓存。
|
|
14
10
|
*
|
|
15
11
|
* Kimi 线路按内容前缀命中,这两次重建是**计划模式必经**的固定税。这个 fork 把税
|
|
16
12
|
* 取消掉,靠的是同一个观察:**末尾追加不破坏前缀**。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-plan-mode.d.ts","sourceRoot":"","sources":["../../src/entry-plan-mode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3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,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAIvC;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAMzC;;;;OAIG;IACH,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;IAI/D;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAsBtC;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;IAU7D;;;;;;;;;OASG;IACH,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAE,cAAmB,GAAG,cAAc;IAuBpF;;;OAGG;IACH,OAAO,CAAC,UAAU;IAclB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAWlB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAUrB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO;IAYrD;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IA8BxB;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAexB;;;OAGG;IACH,OAAO,CAAC,cAAc;IA+GtB;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CA+D5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAO1F;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* `peerDependencies` 里没有它们(也不该有:装不装它们不该由本包决定),
|
|
19
19
|
* 所以全部按**结构契约**描述:`SessionLike` / `SessionEventLike` /
|
|
20
20
|
* `ToolResultMessageLike` 都是本文件里的局部接口,`deepFreeze` 也是本地实现。
|
|
21
|
-
* 这样从 0.1.2-alpha.5 到 0.2.
|
|
21
|
+
* 这样从 0.1.2-alpha.5 到 0.2.2-alpha.3 的每一代 harness 都能解析这个模块。
|
|
22
22
|
*
|
|
23
23
|
* 与官方实现的一致性以测试锁定:`test/tool-result-pruner.test.ts` 覆盖配置校验、
|
|
24
24
|
* 代理对不劈开、非文本块不计价、以及 `compaction/prune` 与替换事件的先后顺序。
|
|
@@ -31,6 +31,8 @@ export declare const PRESET_REGISTRY_PACKAGE = "@deepseek-ai/dsh-agent-preset";
|
|
|
31
31
|
* registers `{{cwd}}` as a `systemPrompt` variable.
|
|
32
32
|
*/
|
|
33
33
|
export declare const WORKING_DIRECTORY_PACKAGE = "@deepseek-ai/dsh-working-directory";
|
|
34
|
+
/** The standalone PTC executor introduced when tool presentation split into executor plugins. */
|
|
35
|
+
export declare const PTC_EXECUTOR_PACKAGE = "@deepseek-ai/dsh-tool-executor-ptc";
|
|
34
36
|
/** The id the `dispatch` preset is selectable under. */
|
|
35
37
|
export declare const DISPATCH_PRESET_ID = "dispatch";
|
|
36
38
|
/**
|
|
@@ -113,6 +115,9 @@ export declare const DISPATCH_PRESET: PresetDefinition;
|
|
|
113
115
|
* and remove its standalone `./list-agents` export. That row is omitted only when
|
|
114
116
|
* the export is absent; older harnesses keep it because their main entry does not
|
|
115
117
|
* register the tool.
|
|
118
|
+
*
|
|
119
|
+
* When the standalone PTC executor exists, it replaces the deprecated
|
|
120
|
+
* agent-tool-presentation compatibility row and its `{ mode: 'ptc' }` config.
|
|
116
121
|
* @param resolves - whether a bare specifier resolves in this installation.
|
|
117
122
|
* @returns the preset definition for the running harness generation.
|
|
118
123
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-preset.d.ts","sourceRoot":"","sources":["../../../src/host/agent-preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,o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 type HarnessToolHistory = HarnessGenerateOptions extends {
|
|
|
80
80
|
toolHistory?: infer History;
|
|
81
81
|
} ? History : unknown;
|
|
82
82
|
/** Request options carrying the normalized conversation. */
|
|
83
|
-
export type GenerateOptions = Omit<HarnessGenerateOptions, 'messages' | 'tools'> & {
|
|
83
|
+
export type GenerateOptions = Omit<HarnessGenerateOptions, 'messages' | 'tools' | 'purpose'> & {
|
|
84
84
|
messages: Message[];
|
|
85
85
|
tools?: Array<HarnessToolSchema & {
|
|
86
86
|
deferLoading?: true;
|
|
87
87
|
}>;
|
|
88
88
|
toolHistory?: HarnessToolHistory;
|
|
89
|
+
/** Forward auxiliary-request metadata without requiring each producer's declaration at this boundary. */
|
|
90
|
+
purpose?: string;
|
|
89
91
|
};
|
|
90
92
|
/**
|
|
91
93
|
* Normalize one harness message list into {@link Message}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/llm-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,eAAe,IAAI,sBAAsB,EACzC,UAAU,IAAI,iBAAiB,EAChC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,EACL,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,gBAAgB;QACxB,yEAAyE;QACzE,0BAA0B,EAAE;YAAE,IAAI,EAAE,0BAA0B,CAAA;SAAE,GAAG,aAAa,CAAA;KACjF;CACF;AAED,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,EAAG,0BAAmC,CAAA;AAE7E,2FAA2F;AAC3F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAA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,OAAO,EAAE,CA+BrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEzF"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* src/host/minimax-code/runtime-enhancements.ts 的 minimaxSessionRouteOf 与
|
|
24
24
|
* src/host/cache-warmup/install.ts 的 cacheWarmupRouteOf):会话请求头 →
|
|
25
25
|
* agent 的模型选择面 → agent 选项 → agent 自身。不 import 任何宿主代次专属的
|
|
26
|
-
* 类型,所以同一份代码在 0.1.2-alpha.5 到 0.2.
|
|
26
|
+
* 类型,所以同一份代码在 0.1.2-alpha.5 到 0.2.2-alpha.3 上都装得上。
|
|
27
27
|
*
|
|
28
28
|
* ## 接线面
|
|
29
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-mode-cache-guard.d.ts","sourceRoot":"","sources":["../../../src/host/plan-mode-cache-guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan-mode-cache-guard.d.ts","sourceRoot":"","sources":["../../../src/host/plan-mode-cache-guard.ts"],"names":[],"mappings":"AA2CA,eAAe;AACf,MAAM,WAAW,kBAAkB;IACjC,wBAAwB;IACxB,OAAO,IAAI,IAAI,CAAA;CAChB;AAqID;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,CAqK1E;AAgKD,eAAe,yBAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../src/host/preferences.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../src/host/preferences.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,2BAA2B;IAC1C,MAAM,IAAI,0BAA0B,CAAA;IACpC,MAAM,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAA;IACpF,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,CAAA;CAC1H;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACxE,+DAA+D;IAC/D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAID;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAsDjF;AA6GD,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAG5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAEV,qBAAqB,EAIrB,qBAAqB,EAEtB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAEV,qBAAqB,EAIrB,qBAAqB,EAEtB,MAAM,wBAAwB,CAAA;AAU/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAmB,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AAKpE,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAEpF;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,2BAA2B,EACxC,YAAY,CAAC,EAAE,YAAY,EAC3B,cAAc,CAAC,EAAE,sBAAsB,EACvC,UAAU,CAAC,EAAE,gBAAgB,EAC7B,WAAW,CAAC,EAAE,gBAAgB,EAC9B,kBAAkB,CAAC,EAAE,qBAAqB,EAC1C,KAAK,CAAC,EAAE,iBAAiB,GACxB,MAAM,IAAI,CAqXZ"}
|
|
@@ -41,6 +41,12 @@ export declare const DEFAULT_DELEGATION_TOOLS: readonly string[];
|
|
|
41
41
|
* reason the model cannot act on, so it sits here beside the fork.
|
|
42
42
|
*/
|
|
43
43
|
export declare const DEFAULT_SUBAGENT_INHERIT_TOOLS: readonly string[];
|
|
44
|
+
/**
|
|
45
|
+
* Inherit-mode tools that fork the caller's own conversation context on the
|
|
46
|
+
* caller's own route (as opposed to multi-agent team spawning such as
|
|
47
|
+
* `spawn_teammate`). Only these tools are unlocked by `allowParentFork`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_PARENT_FORK_TOOLS: readonly string[];
|
|
44
50
|
/**
|
|
45
51
|
* How one delegation tool resolves the child route this guard authorizes.
|
|
46
52
|
*
|
|
@@ -77,6 +83,10 @@ export interface SubagentRoutingOverrides {
|
|
|
77
83
|
readonly defaultAllowedModels?: readonly AllowedModelRoute[];
|
|
78
84
|
/** Authorized child routes per main agent model, keyed by `provider/model`. */
|
|
79
85
|
readonly byMainModel?: Readonly<Record<string, readonly AllowedModelRoute[]>>;
|
|
86
|
+
/** Whether `subagent_fork` may inherit the parent route when a main model has no dedicated fork override. */
|
|
87
|
+
readonly defaultAllowParentFork?: boolean;
|
|
88
|
+
/** Per-main-model `subagent_fork` self-inheritance policy, keyed by `provider/model`. */
|
|
89
|
+
readonly allowParentForkByMainModel?: Readonly<Record<string, boolean>>;
|
|
80
90
|
}
|
|
81
91
|
/** Resolved model-selection preference read from the Host settings document. */
|
|
82
92
|
export interface SubagentModelSelectionPreference {
|
|
@@ -92,6 +102,10 @@ export interface SubagentModelSelectionPreference {
|
|
|
92
102
|
* a key here is governed by that entry instead of the fallback list.
|
|
93
103
|
*/
|
|
94
104
|
readonly byMainModel?: Readonly<Record<string, readonly AllowedModelRoute[]>>;
|
|
105
|
+
/** Fallback `subagent_fork` self-inheritance policy when `allowParentForkByMainModel` carries no entry for the main model. */
|
|
106
|
+
readonly defaultAllowParentFork?: boolean;
|
|
107
|
+
/** Per-main-model `subagent_fork` self-inheritance policy, keyed by `provider/model`. */
|
|
108
|
+
readonly allowParentForkByMainModel?: Readonly<Record<string, boolean>>;
|
|
95
109
|
}
|
|
96
110
|
/** One durable Session record this module reads: its events and its lineage. */
|
|
97
111
|
export interface PolicySession {
|
|
@@ -399,6 +413,16 @@ export declare function effectiveAllowedRoutes(agent: AuthorizationAgent | undef
|
|
|
399
413
|
* @returns the routes that actually govern this delegation.
|
|
400
414
|
*/
|
|
401
415
|
export declare function mainModelRoutesFor(agent: AuthorizationAgent | undefined, sessions: SessionsResolver, preference: SubagentModelSelectionPreference | undefined, baseRoutes: readonly AllowedModelRoute[], lockSnapshot?: boolean): readonly AllowedModelRoute[];
|
|
416
|
+
/**
|
|
417
|
+
* Resolve whether `subagent_fork` is authorized to inherit the root main model's
|
|
418
|
+
* own route even when that route is absent from the cold-spawn allowlist.
|
|
419
|
+
* @param agent - Calling agent.
|
|
420
|
+
* @param preference - Current Host preference, when composed.
|
|
421
|
+
* @param sessions - Session registry used for ancestor lookup.
|
|
422
|
+
* @param lockSnapshot - Freeze the resolved posture for this Session now.
|
|
423
|
+
* @returns whether same-route parent forking is authorized for the Session's main model.
|
|
424
|
+
*/
|
|
425
|
+
export declare function effectiveAllowParentFork(agent: AuthorizationAgent | undefined, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, lockSnapshot?: boolean): boolean;
|
|
402
426
|
/**
|
|
403
427
|
* State a Session's routing posture in the `list_subagent_models` result.
|
|
404
428
|
*
|
|
@@ -410,12 +434,9 @@ export declare function mainModelRoutesFor(agent: AuthorizationAgent | undefined
|
|
|
410
434
|
* authorized route in the form `subagent` expects, eliminating any reason to
|
|
411
435
|
* search local config files or source code for the allowlist.
|
|
412
436
|
*
|
|
413
|
-
* The empty case
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* anything is enforced is decided by the allowlist the Session recorded. The
|
|
417
|
-
* two facts differ, so the model has to be able to read the second one instead
|
|
418
|
-
* of deriving it from the first.
|
|
437
|
+
* The empty case distinguishes an absent Session allowlist from the host's own
|
|
438
|
+
* delegation policy. On 0.2.2 the latter still limits explicit selection to the
|
|
439
|
+
* parent route, so calling this posture "unrestricted" would be false.
|
|
419
440
|
* @param output - Original text returned by `list_subagent_models`.
|
|
420
441
|
* @param allowed - Routes the calling Session authorizes, empty when none is in force.
|
|
421
442
|
* @returns the output with the Session routing posture appended.
|
|
@@ -459,24 +480,21 @@ export declare function mergePreferenceOverrides(base: SubagentModelSelectionPre
|
|
|
459
480
|
* The statement appended to `list_subagent_models` when no allowlist governs the
|
|
460
481
|
* calling Session.
|
|
461
482
|
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
483
|
+
* It distinguishes an absent Session allowlist from the host's own inheritance
|
|
484
|
+
* or parent-route rules, and deliberately does not recommend a setting. This notice is
|
|
464
485
|
* attached for every Session the plugin's authorization listener reaches—which
|
|
465
486
|
* includes sessions with no interest in the dispatch preset—so a sentence telling
|
|
466
487
|
* the reader to go enable model selection would be noise in most of them, and a
|
|
467
488
|
* model that reads it as an instruction will repeat it in an unrelated summary.
|
|
468
489
|
*/
|
|
469
|
-
export declare const
|
|
490
|
+
export declare const NO_ALLOWLIST_ROUTING_NOTICE: string;
|
|
470
491
|
/**
|
|
471
492
|
* Rewrite the upstream `list_subagent_models` and `subagent` tool/parameter
|
|
472
493
|
* descriptions when the calling Session enforces an allowlist.
|
|
473
494
|
*
|
|
474
|
-
* Upstream
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
* In an allowlist-governed Session both statements are false and actively
|
|
478
|
-
* mislead the dispatcher into either omitting `provider`/`model` or distrusting
|
|
479
|
-
* `list_subagent_models` and hunting through local files for the "real" allowlist.
|
|
495
|
+
* Upstream releases before 0.2.2 call selection optional and catalog membership
|
|
496
|
+
* advisory; 0.2.2 instead says omitted values use child defaults. In an
|
|
497
|
+
* allowlist-governed Session those statements would contradict execution.
|
|
480
498
|
* @param text - Tool description, parameter description, or rendered `tools:sdk` section text.
|
|
481
499
|
* @param allowed - Routes the calling Session authorizes.
|
|
482
500
|
* @returns the text with the misleading upstream sentences replaced by the Session's exact policy.
|
|
@@ -515,7 +533,7 @@ export declare function rewriteAuthorizedPromptAssembly<T extends MutablePromptA
|
|
|
515
533
|
* @param inheritToolNames - Delegation tools that start a child on the caller's own route.
|
|
516
534
|
* @returns a denial reason, or undefined to leave the call untouched.
|
|
517
535
|
*/
|
|
518
|
-
export declare function delegationDenialReason(agent: AuthorizationAgent | undefined, toolName: string, args: unknown, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, toolNames?: readonly string[], scope?: AuthorizationScope, inheritToolNames?: readonly string[], declaresRouteParameters?: RouteParameterProbe, lockSnapshot?: boolean): string | undefined;
|
|
536
|
+
export declare function delegationDenialReason(agent: AuthorizationAgent | undefined, toolName: string, args: unknown, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, toolNames?: readonly string[], scope?: AuthorizationScope, inheritToolNames?: readonly string[], declaresRouteParameters?: RouteParameterProbe, lockSnapshot?: boolean, parentForkToolNames?: readonly string[]): string | undefined;
|
|
519
537
|
/** Runtime inputs the guard closes over. */
|
|
520
538
|
export interface SubagentAuthorizationOptions {
|
|
521
539
|
/** Live settings service, when composed; absent leaves recorded policies in charge. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-model-authorization.d.ts","sourceRoot":"","sources":["../../../src/host/subagent-model-authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAE/E,kEAAkE;AAClE,eAAO,MAAM,kCAAkC,6BAA6B,CAAA;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,oCAAoC,CAAA;AAEtE,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAiB,CAAA;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,8BAA8B,EAAE,SAAS,MAAM,EAAwC,CAAA;AAEpG;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAA;AAEvD,8EAA8E;AAC9E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAClC;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;GAQG;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BAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7C,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAA;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,wBAAwB,GAAG,SAAS,CAAA;CACvE;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CA4BjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,GAAE,gCAAqC,GAC5C,MAAM,IAAI,CAwGZ;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAK7E"}
|
|
@@ -128,6 +128,10 @@ export declare function childRoutesOf(parent: AuditedSession, sessions: AuditedS
|
|
|
128
128
|
export declare function effectiveRouteOf(finding: ChildRouteFinding, sessions: AuditedSessions): RouteViolation['route'] & {
|
|
129
129
|
sameAsParent: boolean;
|
|
130
130
|
};
|
|
131
|
+
export interface AuditChildRoutesOptions {
|
|
132
|
+
/** Whether same-route `fork`-provider children are authorized on the parent route. */
|
|
133
|
+
readonly allowParentFork?: boolean;
|
|
134
|
+
}
|
|
131
135
|
/**
|
|
132
136
|
* Fold one parent session's children into the violations worth reporting.
|
|
133
137
|
* A finding with an unresolvable route is reported as neither: guessing would
|
|
@@ -135,9 +139,10 @@ export declare function effectiveRouteOf(finding: ChildRouteFinding, sessions: A
|
|
|
135
139
|
* @param parent - the parent session to audit.
|
|
136
140
|
* @param sessions - registry used to resolve children and parents.
|
|
137
141
|
* @param allowed - routes the parent Session authorized, when it recorded any.
|
|
142
|
+
* @param options - optional parent-fork exemption matching the live guard.
|
|
138
143
|
* @returns violations, ordered as the children were discovered.
|
|
139
144
|
*/
|
|
140
|
-
export declare function auditChildRoutes(parent: AuditedSession, sessions: AuditedSessions, allowed: readonly AuditedRoute[] | undefined): RouteViolation[];
|
|
145
|
+
export declare function auditChildRoutes(parent: AuditedSession, sessions: AuditedSessions, allowed: readonly AuditedRoute[] | undefined, options?: AuditChildRoutesOptions): RouteViolation[];
|
|
141
146
|
/**
|
|
142
147
|
* Render one violation as a single model-facing line.
|
|
143
148
|
* @param violation - the violation to describe.
|