@noirhare/dsh-agent-presets 0.0.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/lib/index.d.ts +10 -0
- package/lib/index.js +23 -0
- package/lib/invariant.d.ts +1 -0
- package/lib/invariant.js +2 -0
- package/package.json +32 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentPreset, AgentPresets } from "@deepseek-ai/dsh-agent-presets";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
declare class NRAgentPresets extends AgentPresets {
|
|
4
|
+
private extraRoots;
|
|
5
|
+
registerRoot(path: string): void;
|
|
6
|
+
unregisterRoot(path: string): void;
|
|
7
|
+
list(): Promise<AgentPreset[]>;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { NRAgentPresets as default };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentPresets, discoverPresets } from "@deepseek-ai/dsh-agent-presets";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
var NRAgentPresets = class extends AgentPresets {
|
|
4
|
+
extraRoots = /* @__PURE__ */ new Set();
|
|
5
|
+
registerRoot(path) {
|
|
6
|
+
this.extraRoots.add(path);
|
|
7
|
+
}
|
|
8
|
+
unregisterRoot(path) {
|
|
9
|
+
this.extraRoots.delete(path);
|
|
10
|
+
}
|
|
11
|
+
async list() {
|
|
12
|
+
const base = await super.list();
|
|
13
|
+
if (this.extraRoots.size === 0) return base;
|
|
14
|
+
const seen = new Set(base.map((preset) => preset.id));
|
|
15
|
+
const extra = await discoverPresets([...this.extraRoots].map((path) => ({
|
|
16
|
+
path,
|
|
17
|
+
trust: "system"
|
|
18
|
+
})));
|
|
19
|
+
return [...base, ...extra.filter((preset) => !seen.has(preset.id))];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { NRAgentPresets as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@deepseek-ai/dsh-agent-presets/invariant";
|
package/lib/invariant.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@noirhare/dsh-agent-presets",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "NoirHare",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/NoirHare/dsh-bundle.git",
|
|
9
|
+
"directory": "packages/agent-presets"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./lib/index.js",
|
|
14
|
+
"./invariant": "./lib/invariant.js",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"lib"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@deepseek-ai/dsh-agent-presets": "^0.1.1-rc.2",
|
|
25
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"dev": "tsdown --watch",
|
|
30
|
+
"typecheck": "tsc --noEmit"
|
|
31
|
+
}
|
|
32
|
+
}
|