dsh-github-flow 0.1.0 → 0.1.2

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/lib/service.js DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * DSH GitHub 原生微内核服务
3
- * 允许生态内其他插件通过 ctx.github 或 inject: ['github'] 消费 GitHub CLI 能力
4
- */
5
- export class GitHubService {
6
- ctx;
7
- executor;
8
- constructor(ctx, executor) {
9
- this.ctx = ctx;
10
- this.executor = executor;
11
- // 挂载到 ctx 上
12
- if (ctx) {
13
- ctx.github = this;
14
- }
15
- }
16
- /**
17
- * 执行原生 gh 命令
18
- */
19
- async run(args, options = {}) {
20
- return this.executor.run(args, options);
21
- }
22
- /**
23
- * 检查宿主机 GitHub CLI 认证状态
24
- */
25
- async checkAuth(cwd) {
26
- return this.executor.checkAuth(cwd);
27
- }
28
- /**
29
- * 获取指定工作区路径下的 Git 关联元数据
30
- */
31
- async getRepoMetadata(cwd) {
32
- return this.executor.getRepoMetadata(cwd);
33
- }
34
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * DSH Tool 定义规范包装器
3
- * 优先使用 @deepseek-ai/dsh-tools 的 defineTool DSL
4
- * 在独立环境无此包时提供标准的运行时安全包装
5
- */
6
- export declare function defineSafeTool(spec: any): any;
@@ -1,15 +0,0 @@
1
- /**
2
- * DSH Tool 定义规范包装器
3
- * 优先使用 @deepseek-ai/dsh-tools 的 defineTool DSL
4
- * 在独立环境无此包时提供标准的运行时安全包装
5
- */
6
- export function defineSafeTool(spec) {
7
- try {
8
- const dshTools = globalThis.__DSH_TOOLS__;
9
- if (dshTools && typeof dshTools.defineTool === 'function') {
10
- return dshTools.defineTool(spec);
11
- }
12
- }
13
- catch (e) { }
14
- return spec;
15
- }