dsh-agent-team-playbook 1.25.0 → 1.28.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/README.md +10 -0
- package/bin/cli.mjs +5 -3
- package/client.js +360 -0
- package/lib/index.js +194 -15
- package/lib/install.js +8 -5
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -105,8 +105,18 @@ dsh plugin --profile web add dsh-agent-team-playbook
|
|
|
105
105
|
| `/atp paths` | 各分册的绝对路径,按需查阅 |
|
|
106
106
|
| `/atp install` | 把 playbook **原子安装进当前工作区**(有同名内容则拒绝,不覆盖) |
|
|
107
107
|
| `/atp install force` | 覆盖同名内容后安装(先暂存原件,失败自动回滚) |
|
|
108
|
+
| `/atp apply 1=覆盖 2=备份 3=改名:x` | 对 install 列出的冲突**逐项决定**(覆盖 / 备份你的文件 / 我们这侧改名并同步引用) |
|
|
108
109
|
| `/atp help` | 用法 |
|
|
109
110
|
|
|
111
|
+
**Web / 桌面端还会多一个设置面板**(设置 → 协作规程):
|
|
112
|
+
|
|
113
|
+
- 显示当前工作区是否已安装、有无同名冲突
|
|
114
|
+
- 有冲突时点「**逐项处理冲突…**」弹出对话框:每项可选 **覆盖 / 备份 / 改名**,底部「应用」
|
|
115
|
+
- 应用时会执行一条 `/atp apply …` 命令(与手动输入**等价**,会在会话里留下审计记录),因此插件**不新增任何写文件接口**
|
|
116
|
+
- 也可以只复制建议命令,自己粘贴执行
|
|
117
|
+
|
|
118
|
+
> dsh-go 手机原生界面不加载浏览器半身,因此没有这个面板——在那边用命令即可。
|
|
119
|
+
|
|
110
120
|
插件**不写任何文件**、也**不挂 skill**——skill 的目录摘要会常驻占用上下文(约 300 tokens/轮),而分册本来就不会自动进上下文,用命令按需取更划算。
|
|
111
121
|
|
|
112
122
|
### ② 装成"常驻上下文"(会写文件,核心价值)
|
package/bin/cli.mjs
CHANGED
|
@@ -283,7 +283,8 @@ async function main() {
|
|
|
283
283
|
// ── 2. 决策 ────────────────────────────────────────────────────────
|
|
284
284
|
const renames = []
|
|
285
285
|
const defaultSuffix = `.bak-${new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14)}`
|
|
286
|
-
let onConflict = '
|
|
286
|
+
let onConflict = 'proceed'
|
|
287
|
+
let backupAllConflicts = false
|
|
287
288
|
let backupSuffix
|
|
288
289
|
let install = true
|
|
289
290
|
const interactive = stdin.isTTY && stdout.isTTY
|
|
@@ -327,7 +328,7 @@ async function main() {
|
|
|
327
328
|
install = false
|
|
328
329
|
console.log(C.dim(' --skip-conflicts:整体跳过(不会只装一半)'))
|
|
329
330
|
} else if (opts.backupExisting) {
|
|
330
|
-
|
|
331
|
+
backupAllConflicts = true
|
|
331
332
|
backupSuffix = defaultSuffix
|
|
332
333
|
console.log(C.dim(` --backup-existing:已有冲突项改名为 *${defaultSuffix} 后安装`))
|
|
333
334
|
} else if (!interactive) {
|
|
@@ -353,7 +354,7 @@ async function main() {
|
|
|
353
354
|
console.error(C.red(' 后缀只能含字母数字点下划线横线,已中止。'))
|
|
354
355
|
process.exit(1)
|
|
355
356
|
}
|
|
356
|
-
|
|
357
|
+
backupAllConflicts = true
|
|
357
358
|
backupSuffix = suffix
|
|
358
359
|
} else if (answer === 'r') {
|
|
359
360
|
for (const unit of new Set(unresolved.map((c) => c.unit))) {
|
|
@@ -401,6 +402,7 @@ async function main() {
|
|
|
401
402
|
targetDir: opts.dir,
|
|
402
403
|
onConflict,
|
|
403
404
|
renames,
|
|
405
|
+
backupTargets: backupAllConflicts ? conflicts.map((c) => c.target) : [],
|
|
404
406
|
backupSuffix,
|
|
405
407
|
})
|
|
406
408
|
|
package/client.js
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-agent-team-playbook — 浏览器半身(Step 1:只读面板)
|
|
3
|
+
*
|
|
4
|
+
* 形态照抄官方内置插件(如 @deepseek-ai/dsh-client-ui-open-in-app):
|
|
5
|
+
* 手写 window.__ModuleLoader__.load({ id, factory }),无构建步骤,
|
|
6
|
+
* require 由 shell 提供(react / primitives / slots …)。
|
|
7
|
+
*
|
|
8
|
+
* 两步中的第二步:面板 + 冲突处理弹窗。
|
|
9
|
+
* 弹窗里逐项选择 覆盖 / 备份 / 改名,点"应用"后**通过 official Remote 执行**
|
|
10
|
+
* `remote.commands.execute(sessionId, '/atp apply …')` —— 与手动输入等价、有审计记录,
|
|
11
|
+
* 因此不需要任何自定义写文件接口。
|
|
12
|
+
*
|
|
13
|
+
* 面板本身仍然只读:
|
|
14
|
+
* · 显示当前工作区是否已安装、有无同名冲突
|
|
15
|
+
* · 冲突项可一键复制建议命令(真正的写入仍由用户执行 /atp apply,可见可审计)
|
|
16
|
+
* 不做任何写操作,也不直接调用命令。
|
|
17
|
+
*/
|
|
18
|
+
window.__ModuleLoader__.load({
|
|
19
|
+
id: 'dsh-agent-team-playbook',
|
|
20
|
+
factory: (require) => {
|
|
21
|
+
const module = { exports: {} }
|
|
22
|
+
const exports = module.exports
|
|
23
|
+
|
|
24
|
+
const React = require('react')
|
|
25
|
+
const primitives = require('@deepseek-ai/dsh-client-ui-primitives')
|
|
26
|
+
|
|
27
|
+
const h = React.createElement
|
|
28
|
+
const { useCallback, useEffect, useMemo, useState } = React
|
|
29
|
+
|
|
30
|
+
const NAME = 'dsh-agent-team-playbook'
|
|
31
|
+
const API = '/api/agent-team-playbook/status'
|
|
32
|
+
const Button = primitives?.Button
|
|
33
|
+
const Modal = primitives?.Modal
|
|
34
|
+
|
|
35
|
+
// ── 极简 store:面板与弹窗共享"待处理冲突"状态 ─────────────────────────
|
|
36
|
+
const store = { state: { open: false, cwd: '', sessionId: '', conflicts: [], busy: false, message: '' }, listeners: new Set() }
|
|
37
|
+
const readStore = () => store.state
|
|
38
|
+
const writeStore = (patch) => {
|
|
39
|
+
store.state = { ...store.state, ...patch }
|
|
40
|
+
for (const fn of store.listeners) fn()
|
|
41
|
+
}
|
|
42
|
+
const subscribeStore = (fn) => {
|
|
43
|
+
store.listeners.add(fn)
|
|
44
|
+
return () => store.listeners.delete(fn)
|
|
45
|
+
}
|
|
46
|
+
const useStore = () => {
|
|
47
|
+
const [snap, setSnap] = React.useState(readStore)
|
|
48
|
+
React.useEffect(() => subscribeStore(() => setSnap(readStore())), [])
|
|
49
|
+
return snap
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** 把逐项选择拼成一条 /atp apply 命令(导出给测试)。 */
|
|
53
|
+
function buildApplySpec(choices) {
|
|
54
|
+
const parts = choices.map((c, i) => {
|
|
55
|
+
if (c.action === 'backup') return `${i + 1}=备份`
|
|
56
|
+
if (c.action === 'rename') return `${i + 1}=改名:${c.name}`
|
|
57
|
+
return `${i + 1}=覆盖`
|
|
58
|
+
})
|
|
59
|
+
return `/atp apply ${parts.join(' ')}`
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** 读一次状态;cwd 为空时只验证连通性。 */
|
|
63
|
+
async function fetchStatus(cwd) {
|
|
64
|
+
const url = cwd ? `${API}?cwd=${encodeURIComponent(cwd)}` : API
|
|
65
|
+
const res = await fetch(url, { credentials: 'same-origin', headers: { accept: 'application/json' } })
|
|
66
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
67
|
+
return res.json()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** 取"当前正在看的会话"的 cwd(客户端 sessions 快照里就有)。 */
|
|
71
|
+
function currentCwd(ctx) {
|
|
72
|
+
try {
|
|
73
|
+
const rows = ctx?.sessions?.list?.getSnapshot?.()?.byId ?? {}
|
|
74
|
+
const list = Object.values(rows)
|
|
75
|
+
const active = list.find((row) => (row?.retainedBy?.mainView ?? 0) > 0) ?? list.find((row) => typeof row?.cwd === 'string')
|
|
76
|
+
return typeof active?.cwd === 'string' ? active.cwd : undefined
|
|
77
|
+
} catch {
|
|
78
|
+
return undefined
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** 一行小字 + 值。 */
|
|
83
|
+
function Row({ label, children }) {
|
|
84
|
+
return h(
|
|
85
|
+
'div',
|
|
86
|
+
{ style: { display: 'flex', gap: 8, alignItems: 'baseline', margin: '2px 0' } },
|
|
87
|
+
h('span', { style: { opacity: 0.65, minWidth: 72 } }, label),
|
|
88
|
+
h('span', null, children),
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function LinkButton({ onClick, children }) {
|
|
93
|
+
if (typeof Button === 'function') return h(Button, { onClick, variant: 'secondary' }, children)
|
|
94
|
+
return h('button', { type: 'button', onClick }, children)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** 解析"当前会话"的 cwd 与 sessionId(客户端 sessions 快照)。 */
|
|
98
|
+
function currentSession(ctx) {
|
|
99
|
+
try {
|
|
100
|
+
const rows = ctx?.sessions?.list?.getSnapshot?.()?.byId ?? {}
|
|
101
|
+
const entries = Object.entries(rows)
|
|
102
|
+
const active = entries.find(([, row]) => (row?.retainedBy?.mainView ?? 0) > 0) ?? entries.find(([, row]) => typeof row?.cwd === 'string')
|
|
103
|
+
if (active === undefined) return {}
|
|
104
|
+
const [sessionId, row] = active
|
|
105
|
+
return { sessionId, cwd: typeof row?.cwd === 'string' ? row.cwd : undefined }
|
|
106
|
+
} catch {
|
|
107
|
+
return {}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** 单个冲突的选择行:覆盖 / 备份 / 改名 + 名字输入。 */
|
|
112
|
+
function ChoiceRow({ index, conflict, choice, onChoose, renameEnabled, onRename }) {
|
|
113
|
+
const btn = (action, text) => {
|
|
114
|
+
const active = choice?.action === action
|
|
115
|
+
const props = { key: action, onClick: () => onChoose(index, action) }
|
|
116
|
+
if (typeof Button === 'function') return h(Button, { ...props, variant: active ? 'primary' : 'outline' }, text)
|
|
117
|
+
return h('button', { ...props, type: 'button', style: { fontWeight: active ? 700 : 400 } }, text)
|
|
118
|
+
}
|
|
119
|
+
const children = [
|
|
120
|
+
h('div', { key: 'label', style: { wordBreak: 'break-all', marginBottom: 4 } }, `${index + 1}. ${conflict.rel}`),
|
|
121
|
+
h('div', { key: 'reason', style: { opacity: 0.6, fontSize: 12, marginBottom: 6 } }, conflict.reason),
|
|
122
|
+
h('div', { key: 'btns', style: { display: 'flex', gap: 6, flexWrap: 'wrap' } },
|
|
123
|
+
btn('overwrite', '覆盖'),
|
|
124
|
+
btn('backup', '备份'),
|
|
125
|
+
renameEnabled ? btn('rename', '改名…') : null),
|
|
126
|
+
]
|
|
127
|
+
if (choice?.action === 'rename') {
|
|
128
|
+
children.push(
|
|
129
|
+
h('div', { key: 'rename', style: { marginTop: 6 } },
|
|
130
|
+
h('input', {
|
|
131
|
+
value: choice.name ?? '',
|
|
132
|
+
placeholder: '新名字(如 team-docs / AGENTS.team.md)',
|
|
133
|
+
onChange: (e) => onRename(index, e.target.value),
|
|
134
|
+
style: { width: '100%', padding: '6px 8px', borderRadius: 6, border: '1px solid rgba(127,127,127,0.4)', background: 'transparent', color: 'inherit' },
|
|
135
|
+
}),
|
|
136
|
+
h('div', { style: { opacity: 0.55, fontSize: 12, marginTop: 4 } }, '整份改名:同一类(核心/分册)只需填一次'),
|
|
137
|
+
),
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
return h('div', { key: `row${index}`, style: { padding: '8px 0', borderTop: index === 0 ? 'none' : '1px solid rgba(127,127,127,0.18)' } }, children)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** 冲突处理弹窗(挂在 shell.overlay 上,关闭时渲染 null)。 */
|
|
144
|
+
function ResolveDialog() {
|
|
145
|
+
const state = useStore()
|
|
146
|
+
const [choices, setChoices] = React.useState([])
|
|
147
|
+
const [error, setError] = React.useState('')
|
|
148
|
+
|
|
149
|
+
React.useEffect(() => {
|
|
150
|
+
if (!state.open) return
|
|
151
|
+
setError('')
|
|
152
|
+
setChoices((state.conflicts ?? []).map(() => ({ action: 'overwrite' })))
|
|
153
|
+
}, [state.open, state.conflicts])
|
|
154
|
+
|
|
155
|
+
if (!state.open) return null
|
|
156
|
+
|
|
157
|
+
const isCoreRel = (rel) => rel === 'AGENTS.md'
|
|
158
|
+
const onChoose = (i, action) => {
|
|
159
|
+
setChoices((prev) => {
|
|
160
|
+
const next = [...prev]
|
|
161
|
+
next[i] = { ...(next[i] ?? {}), action }
|
|
162
|
+
return next
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
const onRename = (i, name) => {
|
|
166
|
+
setChoices((prev) => {
|
|
167
|
+
const next = [...prev]
|
|
168
|
+
next[i] = { ...(next[i] ?? {}), action: 'rename', name }
|
|
169
|
+
// 同一单元(核心/分册)共享同一个改名值
|
|
170
|
+
const unit = isCoreRel((state.conflicts ?? [])[i]?.rel ?? '')
|
|
171
|
+
next.forEach((c, j) => {
|
|
172
|
+
if (j !== i && isCoreRel((state.conflicts ?? [])[j]?.rel ?? '') === unit) next[j] = { ...(next[j] ?? {}), name }
|
|
173
|
+
})
|
|
174
|
+
return next
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const apply = async () => {
|
|
179
|
+
const conflicts = state.conflicts ?? []
|
|
180
|
+
const missing = choices.findIndex((c, i) => c?.action === 'rename' && !String(c.name ?? '').trim())
|
|
181
|
+
if (missing >= 0) {
|
|
182
|
+
setError(`第 ${missing + 1} 项选了改名但没填名字`)
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
if (!state.sessionId || typeof state.execute !== 'function') {
|
|
186
|
+
setError('拿不到当前会话,无法执行;请改用 /atp apply 命令')
|
|
187
|
+
return
|
|
188
|
+
}
|
|
189
|
+
try {
|
|
190
|
+
writeStore({ busy: true })
|
|
191
|
+
const line = buildApplySpec(choices)
|
|
192
|
+
const result = await state.execute(state.sessionId, line)
|
|
193
|
+
if (result && result.ok === false) throw new Error(result?.error?.message ?? '命令执行失败')
|
|
194
|
+
writeStore({ open: false, busy: false, message: `已执行:${line}` })
|
|
195
|
+
if (typeof state.afterApply === 'function') await state.afterApply()
|
|
196
|
+
} catch (e) {
|
|
197
|
+
setError(String(e?.message ?? e))
|
|
198
|
+
writeStore({ busy: false })
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const footer = h('div', { style: { display: 'flex', gap: 8, justifyContent: 'flex-end' } },
|
|
203
|
+
typeof Button === 'function'
|
|
204
|
+
? h(Button, { variant: 'outline', onClick: () => writeStore({ open: false }) }, '取消')
|
|
205
|
+
: h('button', { type: 'button', onClick: () => writeStore({ open: false }) }, '取消'),
|
|
206
|
+
typeof Button === 'function'
|
|
207
|
+
? h(Button, { variant: 'primary', disabled: state.busy, onClick: () => void apply() }, state.busy ? '执行中…' : '应用')
|
|
208
|
+
: h('button', { type: 'button', disabled: state.busy, onClick: () => void apply() }, '应用'),
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
const body = [
|
|
212
|
+
h('div', { key: 'cwd', style: { opacity: 0.65, fontSize: 12, marginBottom: 10, wordBreak: 'break-all' } }, state.cwd),
|
|
213
|
+
...(state.conflicts ?? []).map((conflict, i) =>
|
|
214
|
+
h(ChoiceRow, {
|
|
215
|
+
key: `c${i}`,
|
|
216
|
+
index: i,
|
|
217
|
+
conflict,
|
|
218
|
+
choice: choices[i],
|
|
219
|
+
onChoose,
|
|
220
|
+
renameEnabled: true,
|
|
221
|
+
onRename,
|
|
222
|
+
})),
|
|
223
|
+
error ? h('div', { key: 'err', style: { color: 'var(--dsh-danger, #c0563b)', marginTop: 10 } }, error) : null,
|
|
224
|
+
h('div', { key: 'hint', style: { opacity: 0.55, fontSize: 12, marginTop: 12 } },
|
|
225
|
+
'点"应用"会执行一条 /atp apply 命令(与手动输入等价,可在会话里看到审计记录)。'),
|
|
226
|
+
].filter(Boolean)
|
|
227
|
+
|
|
228
|
+
if (typeof Modal !== 'function') {
|
|
229
|
+
return h('div', { style: { position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.5)', zIndex: 9999, padding: 20, overflow: 'auto' } },
|
|
230
|
+
h('div', { style: { background: 'var(--dsh-surface, #1b1b1b)', padding: 16, borderRadius: 10 } }, body, footer))
|
|
231
|
+
}
|
|
232
|
+
return h(Modal, { open: true, onClose: () => writeStore({ open: false }), title: '处理同名内容', closeLabel: '取消', footer }, body)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function Panel() {
|
|
236
|
+
const [state, setState] = useState({ phase: 'loading' })
|
|
237
|
+
const [copied, setCopied] = useState('')
|
|
238
|
+
|
|
239
|
+
const refresh = useCallback(async () => {
|
|
240
|
+
setState({ phase: 'loading' })
|
|
241
|
+
try {
|
|
242
|
+
const cwd = currentCwd(Panel.ctx)
|
|
243
|
+
const data = await fetchStatus(cwd)
|
|
244
|
+
setState({ phase: 'ready', data, cwd })
|
|
245
|
+
} catch (error) {
|
|
246
|
+
setState({ phase: 'error', message: String(error?.message ?? error) })
|
|
247
|
+
}
|
|
248
|
+
}, [])
|
|
249
|
+
|
|
250
|
+
useEffect(() => {
|
|
251
|
+
void refresh()
|
|
252
|
+
}, [refresh])
|
|
253
|
+
|
|
254
|
+
const conflicts = state.phase === 'ready' ? state.data?.conflicts ?? [] : []
|
|
255
|
+
|
|
256
|
+
const suggestion = useMemo(() => {
|
|
257
|
+
if (conflicts.length === 0) return ''
|
|
258
|
+
return `/atp apply ${conflicts.map((_, i) => `${i + 1}=覆盖`).join(' ')}`
|
|
259
|
+
}, [conflicts])
|
|
260
|
+
|
|
261
|
+
const copy = useCallback(async (text) => {
|
|
262
|
+
try {
|
|
263
|
+
await navigator.clipboard.writeText(text)
|
|
264
|
+
setCopied(text)
|
|
265
|
+
setTimeout(() => setCopied(''), 1500)
|
|
266
|
+
} catch {
|
|
267
|
+
setCopied('')
|
|
268
|
+
}
|
|
269
|
+
}, [])
|
|
270
|
+
|
|
271
|
+
const children = []
|
|
272
|
+
children.push(h('div', { key: 'title', style: { fontWeight: 600, marginBottom: 4 } }, '多智能体协作规程(agent-team-playbook)'))
|
|
273
|
+
|
|
274
|
+
if (state.phase === 'loading') {
|
|
275
|
+
children.push(h(Row, { key: 'loading', label: '状态' }, '检测中…'))
|
|
276
|
+
} else if (state.phase === 'error') {
|
|
277
|
+
children.push(h(Row, { key: 'err', label: '状态' }, `无法连接:${state.message}`))
|
|
278
|
+
} else {
|
|
279
|
+
const d = state.data ?? {}
|
|
280
|
+
children.push(h(Row, { key: 'conn', label: '接口' }, d.connected ? '已连通' : '未连通'))
|
|
281
|
+
children.push(h(Row, { key: 'cwd', label: '工作区' }, d.cwd ?? '(未取到当前会话目录)'))
|
|
282
|
+
children.push(
|
|
283
|
+
h(Row, { key: 'inst', label: '安装状态' }, d.installed ? '已安装(AGENTS.md + docs/ 都在)' : '未安装'),
|
|
284
|
+
)
|
|
285
|
+
if (conflicts.length > 0) {
|
|
286
|
+
children.push(
|
|
287
|
+
h('div', { key: 'conf', style: { marginTop: 8, marginBottom: 4, color: 'var(--dsh-warning, #b8862b)' } },
|
|
288
|
+
`检测到 ${conflicts.length} 处同名内容(不会被自动覆盖):`),
|
|
289
|
+
)
|
|
290
|
+
conflicts.forEach((c, i) => {
|
|
291
|
+
children.push(
|
|
292
|
+
h('div', { key: `c${i}`, style: { paddingLeft: 12, margin: '2px 0' } },
|
|
293
|
+
`${i + 1}. ${c.rel} — ${c.reason}`),
|
|
294
|
+
)
|
|
295
|
+
})
|
|
296
|
+
children.push(
|
|
297
|
+
h('div', { key: 'resolve', style: { marginTop: 8 } },
|
|
298
|
+
typeof Button === 'function'
|
|
299
|
+
? h(Button, {
|
|
300
|
+
variant: 'primary',
|
|
301
|
+
onClick: () => {
|
|
302
|
+
const ctx = Panel.ctx
|
|
303
|
+
const { sessionId, cwd } = currentSession(ctx)
|
|
304
|
+
const execute = async (sid, line) => ctx?.remote?.commands?.execute?.(sid, line, [])
|
|
305
|
+
writeStore({ open: true, conflicts, cwd: cwd ?? '', sessionId: sessionId ?? '', execute, afterApply: refresh })
|
|
306
|
+
},
|
|
307
|
+
}, '逐项处理冲突…')
|
|
308
|
+
: null),
|
|
309
|
+
)
|
|
310
|
+
children.push(
|
|
311
|
+
h('div', { key: 'sug', style: { marginTop: 8 } },
|
|
312
|
+
h('div', { style: { opacity: 0.65, marginBottom: 4 } }, '逐项决定后执行(可改 覆盖→备份 / 改名:新名):'),
|
|
313
|
+
h('code', { style: { display: 'block', padding: 6, borderRadius: 6, background: 'rgba(127,127,127,0.12)' } }, suggestion),
|
|
314
|
+
h('div', { style: { marginTop: 6 } },
|
|
315
|
+
h(LinkButton, { onClick: () => void copy(suggestion) }, copied === suggestion ? '已复制 ✓' : '复制命令')),
|
|
316
|
+
),
|
|
317
|
+
)
|
|
318
|
+
} else if (d.installed) {
|
|
319
|
+
children.push(h('div', { key: 'ok', style: { marginTop: 8, opacity: 0.8 } }, '没有同名冲突。'))
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
children.push(
|
|
324
|
+
h('div', { key: 'actions', style: { marginTop: 10, display: 'flex', gap: 8 } },
|
|
325
|
+
h(LinkButton, { onClick: () => void refresh() }, '重新检测'),
|
|
326
|
+
h(LinkButton, { onClick: () => void copy('/atp install') }, copied === '/atp install' ? '已复制 ✓' : '复制 /atp install')),
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
children.push(
|
|
330
|
+
h('div', { key: 'hint', style: { marginTop: 10, opacity: 0.6, fontSize: 12 } },
|
|
331
|
+
'面板只读:不会修改你的文件。安装/覆盖/改名仍通过 /atp install 与 /atp apply 执行(可见、可审计)。'),
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
return h('div', { style: { display: 'flex', flexDirection: 'column', gap: 2 } }, children)
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function apply(ctx) {
|
|
338
|
+
Panel.ctx = ctx
|
|
339
|
+
ctx.slots.inject('settings.section', () => ctx.slots.register({
|
|
340
|
+
name: 'settings.section',
|
|
341
|
+
id: 'agent-team-playbook',
|
|
342
|
+
order: 36,
|
|
343
|
+
label: () => '协作规程',
|
|
344
|
+
}, () => h(Panel, null)))
|
|
345
|
+
|
|
346
|
+
// 冲突处理弹窗:常驻挂载,关闭时渲染 null
|
|
347
|
+
ctx.slots.inject('shell.overlay', () => ctx.slots.register({
|
|
348
|
+
name: 'shell.overlay',
|
|
349
|
+
id: 'agent-team-playbook.resolve',
|
|
350
|
+
}, () => h(ResolveDialog, null)))
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
exports.apply = apply
|
|
354
|
+
exports.inject = ['slots', 'sessions', 'remote.commands']
|
|
355
|
+
exports.name = NAME
|
|
356
|
+
// 测试缝:拼命令是纯函数,单独可测
|
|
357
|
+
exports.__test = { buildApplySpec }
|
|
358
|
+
return module.exports
|
|
359
|
+
},
|
|
360
|
+
})
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { readFileSync, existsSync, readdirSync } from 'node:fs'
|
|
18
18
|
import path from 'node:path'
|
|
19
19
|
import { fileURLToPath } from 'node:url'
|
|
20
|
-
import { installAtomic } from './install.js'
|
|
20
|
+
import { installAtomic, scan, CORE_FILE, DOCS_DIR } from './install.js'
|
|
21
21
|
|
|
22
22
|
export const name = 'dsh-agent-team-playbook'
|
|
23
23
|
|
|
@@ -60,7 +60,7 @@ const INSTALL_HINT = [
|
|
|
60
60
|
'让规程变成每轮的固定上下文(本命令只是按需调用):',
|
|
61
61
|
'',
|
|
62
62
|
' /atp install 装进当前工作区(AGENTS.md + docs/)',
|
|
63
|
-
' /atp install
|
|
63
|
+
' /atp apply 1=覆盖 2=备份 3=改名:x 逐项处理冲突(install 会列出编号)',
|
|
64
64
|
' npx dsh-agent-team-playbook init --global 全局指针区块',
|
|
65
65
|
' npx dsh-agent-team-playbook init --global --inline-core 全局内联核心全文',
|
|
66
66
|
].join('\n')
|
|
@@ -120,6 +120,129 @@ function isUnsafeTarget(dir) {
|
|
|
120
120
|
return unsafe.some((u) => dir === u)
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/** 冲突按路径排序后编号,保证 install 与 apply 一致。 */
|
|
124
|
+
function numberedConflicts(conflicts) {
|
|
125
|
+
return [...conflicts].sort((a, b) => a.rel.localeCompare(b.rel))
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** 冲突属于哪个单元(核心 / 分册)。 */
|
|
129
|
+
function unitOfRel(rel) {
|
|
130
|
+
return rel === CORE_FILE ? CORE_FILE : DOCS_DIR
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** 解析 /atp apply 的决策串。 */
|
|
134
|
+
function parseApplySpec(raw) {
|
|
135
|
+
const tokens = String(raw).trim().split(/[\s,,]+/).filter(Boolean)
|
|
136
|
+
const perIndex = new Map()
|
|
137
|
+
const globals = []
|
|
138
|
+
for (const tk of tokens) {
|
|
139
|
+
const m = /^(\d+|all)=(.+)$/i.exec(tk)
|
|
140
|
+
if (!m) return { error: `无法识别「${tk}」。格式:1=覆盖 / 2=备份 / 3=改名:名字 / all=覆盖` }
|
|
141
|
+
const idx = m[1].toLowerCase()
|
|
142
|
+
const body = m[2].trim()
|
|
143
|
+
const rm = /^(覆盖|overwrite|备份|backup|改名|rename)(?::(.+))?$/i.exec(body)
|
|
144
|
+
if (!rm) return { error: `无法识别的动作「${body}」。可用:覆盖 / 备份 / 改名:名字` }
|
|
145
|
+
const action = /overwrite|覆盖/i.test(rm[1]) ? 'overwrite' : /backup|备份/i.test(rm[1]) ? 'backup' : 'rename'
|
|
146
|
+
const name = rm[2]?.trim()
|
|
147
|
+
if (action === 'rename' && !name) return { error: `改名需要给出新名字:${tk}` }
|
|
148
|
+
if (name !== undefined && !/^[^/\\]+$/.test(name)) return { error: `名字不能含路径分隔符:${name}` }
|
|
149
|
+
if (idx === 'all') globals.push({ action, name })
|
|
150
|
+
else perIndex.set(Number(idx), { action, name })
|
|
151
|
+
}
|
|
152
|
+
return { perIndex, globals }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** 处理 /atp apply:对当前冲突逐项决定后安装。 */
|
|
156
|
+
async function handleApply(ctx, rawInput, invocation) {
|
|
157
|
+
const targetDir = resolveWorkspace(ctx, invocation)
|
|
158
|
+
if (targetDir === null) {
|
|
159
|
+
return { kind: 'error', text: '无法确定当前工作区目录,已拒绝(避免写到你没预期的地方)。' }
|
|
160
|
+
}
|
|
161
|
+
if (isUnsafeTarget(targetDir)) {
|
|
162
|
+
return { kind: 'error', text: `拒绝安装到 ${targetDir}:这看起来是 DSH 主目录或插件自身目录。` }
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const specText = rawInput.replace(/^apply\s*/i, '')
|
|
166
|
+
if (specText.trim() === '') {
|
|
167
|
+
return { kind: 'error', text: `缺少决策。先运行 /atp install 看编号,再 /atp apply 1=覆盖 2=备份 …` }
|
|
168
|
+
}
|
|
169
|
+
const parsed = parseApplySpec(specText)
|
|
170
|
+
if (parsed.error) return { kind: 'error', text: parsed.error }
|
|
171
|
+
|
|
172
|
+
const { conflicts } = await scan({ sourceRoot: PLAYBOOK_DIR, targetDir })
|
|
173
|
+
if (conflicts.length === 0) {
|
|
174
|
+
const r = await installAtomic({ sourceRoot: PLAYBOOK_DIR, targetDir, onConflict: 'proceed' })
|
|
175
|
+
return r.ok
|
|
176
|
+
? { kind: 'success', text: `没有冲突,已安装 ${r.installed.length} 个文件到 ${targetDir}` }
|
|
177
|
+
: { kind: 'error', text: `安装失败:${r.message}` }
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const list = numberedConflicts(conflicts)
|
|
181
|
+
const decisions = []
|
|
182
|
+
const missing = []
|
|
183
|
+
const renameByUnit = new Map()
|
|
184
|
+
for (let i = 0; i < list.length; i += 1) {
|
|
185
|
+
const c = list[i]
|
|
186
|
+
const idx = i + 1
|
|
187
|
+
const d = parsed.perIndex.get(idx) ?? parsed.globals[0]
|
|
188
|
+
if (d === undefined) {
|
|
189
|
+
missing.push(idx)
|
|
190
|
+
continue
|
|
191
|
+
}
|
|
192
|
+
if (d.action === 'rename') {
|
|
193
|
+
const unit = unitOfRel(c.rel)
|
|
194
|
+
const prev = renameByUnit.get(unit)
|
|
195
|
+
if (prev !== undefined && prev !== d.name) {
|
|
196
|
+
return { kind: 'error', text: `同一单元(${unit})不能改两个名字:${prev} / ${d.name}` }
|
|
197
|
+
}
|
|
198
|
+
renameByUnit.set(unit, d.name)
|
|
199
|
+
}
|
|
200
|
+
decisions.push({ conflict: c, action: d.action })
|
|
201
|
+
}
|
|
202
|
+
if (missing.length > 0) {
|
|
203
|
+
return {
|
|
204
|
+
kind: 'error',
|
|
205
|
+
text: [
|
|
206
|
+
`还有 ${missing.length} 项没决定:${missing.join('、')}`,
|
|
207
|
+
'',
|
|
208
|
+
...list.map((c, i) => ` ${i + 1}. ${c.rel}(${c.reason})`),
|
|
209
|
+
'',
|
|
210
|
+
'补齐后再执行,例如:/atp apply 1=覆盖 2=备份 3=改名:team-docs',
|
|
211
|
+
].join('\n'),
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// 改名若与已存在路径冲突,提前报错
|
|
216
|
+
for (const [unit, name] of renameByUnit) {
|
|
217
|
+
const probe = path.join(targetDir, name)
|
|
218
|
+
if (existsSync(probe)) return { kind: 'error', text: `改名目标已存在:${name}` }
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const renames = []
|
|
222
|
+
for (const [unit, name] of renameByUnit) {
|
|
223
|
+
if (unit === DOCS_DIR) renames.push({ from: `${DOCS_DIR}/`, to: `${name}/` })
|
|
224
|
+
else renames.push({ from: CORE_FILE, to: name })
|
|
225
|
+
}
|
|
226
|
+
const backupTargets = decisions.filter((d) => d.action === 'backup').map((d) => d.conflict.target)
|
|
227
|
+
|
|
228
|
+
const result = await installAtomic({
|
|
229
|
+
sourceRoot: PLAYBOOK_DIR,
|
|
230
|
+
targetDir,
|
|
231
|
+
onConflict: 'proceed',
|
|
232
|
+
renames,
|
|
233
|
+
backupTargets,
|
|
234
|
+
backupSuffix: `.bak-${new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14)}`,
|
|
235
|
+
})
|
|
236
|
+
|
|
237
|
+
if (!result.ok) return { kind: 'error', text: `安装失败并已回滚:${result.message}` }
|
|
238
|
+
|
|
239
|
+
const lines = [`已安装到:${targetDir}(${result.installed.length} 个文件,核心与分册整体落地)`]
|
|
240
|
+
if (result.backups.length > 0) lines.push(`已备份你的文件:${result.backups.map((b) => path.relative(targetDir, b.to)).join(',')}`)
|
|
241
|
+
if (renames.length > 0) lines.push(`按你的改名安装:${renames.map((r) => `${r.from} → ${r.to}`).join(',')}(文档内引用已同步)`)
|
|
242
|
+
lines.push('', '工作区 AGENTS.md 会被 DSH 每轮自动注入,重载会话后生效。')
|
|
243
|
+
return { kind: 'success', text: lines.join('\n') }
|
|
244
|
+
}
|
|
245
|
+
|
|
123
246
|
async function handleInstall(ctx, rawInput, invocation) {
|
|
124
247
|
const force = /\bforce\b|\b--force\b/i.test(rawInput)
|
|
125
248
|
const targetDir = resolveWorkspace(ctx, invocation)
|
|
@@ -150,23 +273,21 @@ async function handleInstall(ctx, rawInput, invocation) {
|
|
|
150
273
|
|
|
151
274
|
if (!result.ok) {
|
|
152
275
|
if (result.code === 'conflict') {
|
|
153
|
-
const list = result.conflicts
|
|
154
|
-
|
|
155
|
-
.map((c) => ` · ${path.relative(targetDir, c.target)}(${c.reason})`)
|
|
156
|
-
.join('\n')
|
|
276
|
+
const list = numberedConflicts(result.conflicts)
|
|
277
|
+
const rows = list.map((c, i) => ` ${i + 1}. ${c.rel}(${c.reason})`)
|
|
157
278
|
return {
|
|
158
279
|
kind: 'error',
|
|
159
280
|
text: [
|
|
160
|
-
`未安装:${targetDir}
|
|
161
|
-
|
|
162
|
-
|
|
281
|
+
`未安装:${targetDir} 有 ${list.length} 处同名内容。`,
|
|
282
|
+
'',
|
|
283
|
+
...rows,
|
|
284
|
+
'',
|
|
285
|
+
'逐项决定后安装(动作:覆盖 / 备份(你的文件加后缀保留) / 改名:新名(我们这侧换名)):',
|
|
286
|
+
` /atp apply ${list.map((_, i) => `${i + 1}=覆盖`).join(' ')}`,
|
|
287
|
+
' 例:/atp apply 1=备份 2=改名:team-docs',
|
|
163
288
|
'',
|
|
164
|
-
'
|
|
165
|
-
|
|
166
|
-
' 或用 CLI 交互式处理(可改名/备份):npx dsh-agent-team-playbook init',
|
|
167
|
-
]
|
|
168
|
-
.filter((l) => l !== '')
|
|
169
|
-
.join('\n'),
|
|
289
|
+
'或一次性覆盖:/atp install force',
|
|
290
|
+
].join('\n'),
|
|
170
291
|
}
|
|
171
292
|
}
|
|
172
293
|
return { kind: 'error', text: `安装失败并已回滚:${result.message}` }
|
|
@@ -204,15 +325,73 @@ function handleCommand(ctx, invocation) {
|
|
|
204
325
|
return { kind: 'success', text: core }
|
|
205
326
|
}
|
|
206
327
|
if (sub === 'install' || sub.startsWith('install ')) return handleInstall(ctx, raw, invocation)
|
|
328
|
+
if (sub === 'apply' || sub.startsWith('apply ')) return handleApply(ctx, raw, invocation)
|
|
207
329
|
|
|
208
330
|
return { kind: 'error', text: `未知参数:${raw}\n\n${USAGE}` }
|
|
209
331
|
}
|
|
210
332
|
|
|
333
|
+
/**
|
|
334
|
+
* 只读状态接口的 handler(供 Web 面板调用)。
|
|
335
|
+
*
|
|
336
|
+
* 安全边界:
|
|
337
|
+
* - 平台在 handler 之前已做 Host/Origin 校验与会话凭据校验(非白名单路由一律鉴权)
|
|
338
|
+
* - 本 handler 只报告"我们关心的几个相对路径是否存在",不做任意目录列举
|
|
339
|
+
*
|
|
340
|
+
* @param {import('node:http').IncomingMessage} req
|
|
341
|
+
* @param {import('node:http').ServerResponse} res
|
|
342
|
+
*/
|
|
343
|
+
export function createStatusHandler() {
|
|
344
|
+
return async function statusHandler(req, res) {
|
|
345
|
+
const send = (status, payload) => {
|
|
346
|
+
res.writeHead(status, { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store' })
|
|
347
|
+
res.end(JSON.stringify(payload))
|
|
348
|
+
}
|
|
349
|
+
try {
|
|
350
|
+
const url = new URL(req.url ?? '/', 'http://localhost')
|
|
351
|
+
const cwd = url.searchParams.get('cwd')
|
|
352
|
+
if (cwd === null || cwd === '') {
|
|
353
|
+
return send(200, { ok: true, connected: true, needsCwd: true, playbookDir: PLAYBOOK_DIR })
|
|
354
|
+
}
|
|
355
|
+
const targetDir = path.resolve(cwd)
|
|
356
|
+
if (!path.isAbsolute(targetDir) || !existsSync(targetDir)) {
|
|
357
|
+
return send(400, { ok: false, error: 'cwd 不存在或不是绝对路径' })
|
|
358
|
+
}
|
|
359
|
+
const { conflicts } = await scan({ sourceRoot: PLAYBOOK_DIR, targetDir })
|
|
360
|
+
const installed = existsSync(path.join(targetDir, CORE_FILE)) && existsSync(path.join(targetDir, DOCS_DIR, 'workflow', 'rules'))
|
|
361
|
+
return send(200, {
|
|
362
|
+
ok: true,
|
|
363
|
+
connected: true,
|
|
364
|
+
cwd: targetDir,
|
|
365
|
+
installed,
|
|
366
|
+
conflicts: conflicts.map((c) => ({ rel: c.rel, reason: c.reason })),
|
|
367
|
+
})
|
|
368
|
+
} catch (error) {
|
|
369
|
+
return send(500, { ok: false, error: String(error?.message ?? error) })
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
211
374
|
/**
|
|
212
375
|
* Plugin entry point.
|
|
213
376
|
* @param {import('@deepseek-ai/cordis').Context} ctx
|
|
214
377
|
*/
|
|
215
378
|
export function apply(ctx) {
|
|
379
|
+
// Web 面板用的只读接口。
|
|
380
|
+
// 防御:精简 composition 可能没有 inject/webServer/effect —— 静默跳过,不影响命令注册。
|
|
381
|
+
if (typeof ctx.inject === 'function') {
|
|
382
|
+
try {
|
|
383
|
+
ctx.inject(['webServer'], (scoped) => {
|
|
384
|
+
const server = scoped?.webServer
|
|
385
|
+
const handler = createStatusHandler()
|
|
386
|
+
const register = () => server.register({ kind: 'prefix', path: '/api/agent-team-playbook', handler })
|
|
387
|
+
if (typeof scoped?.effect === 'function') scoped.effect(register, 'agent-team-playbook: status api')
|
|
388
|
+
else register()
|
|
389
|
+
})
|
|
390
|
+
} catch (error) {
|
|
391
|
+
ctx.logger?.warn?.(`agent-team-playbook: 状态接口未挂载(${error?.message ?? error})`)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
216
395
|
ctx.commands.register({
|
|
217
396
|
definitionId: 'dsh-agent-team-playbook',
|
|
218
397
|
name: 'atp',
|
package/lib/install.js
CHANGED
|
@@ -109,15 +109,16 @@ export async function scan({ sourceRoot, targetDir }) {
|
|
|
109
109
|
* @param {object} args
|
|
110
110
|
* @param {string} args.sourceRoot 包内 playbook 目录
|
|
111
111
|
* @param {string} args.targetDir 目标工作区
|
|
112
|
-
* @param {'error'|'
|
|
112
|
+
* @param {'error'|'proceed'} args.onConflict 冲突时是拒绝还是继续
|
|
113
|
+
* @param {string[]} [args.backupTargets] 需要"备份(改名保留)"的已有路径(绝对路径)
|
|
114
|
+
* @param {string} [args.backupSuffix] 备份后缀
|
|
113
115
|
* @param {Array<{from: string, to: string}>} [args.renames] 我们这侧的改名(会改写引用)
|
|
114
|
-
* @param {string} [args.backupSuffix] onConflict==='backup' 时用的后缀
|
|
115
116
|
* @param {(phase: string, detail?: any) => void} [args.onProgress] 进度回调(可选)
|
|
116
117
|
* @returns {Promise<{ok: boolean, code?: 'conflict'|'failed', message?: string,
|
|
117
118
|
* installed: string[], backups: Array<{from:string,to:string}>,
|
|
118
119
|
* conflicts?: any[]}>}
|
|
119
120
|
*/
|
|
120
|
-
export async function installAtomic({ sourceRoot, targetDir, onConflict, renames = [], backupSuffix, onProgress = () => {} }) {
|
|
121
|
+
export async function installAtomic({ sourceRoot, targetDir, onConflict, renames = [], backupTargets = [], backupSuffix, onProgress = () => {} }) {
|
|
121
122
|
const scanned = await scan({ sourceRoot, targetDir })
|
|
122
123
|
const { units, docRels, conflicts } = scanned
|
|
123
124
|
|
|
@@ -149,9 +150,11 @@ export async function installAtomic({ sourceRoot, targetDir, onConflict, renames
|
|
|
149
150
|
|
|
150
151
|
// 2. 备份(改名已有项)
|
|
151
152
|
const backups = []
|
|
152
|
-
if (
|
|
153
|
-
if (!backupSuffix) throw new Error('
|
|
153
|
+
if (backupTargets.length > 0) {
|
|
154
|
+
if (!backupSuffix) throw new Error('backupTargets 需要 backupSuffix')
|
|
155
|
+
const wanted = new Set(backupTargets.map((p) => path.resolve(p)))
|
|
154
156
|
for (const c of conflicts) {
|
|
157
|
+
if (!wanted.has(path.resolve(c.target))) continue
|
|
155
158
|
const to = uniqueBackupPath(c.target, backupSuffix)
|
|
156
159
|
await mkdir(path.dirname(to), { recursive: true })
|
|
157
160
|
await rename(c.target, to)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agent-team-playbook",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "DeepSeek Harness plugin that brings an executable multi-agent collaboration workflow (charter, triage tiers, six-stage pipeline, audit gates, experience library): a read-only /agent-team command plus a collision-aware installer for the documents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "lib/index.js",
|
|
17
17
|
"files": [
|
|
18
|
+
"client.js",
|
|
18
19
|
"lib",
|
|
19
20
|
"bin",
|
|
20
21
|
"scripts",
|
|
@@ -27,6 +28,10 @@
|
|
|
27
28
|
"dsh": {
|
|
28
29
|
"bundle": {
|
|
29
30
|
"patch": "./cordis.patch.yml"
|
|
31
|
+
},
|
|
32
|
+
"client": {
|
|
33
|
+
"platform": "web",
|
|
34
|
+
"inject": []
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
"keywords": [
|
|
@@ -45,5 +50,10 @@
|
|
|
45
50
|
"sync": "node scripts/sync-playbook.mjs",
|
|
46
51
|
"check": "node scripts/sync-playbook.mjs --check",
|
|
47
52
|
"prepack": "node scripts/sync-playbook.mjs"
|
|
53
|
+
},
|
|
54
|
+
"exports": {
|
|
55
|
+
".": "./lib/index.js",
|
|
56
|
+
"./client": "./client.js",
|
|
57
|
+
"./package.json": "./package.json"
|
|
48
58
|
}
|
|
49
59
|
}
|