dsh-test-drive 0.1.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/CHANGELOG.md +19 -0
- package/LICENSE +201 -0
- package/README.es.md +229 -0
- package/README.hi.md +229 -0
- package/README.md +229 -0
- package/README.pt.md +229 -0
- package/README.zh.md +229 -0
- package/SECURITY.md +55 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/cordis.patch.yml +45 -0
- package/lib/index.js +1920 -0
- package/lib/types/batch.d.ts +50 -0
- package/lib/types/batch.d.ts.map +1 -0
- package/lib/types/command.d.ts +22 -0
- package/lib/types/command.d.ts.map +1 -0
- package/lib/types/config.d.ts +109 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/domain.d.ts +133 -0
- package/lib/types/domain.d.ts.map +1 -0
- package/lib/types/drive.d.ts +65 -0
- package/lib/types/drive.d.ts.map +1 -0
- package/lib/types/driver.d.ts +153 -0
- package/lib/types/driver.d.ts.map +1 -0
- package/lib/types/index.d.ts +49 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/report.d.ts +18 -0
- package/lib/types/report.d.ts.map +1 -0
- package/lib/types/result.d.ts +254 -0
- package/lib/types/result.d.ts.map +1 -0
- package/lib/types/sanitize.d.ts +58 -0
- package/lib/types/sanitize.d.ts.map +1 -0
- package/lib/types/tools.d.ts +34 -0
- package/lib/types/tools.d.ts.map +1 -0
- package/lib/types/version.d.ts +8 -0
- package/lib/types/version.d.ts.map +1 -0
- package/lib/types/workspace.d.ts +103 -0
- package/lib/types/workspace.d.ts.map +1 -0
- package/package.json +146 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The structured test-drive result: one record per driven target, plus the
|
|
3
|
+
* batch matrix that aggregates them. This is the machine-readable output
|
|
4
|
+
* contract that downstream consumers (dsh-score and other scoring pipelines)
|
|
5
|
+
* read from the `test-drive` storage domain — every field a scorer needs
|
|
6
|
+
* (install/smoke status, durations, failure summaries) is a first-class
|
|
7
|
+
* field, never prose to be parsed.
|
|
8
|
+
*
|
|
9
|
+
* The zod schemas are the single source of truth for both the domain record
|
|
10
|
+
* types (validated at the durable boundary by `dsh-storage-domain`) and the
|
|
11
|
+
* TypeScript record types (`z.infer`), so the written records and the typed
|
|
12
|
+
* runtime can never drift.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-test-drive/result
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
/** Schema discriminator of every record this plugin writes (version 1). */
|
|
18
|
+
export declare const RESULT_SCHEMA: "dsh-test-drive/v1";
|
|
19
|
+
/** How the target was addressed. */
|
|
20
|
+
export declare const TargetKindSchema: z.ZodUnion<readonly [z.ZodLiteral<"repo">, z.ZodLiteral<"npm">, z.ZodLiteral<"path">, z.ZodLiteral<"tarball">]>;
|
|
21
|
+
export type TargetKind = z.infer<typeof TargetKindSchema>;
|
|
22
|
+
/** Outcome of an ordinary stage: it ran and passed, ran and failed, or was skipped by config. */
|
|
23
|
+
export declare const StageStatusSchema: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
24
|
+
export type StageStatus = z.infer<typeof StageStatusSchema>;
|
|
25
|
+
/** Boot-smoke outcome: clean boot plus completed task, failed boot, clean boot with an inconclusive task, or skipped. */
|
|
26
|
+
export declare const SmokeStatusSchema: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"boot-ok">, z.ZodLiteral<"skipped">]>;
|
|
27
|
+
export type SmokeStatus = z.infer<typeof SmokeStatusSchema>;
|
|
28
|
+
/** Overall verdict of one drive run. */
|
|
29
|
+
export declare const DriveVerdictSchema: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"partial">, z.ZodLiteral<"unknown">]>;
|
|
30
|
+
export type DriveVerdict = z.infer<typeof DriveVerdictSchema>;
|
|
31
|
+
/** Shared stage facts: exit, duration, attempts, and sanitized summary/tail. */
|
|
32
|
+
export declare const StageResultSchema: z.ZodObject<{
|
|
33
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
34
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
durationMs: z.ZodNumber;
|
|
36
|
+
attempts: z.ZodNumber;
|
|
37
|
+
summary: z.ZodString;
|
|
38
|
+
outputTail: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type StageResult = z.infer<typeof StageResultSchema>;
|
|
41
|
+
/** Install stage extras: whether the pnpm allowBuilds gate was hit and allowed. */
|
|
42
|
+
export declare const InstallStageResultSchema: z.ZodObject<{
|
|
43
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
44
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
durationMs: z.ZodNumber;
|
|
46
|
+
attempts: z.ZodNumber;
|
|
47
|
+
summary: z.ZodString;
|
|
48
|
+
outputTail: z.ZodString;
|
|
49
|
+
allowBuildsNeeded: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type InstallStageResult = z.infer<typeof InstallStageResultSchema>;
|
|
52
|
+
/** Config-dump stage extras: whether the bundle patch provably took effect. */
|
|
53
|
+
export declare const ConfigStageResultSchema: z.ZodObject<{
|
|
54
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
55
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
durationMs: z.ZodNumber;
|
|
57
|
+
attempts: z.ZodNumber;
|
|
58
|
+
summary: z.ZodString;
|
|
59
|
+
outputTail: z.ZodString;
|
|
60
|
+
patchEffective: z.ZodBoolean;
|
|
61
|
+
layers: z.ZodArray<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type ConfigStageResult = z.infer<typeof ConfigStageResultSchema>;
|
|
64
|
+
/** Boot-smoke stage: loader-failure facts plus the optional task completion. */
|
|
65
|
+
export declare const SmokeStageResultSchema: z.ZodObject<{
|
|
66
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
durationMs: z.ZodNumber;
|
|
68
|
+
attempts: z.ZodNumber;
|
|
69
|
+
summary: z.ZodString;
|
|
70
|
+
outputTail: z.ZodString;
|
|
71
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"boot-ok">, z.ZodLiteral<"skipped">]>;
|
|
72
|
+
bootFailed: z.ZodBoolean;
|
|
73
|
+
taskCompleted: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type SmokeStageResult = z.infer<typeof SmokeStageResultSchema>;
|
|
76
|
+
/** Uninstall stage result. */
|
|
77
|
+
export declare const UninstallStageResultSchema: z.ZodObject<{
|
|
78
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
79
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
80
|
+
durationMs: z.ZodNumber;
|
|
81
|
+
attempts: z.ZodNumber;
|
|
82
|
+
summary: z.ZodString;
|
|
83
|
+
outputTail: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type UninstallStageResult = z.infer<typeof UninstallStageResultSchema>;
|
|
86
|
+
/** Cleanup stage: quarantine/removal facts for the temp directory this run owned. */
|
|
87
|
+
export declare const CleanupStageResultSchema: z.ZodObject<{
|
|
88
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
89
|
+
quarantined: z.ZodBoolean;
|
|
90
|
+
removed: z.ZodBoolean;
|
|
91
|
+
summary: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type CleanupStageResult = z.infer<typeof CleanupStageResultSchema>;
|
|
94
|
+
/** Facts about the runner that produced the record. */
|
|
95
|
+
export declare const RunMetaSchema: z.ZodObject<{
|
|
96
|
+
runId: z.ZodString;
|
|
97
|
+
startedAt: z.ZodString;
|
|
98
|
+
finishedAt: z.ZodString;
|
|
99
|
+
durationMs: z.ZodNumber;
|
|
100
|
+
harnessVersion: z.ZodString;
|
|
101
|
+
pluginVersion: z.ZodString;
|
|
102
|
+
platform: z.ZodString;
|
|
103
|
+
node: z.ZodString;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export type RunMeta = z.infer<typeof RunMetaSchema>;
|
|
106
|
+
/** What was driven, and what the install revealed about it. */
|
|
107
|
+
export declare const DriveTargetSchema: z.ZodObject<{
|
|
108
|
+
kind: z.ZodUnion<readonly [z.ZodLiteral<"repo">, z.ZodLiteral<"npm">, z.ZodLiteral<"path">, z.ZodLiteral<"tarball">]>;
|
|
109
|
+
spec: z.ZodString;
|
|
110
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
packageName: z.ZodString;
|
|
112
|
+
packageVersion: z.ZodString;
|
|
113
|
+
hasBundleManifest: z.ZodBoolean;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type DriveTarget = z.infer<typeof DriveTargetSchema>;
|
|
117
|
+
/** Isolation facts asserted by construction: every path the child touched was inside the owned temp root. */
|
|
118
|
+
export declare const IsolationFactsSchema: z.ZodObject<{
|
|
119
|
+
tempDshHome: z.ZodBoolean;
|
|
120
|
+
tempWorkspace: z.ZodBoolean;
|
|
121
|
+
tempStore: z.ZodBoolean;
|
|
122
|
+
hostHomeTouched: z.ZodLiteral<false>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type IsolationFacts = z.infer<typeof IsolationFactsSchema>;
|
|
125
|
+
/** One drive run: install → dump-config → boot smoke → uninstall → cleanup. */
|
|
126
|
+
export declare const DriveResultSchema: z.ZodObject<{
|
|
127
|
+
schema: z.ZodLiteral<"dsh-test-drive/v1">;
|
|
128
|
+
run: z.ZodObject<{
|
|
129
|
+
runId: z.ZodString;
|
|
130
|
+
startedAt: z.ZodString;
|
|
131
|
+
finishedAt: z.ZodString;
|
|
132
|
+
durationMs: z.ZodNumber;
|
|
133
|
+
harnessVersion: z.ZodString;
|
|
134
|
+
pluginVersion: z.ZodString;
|
|
135
|
+
platform: z.ZodString;
|
|
136
|
+
node: z.ZodString;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
target: z.ZodObject<{
|
|
139
|
+
kind: z.ZodUnion<readonly [z.ZodLiteral<"repo">, z.ZodLiteral<"npm">, z.ZodLiteral<"path">, z.ZodLiteral<"tarball">]>;
|
|
140
|
+
spec: z.ZodString;
|
|
141
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
packageName: z.ZodString;
|
|
143
|
+
packageVersion: z.ZodString;
|
|
144
|
+
hasBundleManifest: z.ZodBoolean;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
isolation: z.ZodObject<{
|
|
148
|
+
tempDshHome: z.ZodBoolean;
|
|
149
|
+
tempWorkspace: z.ZodBoolean;
|
|
150
|
+
tempStore: z.ZodBoolean;
|
|
151
|
+
hostHomeTouched: z.ZodLiteral<false>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
stages: z.ZodObject<{
|
|
154
|
+
install: z.ZodObject<{
|
|
155
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
156
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
157
|
+
durationMs: z.ZodNumber;
|
|
158
|
+
attempts: z.ZodNumber;
|
|
159
|
+
summary: z.ZodString;
|
|
160
|
+
outputTail: z.ZodString;
|
|
161
|
+
allowBuildsNeeded: z.ZodBoolean;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
config: z.ZodObject<{
|
|
164
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
165
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
166
|
+
durationMs: z.ZodNumber;
|
|
167
|
+
attempts: z.ZodNumber;
|
|
168
|
+
summary: z.ZodString;
|
|
169
|
+
outputTail: z.ZodString;
|
|
170
|
+
patchEffective: z.ZodBoolean;
|
|
171
|
+
layers: z.ZodArray<z.ZodString>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
smoke: z.ZodObject<{
|
|
174
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
175
|
+
durationMs: z.ZodNumber;
|
|
176
|
+
attempts: z.ZodNumber;
|
|
177
|
+
summary: z.ZodString;
|
|
178
|
+
outputTail: z.ZodString;
|
|
179
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"boot-ok">, z.ZodLiteral<"skipped">]>;
|
|
180
|
+
bootFailed: z.ZodBoolean;
|
|
181
|
+
taskCompleted: z.ZodBoolean;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
uninstall: z.ZodObject<{
|
|
184
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
185
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
186
|
+
durationMs: z.ZodNumber;
|
|
187
|
+
attempts: z.ZodNumber;
|
|
188
|
+
summary: z.ZodString;
|
|
189
|
+
outputTail: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
cleanup: z.ZodObject<{
|
|
192
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
193
|
+
quarantined: z.ZodBoolean;
|
|
194
|
+
removed: z.ZodBoolean;
|
|
195
|
+
summary: z.ZodString;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
verdict: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"partial">, z.ZodLiteral<"unknown">]>;
|
|
199
|
+
verdictReason: z.ZodString;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
export type DriveResult = z.infer<typeof DriveResultSchema>;
|
|
202
|
+
/** One row of a batch matrix: the per-target verdict plus the fields a matrix table needs. */
|
|
203
|
+
export declare const MatrixRowSchema: z.ZodObject<{
|
|
204
|
+
target: z.ZodString;
|
|
205
|
+
kind: z.ZodUnion<readonly [z.ZodLiteral<"repo">, z.ZodLiteral<"npm">, z.ZodLiteral<"path">, z.ZodLiteral<"tarball">]>;
|
|
206
|
+
verdict: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"partial">, z.ZodLiteral<"unknown">]>;
|
|
207
|
+
install: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
208
|
+
smoke: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"boot-ok">, z.ZodLiteral<"skipped">]>;
|
|
209
|
+
durationMs: z.ZodNumber;
|
|
210
|
+
summary: z.ZodString;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
export type MatrixRow = z.infer<typeof MatrixRowSchema>;
|
|
213
|
+
/** Aggregated batch record keyed by the batch id. */
|
|
214
|
+
export declare const MatrixRecordSchema: z.ZodObject<{
|
|
215
|
+
schema: z.ZodLiteral<"dsh-test-drive/v1">;
|
|
216
|
+
id: z.ZodString;
|
|
217
|
+
createdAt: z.ZodString;
|
|
218
|
+
durationMs: z.ZodNumber;
|
|
219
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
220
|
+
target: z.ZodString;
|
|
221
|
+
kind: z.ZodUnion<readonly [z.ZodLiteral<"repo">, z.ZodLiteral<"npm">, z.ZodLiteral<"path">, z.ZodLiteral<"tarball">]>;
|
|
222
|
+
verdict: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"partial">, z.ZodLiteral<"unknown">]>;
|
|
223
|
+
install: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"skipped">]>;
|
|
224
|
+
smoke: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodLiteral<"fail">, z.ZodLiteral<"boot-ok">, z.ZodLiteral<"skipped">]>;
|
|
225
|
+
durationMs: z.ZodNumber;
|
|
226
|
+
summary: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
totals: z.ZodObject<{
|
|
229
|
+
total: z.ZodNumber;
|
|
230
|
+
pass: z.ZodNumber;
|
|
231
|
+
fail: z.ZodNumber;
|
|
232
|
+
partial: z.ZodNumber;
|
|
233
|
+
unknown: z.ZodNumber;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export type MatrixRecord = z.infer<typeof MatrixRecordSchema>;
|
|
237
|
+
/** Compile the tallies for one matrix record. */
|
|
238
|
+
export declare function totalsOf(rows: readonly MatrixRow[]): MatrixRecord['totals'];
|
|
239
|
+
/**
|
|
240
|
+
* Derive the overall verdict of one drive run from its stage outcomes.
|
|
241
|
+
*
|
|
242
|
+
* Rules, in order:
|
|
243
|
+
* 1. A failed install or a failed boot (`smoke.fail`) is a hard `fail`.
|
|
244
|
+
* 2. `pass` needs install pass + patch effective + a clean boot (`pass` or
|
|
245
|
+
* `boot-ok`) + a successful uninstall.
|
|
246
|
+
* 3. `partial` covers everything that installed but missed a later assurance
|
|
247
|
+
* (patch not visible, smoke skipped by config, uninstall failed).
|
|
248
|
+
* 4. `unknown` is the honest answer when nothing decisive ran.
|
|
249
|
+
*
|
|
250
|
+
* @param result - the complete drive result.
|
|
251
|
+
* @returns `[verdict, reason]`.
|
|
252
|
+
*/
|
|
253
|
+
export declare function verdictOf(result: DriveResult): [verdict: DriveVerdict, reason: string];
|
|
254
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/result.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure sanitizers for every string that reaches a report, a log, or the model.
|
|
3
|
+
* Nothing here reads the environment or the clock: report content is the only
|
|
4
|
+
* caller, and the sanitizers must stay testable with extreme inputs (token
|
|
5
|
+
* literals, credential-bearing URLs, hostile repo specs, temp-root paths).
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-test-drive/sanitize
|
|
8
|
+
*/
|
|
9
|
+
/** Maximum length of a sanitized target spec recorded in a report. */
|
|
10
|
+
export declare const MAX_TARGET_SPEC_LENGTH = 1000;
|
|
11
|
+
/** Marker substituted for every redacted secret. */
|
|
12
|
+
export declare const REDACTED = "***REDACTED***";
|
|
13
|
+
/**
|
|
14
|
+
* Replace credential-shaped substrings with {@link REDACTED}.
|
|
15
|
+
*
|
|
16
|
+
* @param text - any output or user-supplied string.
|
|
17
|
+
* @returns the same text with secrets redacted.
|
|
18
|
+
*/
|
|
19
|
+
export declare function redactSecrets(text: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Sanitize one user-supplied target spec for recording and display: strip
|
|
22
|
+
* control characters, redact embedded credentials, cap the length, and keep
|
|
23
|
+
* surrounding whitespace off the recorded value.
|
|
24
|
+
*
|
|
25
|
+
* @param spec - the raw target as the user supplied it.
|
|
26
|
+
* @returns the sanitized spec; never throws.
|
|
27
|
+
*/
|
|
28
|
+
export declare function sanitizeTarget(spec: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Bound a multi-line output stream to a short tail for one-line summaries.
|
|
31
|
+
* The tail keeps the END of the text (errors and final results cluster there).
|
|
32
|
+
*
|
|
33
|
+
* @param text - collected output.
|
|
34
|
+
* @param maxChars - retained character count.
|
|
35
|
+
* @returns the tail, prefixed with a truncation marker when shortened.
|
|
36
|
+
*/
|
|
37
|
+
export declare function tailText(text: string, maxChars: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Replace every occurrence of one run's temp root with a stable placeholder,
|
|
40
|
+
* so recorded output never leaks machine-local absolute paths. Both
|
|
41
|
+
* separator styles are matched (Windows backslashes vs forward slashes).
|
|
42
|
+
*
|
|
43
|
+
* @param text - output to scrub.
|
|
44
|
+
* @param tempRoot - the exact temp root this run owns.
|
|
45
|
+
* @returns the scrubbed text.
|
|
46
|
+
*/
|
|
47
|
+
export declare function redactTempPath(text: string, tempRoot: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Scrub one stage's collected output for a report field: redact the temp
|
|
50
|
+
* root, redact secrets, then keep only the bounded tail.
|
|
51
|
+
*
|
|
52
|
+
* @param text - raw collected output.
|
|
53
|
+
* @param tempRoot - this run's temp root ('' for none).
|
|
54
|
+
* @param maxChars - retained tail length.
|
|
55
|
+
* @returns the report-safe tail.
|
|
56
|
+
*/
|
|
57
|
+
export declare function sanitizeOutput(text: string, tempRoot: string, maxChars: number): string;
|
|
58
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,OAAQ,CAAA;AAE3C,oDAAoD;AACpD,eAAO,MAAM,QAAQ,mBAAmB,CAAA;AAExC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two model tools: `test_drive` (one target through the full pipeline,
|
|
3
|
+
* optionally as a background job) and `drive_report` (fetch a stored run or
|
|
4
|
+
* matrix record by id, or the latest matrix). Canonical outputs are the
|
|
5
|
+
* structured records themselves; the renderers turn them into Markdown.
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-test-drive/tools
|
|
8
|
+
*/
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
import type { Domain } from '@deepseek-ai/dsh-storage-domain';
|
|
11
|
+
import type { BatchDeps } from './batch.ts';
|
|
12
|
+
import type { ResolvedConfig } from './config.ts';
|
|
13
|
+
import type { driveDomainSpec } from './domain.ts';
|
|
14
|
+
import { DriveRunner } from './drive.ts';
|
|
15
|
+
import type { DriveDeps } from './drive.ts';
|
|
16
|
+
/** Everything both tools need; assembled by `src/index.ts`. */
|
|
17
|
+
export interface ToolServices extends BatchDeps, DriveDeps {
|
|
18
|
+
/** The mounting context. */
|
|
19
|
+
ctx: Context;
|
|
20
|
+
/** Resolved plugin config. */
|
|
21
|
+
config: ResolvedConfig;
|
|
22
|
+
/** Lazily-opened report domain. */
|
|
23
|
+
domain: () => Promise<Domain<typeof driveDomainSpec>>;
|
|
24
|
+
/** The drive pipeline. */
|
|
25
|
+
runner: DriveRunner;
|
|
26
|
+
}
|
|
27
|
+
/** Canonical background branch returned when `test_drive` runs as a job. */
|
|
28
|
+
export interface BackgroundHandle {
|
|
29
|
+
kind: 'background';
|
|
30
|
+
jobId: string;
|
|
31
|
+
}
|
|
32
|
+
/** Build both tool definitions over the shared services. */
|
|
33
|
+
export declare function allTools(services: ToolServices): import("@deepseek-ai/dsh-tools").ToolDefinition[];
|
|
34
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAI7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAM3C,+DAA+D;AAC/D,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,SAAS;IACxD,4BAA4B;IAC5B,GAAG,EAAE,OAAO,CAAA;IACZ,8BAA8B;IAC9B,MAAM,EAAE,cAAc,CAAA;IACtB,mCAAmC;IACnC,MAAM,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,CAAA;IACrD,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAA;CACpB;AAmKD,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd;AA2BD,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,YAAY,qDA4F9C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Producer version, kept in lockstep with `package.json` by
|
|
3
|
+
* `scripts/release.mjs`; `tests/version.spec.ts` trips when they drift.
|
|
4
|
+
* The structured report records it as `run.pluginVersion`.
|
|
5
|
+
* @module dsh-test-drive/version
|
|
6
|
+
*/
|
|
7
|
+
export declare const VERSION = "0.1.0";
|
|
8
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,UAAU,CAAA"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporary-directory ownership for test drives. Every directory this plugin
|
|
3
|
+
* ever touches under the OS temp dir is created here with {@link mkdtemp},
|
|
4
|
+
* tracked in a live registry, and removed only through the
|
|
5
|
+
* dry-run → quarantine-rename → delete ladder. Nothing in this module scans
|
|
6
|
+
* the temp dir, guesses at foreign prefixes, or touches the real home:
|
|
7
|
+
* ownership is a registry lookup plus a prefix and direct-child check, and a
|
|
8
|
+
* path that fails any check is refused loudly.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-test-drive/workspace
|
|
11
|
+
*/
|
|
12
|
+
/** Prefix of every owned temp root (`mkdtemp` appends the random suffix). */
|
|
13
|
+
export declare const OWNED_PREFIX = "dsh-test-drive-";
|
|
14
|
+
/** Prefix of quarantine directories an owned root is renamed into before removal. */
|
|
15
|
+
export declare const QUARANTINE_PREFIX = "dsh-test-drive-quarantine-";
|
|
16
|
+
/** Milliseconds between removal retries on Windows file-lock errors. */
|
|
17
|
+
export declare const REMOVE_RETRY_DELAY_MS = 100;
|
|
18
|
+
/** Removal attempts before the cleanup stage reports failure. */
|
|
19
|
+
export declare const REMOVE_MAX_RETRIES = 3;
|
|
20
|
+
/** Layout of one owned temp root: DSH_HOME, child cwd, and the pnpm store. */
|
|
21
|
+
export interface TempWorkspace {
|
|
22
|
+
/** The owned root everything else lives under. */
|
|
23
|
+
root: string;
|
|
24
|
+
/** Throwaway DSH_HOME passed to every child `dsh` process. */
|
|
25
|
+
home: string;
|
|
26
|
+
/** Throwaway working directory for child processes. */
|
|
27
|
+
workspace: string;
|
|
28
|
+
/** Redirected pnpm content-addressable store. */
|
|
29
|
+
store: string;
|
|
30
|
+
/** Profile directory once `dsh plugin add` initializes it. */
|
|
31
|
+
profileDir: string;
|
|
32
|
+
}
|
|
33
|
+
/** One planned cleanup operation, printed to the operator log before execution. */
|
|
34
|
+
export interface CleanupPlan {
|
|
35
|
+
/** Operation kind. */
|
|
36
|
+
action: 'quarantine-rename' | 'remove' | 'keep';
|
|
37
|
+
/** Full absolute target path. */
|
|
38
|
+
path: string;
|
|
39
|
+
/** Note explaining why the target is safe to touch. */
|
|
40
|
+
ownership: string;
|
|
41
|
+
}
|
|
42
|
+
/** How the removal ladder ended. */
|
|
43
|
+
export interface CleanupOutcome {
|
|
44
|
+
status: 'pass' | 'fail' | 'skipped';
|
|
45
|
+
quarantined: boolean;
|
|
46
|
+
removed: boolean;
|
|
47
|
+
summary: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The registry of temp roots this plugin instance owns. All mutations are
|
|
51
|
+
* synchronous so the ownership set can never observe a half-registered root.
|
|
52
|
+
*/
|
|
53
|
+
export declare class TempWorkspaceRegistry {
|
|
54
|
+
private readonly log;
|
|
55
|
+
private readonly now;
|
|
56
|
+
private readonly owned;
|
|
57
|
+
private readonly quarantined;
|
|
58
|
+
private sequence;
|
|
59
|
+
/**
|
|
60
|
+
* @param log - operator log sink (the plugin logger); receives the dry-run plan lines.
|
|
61
|
+
* @param now - clock (test hook for deterministic quarantine names).
|
|
62
|
+
*/
|
|
63
|
+
constructor(log: (line: string) => void, now?: () => number);
|
|
64
|
+
/** Owned roots currently registered (for tests and diagnostics). */
|
|
65
|
+
get size(): number;
|
|
66
|
+
/** Create one owned temp root with the standard layout. */
|
|
67
|
+
create(profileName: string): Promise<TempWorkspace>;
|
|
68
|
+
/**
|
|
69
|
+
* Assert that `path` is a directory this instance created and still owns.
|
|
70
|
+
* Fails loud — never falls back to cwd, a parent, or a different prefix.
|
|
71
|
+
*/
|
|
72
|
+
private assertOwned;
|
|
73
|
+
/**
|
|
74
|
+
* Compile and LOG the dry-run plan for one root before any mutation happens.
|
|
75
|
+
* The returned quarantine path is the exact path the execution ladder uses,
|
|
76
|
+
* so the logged plan always matches the performed operations.
|
|
77
|
+
*/
|
|
78
|
+
private plan;
|
|
79
|
+
/**
|
|
80
|
+
* Remove one owned root via the quarantine ladder: assert ownership, log the
|
|
81
|
+
* dry-run plan, rename into an owned quarantine directory, then remove it.
|
|
82
|
+
* A root that fails removal stays registered as quarantine and is retried
|
|
83
|
+
* on the next teardown.
|
|
84
|
+
*
|
|
85
|
+
* @param root - the owned root to remove.
|
|
86
|
+
* @returns the sanitized outcome.
|
|
87
|
+
*/
|
|
88
|
+
quarantineAndRemove(root: string): Promise<CleanupOutcome>;
|
|
89
|
+
/**
|
|
90
|
+
* Keep a root for forensics (config `keepTempDirs`): drop ownership without
|
|
91
|
+
* touching the directory. The caller owns later manual cleanup.
|
|
92
|
+
*/
|
|
93
|
+
keep(root: string): CleanupOutcome;
|
|
94
|
+
/** Best-effort teardown of every still-registered root and quarantine dir. */
|
|
95
|
+
disposeAll(): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
/** Remove a directory tree with bounded retries (Windows file-lock tolerance). */
|
|
98
|
+
export declare function removeWithRetries(path: string, maxRetries: number, retryDelayMs: number): Promise<void>;
|
|
99
|
+
/** Verify a directory exists and is a directory (post-create sanity for tests). */
|
|
100
|
+
export declare function dirExists(path: string): Promise<boolean>;
|
|
101
|
+
/** List a directory (test helper for asserting leftovers). */
|
|
102
|
+
export declare function listDir(path: string): Promise<string[]>;
|
|
103
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,6EAA6E;AAC7E,eAAO,MAAM,YAAY,oBAAoB,CAAA;AAE7C,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,+BAA+B,CAAA;AAE7D,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,MAAM,CAAA;AAExC,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAEnC,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,mFAAmF;AACnF,MAAM,WAAW,WAAW;IAC1B,sBAAsB;IACtB,MAAM,EAAE,mBAAmB,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC/C,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACnC,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AASD;;;GAGG;AACH,qBAAa,qBAAqB;IAU9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAVtB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAI;IAEpB;;;OAGG;gBAEgB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC3B,GAAG,GAAE,MAAM,MAAiB;IAG/C,oEAAoE;IACpE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,2DAA2D;IACrD,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAczD;;;OAGG;IACH,OAAO,CAAC,WAAW;IAkBnB;;;;OAIG;IACH,OAAO,CAAC,IAAI;IAQZ;;;;;;;;OAQG;IACG,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAsBhE;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAQlC,8EAA8E;IACxE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAmBlC;AAED,kFAAkF;AAClF,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY7G;AAED,mFAAmF;AACnF,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9D;AAED,8DAA8D;AAC9D,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAM7D"}
|
package/package.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-test-drive",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Isolated install-and-smoke test drives for DeepSeek Harness plugins: installs a repo or npm package into a throwaway DSH_HOME profile, verifies the bundle patch layer and boot logs, records a structured pass/fail result matrix (JSON/Markdown) for scoring pipelines, and quarantines every temp directory it owns",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/PerryLink/dsh-test-drive.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/PerryLink/dsh-test-drive#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/PerryLink/dsh-test-drive/issues"
|
|
12
|
+
},
|
|
13
|
+
"author": "PerryLink",
|
|
14
|
+
"private": false,
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./lib/index.js",
|
|
17
|
+
"types": "./lib/types/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./lib/types/index.d.ts",
|
|
21
|
+
"default": "./lib/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"lib",
|
|
27
|
+
"cordis.patch.yml",
|
|
28
|
+
"CHANGELOG.md",
|
|
29
|
+
"THIRD_PARTY_NOTICES.md",
|
|
30
|
+
"SECURITY.md",
|
|
31
|
+
"README.md",
|
|
32
|
+
"README.zh.md",
|
|
33
|
+
"README.es.md",
|
|
34
|
+
"README.pt.md",
|
|
35
|
+
"README.hi.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"dsh": {
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"dshWorkshop": {
|
|
44
|
+
"schema": "omdsh-workshop-package/v1",
|
|
45
|
+
"type": "plugin",
|
|
46
|
+
"integration": {
|
|
47
|
+
"protocol": "harness-profile",
|
|
48
|
+
"artifact": "cordis.patch.yml"
|
|
49
|
+
},
|
|
50
|
+
"install": {
|
|
51
|
+
"mode": "transactional",
|
|
52
|
+
"adapter": "profile-bundle",
|
|
53
|
+
"failurePolicy": "generation-rollback",
|
|
54
|
+
"touchesCurrentBeforeActivation": false
|
|
55
|
+
},
|
|
56
|
+
"lifecycle": {
|
|
57
|
+
"activation": "hot-reload",
|
|
58
|
+
"dispose": "supported"
|
|
59
|
+
},
|
|
60
|
+
"permissions": [
|
|
61
|
+
"fs:read",
|
|
62
|
+
"fs:write",
|
|
63
|
+
"subprocess:spawn",
|
|
64
|
+
"session:append",
|
|
65
|
+
"network:inherit",
|
|
66
|
+
"native-code:none"
|
|
67
|
+
],
|
|
68
|
+
"compatibility": {
|
|
69
|
+
"dshVersions": [
|
|
70
|
+
"0.1.0-rc.6"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"capability": {
|
|
74
|
+
"id": "plugin-test-drive",
|
|
75
|
+
"kind": "tool",
|
|
76
|
+
"invocation": "test_drive, /testdrive, drive_report",
|
|
77
|
+
"expected": "installs a repo or npm package into an isolated throwaway DSH_HOME profile, verifies the patch layer and boot logs, records a structured install/smoke result matrix, and cleans up every temp directory it owns"
|
|
78
|
+
},
|
|
79
|
+
"evidence": {
|
|
80
|
+
"install": null,
|
|
81
|
+
"failureIsolation": null,
|
|
82
|
+
"hotReload": null,
|
|
83
|
+
"remove": null
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"keywords": [
|
|
87
|
+
"dsh",
|
|
88
|
+
"dsh-plugin",
|
|
89
|
+
"deepseek-harness",
|
|
90
|
+
"deepseek",
|
|
91
|
+
"cordis",
|
|
92
|
+
"plugin-testing",
|
|
93
|
+
"install-smoke",
|
|
94
|
+
"compatibility-matrix",
|
|
95
|
+
"ci"
|
|
96
|
+
],
|
|
97
|
+
"engines": {
|
|
98
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
99
|
+
},
|
|
100
|
+
"packageManager": "pnpm@11.7.0",
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
103
|
+
"@deepseek-ai/schemastery": "^3.18.0",
|
|
104
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
105
|
+
"@deepseek-ai/dsh-commands": "0.1.0-rc.6",
|
|
106
|
+
"@deepseek-ai/dsh-jobs": "0.1.0-rc.6",
|
|
107
|
+
"@deepseek-ai/dsh-storage-domain": "0.1.0-rc.6",
|
|
108
|
+
"@deepseek-ai/dsh-subprocess": "0.1.0-rc.6",
|
|
109
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.6"
|
|
110
|
+
},
|
|
111
|
+
"dependencies": {
|
|
112
|
+
"tsdown": "^0.22.14",
|
|
113
|
+
"typescript": "^5.9.0",
|
|
114
|
+
"zod": "^4.4.3"
|
|
115
|
+
},
|
|
116
|
+
"devDependencies": {
|
|
117
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
118
|
+
"@deepseek-ai/schemastery": "^3.18.0",
|
|
119
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
120
|
+
"@deepseek-ai/dsh-commands": "0.1.0-rc.6",
|
|
121
|
+
"@deepseek-ai/dsh-jobs": "0.1.0-rc.6",
|
|
122
|
+
"@deepseek-ai/dsh-jobs-local": "0.1.0-rc.6",
|
|
123
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
124
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
125
|
+
"@deepseek-ai/dsh-storage": "0.1.0-rc.6",
|
|
126
|
+
"@deepseek-ai/dsh-storage-domain": "0.1.0-rc.6",
|
|
127
|
+
"@deepseek-ai/dsh-subprocess": "0.1.0-rc.6",
|
|
128
|
+
"@deepseek-ai/dsh-subprocess-local": "0.1.0-rc.6",
|
|
129
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.6",
|
|
130
|
+
"@types/node": "^22.19.0",
|
|
131
|
+
"vitest": "^3.2.0",
|
|
132
|
+
"zod": "^4.4.3"
|
|
133
|
+
},
|
|
134
|
+
"scripts": {
|
|
135
|
+
"build": "node scripts/prepare.mjs",
|
|
136
|
+
"prepare": "node scripts/prepare.mjs",
|
|
137
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
138
|
+
"typecheck:ci": "tsc -p tsconfig.ci.json --noEmit",
|
|
139
|
+
"test": "vitest run",
|
|
140
|
+
"test:watch": "vitest",
|
|
141
|
+
"test:e2e": "vitest run tests/e2e.spec.ts",
|
|
142
|
+
"verify:self-contained": "node scripts/verify-self-contained.mjs",
|
|
143
|
+
"verify:artifacts": "node scripts/verify-artifacts.mjs"
|
|
144
|
+
},
|
|
145
|
+
"license": "Apache-2.0"
|
|
146
|
+
}
|