@xi4z/dsh-utils 0.5.0 → 0.7.1
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 +258 -314
- package/cordis.patch.yml +36 -37
- package/lib/index.d.ts +5 -63
- package/lib/index.js +6 -859
- package/lib/index.js.map +1 -1
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +10 -46
- package/src/index.ts +6 -927
- package/client.js +0 -2330
- package/lib/ui-host.d.ts +0 -96
- package/lib/ui-host.js +0 -970
- package/lib/ui-host.js.map +0 -1
- package/packages/approval-policy/lib/index.d.ts +0 -297
- package/packages/approval-policy/lib/index.js +0 -425
- package/packages/approval-policy/lib/index.js.map +0 -1
- package/packages/approval-policy/locale/en.json +0 -6
- package/packages/approval-policy/locale/zh.json +0 -6
- package/packages/notify/lib/index.d.ts +0 -290
- package/packages/notify/lib/index.js +0 -915
- package/packages/notify/lib/index.js.map +0 -1
- package/packages/notify/locale/en.json +0 -6
- package/packages/notify/locale/zh.json +0 -6
- package/packages/skill-panel/lib/index.d.ts +0 -49
- package/packages/skill-panel/lib/index.js +0 -420
- package/packages/skill-panel/lib/index.js.map +0 -1
- package/packages/skill-panel/locale/en.json +0 -6
- package/packages/skill-panel/locale/zh.json +0 -6
- package/packages/utils-agents/lib/git.d.ts +0 -87
- package/packages/utils-agents/lib/git.js +0 -403
- package/packages/utils-agents/lib/git.js.map +0 -1
- package/packages/utils-agents/lib/global-repo.d.ts +0 -57
- package/packages/utils-agents/lib/global-repo.js +0 -301
- package/packages/utils-agents/lib/global-repo.js.map +0 -1
- package/packages/utils-agents/lib/index.d.ts +0 -80
- package/packages/utils-agents/lib/index.js +0 -435
- package/packages/utils-agents/lib/index.js.map +0 -1
- package/packages/utils-agents/lib/legacy.d.ts +0 -30
- package/packages/utils-agents/lib/legacy.js +0 -141
- package/packages/utils-agents/lib/legacy.js.map +0 -1
- package/packages/utils-agents/lib/native.d.ts +0 -74
- package/packages/utils-agents/lib/native.js +0 -232
- package/packages/utils-agents/lib/native.js.map +0 -1
- package/packages/utils-agents/lib/presets.d.ts +0 -34
- package/packages/utils-agents/lib/presets.js +0 -312
- package/packages/utils-agents/lib/presets.js.map +0 -1
- package/packages/utils-agents/lib/shared.d.ts +0 -105
- package/packages/utils-agents/lib/shared.js +0 -507
- package/packages/utils-agents/lib/shared.js.map +0 -1
- package/packages/utils-agents/lib/update.d.ts +0 -129
- package/packages/utils-agents/lib/update.js +0 -507
- package/packages/utils-agents/lib/update.js.map +0 -1
- package/packages/utils-agents/lib/util.d.ts +0 -215
- package/packages/utils-agents/lib/util.js +0 -475
- package/packages/utils-agents/lib/util.js.map +0 -1
- package/packages/utils-agents/locale/en.json +0 -6
- package/packages/utils-agents/locale/zh.json +0 -6
- package/skills/dsh-approval-policy-config/SKILL.md +0 -96
- package/src/ui-host.ts +0 -1073
package/cordis.patch.yml
CHANGED
|
@@ -1,51 +1,40 @@
|
|
|
1
1
|
# dsh-utils — bundle layer for the utility components.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# (`@xi4z/dsh-utils/utils-agents`), resolved through this package's `exports`.
|
|
7
|
-
# A subpath row is not a package: DSH never reads its `package.json`; its display
|
|
8
|
-
# title comes from the exported `./<subpath>/locale/*.json`. The upside is that
|
|
9
|
-
# the manifest has no `@xi4z/*` dependencies at all, so the bundle installs from
|
|
10
|
-
# a registry, a Git URL, a packed tarball or a local directory alike.
|
|
11
|
-
# Because `utils-main` is a package-root row, DSH's client-module scanner also
|
|
12
|
-
# serves this package's client.js from it.
|
|
3
|
+
# This package mounts no component of its own: it is the same shape as the
|
|
4
|
+
# shipped experimental bundles. Every component is an independently published
|
|
5
|
+
# package (a real dependency of this bundle), and this patch assembles them:
|
|
13
6
|
#
|
|
14
|
-
# The `packages/` directories stay as build units for tsc and for the per-package
|
|
15
|
-
# tests; they are not published.
|
|
16
|
-
#
|
|
17
|
-
# utils-main — the root package itself: recursive SKILL.md discovery
|
|
18
|
-
# in nested skill folders, plus the legacy global
|
|
19
|
-
# skill-repository JSON routes (their UI moved into
|
|
20
|
-
# utils-agents) and the browser half (client.js).
|
|
21
7
|
# dsh-approval-policy — unattended approval gate: subagent/scheduled/cron
|
|
22
8
|
# approval requests wait a bounded window, then settle
|
|
23
9
|
# with a fail-closed default instead of hanging forever.
|
|
24
10
|
# dsh-notify — session notifications: a turn ending, a pending
|
|
25
11
|
# approval, or a pending question is pushed through a
|
|
26
12
|
# Gotify gateway, tagged with this device's name.
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# invocable.
|
|
31
|
-
# utils-agents — the agents/presets panel: registers each
|
|
32
|
-
# ~/.dsh/.agent-presets/<id>/ directory as a real
|
|
33
|
-
# agent preset through cordis:include, then serves
|
|
13
|
+
# utils-agents — the one host component for skills and presets. It
|
|
14
|
+
# registers each ~/.dsh/.agent-presets/<id>/ directory
|
|
15
|
+
# as a real agent preset through cordis:include, serves
|
|
34
16
|
# routes that list/toggle its skills, edit its
|
|
35
17
|
# Markdown, and clone/fast-forward a Git repository
|
|
36
|
-
# (public or private, via a Deploy Key) into it
|
|
18
|
+
# (public or private, via a Deploy Key) into it — and
|
|
19
|
+
# it also owns recursive nested SKILL.md discovery plus
|
|
20
|
+
# the model-facing skill visibility switches, merged
|
|
21
|
+
# from the former utils-main and dsh-skill-panel rows.
|
|
22
|
+
# utils-ui — the browser half shared by every row above: the
|
|
23
|
+
# configuration page for each row and the utils-agents
|
|
24
|
+
# sidebar panel. Its host half is an empty marker; the
|
|
25
|
+
# client module scanner serves its client.js because
|
|
26
|
+
# this row mounts the bare package name.
|
|
37
27
|
#
|
|
38
|
-
# Row ids double as settings namespaces and stay stable.
|
|
28
|
+
# Row ids double as settings namespaces and stay stable. The plugin page keeps
|
|
29
|
+
# addressing each row's configuration as `@xi4z/dsh-utils#<row id>`, because
|
|
30
|
+
# this bundle is the package that inserted the row.
|
|
39
31
|
|
|
40
32
|
- insert:
|
|
41
|
-
- id: utils-main
|
|
42
|
-
name: '@xi4z/dsh-utils'
|
|
43
|
-
config: {}
|
|
44
33
|
- id: dsh-approval-policy
|
|
45
|
-
name: '@xi4z/dsh-utils
|
|
34
|
+
name: '@xi4z/dsh-utils-approval-policy'
|
|
46
35
|
config: {}
|
|
47
36
|
- id: dsh-notify
|
|
48
|
-
name: '@xi4z/dsh-utils
|
|
37
|
+
name: '@xi4z/dsh-utils-notify'
|
|
49
38
|
config:
|
|
50
39
|
# 留空 = 内置默认。下面只列出最常改的几项,完整字段见 README。
|
|
51
40
|
#
|
|
@@ -65,13 +54,8 @@
|
|
|
65
54
|
- aborted
|
|
66
55
|
notifyOnApproval: true
|
|
67
56
|
notifyOnQuestion: true
|
|
68
|
-
- id: dsh-skill-panel
|
|
69
|
-
name: '@xi4z/dsh-utils/skill-panel'
|
|
70
|
-
config:
|
|
71
|
-
# 模型技能目录里隐藏的技能名;面板开关写入这里,热生效。
|
|
72
|
-
disabledSkills: []
|
|
73
57
|
- id: utils-agents
|
|
74
|
-
name: '@xi4z/dsh-utils
|
|
58
|
+
name: '@xi4z/dsh-utils-utils-agents'
|
|
75
59
|
config:
|
|
76
60
|
# 单文件读写上限(字节)。AGENTS.md 本质上也是提示词,别放太大。
|
|
77
61
|
maxBytes: 524288
|
|
@@ -92,6 +76,19 @@
|
|
|
92
76
|
# 新预设技能仓库的默认值。
|
|
93
77
|
defaultRepoUrl: 'https://github.com/xi4z/skills'
|
|
94
78
|
defaultBranch: 'Agent'
|
|
79
|
+
# 嵌套 SKILL.md 递归发现(原 utils-main 行)。
|
|
80
|
+
minDepth: 2
|
|
81
|
+
maxDepth: 8
|
|
82
|
+
watch: true
|
|
83
|
+
includeProjectRoots: true
|
|
84
|
+
includeUserRoots: true
|
|
85
|
+
extraRoots: []
|
|
86
|
+
ignoreDirs:
|
|
87
|
+
- .system
|
|
88
|
+
- node_modules
|
|
89
|
+
- .git
|
|
90
|
+
# 模型技能目录里隐藏的技能名(原 dsh-skill-panel 行);仍可手动加载。
|
|
91
|
+
disabledSkills: []
|
|
95
92
|
# 面板顶部的版本检查:定时查询 npm 上 @xi4z/dsh-utils 的 latest。
|
|
96
93
|
# 手动「检查更新」按钮不受间隔限制;改镜像时把 updateRegistry 换掉。
|
|
97
94
|
updateCheck: true
|
|
@@ -99,3 +96,5 @@
|
|
|
99
96
|
updateRegistry: 'https://registry.npmjs.org'
|
|
100
97
|
# 查到新版本就后台 pnpm add;装完要重启 dsh web。link:/file: 安装自动跳过。
|
|
101
98
|
updateAutoInstall: true
|
|
99
|
+
- id: utils-ui
|
|
100
|
+
name: '@xi4z/dsh-utils-ui'
|
package/lib/index.d.ts
CHANGED
|
@@ -1,69 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `dsh-utils`
|
|
3
|
-
* bundle, mounted as a normal row by `cordis.patch.yml`.
|
|
2
|
+
* `dsh-utils` bundle layer: a patch-only package.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* package-root row, so the client-module scanner serves it from this row.
|
|
4
|
+
* The bundle itself mounts no component. `cordis.patch.yml` assembles the six
|
|
5
|
+
* independently published component packages, so this module stays empty: the
|
|
6
|
+
* build produces it so the package still exposes a valid `main`, exactly like
|
|
7
|
+
* the shipped experimental bundles.
|
|
10
8
|
*
|
|
11
9
|
* @module dsh-utils
|
|
12
10
|
*/
|
|
13
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
14
|
-
import z from '@deepseek-ai/schemastery';
|
|
15
|
-
export declare const name = "utils-main";
|
|
16
|
-
export declare const inject: string[];
|
|
17
|
-
/**
|
|
18
|
-
* Settings schema. Volatile fields are the only ones DSH exposes in the
|
|
19
|
-
* Settings form and the ones the Loader can refresh in place.
|
|
20
|
-
*/
|
|
21
|
-
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
22
|
-
minDepth: z<number, number, "volatile-defined">;
|
|
23
|
-
maxDepth: z<number, number, "volatile-defined">;
|
|
24
|
-
watch: z<boolean, boolean, "volatile-defined">;
|
|
25
|
-
debounceMs: z<number, number, "volatile-defined">;
|
|
26
|
-
pollIntervalMs: z<number, number, "volatile-defined">;
|
|
27
|
-
includeProjectRoots: z<boolean, boolean, "volatile-defined">;
|
|
28
|
-
includeUserRoots: z<boolean, boolean, "volatile-defined">;
|
|
29
|
-
followSymlinks: z<boolean, boolean, "volatile-defined">;
|
|
30
|
-
extraRoots: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
31
|
-
ignoreDirs: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
32
|
-
}>>, Schemastery.ObjectT<NoInfer<{
|
|
33
|
-
minDepth: z<number, number, "volatile-defined">;
|
|
34
|
-
maxDepth: z<number, number, "volatile-defined">;
|
|
35
|
-
watch: z<boolean, boolean, "volatile-defined">;
|
|
36
|
-
debounceMs: z<number, number, "volatile-defined">;
|
|
37
|
-
pollIntervalMs: z<number, number, "volatile-defined">;
|
|
38
|
-
includeProjectRoots: z<boolean, boolean, "volatile-defined">;
|
|
39
|
-
includeUserRoots: z<boolean, boolean, "volatile-defined">;
|
|
40
|
-
followSymlinks: z<boolean, boolean, "volatile-defined">;
|
|
41
|
-
extraRoots: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
42
|
-
ignoreDirs: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
43
|
-
}>>, "plain">;
|
|
44
|
-
/** Volatile Config fields arrive as live references; `.get()` snapshots. */
|
|
45
|
-
interface VolatileRef<T> {
|
|
46
|
-
get(): T;
|
|
47
|
-
}
|
|
48
|
-
/** One setting as the Loader supplies it: a live reference, or a plain value in tests. */
|
|
49
|
-
type MaybeRef<T> = T | VolatileRef<T>;
|
|
50
|
-
/** The runtime shape `apply` receives (every field volatile, every field optional). */
|
|
51
|
-
export interface UtilsMainConfig {
|
|
52
|
-
readonly minDepth?: MaybeRef<number>;
|
|
53
|
-
readonly maxDepth?: MaybeRef<number>;
|
|
54
|
-
readonly watch?: MaybeRef<boolean>;
|
|
55
|
-
readonly debounceMs?: MaybeRef<number>;
|
|
56
|
-
readonly pollIntervalMs?: MaybeRef<number>;
|
|
57
|
-
readonly includeProjectRoots?: MaybeRef<boolean>;
|
|
58
|
-
readonly includeUserRoots?: MaybeRef<boolean>;
|
|
59
|
-
readonly followSymlinks?: MaybeRef<boolean>;
|
|
60
|
-
readonly extraRoots?: MaybeRef<readonly string[]>;
|
|
61
|
-
readonly ignoreDirs?: MaybeRef<readonly string[]>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Register the recursive skill provider on the host `skills` registry.
|
|
65
|
-
* @param ctx - plugin context carrying the `skills` service.
|
|
66
|
-
* @param config - optional row config; see {@link normalizeConfig}.
|
|
67
|
-
*/
|
|
68
|
-
export declare function apply(ctx: Context, config?: UtilsMainConfig): void;
|
|
69
11
|
export {};
|