@deepseek-ai/dsh-agent-presets 0.0.1-rc.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.
@@ -0,0 +1,83 @@
1
+ /** Agent-preset vocabulary shared by discovery, mounting, and consumers. @module @deepseek-ai/dsh-agent-presets/types */
2
+ /**
3
+ * Where a preset's composition came from. A `system` preset ships with the
4
+ * deployment; a `user` preset was authored locally, by a person or by an
5
+ * agent, and therefore carries the same trust as shell access.
6
+ */
7
+ export type PresetTrust = 'system' | 'user';
8
+ /**
9
+ * Ids a preset directory may use.
10
+ *
11
+ * The id becomes a path segment, so this is a containment boundary rather than
12
+ * a style rule: `..`, a separator, or an absolute-looking name would place the
13
+ * composition outside the root the deployment authorised. Discovery shares it:
14
+ * a directory whose name no copy could ever claim is not a preset slot.
15
+ */
16
+ export declare const PRESET_ID: RegExp;
17
+ /** One preset directory that carries a mountable agent composition. */
18
+ export interface AgentPreset {
19
+ /** Stable identifier; the preset directory's name. */
20
+ readonly id: string;
21
+ /** Trust recorded from the root this preset was discovered under. */
22
+ readonly trust: PresetTrust;
23
+ /** Absolute path of the preset's agent composition file. */
24
+ readonly path: string;
25
+ /** Display name from the preset's own metadata; absent falls back to {@link id}. */
26
+ readonly name?: string;
27
+ /** One sentence on what this preset is for, when it published one. */
28
+ readonly description?: string;
29
+ /** Declared position within its group; absent sorts after those that declare one. */
30
+ readonly order?: number;
31
+ /**
32
+ * Why this preset cannot compose a session, absent when it can. A broken
33
+ * preset stays on the roster — hiding it would leave its directory blocking
34
+ * the id with nothing to see or delete — but every mounting path refuses it
35
+ * up front with this reason instead of failing deep inside the loader.
36
+ */
37
+ readonly broken?: string;
38
+ }
39
+ /** One directory scanned for preset subdirectories. */
40
+ export interface PresetRoot {
41
+ /** Directory holding one subdirectory per preset; a leading `~` expands. */
42
+ path: string;
43
+ /** Trust recorded on every preset discovered under this root. */
44
+ trust: PresetTrust;
45
+ }
46
+ /** Plugin config: which preset is the default, and where presets live. */
47
+ export interface Config {
48
+ /** Preset id mounted when a caller names none. Missing at mount time fails loud. */
49
+ default: string;
50
+ /** Scanned roots in precedence order; an earlier root wins a duplicate id. */
51
+ roots: PresetRoot[];
52
+ }
53
+ /**
54
+ * No configured root supplies the requested preset.
55
+ *
56
+ * Separate from a mount failure because the two mean different things to a
57
+ * caller: an unknown id is a bad request, while an unusable composition is a
58
+ * broken preset the deployment must fix.
59
+ */
60
+ export declare class UnknownPresetError extends Error {
61
+ /** The id that was requested. */
62
+ readonly presetId: string;
63
+ /** Ids the roster does supply, for the caller to offer instead. */
64
+ readonly available: readonly string[];
65
+ constructor(
66
+ /** The id that was requested. */
67
+ presetId: string,
68
+ /** Ids the roster does supply, for the caller to offer instead. */
69
+ available: readonly string[]);
70
+ }
71
+ /** A preset exists but its composition cannot be installed. */
72
+ export declare class PresetMountError extends Error {
73
+ /** The preset whose composition failed. */
74
+ readonly presetId: string;
75
+ /** Why it failed, without this package's own message prefix. */
76
+ readonly reason: string;
77
+ constructor(
78
+ /** The preset whose composition failed. */
79
+ presetId: string,
80
+ /** Why it failed, without this package's own message prefix. */
81
+ reason: string, options?: ErrorOptions);
82
+ }
83
+ //# sourceMappingURL=types.d.ts.map
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-agent-presets",
3
+ "description": "Per-session agent composition from preset cordis.yml files for the DeepSeek Harness",
4
+ "version": "0.0.1-rc.1",
5
+ "publishConfig": {
6
+ "access": "restricted"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/preset/agent-presets"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./src/*": "./src/*",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "lib/index.js",
30
+ "lib/invariant.js",
31
+ "lib/types/**/*.d.ts"
32
+ ],
33
+ "license": "BSD-3-Clause",
34
+ "peerDependencies": {
35
+ "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
36
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
37
+ "@deepseek-ai/dsh-atomic-write": "^0.0.1-rc.1",
38
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
39
+ "@deepseek-ai/dsh-paths": "^0.0.1-rc.1",
40
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
41
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
42
+ "@deepseek-ai/dsh-settings": "^0.0.1-rc.1",
43
+ "@deepseek-ai/dsh-scope": "^0.0.1-rc.1"
44
+ },
45
+ "dependencies": {
46
+ "js-yaml": "^4.1.0",
47
+ "@deepseek-ai/schemastery": "^3.18.1-rc.1"
48
+ },
49
+ "devDependencies": {
50
+ "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
51
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
52
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
53
+ "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.1",
54
+ "@deepseek-ai/dsh-atomic-write": "^0.0.1-rc.1",
55
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
56
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
57
+ "@deepseek-ai/dsh-paths": "^0.0.1-rc.1",
58
+ "@deepseek-ai/dsh-scope": "^0.0.1-rc.1",
59
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
60
+ "@deepseek-ai/dsh-settings-local": "^0.0.1-rc.1",
61
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.1",
62
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
63
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
64
+ "@deepseek-ai/dsh-settings": "^0.0.1-rc.1"
65
+ }
66
+ }