@zhangj1164/dsh-github-issue 0.2.0 → 0.3.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/lib/types.d.ts CHANGED
@@ -133,5 +133,135 @@ type GithubIssueOptimizeResult = {
133
133
  readonly message: string;
134
134
  };
135
135
  };
136
+ /** One open issue a session can claim and work on. */
137
+ interface GithubIssueTask {
138
+ /** Issue number inside its repository. */
139
+ readonly number: number;
140
+ /** Issue title. */
141
+ readonly title: string;
142
+ /** Issue body in Markdown; empty when the issue has none. */
143
+ readonly body: string;
144
+ /** Canonical browser URL of the issue. */
145
+ readonly url: string;
146
+ /** Every label name the issue carries. */
147
+ readonly labels: readonly string[];
148
+ }
149
+ /**
150
+ * Stable failure codes the issue intake calls report.
151
+ *
152
+ * The codes are the contract: a caller decides what to do from the code, and
153
+ * the message exists for the human reading the failure. `auth-missing` is
154
+ * separate from `auth-failure` because no credential and a rejected credential
155
+ * are different deployment problems with different fixes.
156
+ */
157
+ type GithubIssueFailureCode = 'auth-missing' | 'auth-failure' | 'rate-limited' | 'invalid-repo' | 'invalid-request' | 'http-failure' | 'network-failure' | 'session-unavailable' | 'dispatch-failed';
158
+ /** One failed issue intake call. */
159
+ interface GithubIssueFailure {
160
+ /** Failure discriminator. */
161
+ readonly ok: false;
162
+ /** The code and the user-facing message. */
163
+ readonly error: {
164
+ readonly code: GithubIssueFailureCode;
165
+ readonly message: string;
166
+ };
167
+ }
168
+ /** Request to create one issue from an optimized report. */
169
+ interface GithubIssueCreateRequest {
170
+ /** Repository URL override; omit to use this service's configured `repoUrl`. */
171
+ readonly repoUrl?: string;
172
+ /** The report to file. */
173
+ readonly report: GithubIssueReport;
174
+ }
175
+ /** The issue GitHub created. */
176
+ interface GithubIssueCreated {
177
+ /** Issue number inside the repository. */
178
+ readonly number: number;
179
+ /** Canonical browser URL of the new issue. */
180
+ readonly url: string;
181
+ }
182
+ /** Result of filing one issue. */
183
+ type GithubIssueCreateResult = {
184
+ readonly ok: true;
185
+ readonly value: GithubIssueCreated;
186
+ } | GithubIssueFailure;
187
+ /** Request to list the open issues carrying the claim label. */
188
+ interface GithubIssueListRequest {
189
+ /** Repository URL override; omit to use this service's configured `repoUrl`. */
190
+ readonly repoUrl?: string;
191
+ /** Claim label override; omit to use the configured `claimLabel`. */
192
+ readonly claimLabel?: string;
193
+ /** Largest number of issues to request; omit to use `maxIssuesPerRun`. */
194
+ readonly max?: number;
195
+ }
196
+ /** Result of listing claimable issues. */
197
+ type GithubIssueListResult = {
198
+ readonly ok: true;
199
+ readonly value: readonly GithubIssueTask[];
200
+ } | GithubIssueFailure;
201
+ /** Request to hand one issue to a new Session. */
202
+ interface GithubIssueDispatchRequest {
203
+ /** The issue to work on. */
204
+ readonly issue: GithubIssueTask;
205
+ /** Working directory the Session owns; omit to use the configured default. */
206
+ readonly cwd?: string;
207
+ /** Agent preset the Session runs; omit to use the configured default. */
208
+ readonly agentPreset?: string;
209
+ }
210
+ /** Result of dispatching one issue. */
211
+ type GithubIssueDispatchResult = {
212
+ readonly ok: true;
213
+ readonly value: {
214
+ readonly sessionId: string;
215
+ };
216
+ } | GithubIssueFailure;
217
+ /** Request to run one intake pass over the configured repository. */
218
+ interface GithubIssueIntakeRequest {
219
+ /** Repository URL override; omit to use this service's configured `repoUrl`. */
220
+ readonly repoUrl?: string;
221
+ /** Claim label override; omit to use the configured `claimLabel`. */
222
+ readonly claimLabel?: string;
223
+ /** Largest number of issues to dispatch in this pass. */
224
+ readonly max?: number;
225
+ /** Working directory each dispatched Session owns. */
226
+ readonly cwd?: string;
227
+ /** Agent preset each dispatched Session runs. */
228
+ readonly agentPreset?: string;
229
+ }
230
+ /** One issue handed to a Session during an intake pass. */
231
+ interface GithubIssueDispatched {
232
+ /** Issue number. */
233
+ readonly number: number;
234
+ /** Session created for it. */
235
+ readonly sessionId: string;
236
+ }
237
+ /** One issue an intake pass selected but could not dispatch. */
238
+ interface GithubIssueIntakeFailure {
239
+ /** Issue number. */
240
+ readonly number: number;
241
+ /** Stable failure code. */
242
+ readonly code: GithubIssueFailureCode;
243
+ /** User-facing explanation. */
244
+ readonly message: string;
245
+ }
246
+ /** What one intake pass did. */
247
+ interface GithubIssueIntakeValue {
248
+ /** Wall-clock time the pass ran, in epoch milliseconds. */
249
+ readonly checkedAt: number;
250
+ /** Repository the pass read. */
251
+ readonly repoUrl: string;
252
+ /** Issues the claim label selected. */
253
+ readonly claimable: readonly GithubIssueTask[];
254
+ /** Issues handed to a Session in this pass. */
255
+ readonly dispatched: readonly GithubIssueDispatched[];
256
+ /** Issue numbers skipped because an earlier pass already dispatched them. */
257
+ readonly skipped: readonly number[];
258
+ /** Issues the pass selected but could not dispatch. */
259
+ readonly failures: readonly GithubIssueIntakeFailure[];
260
+ }
261
+ /** Result of one intake pass. */
262
+ type GithubIssueIntakeResult = {
263
+ readonly ok: true;
264
+ readonly value: GithubIssueIntakeValue;
265
+ } | GithubIssueFailure;
136
266
  //#endregion
137
- export { GithubIssueAnalysisWindow, GithubIssueFailureGroupInput, GithubIssueFailureRoute, GithubIssueGenerateReportRequest, GithubIssueGenerateReportResult, GithubIssueOptimizeRequest, GithubIssueOptimizeResult, GithubIssuePrefillRequest, GithubIssuePrefillResult, GithubIssueReport };
267
+ export { GithubIssueAnalysisWindow, GithubIssueCreateRequest, GithubIssueCreateResult, GithubIssueCreated, GithubIssueDispatchRequest, GithubIssueDispatchResult, GithubIssueDispatched, GithubIssueFailure, GithubIssueFailureCode, GithubIssueFailureGroupInput, GithubIssueFailureRoute, GithubIssueGenerateReportRequest, GithubIssueGenerateReportResult, GithubIssueIntakeFailure, GithubIssueIntakeRequest, GithubIssueIntakeResult, GithubIssueIntakeValue, GithubIssueListRequest, GithubIssueListResult, GithubIssueOptimizeRequest, GithubIssueOptimizeResult, GithubIssuePrefillRequest, GithubIssuePrefillResult, GithubIssueReport, GithubIssueTask };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zhangj1164/dsh-github-issue",
3
- "description": "GitHub issue generation and optimization service for DeepSeek Harness: builds structured issue reports from telemetry analysis, pre-filled issue URLs, and AI-optimized descriptions",
4
- "version": "0.2.0",
3
+ "description": "GitHub issue generation, filing, and intake service for DeepSeek Harness: structured reports from telemetry analysis, AI-optimized descriptions, direct issue creation, and first-startup dispatch of claimable issues to new Sessions",
4
+ "version": "0.3.0",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -44,19 +44,27 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@deepseek-ai/schemastery": "^3.18.0",
47
+ "@deepseek-ai/cosmokit": "^1.8.6",
48
+ "@deepseek-ai/schemastery": "^3.18.4",
48
49
  "zod": "^4.6.5"
49
50
  },
50
51
  "peerDependencies": {
51
52
  "@deepseek-ai/cordis": "~4.0.5",
52
53
  "@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
53
54
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
55
+ "@deepseek-ai/dsh-storage-domain": "^0.2.1-rc.2",
54
56
  "@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.2"
55
57
  },
58
+ "peerDependenciesMeta": {
59
+ "@deepseek-ai/dsh-storage-domain": {
60
+ "optional": true
61
+ }
62
+ },
56
63
  "devDependencies": {
57
64
  "@deepseek-ai/cordis": "~4.0.5",
58
65
  "@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
59
66
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
67
+ "@deepseek-ai/dsh-storage-domain": "^0.2.1-rc.2",
60
68
  "@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.2",
61
69
  "@types/node": "^26.5.1",
62
70
  "tsdown": "^0.22.2",