@shuind/dsh-codex-harness 0.2.16 → 0.2.18
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/docs/preset-library.md +20 -18
- package/lib/client.js +300 -177
- package/lib/index.js +266 -13
- package/lib/typert.js +117 -0
- package/lib/types/client/index.d.ts +28 -2
- package/lib/types/client/index.js +32 -62
- package/lib/types/client/preset-copy.d.ts +12 -0
- package/lib/types/client/preset-copy.js +24 -0
- package/lib/types/client/preset-manager.js +70 -9
- package/lib/types/client/preset-requests.d.ts +4 -0
- package/lib/types/client/preset-requests.js +19 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +3 -1
- package/lib/types/preset-contract.d.ts +11 -0
- package/lib/types/preset-editor-remote.js +4 -3
- package/lib/types/preset-editor.d.ts +12 -1
- package/lib/types/preset-editor.js +234 -9
- package/lib/types/prompt-sections.d.ts +15 -0
- package/lib/types/prompt-sections.js +23 -0
- package/lib/types/typert.host.d.ts +47 -0
- package/lib/types/typert.host.js +99 -0
- package/package.json +296 -285
|
@@ -24,7 +24,7 @@ const en = {
|
|
|
24
24
|
contextSizeDescription: 'Next request capacity in K tokens.',
|
|
25
25
|
contextRestore: 'Restore model default',
|
|
26
26
|
promptCardTitle: 'Codex Harness',
|
|
27
|
-
promptCardDescription: 'Edit presets and
|
|
27
|
+
promptCardDescription: 'Edit presets, Codex capabilities, and the operating prompt. Activity status is global.',
|
|
28
28
|
otherCapabilitiesLabel: 'Global capabilities',
|
|
29
29
|
capabilityPrompt: 'Codex operating prompt',
|
|
30
30
|
capabilityPromptHint: 'Inject the editable instructions and persona-first prompt layout.',
|
|
@@ -44,7 +44,21 @@ const en = {
|
|
|
44
44
|
capabilityCompactionHint: 'Prefer the provider Responses compact endpoint before local compaction.',
|
|
45
45
|
capabilityActivity: 'Activity indicator',
|
|
46
46
|
capabilityActivityHint: 'Show request, reply, and compaction status beside the conversation.',
|
|
47
|
+
promptCustomizationLabel: 'Prompt customization',
|
|
48
|
+
personaLabel: 'Persona',
|
|
49
|
+
personaHint: 'Deployment identity and role. Supports {{model}} and {{cwd}}.',
|
|
50
|
+
sourcePromptLabel: 'DSH Core source instructions',
|
|
51
|
+
sourcePromptHint: 'Guidance about the DSH checkout and working directory. Supports {{sourceRoot}}.',
|
|
52
|
+
webPromptLabel: 'DSH Core Web instructions',
|
|
53
|
+
webPromptHint: 'Guidance about this Web GUI, HMR, builds, and verification. Supports {{webUrl}}.',
|
|
54
|
+
promptRestoreAll: 'Restore all prompt defaults',
|
|
47
55
|
promptLabel: 'Codex operating prompt',
|
|
56
|
+
promptHint: 'This is the Codex operating prompt. Persona and DSH Core instructions are edited separately above.',
|
|
57
|
+
promptUnsaved: 'Unsaved',
|
|
58
|
+
promptDiscard: 'Discard',
|
|
59
|
+
promptSave: 'Save',
|
|
60
|
+
promptSaving: 'Saving...',
|
|
61
|
+
promptSaveFailed: 'Could not save the prompt.',
|
|
48
62
|
promptExpand: 'Expand settings',
|
|
49
63
|
promptCollapse: 'Collapse settings',
|
|
50
64
|
promptReadOnly: 'This settings document is read-only.',
|
|
@@ -63,7 +77,7 @@ const zh = {
|
|
|
63
77
|
contextSizeDescription: '\u8bbe\u7f6e\u4e0b\u6b21\u8bf7\u6c42\u7684\u4e0a\u4e0b\u6587\u5bb9\u91cf\uff0c\u5355\u4f4d\u4e3a K tokens\u3002',
|
|
64
78
|
contextRestore: '\u6062\u590d\u6a21\u578b\u9ed8\u8ba4\u503c',
|
|
65
79
|
promptCardTitle: 'Codex Harness',
|
|
66
|
-
promptCardDescription: '\u7f16\u8f91\u9884\u8bbe\
|
|
80
|
+
promptCardDescription: '\u7f16\u8f91\u9884\u8bbe\u3001Codex \u80fd\u529b\u548c\u64cd\u4f5c\u63d0\u793a\u8bcd\uff0c\u6d3b\u52a8\u72b6\u6001\u662f\u5168\u5c40\u8bbe\u7f6e\u3002',
|
|
67
81
|
otherCapabilitiesLabel: '\u5168\u5c40\u80fd\u529b',
|
|
68
82
|
capabilityPrompt: 'Codex \u64cd\u4f5c\u63d0\u793a\u8bcd',
|
|
69
83
|
capabilityPromptHint: '\u6ce8\u5165\u53ef\u7f16\u8f91\u6307\u4ee4\uff0c\u5e76\u5c06 Persona \u653e\u5728\u63d0\u793a\u8bcd\u9996\u4f4d\u3002',
|
|
@@ -83,7 +97,21 @@ const zh = {
|
|
|
83
97
|
capabilityCompactionHint: '\u4f18\u5148\u8c03\u7528\u63d0\u4f9b\u5546\u7684 Responses compact \u7aef\u70b9\uff0c\u5931\u8d25\u65f6\u56de\u9000\u672c\u5730\u538b\u7f29\u3002',
|
|
84
98
|
capabilityActivity: '\u6d3b\u52a8\u72b6\u6001',
|
|
85
99
|
capabilityActivityHint: '\u5728\u5bf9\u8bdd\u65c1\u663e\u793a\u8bf7\u6c42\u3001\u56de\u590d\u548c\u538b\u7f29\u72b6\u6001\u3002',
|
|
100
|
+
promptCustomizationLabel: '\u63d0\u793a\u8bcd\u5b9a\u5236',
|
|
101
|
+
personaLabel: 'Persona',
|
|
102
|
+
personaHint: '\u5b9a\u4e49 Agent \u7684\u8eab\u4efd\u4e0e\u89d2\u8272,\u652f\u6301 {{model}} \u548c {{cwd}}。',
|
|
103
|
+
sourcePromptLabel: 'DSH Core \u6e90\u7801\u8bf4\u660e',
|
|
104
|
+
sourcePromptHint: '\u8bf4\u660e DSH \u6e90\u7801\u68c0\u51fa\u76ee\u5f55\u4e0e\u5de5\u4f5c\u76ee\u5f55,\u652f\u6301 {{sourceRoot}}。',
|
|
105
|
+
webPromptLabel: 'DSH Core Web \u8bf4\u660e',
|
|
106
|
+
webPromptHint: '\u8bf4\u660e Web GUI、HMR、\u6784\u5efa\u4e0e\u9a8c\u8bc1,\u652f\u6301 {{webUrl}}。',
|
|
107
|
+
promptRestoreAll: '\u6062\u590d\u6240\u6709\u63d0\u793a\u8bcd\u9ed8\u8ba4\u503c',
|
|
86
108
|
promptLabel: 'Codex \u64cd\u4f5c\u63d0\u793a\u8bcd',
|
|
109
|
+
promptHint: '\u8fd9\u662f Codex \u64cd\u4f5c\u63d0\u793a\u8bcd。Persona \u548c DSH Core \u8bf4\u660e\u5728\u4e0a\u65b9\u5206\u522b\u7f16\u8f91。',
|
|
110
|
+
promptUnsaved: '\u672a\u4fdd\u5b58',
|
|
111
|
+
promptDiscard: '\u653e\u5f03',
|
|
112
|
+
promptSave: '\u4fdd\u5b58',
|
|
113
|
+
promptSaving: '\u4fdd\u5b58\u4e2d...',
|
|
114
|
+
promptSaveFailed: '\u63d0\u793a\u8bcd\u4fdd\u5b58\u5931\u8d25。',
|
|
87
115
|
promptExpand: '\u5c55\u5f00\u8bbe\u7f6e',
|
|
88
116
|
promptCollapse: '\u6536\u8d77\u8bbe\u7f6e',
|
|
89
117
|
promptReadOnly: '\u5f53\u524d\u8bbe\u7f6e\u6587\u4ef6\u4e3a\u53ea\u8bfb\u3002',
|
|
@@ -100,72 +128,14 @@ function CapabilityToggle({ field, label, hint, enabled, disabled, setSetting, }
|
|
|
100
128
|
cursor: disabled ? 'default' : 'pointer',
|
|
101
129
|
}, children: [_jsxs("span", { style: { flex: 1, minWidth: 0, display: 'grid', gap: 2 }, children: [_jsx("strong", { style: { fontSize: 13, fontWeight: 500 }, children: label }), _jsx("span", { style: { color: 'var(--dsw-alias-label-tertiary)', fontSize: 12, lineHeight: 1.45 }, children: hint })] }), _jsx("input", { type: "checkbox", role: "switch", checked: enabled, disabled: disabled, "aria-label": label, onChange: event => { void setSetting(field, event.target.checked); }, style: { marginTop: 3, accentColor: 'var(--dsw-static-blue-500)' } })] }));
|
|
102
130
|
}
|
|
103
|
-
/**
|
|
104
|
-
function CapabilityGroup({ id, label, children, accent }) {
|
|
105
|
-
const [open, setOpen] = useState(false);
|
|
106
|
-
const panelId = `${id}-panel`;
|
|
107
|
-
return (_jsxs("section", { style: {
|
|
108
|
-
display: 'grid',
|
|
109
|
-
gap: open ? 4 : 0,
|
|
110
|
-
}, children: [_jsxs("button", { type: "button", "aria-expanded": open, "aria-controls": panelId, onClick: () => { setOpen(!open); }, style: {
|
|
111
|
-
display: 'flex',
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
gap: 7,
|
|
114
|
-
width: '100%',
|
|
115
|
-
padding: 0,
|
|
116
|
-
border: 0,
|
|
117
|
-
background: 'none',
|
|
118
|
-
color: 'var(--dsw-alias-label-secondary)',
|
|
119
|
-
font: 'inherit',
|
|
120
|
-
textAlign: 'left',
|
|
121
|
-
cursor: 'pointer',
|
|
122
|
-
}, children: [_jsx("span", { "aria-hidden": "true", style: {
|
|
123
|
-
width: 6,
|
|
124
|
-
height: 6,
|
|
125
|
-
flex: '0 0 auto',
|
|
126
|
-
borderRadius: 999,
|
|
127
|
-
background: accent,
|
|
128
|
-
} }), _jsx("strong", { style: {
|
|
129
|
-
color: 'var(--dsw-alias-label-secondary)',
|
|
130
|
-
fontSize: 14,
|
|
131
|
-
fontWeight: 600,
|
|
132
|
-
letterSpacing: '0.01em',
|
|
133
|
-
}, children: label }), _jsx("span", { "aria-hidden": "true", style: { color: 'var(--dsw-alias-label-tertiary)', fontSize: 16 }, children: open ? '-' : '+' })] }), open && (_jsx("div", { id: panelId, style: {
|
|
134
|
-
display: 'grid',
|
|
135
|
-
marginLeft: 5,
|
|
136
|
-
paddingLeft: 12,
|
|
137
|
-
}, children: children }))] }));
|
|
138
|
-
}
|
|
139
|
-
/** Preset editor and global activity control contributed to Settings > Plugins. */
|
|
131
|
+
/** One editor per preset; only display preferences are global. */
|
|
140
132
|
export function PromptSettingsCard(props) {
|
|
141
133
|
const { useSettings, setSetting, presetManager, t } = props;
|
|
142
134
|
const snapshot = useSettings(state => state);
|
|
143
|
-
const otherCapabilities = [
|
|
144
|
-
{ field: 'activityIndicatorEnabled', label: 'capabilityActivity', hint: 'capabilityActivityHint' },
|
|
145
|
-
];
|
|
146
135
|
const [open, setOpen] = useState(false);
|
|
147
136
|
if (snapshot.status === 'unavailable')
|
|
148
137
|
return null;
|
|
149
|
-
|
|
150
|
-
return (_jsxs("li", { style: {
|
|
151
|
-
listStyle: 'none',
|
|
152
|
-
border: '1px solid var(--dsw-alias-border-l2)',
|
|
153
|
-
borderRadius: 12,
|
|
154
|
-
background: open ? 'var(--dsw-alias-bg-layer-2)' : 'var(--dsw-alias-bg-layer-3)',
|
|
155
|
-
overflow: 'hidden',
|
|
156
|
-
}, children: [_jsxs("button", { type: "button", "aria-expanded": open, "aria-label": `${t(open ? 'promptCollapse' : 'promptExpand')}: ${t('promptCardTitle')}`, onClick: () => { setOpen(!open); }, style: {
|
|
157
|
-
width: '100%',
|
|
158
|
-
border: 0,
|
|
159
|
-
background: 'none',
|
|
160
|
-
color: 'inherit',
|
|
161
|
-
padding: '14px 16px',
|
|
162
|
-
display: 'flex',
|
|
163
|
-
alignItems: 'center',
|
|
164
|
-
gap: 12,
|
|
165
|
-
textAlign: 'left',
|
|
166
|
-
cursor: 'pointer',
|
|
167
|
-
font: 'inherit',
|
|
168
|
-
}, children: [_jsxs("span", { style: { flex: 1, minWidth: 0, display: 'flex', flexDirection: 'column', gap: 4 }, children: [_jsx("strong", { style: { fontSize: 15, lineHeight: 1.4 }, children: t('promptCardTitle') }), _jsx("span", { style: { color: 'var(--dsw-alias-label-tertiary)', fontSize: 13, lineHeight: 1.5 }, children: t('promptCardDescription') })] }), _jsx("span", { "aria-hidden": "true", style: { color: 'var(--dsw-alias-label-tertiary)', fontSize: 16 }, children: open ? '-' : '+' })] }), open && (_jsxs("div", { style: { borderTop: '1px solid var(--dsw-alias-border-l2)', margin: '0 16px', padding: '12px 0' }, children: [_jsx(PresetManagerCard, { presetManager: presetManager, t: t }), _jsxs("details", { style: { marginTop: 22, borderTop: '1px solid var(--dsw-alias-border-l2)', paddingTop: 14 }, children: [_jsx("summary", { style: { cursor: 'pointer', fontWeight: 600, marginBottom: 14 }, children: t('pmGlobalSettings') }), !snapshot.writable && (_jsx("p", { style: { margin: '0 0 10px', color: 'var(--dsw-alias-label-tertiary)', fontSize: 12 }, children: t('promptReadOnly') })), _jsx(CapabilityGroup, { id: "global-capabilities", label: t('otherCapabilitiesLabel'), accent: "var(--dsw-alias-label-tertiary)", children: otherCapabilities.map(renderCapability) })] })] }))] }));
|
|
138
|
+
return _jsxs("li", { style: { listStyle: 'none', border: '1px solid var(--dsw-alias-border-l2)', borderRadius: 12, overflow: 'hidden' }, children: [_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen(!open), style: { width: '100%', padding: 16, textAlign: 'left', border: 0, background: 'none', color: 'inherit', cursor: 'pointer' }, children: [_jsx("strong", { children: t('promptCardTitle') }), _jsx("span", { style: { float: 'right' }, children: open ? '−' : '+' }), _jsx("p", { style: { marginBottom: 0 }, children: t('promptCardDescription') })] }), open && _jsxs("div", { style: { padding: 16, borderTop: '1px solid var(--dsw-alias-border-l2)' }, children: [_jsx(PresetManagerCard, { presetManager: presetManager, t: t }), _jsxs("details", { style: { marginTop: 22, borderTop: '1px solid var(--dsw-alias-border-l2)', paddingTop: 14 }, children: [_jsx("summary", { style: { cursor: 'pointer', fontWeight: 600 }, children: t('pmGlobalSettings') }), _jsx(CapabilityToggle, { field: "activityIndicatorEnabled", label: t('capabilityActivity'), hint: t('capabilityActivityHint'), enabled: snapshot.value?.activityIndicatorEnabled ?? true, disabled: !snapshot.writable, setSetting: setSetting })] })] })] });
|
|
169
139
|
}
|
|
170
140
|
/** The legacy composer seat is a compact inline row, not a menu panel. */
|
|
171
141
|
function FastModeFallback(props) {
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
export declare const presetEn: {
|
|
2
|
+
readonly peConnectionError: "Could not connect to the local service. Retry loading; if the connection still fails, reconnect the page.";
|
|
3
|
+
readonly peReadError: "Could not read this preset. Retry loading or refresh the preset list.";
|
|
4
|
+
readonly peRetryRead: "Retry loading";
|
|
5
|
+
readonly peReconnect: "Reconnect page";
|
|
6
|
+
readonly peSystemPrompt: "System prompt sections";
|
|
7
|
+
readonly peSectionsHint: "These templates contribute to this preset’s system prompt before the tools. Runtime variables, workspace instructions and plugin-provided guidance are assembled when the conversation runs.";
|
|
8
|
+
readonly peDynamicPrompt: "This field is an expression; it is preserved without executing it in the editor.";
|
|
9
|
+
readonly peDshSourcePrompt: "Tells the agent where the DSH source checkout is and keeps it separate from the current workspace. It is used when inspecting or extending DSH itself.";
|
|
10
|
+
readonly peDshWebPrompt: "Tells the agent which Web page it is talking through, what “this page” means, and when Web changes need a rebuild or refresh.";
|
|
11
|
+
readonly peSuppressed: "Not used";
|
|
12
|
+
readonly peCompletePersona: "This preset uses Persona as its entire system prompt, so this section is excluded.";
|
|
13
|
+
readonly peLoading: "Reading preset…";
|
|
2
14
|
readonly peTitle: "Preset editor";
|
|
3
15
|
readonly peHierarchy: "Codex mode and other presets are peers. Choose one to edit, or make an editable copy of a built-in preset first.";
|
|
4
16
|
readonly peSelect: "Preset";
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
export const presetEn = {
|
|
2
|
+
peConnectionError: 'Could not connect to the local service. Retry loading; if the connection still fails, reconnect the page.',
|
|
3
|
+
peReadError: 'Could not read this preset. Retry loading or refresh the preset list.',
|
|
4
|
+
peRetryRead: 'Retry loading',
|
|
5
|
+
peReconnect: 'Reconnect page',
|
|
6
|
+
peSystemPrompt: 'System prompt sections',
|
|
7
|
+
peSectionsHint: 'These templates contribute to this preset’s system prompt before the tools. Runtime variables, workspace instructions and plugin-provided guidance are assembled when the conversation runs.',
|
|
8
|
+
peDynamicPrompt: 'This field is an expression; it is preserved without executing it in the editor.',
|
|
9
|
+
peDshSourcePrompt: 'Tells the agent where the DSH source checkout is and keeps it separate from the current workspace. It is used when inspecting or extending DSH itself.',
|
|
10
|
+
peDshWebPrompt: 'Tells the agent which Web page it is talking through, what “this page” means, and when Web changes need a rebuild or refresh.',
|
|
11
|
+
peSuppressed: 'Not used',
|
|
12
|
+
peCompletePersona: 'This preset uses Persona as its entire system prompt, so this section is excluded.',
|
|
13
|
+
peLoading: 'Reading preset…',
|
|
2
14
|
peTitle: 'Preset editor',
|
|
3
15
|
peHierarchy: 'Codex mode and other presets are peers. Choose one to edit, or make an editable copy of a built-in preset first.',
|
|
4
16
|
peSelect: 'Preset',
|
|
@@ -27,6 +39,18 @@ export const presetEn = {
|
|
|
27
39
|
pmSave: 'Save changes',
|
|
28
40
|
};
|
|
29
41
|
export const presetZh = {
|
|
42
|
+
peConnectionError: '未能连接本地服务。请重试读取;如果仍然失败,请重新连接页面。',
|
|
43
|
+
peReadError: '无法读取这个预设,请重试读取或刷新预设列表。',
|
|
44
|
+
peRetryRead: '重试读取',
|
|
45
|
+
peReconnect: '重新连接页面',
|
|
46
|
+
peSystemPrompt: '系统提示词',
|
|
47
|
+
peSectionsHint: '这些模板共同组成当前预设在工具之前的系统提示词。运行时变量、工作区指令和插件提供的说明会在会话中组装。',
|
|
48
|
+
peDynamicPrompt: '此字段是动态表达式,编辑器保留原值,不执行表达式。',
|
|
49
|
+
peDshSourcePrompt: '告诉 Agent DSH 源码检出目录在哪里,并与当前工作区区分开;用于检查或扩展 DSH 本身。',
|
|
50
|
+
peDshWebPrompt: '告诉 Agent 当前通过哪个 Web 页面交互、“这个页面”指什么,以及 Web 修改何时需要重建或刷新。',
|
|
51
|
+
peSuppressed: '未使用',
|
|
52
|
+
peCompletePersona: '此预设将 Persona 作为完整系统提示词,因此不使用这一段。',
|
|
53
|
+
peLoading: '正在读取预设…',
|
|
30
54
|
peTitle: '预设编辑',
|
|
31
55
|
peHierarchy: 'Codex 模式和其它预设处于同一级。选择一个预设编辑;内置预设先创建可编辑副本。',
|
|
32
56
|
peSelect: '选择预设',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { DEFAULT_CODEX_SYSTEM_PROMPT } from "../prompt.js";
|
|
4
|
+
import { isPresetConnectionError, readPresetWithRetry } from "./preset-requests.js";
|
|
3
5
|
const catalogCache = new WeakMap();
|
|
6
|
+
const documentCache = new WeakMap();
|
|
4
7
|
const CODEX_DEFAULT_ID = 'codex-collaboration';
|
|
5
8
|
function unwrap(result) {
|
|
6
9
|
if (result.ok)
|
|
@@ -12,7 +15,8 @@ function equalEditorState(a, b) {
|
|
|
12
15
|
return a === b;
|
|
13
16
|
return a.name === b.name && a.description === b.description && a.systemPrompt === b.systemPrompt
|
|
14
17
|
&& a.inheritPrompt === b.inheritPrompt && a.codex === b.codex
|
|
15
|
-
&& JSON.stringify(a.codexOptions) === JSON.stringify(b.codexOptions)
|
|
18
|
+
&& JSON.stringify(a.codexOptions) === JSON.stringify(b.codexOptions)
|
|
19
|
+
&& JSON.stringify(a.promptSections) === JSON.stringify(b.promptSections);
|
|
16
20
|
}
|
|
17
21
|
const styles = `
|
|
18
22
|
.codex-preset-editor { display:grid; gap:12px; min-width:0; font-size:13px; }
|
|
@@ -42,8 +46,13 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
42
46
|
const [codexEnabled, setCodexEnabled] = useState(false);
|
|
43
47
|
const [busy, setBusy] = useState(false);
|
|
44
48
|
const [error, setError] = useState('');
|
|
49
|
+
const [errorAction, setErrorAction] = useState('read');
|
|
45
50
|
const [notice, setNotice] = useState('');
|
|
46
51
|
const alive = useRef(true);
|
|
52
|
+
const request = useRef(0);
|
|
53
|
+
if (!documentCache.has(presetManager))
|
|
54
|
+
documentCache.set(presetManager, new Map());
|
|
55
|
+
const cache = documentCache.get(presetManager);
|
|
47
56
|
const remote = presetManager.remote.codexPresetEditor;
|
|
48
57
|
const dirty = !!draft && (!original || !equalEditorState(draft, original) || codexEnabled !== draft.codex);
|
|
49
58
|
async function run(work) {
|
|
@@ -69,9 +78,13 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
69
78
|
return;
|
|
70
79
|
if (confirmDirty && dirty && !window.confirm(t('pmDiscard')))
|
|
71
80
|
return;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
const ticket = ++request.current;
|
|
82
|
+
setSelectedId(id);
|
|
83
|
+
setError('');
|
|
84
|
+
setNotice('');
|
|
85
|
+
setErrorAction('read');
|
|
86
|
+
const accept = (value) => {
|
|
87
|
+
if (!alive.current || ticket !== request.current)
|
|
75
88
|
return;
|
|
76
89
|
setSelectedId(id);
|
|
77
90
|
setSourceId(id);
|
|
@@ -79,10 +92,33 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
79
92
|
setDraft(value);
|
|
80
93
|
setCopyMode(false);
|
|
81
94
|
setCodexEnabled(value.codex);
|
|
82
|
-
}
|
|
95
|
+
};
|
|
96
|
+
const cached = cache.get(id);
|
|
97
|
+
if (cached && Date.now() - cached.time < 60_000) {
|
|
98
|
+
accept(cached.value);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
setDraft(undefined);
|
|
102
|
+
setOriginal(undefined);
|
|
103
|
+
setBusy(true);
|
|
104
|
+
try {
|
|
105
|
+
await presetManager.ready;
|
|
106
|
+
const value = await readPresetWithRetry(() => remote.read(id).then(unwrap), () => alive.current && ticket === request.current);
|
|
107
|
+
cache.set(id, { value, time: Date.now() });
|
|
108
|
+
accept(value);
|
|
109
|
+
}
|
|
110
|
+
catch (cause) {
|
|
111
|
+
if (alive.current && ticket === request.current)
|
|
112
|
+
setError(String(cause));
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
if (alive.current && ticket === request.current)
|
|
116
|
+
setBusy(false);
|
|
117
|
+
}
|
|
83
118
|
}
|
|
84
119
|
async function refresh() {
|
|
85
|
-
|
|
120
|
+
setErrorAction('read');
|
|
121
|
+
const value = await readPresetWithRetry(() => remote.catalog().then(unwrap), () => alive.current);
|
|
86
122
|
if (!alive.current)
|
|
87
123
|
return;
|
|
88
124
|
catalogCache.set(presetManager, value);
|
|
@@ -111,8 +147,6 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
111
147
|
function beginCopy() {
|
|
112
148
|
if (!draft || !sourceId)
|
|
113
149
|
return;
|
|
114
|
-
if (dirty && !window.confirm(t('pmDiscard')))
|
|
115
|
-
return;
|
|
116
150
|
setCopyMode(true);
|
|
117
151
|
setCodexEnabled(draft.codex);
|
|
118
152
|
setOriginal({ ...draft });
|
|
@@ -121,9 +155,11 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
121
155
|
function save() {
|
|
122
156
|
if (!draft || busy || !draft.name.trim())
|
|
123
157
|
return;
|
|
158
|
+
setErrorAction('save');
|
|
124
159
|
void run(async () => {
|
|
125
160
|
const options = codexEnabled ? draft.codexOptions : undefined;
|
|
126
161
|
const payload = { name: draft.name, description: draft.description, systemPrompt: draft.systemPrompt,
|
|
162
|
+
promptSections: draft.promptSections.filter(section => section.editable && (codexEnabled || section.id !== 'codex:base')),
|
|
127
163
|
inheritPrompt: draft.inheritPrompt, enableCodex: codexEnabled, ...(options === undefined ? {} : { codexOptions: options }) };
|
|
128
164
|
const value = unwrap(await (copyMode
|
|
129
165
|
? remote.create({ ...payload, sourceId })
|
|
@@ -134,6 +170,7 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
134
170
|
setSourceId(value.id);
|
|
135
171
|
setOriginal(value);
|
|
136
172
|
setDraft(value);
|
|
173
|
+
cache.set(value.id, { value, time: Date.now() });
|
|
137
174
|
setCopyMode(false);
|
|
138
175
|
setCodexEnabled(value.codex);
|
|
139
176
|
setNotice(t('peSaved'));
|
|
@@ -150,7 +187,31 @@ export function PresetManagerCard({ presetManager, t }) {
|
|
|
150
187
|
const selectedRow = catalog?.presets.find(row => row.id === selectedId);
|
|
151
188
|
const readOnly = !!draft && !draft.editable && !copyMode;
|
|
152
189
|
const options = draft?.codexOptions;
|
|
153
|
-
return _jsxs("section", { className: "codex-preset-editor", "aria-label": t('peTitle'), "aria-busy": busy, children: [_jsx("style", { children: styles }), _jsxs("div", { className: "pe-row", style: { justifyContent: 'space-between' }, children: [_jsx("strong", { children: t('peTitle') }), _jsx("button", { type: "button", disabled: busy, onClick: () => {
|
|
190
|
+
return _jsxs("section", { className: "codex-preset-editor", "aria-label": t('peTitle'), "aria-busy": busy, children: [_jsx("style", { children: styles }), _jsxs("div", { className: "pe-row", style: { justifyContent: 'space-between' }, children: [_jsx("strong", { children: t('peTitle') }), _jsx("button", { type: "button", disabled: busy, onClick: () => { if (dirty && !window.confirm(t('pmDiscard')))
|
|
191
|
+
return; cache.clear(); void run(async () => { await refresh(); if (selectedId)
|
|
192
|
+
await load(selectedId, false); }); }, children: t('pmRefresh') })] }), _jsx("p", { children: t('peHierarchy') }), _jsxs("label", { children: [t('peSelect'), _jsxs("select", { value: selectedId, disabled: busy || !catalog, onChange: event => { void load(event.target.value); }, children: [_jsx("option", { value: "", children: t('peSelectPlaceholder') }), catalog?.presets.map(row => _jsxs("option", { value: row.id, children: [row.name, row.editable ? '' : ` · ${t('pmBuiltIn')}`] }, row.id))] })] }), selectedRow && _jsx("p", { children: selectedRow.editable ? t('peEditable') : t('peBuiltinEdit') }), error && _jsxs("div", { role: "alert", children: [_jsx("p", { children: errorAction === 'read'
|
|
193
|
+
? t(isPresetConnectionError(error) ? 'peConnectionError' : 'peReadError')
|
|
194
|
+
: error.includes('preset-conflict') ? t('pmConflict') : error.includes('invalid-preset-yaml') ? t('pmYamlError') : t('pmSaveError') }), errorAction === 'read' && _jsxs("div", { className: "pe-row", children: [_jsx("button", { type: "button", disabled: busy, onClick: () => { if (selectedId) {
|
|
195
|
+
cache.delete(selectedId);
|
|
196
|
+
void load(selectedId, false);
|
|
197
|
+
}
|
|
198
|
+
else
|
|
199
|
+
void run(refresh); }, children: t('peRetryRead') }), !draft && isPresetConnectionError(error) && _jsx("button", { type: "button", onClick: () => window.location.reload(), children: t('peReconnect') })] }), _jsxs("details", { children: [_jsx("summary", { children: t('pmErrorDetails') }), _jsx("pre", { style: { whiteSpace: 'pre-wrap' }, children: error })] })] }), notice && _jsx("p", { role: "status", children: notice }), busy && !draft && _jsx("p", { role: "status", children: t('peLoading') }), draft && _jsxs(_Fragment, { children: [_jsxs("label", { children: [t('pmName'), _jsx("input", { value: draft.name, maxLength: 200, disabled: busy || readOnly, onChange: event => patch({ name: event.target.value }) })] }), _jsxs("label", { children: [t('pmDescription'), _jsx("input", { value: draft.description, maxLength: 4000, disabled: busy || readOnly, onChange: event => patch({ description: event.target.value }) })] }), !copyMode && _jsx("button", { type: "button", disabled: busy || !catalog?.authorable, onClick: beginCopy, children: t('peCreateCopy') }), _jsxs("div", { className: "pe-block", children: [_jsx("strong", { children: t('peSystemPrompt') }), _jsx("p", { children: t('peSectionsHint') }), draft.promptSections.map(section => _jsxs("details", { children: [_jsxs("summary", { style: { cursor: 'pointer', padding: '6px 0' }, children: [section.label, section.suppressed ? ` · ${t('peSuppressed')}` : ''] }), section.id === 'harness:source' && _jsx("p", { children: t('peDshSourcePrompt') }), section.id === 'app:web-surface' && _jsx("p", { children: t('peDshWebPrompt') }), _jsx("textarea", { "aria-label": section.label, rows: section.id === 'codex:base' ? 12 : 5, value: section.text, disabled: busy || readOnly || !section.editable, onChange: event => patch({ promptSections: draft.promptSections.map(item => item.id === section.id ? { ...item, text: event.target.value } : item),
|
|
200
|
+
...(section.id === 'codex:base' ? { systemPrompt: event.target.value, inheritPrompt: false } : {}) }) }), section.suppressed ? _jsx("p", { children: t('peCompletePersona') }) : !section.editable && _jsx("p", { children: t('peDynamicPrompt') })] }, section.id))] }), !readOnly && _jsxs(_Fragment, { children: [_jsxs("div", { className: "pe-block", children: [_jsx("strong", { children: t('peCodexSection') }), !draft.codex && _jsxs("label", { className: "pe-toggle", children: [_jsx("input", { type: "checkbox", checked: codexEnabled, disabled: busy, onChange: event => {
|
|
201
|
+
const enabled = event.target.checked;
|
|
202
|
+
setCodexEnabled(enabled);
|
|
203
|
+
if (enabled) {
|
|
204
|
+
const extras = [
|
|
205
|
+
{ id: 'codex:base', label: 'Codex 操作提示词', text: DEFAULT_CODEX_SYSTEM_PROMPT, editable: true },
|
|
206
|
+
];
|
|
207
|
+
patch({ promptSections: [...draft.promptSections.map(s => s.suppressed ? { ...s, suppressed: undefined, editable: true } : s), ...extras.filter(item => !draft.promptSections.some(s => s.id === item.id))] });
|
|
208
|
+
}
|
|
209
|
+
else
|
|
210
|
+
patch({ promptSections: draft.promptSections.filter(s => original?.promptSections.some(item => item.id === s.id)).map(s => {
|
|
211
|
+
const source = original?.promptSections.find(item => item.id === s.id);
|
|
212
|
+
return source?.suppressed ? { ...s, suppressed: true, editable: false } : s;
|
|
213
|
+
}) });
|
|
214
|
+
} }), _jsxs("span", { children: [_jsx("strong", { children: t('peAddCodex') }), _jsx("small", { children: t('peAddCodexHint') })] })] }), codexEnabled && options && _jsxs(_Fragment, { children: [optionToggle('hostedWebSearchEnabled', t('capabilityWebSearch'), t('capabilityWebSearchHint'), options, next => patch({ codexOptions: next }), busy), optionToggle('remoteCompactionEnabled', t('capabilityCompaction'), t('capabilityCompactionHint'), options, next => patch({ codexOptions: next }), busy), optionToggle('terminalToolsEnabled', t('capabilityTerminal'), t('capabilityTerminalHint'), options, next => patch({ codexOptions: next }), busy), optionToggle('patchToolEnabled', t('capabilityPatch'), t('capabilityPatchHint'), options, next => patch({ codexOptions: next }), busy), optionToggle('planToolEnabled', t('capabilityPlan'), t('capabilityPlanHint'), options, next => patch({ codexOptions: next }), busy), optionToggle('promptEnabled', t('capabilityPrompt'), t('capabilityPromptHint'), options, next => patch({ codexOptions: next }), busy), _jsx("p", { children: t('peActivityGlobal') })] })] }), _jsxs("div", { className: "pe-row", children: [_jsx("button", { type: "button", className: "pe-primary", disabled: busy || !catalog?.authorable || !draft.name.trim() || !dirty, onClick: save, children: copyMode ? t('peSaveCopy') : t('pmSave') }), copyMode && _jsx("button", { type: "button", disabled: busy, onClick: () => { void load(sourceId, false); }, children: t('pmCancel') }), !copyMode && _jsx("button", { type: "button", disabled: busy, onClick: () => { void load(draft.id, false); }, children: t('pmCancel') })] })] })] })] });
|
|
154
215
|
}
|
|
155
216
|
export default PresetManagerCard;
|
|
156
217
|
//# sourceMappingURL=preset-manager.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Only transport failures from a read can be retried without duplicating writes. */
|
|
2
|
+
export declare function isPresetConnectionError(error: unknown): boolean;
|
|
3
|
+
export declare function readPresetWithRetry<T>(read: () => Promise<T>, active: () => boolean): Promise<T>;
|
|
4
|
+
//# sourceMappingURL=preset-requests.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Only transport failures from a read can be retried without duplicating writes. */
|
|
2
|
+
export function isPresetConnectionError(error) {
|
|
3
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4
|
+
return /Failed to fetch|NetworkError|Load failed|network request failed|no active Connection|connection.*(?:closed|offline)/i.test(message);
|
|
5
|
+
}
|
|
6
|
+
export async function readPresetWithRetry(read, active) {
|
|
7
|
+
try {
|
|
8
|
+
return await read();
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (!isPresetConnectionError(error) || !active())
|
|
12
|
+
throw error;
|
|
13
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
14
|
+
if (!active())
|
|
15
|
+
throw error;
|
|
16
|
+
return read();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=preset-requests.js.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface Config {
|
|
|
32
32
|
systemPrompt?: string;
|
|
33
33
|
/** Explicit per-preset operating prompt; overrides the shared prompt only. */
|
|
34
34
|
presetPrompt?: string;
|
|
35
|
+
presetSections?: import('./prompt-sections.ts').Config;
|
|
35
36
|
/** Per-preset Codex capability overrides. Omitted values follow shared settings. */
|
|
36
37
|
promptEnabled?: boolean;
|
|
37
38
|
terminalToolsEnabled?: boolean;
|
package/lib/types/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { DEFAULT_CODEX_PERSONA, DEFAULT_CODEX_SYSTEM_PROMPT, DEFAULT_DSH_CORE_SO
|
|
|
9
9
|
import { CODEX_SETTINGS_ENTRY, CODEX_SETTINGS_NAMESPACE, CODEX_SETTINGS_SCHEMA, } from "./settings.js";
|
|
10
10
|
import { codexCompactionMode } from "./compaction.js";
|
|
11
11
|
import { CodexPresetEditor } from "./preset-editor.js";
|
|
12
|
+
import { applyPromptSections, Config as PromptSectionsConfig } from "./prompt-sections.js";
|
|
12
13
|
export { DEFAULT_CODEX_PERSONA, DEFAULT_CODEX_SYSTEM_PROMPT, DEFAULT_DSH_CORE_SOURCE_PROMPT, DEFAULT_DSH_CORE_WEB_PROMPT, } from "./prompt.js";
|
|
13
14
|
export { CODEX_SETTINGS_NAMESPACE, CODEX_SETTINGS_SCHEMA } from "./settings.js";
|
|
14
15
|
export const name = 'codex';
|
|
@@ -44,6 +45,7 @@ export const Config = z.object({
|
|
|
44
45
|
remoteCompact: z.boolean().default(true),
|
|
45
46
|
systemPrompt: z.string().default(DEFAULT_CODEX_SYSTEM_PROMPT),
|
|
46
47
|
presetPrompt: z.string(),
|
|
48
|
+
presetSections: PromptSectionsConfig,
|
|
47
49
|
promptEnabled: z.boolean(),
|
|
48
50
|
terminalToolsEnabled: z.boolean(),
|
|
49
51
|
patchToolEnabled: z.boolean(),
|
|
@@ -719,7 +721,7 @@ export function apply(ctx, config = {}) {
|
|
|
719
721
|
}));
|
|
720
722
|
}
|
|
721
723
|
if (resolved.codexCore) {
|
|
722
|
-
ctx.on('system-prompt/assemble', async (_assembly, _context, next) => applyCodexCapabilitySettings(await next(), codexSettings.current()));
|
|
724
|
+
ctx.on('system-prompt/assemble', async (_assembly, _context, next) => applyPromptSections(applyCodexCapabilitySettings(await next(), codexSettings.current()), config.presetSections ?? {}));
|
|
723
725
|
ctx.systemPrompt.section({
|
|
724
726
|
name: 'codex:base',
|
|
725
727
|
order: 10,
|
|
@@ -5,6 +5,14 @@ export interface PresetFields {
|
|
|
5
5
|
systemPrompt: string;
|
|
6
6
|
inheritPrompt: boolean;
|
|
7
7
|
}
|
|
8
|
+
export interface PresetPromptSection {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
text: string;
|
|
12
|
+
editable: boolean;
|
|
13
|
+
/** Excluded by a complete Persona; shown for inspection, never saved as an active section. */
|
|
14
|
+
suppressed?: boolean;
|
|
15
|
+
}
|
|
8
16
|
/** Codex capabilities stored with a preset. Activity status stays global. */
|
|
9
17
|
export interface CodexPresetOptions {
|
|
10
18
|
promptEnabled: boolean;
|
|
@@ -21,17 +29,20 @@ export interface PresetEditorDocument extends PresetFields {
|
|
|
21
29
|
codex: boolean;
|
|
22
30
|
codexOptions: CodexPresetOptions;
|
|
23
31
|
composition: string;
|
|
32
|
+
promptSections: PresetPromptSection[];
|
|
24
33
|
}
|
|
25
34
|
export interface PresetEditorInput extends PresetFields {
|
|
26
35
|
id: string;
|
|
27
36
|
revision?: string;
|
|
28
37
|
composition?: string;
|
|
29
38
|
enableCodex?: boolean;
|
|
39
|
+
promptSections?: PresetPromptSection[];
|
|
30
40
|
codexOptions?: Partial<CodexPresetOptions>;
|
|
31
41
|
}
|
|
32
42
|
export interface PresetCreateInput extends PresetFields {
|
|
33
43
|
sourceId: string;
|
|
34
44
|
enableCodex?: boolean;
|
|
45
|
+
promptSections?: PresetPromptSection[];
|
|
35
46
|
composition?: string;
|
|
36
47
|
codexOptions?: Partial<CodexPresetOptions>;
|
|
37
48
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
const promptSections = z.array(z.object({ id: z.string(), label: z.string(), text: z.string().max(1_000_000), editable: z.boolean(), suppressed: z.boolean().optional() })).max(200);
|
|
2
3
|
const fields = {
|
|
3
4
|
name: z.string().max(200), description: z.string().max(4000),
|
|
4
5
|
systemPrompt: z.string().max(1_000_000), inheritPrompt: z.boolean(),
|
|
@@ -8,7 +9,7 @@ const codexOptions = z.object({
|
|
|
8
9
|
planToolEnabled: z.boolean(), hostedWebSearchEnabled: z.boolean(), remoteCompactionEnabled: z.boolean(),
|
|
9
10
|
});
|
|
10
11
|
const codexOptionsPatch = codexOptions.partial();
|
|
11
|
-
const document = z.object({ ...fields, id: z.string(), revision: z.string(), editable: z.boolean(), codex: z.boolean(), codexOptions, composition: z.string() });
|
|
12
|
+
const document = z.object({ ...fields, id: z.string(), revision: z.string(), editable: z.boolean(), codex: z.boolean(), codexOptions, promptSections, composition: z.string() });
|
|
12
13
|
const catalog = z.object({
|
|
13
14
|
presets: z.array(z.object({ id: z.string(), name: z.string(), description: z.string(),
|
|
14
15
|
editable: z.boolean(), isDefault: z.boolean() })),
|
|
@@ -29,8 +30,8 @@ export default {
|
|
|
29
30
|
descriptors: [
|
|
30
31
|
descriptor('catalog', undefined, z.unknown(), catalog),
|
|
31
32
|
descriptor('read', 'id', z.string(), document),
|
|
32
|
-
descriptor('update', 'rawInput', z.object({ ...fields, id: z.string(), revision: z.string().optional(), composition: z.string().max(1_000_000).optional(), enableCodex: z.boolean().optional(), codexOptions: codexOptionsPatch.optional() }), document),
|
|
33
|
-
descriptor('create', 'rawInput', z.object({ ...fields, sourceId: z.string(), enableCodex: z.boolean().optional(), composition: z.string().max(1_000_000).optional(), codexOptions: codexOptionsPatch.optional() }), document),
|
|
33
|
+
descriptor('update', 'rawInput', z.object({ ...fields, id: z.string(), revision: z.string().optional(), composition: z.string().max(1_000_000).optional(), enableCodex: z.boolean().optional(), promptSections: promptSections.optional(), codexOptions: codexOptionsPatch.optional() }), document),
|
|
34
|
+
descriptor('create', 'rawInput', z.object({ ...fields, sourceId: z.string(), enableCodex: z.boolean().optional(), composition: z.string().max(1_000_000).optional(), promptSections: promptSections.optional(), codexOptions: codexOptionsPatch.optional() }), document),
|
|
34
35
|
],
|
|
35
36
|
};
|
|
36
37
|
//# sourceMappingURL=preset-editor-remote.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
3
|
-
import type {
|
|
3
|
+
import type { CodexSettings } from './settings.ts';
|
|
4
|
+
import type { CodexPresetOptions, PresetCatalog, PresetCreateInput, PresetEditorInput, PresetEditorDocument, PresetPromptSection } from './preset-contract.ts';
|
|
4
5
|
export type { PresetEditorInput, PresetEditorDocument } from './preset-contract.ts';
|
|
5
6
|
export declare const DEFAULT_CODEX_PRESET_OPTIONS: CodexPresetOptions;
|
|
6
7
|
export interface ResolvedPresetForEditor {
|
|
@@ -8,8 +9,13 @@ export interface ResolvedPresetForEditor {
|
|
|
8
9
|
trust: 'system' | 'user';
|
|
9
10
|
path: string;
|
|
10
11
|
broken?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
description?: string;
|
|
11
14
|
}
|
|
12
15
|
export interface AgentPresetsForEditor {
|
|
16
|
+
list?(): Promise<ResolvedPresetForEditor[]>;
|
|
17
|
+
readonly defaultId?: string;
|
|
18
|
+
readonly authorable?: boolean;
|
|
13
19
|
resolve(id: string): Promise<ResolvedPresetForEditor>;
|
|
14
20
|
readDocument(id: string): Promise<{
|
|
15
21
|
content: string;
|
|
@@ -34,6 +40,9 @@ export interface AgentPresetsForEditor {
|
|
|
34
40
|
trust: 'system' | 'user';
|
|
35
41
|
}[];
|
|
36
42
|
}
|
|
43
|
+
export declare function readPromptSections(content: string, shared?: Partial<CodexSettings>): PresetPromptSection[];
|
|
44
|
+
/** Patch the contributing fields, not a disconnected secondary prompt. */
|
|
45
|
+
export declare function patchPromptSections(content: string, sections: PresetPromptSection[]): string;
|
|
37
46
|
export declare function readCodexPresetOptions(content: string): CodexPresetOptions;
|
|
38
47
|
export declare function supportsCodex(content: string): boolean;
|
|
39
48
|
/** Structural validation only: executable tags stay inert until DSH mounts a selected preset. */
|
|
@@ -47,6 +56,8 @@ export declare function patchPresetMetadata(content: string, name: string, descr
|
|
|
47
56
|
export declare class CodexPresetEditor extends TypertRemoteService {
|
|
48
57
|
static inject: string[];
|
|
49
58
|
private readonly agentPresets;
|
|
59
|
+
private sharedSettings?;
|
|
60
|
+
private indexed?;
|
|
50
61
|
constructor(ctx: Context, _config?: undefined);
|
|
51
62
|
catalog(): Promise<PresetCatalog>;
|
|
52
63
|
read(id: string): Promise<PresetEditorDocument>;
|