@oss-autopilot/core 0.41.0 → 0.42.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.
Files changed (63) hide show
  1. package/dist/cli.bundle.cjs +1552 -1318
  2. package/dist/cli.js +593 -69
  3. package/dist/commands/check-integration.d.ts +3 -3
  4. package/dist/commands/check-integration.js +10 -43
  5. package/dist/commands/comments.d.ts +6 -9
  6. package/dist/commands/comments.js +102 -252
  7. package/dist/commands/config.d.ts +8 -2
  8. package/dist/commands/config.js +6 -28
  9. package/dist/commands/daily.d.ts +28 -4
  10. package/dist/commands/daily.js +33 -45
  11. package/dist/commands/dashboard-data.js +7 -6
  12. package/dist/commands/dashboard-server.d.ts +14 -0
  13. package/dist/commands/dashboard-server.js +362 -0
  14. package/dist/commands/dashboard.d.ts +5 -0
  15. package/dist/commands/dashboard.js +51 -1
  16. package/dist/commands/dismiss.d.ts +13 -5
  17. package/dist/commands/dismiss.js +4 -24
  18. package/dist/commands/index.d.ts +33 -0
  19. package/dist/commands/index.js +22 -0
  20. package/dist/commands/init.d.ts +5 -4
  21. package/dist/commands/init.js +4 -14
  22. package/dist/commands/local-repos.d.ts +4 -5
  23. package/dist/commands/local-repos.js +6 -33
  24. package/dist/commands/parse-list.d.ts +3 -4
  25. package/dist/commands/parse-list.js +8 -39
  26. package/dist/commands/read.d.ts +11 -5
  27. package/dist/commands/read.js +4 -18
  28. package/dist/commands/search.d.ts +3 -3
  29. package/dist/commands/search.js +39 -65
  30. package/dist/commands/setup.d.ts +34 -5
  31. package/dist/commands/setup.js +75 -166
  32. package/dist/commands/shelve.d.ts +13 -5
  33. package/dist/commands/shelve.js +4 -24
  34. package/dist/commands/snooze.d.ts +15 -9
  35. package/dist/commands/snooze.js +16 -59
  36. package/dist/commands/startup.d.ts +11 -6
  37. package/dist/commands/startup.js +44 -82
  38. package/dist/commands/status.d.ts +3 -3
  39. package/dist/commands/status.js +10 -29
  40. package/dist/commands/track.d.ts +10 -9
  41. package/dist/commands/track.js +17 -39
  42. package/dist/commands/validation.d.ts +2 -2
  43. package/dist/commands/validation.js +7 -15
  44. package/dist/commands/vet.d.ts +3 -3
  45. package/dist/commands/vet.js +16 -26
  46. package/dist/core/errors.d.ts +9 -0
  47. package/dist/core/errors.js +17 -0
  48. package/dist/core/github-stats.d.ts +14 -21
  49. package/dist/core/github-stats.js +84 -138
  50. package/dist/core/http-cache.d.ts +6 -0
  51. package/dist/core/http-cache.js +16 -4
  52. package/dist/core/index.d.ts +2 -1
  53. package/dist/core/index.js +2 -1
  54. package/dist/core/issue-conversation.js +4 -4
  55. package/dist/core/issue-discovery.js +14 -14
  56. package/dist/core/issue-vetting.js +17 -17
  57. package/dist/core/pr-monitor.d.ts +6 -20
  58. package/dist/core/pr-monitor.js +11 -52
  59. package/dist/core/state.js +4 -5
  60. package/dist/core/utils.d.ts +11 -0
  61. package/dist/core/utils.js +21 -0
  62. package/dist/formatters/json.d.ts +58 -0
  63. package/package.json +5 -1
@@ -5,11 +5,40 @@
5
5
  interface SetupOptions {
6
6
  reset?: boolean;
7
7
  set?: string[];
8
- json?: boolean;
9
8
  }
10
- interface CheckSetupOptions {
11
- json?: boolean;
9
+ export interface SetupSetOutput {
10
+ success: true;
11
+ settings: Record<string, string>;
12
+ warnings?: string[];
12
13
  }
13
- export declare function runSetup(options: SetupOptions): Promise<void>;
14
- export declare function runCheckSetup(options: CheckSetupOptions): Promise<void>;
14
+ export interface SetupCompleteOutput {
15
+ setupComplete: true;
16
+ config: {
17
+ githubUsername: string;
18
+ maxActivePRs: number;
19
+ dormantThresholdDays: number;
20
+ approachingDormantDays: number;
21
+ languages: string[];
22
+ labels: string[];
23
+ };
24
+ }
25
+ export interface SetupPrompt {
26
+ setting: string;
27
+ prompt: string;
28
+ current: string | number | string[] | null;
29
+ required?: boolean;
30
+ default?: string | number | string[];
31
+ type?: string;
32
+ }
33
+ export interface SetupRequiredOutput {
34
+ setupRequired: true;
35
+ prompts: SetupPrompt[];
36
+ }
37
+ export type SetupOutput = SetupSetOutput | SetupCompleteOutput | SetupRequiredOutput;
38
+ export interface CheckSetupOutput {
39
+ setupComplete: boolean;
40
+ username: string;
41
+ }
42
+ export declare function runSetup(options: SetupOptions): Promise<SetupOutput>;
43
+ export declare function runCheckSetup(): Promise<CheckSetupOutput>;
15
44
  export {};
@@ -3,7 +3,6 @@
3
3
  * Interactive setup / configuration
4
4
  */
5
5
  import { getStateManager, DEFAULT_CONFIG } from '../core/index.js';
6
- import { outputJson } from '../formatters/json.js';
7
6
  import { validateGitHubUsername } from './validation.js';
8
7
  export async function runSetup(options) {
9
8
  const stateManager = getStateManager();
@@ -11,6 +10,7 @@ export async function runSetup(options) {
11
10
  // Handle --set mode: apply settings directly
12
11
  if (options.set && options.set.length > 0) {
13
12
  const results = {};
13
+ const warnings = [];
14
14
  for (const setting of options.set) {
15
15
  const [key, ...valueParts] = setting.split('=');
16
16
  const value = valueParts.join('=');
@@ -81,15 +81,11 @@ export async function runSetup(options) {
81
81
  }
82
82
  }
83
83
  if (invalid.length > 0) {
84
- if (!options.json) {
85
- console.warn(`Warning: Skipping invalid entries (expected "owner/repo" format): ${invalid.join(', ')}`);
86
- }
84
+ warnings.push(`Warning: Skipping invalid entries (expected "owner/repo" format): ${invalid.join(', ')}`);
87
85
  results['aiPolicyBlocklist_invalidEntries'] = invalid.join(', ');
88
86
  }
89
87
  if (valid.length === 0 && entries.length > 0) {
90
- if (!options.json) {
91
- console.warn('Warning: All entries were invalid. Blocklist not updated.');
92
- }
88
+ warnings.push('Warning: All entries were invalid. Blocklist not updated.');
93
89
  results[key] = '(all entries invalid)';
94
90
  break;
95
91
  }
@@ -104,173 +100,86 @@ export async function runSetup(options) {
104
100
  }
105
101
  break;
106
102
  default:
107
- if (!options.json) {
108
- console.warn(`Unknown setting: ${key}`);
109
- }
103
+ warnings.push(`Unknown setting: ${key}`);
110
104
  }
111
105
  }
112
106
  stateManager.save();
113
- if (options.json) {
114
- outputJson({ success: true, settings: results });
115
- }
116
- else {
117
- for (const [key, value] of Object.entries(results)) {
118
- console.log(`✓ ${key}: ${value}`);
119
- }
120
- }
121
- return;
107
+ return { success: true, settings: results, warnings: warnings.length > 0 ? warnings : undefined };
122
108
  }
123
109
  // Show setup status
124
110
  if (config.setupComplete && !options.reset) {
125
- if (options.json) {
126
- outputJson({
127
- setupComplete: true,
128
- config: {
129
- githubUsername: config.githubUsername,
130
- maxActivePRs: config.maxActivePRs,
131
- dormantThresholdDays: config.dormantThresholdDays,
132
- approachingDormantDays: config.approachingDormantDays,
133
- languages: config.languages,
134
- labels: config.labels,
135
- },
136
- });
137
- }
138
- else {
139
- console.log('\n⚙️ OSS Autopilot Setup\n');
140
- console.log('✓ Setup already complete!\n');
141
- console.log('Current settings:');
142
- console.log(` GitHub username: ${config.githubUsername || '(not set)'}`);
143
- console.log(` Max active PRs: ${config.maxActivePRs}`);
144
- console.log(` Dormant threshold: ${config.dormantThresholdDays} days`);
145
- console.log(` Approaching dormant: ${config.approachingDormantDays} days`);
146
- console.log(` Languages: ${config.languages.join(', ')}`);
147
- console.log(` Labels: ${config.labels.join(', ')}`);
148
- console.log(`\nRun 'setup --reset' to reconfigure.`);
149
- }
150
- return;
111
+ return {
112
+ setupComplete: true,
113
+ config: {
114
+ githubUsername: config.githubUsername,
115
+ maxActivePRs: config.maxActivePRs,
116
+ dormantThresholdDays: config.dormantThresholdDays,
117
+ approachingDormantDays: config.approachingDormantDays,
118
+ languages: config.languages,
119
+ labels: config.labels,
120
+ },
121
+ };
151
122
  }
152
123
  // Output setup prompts
153
- if (options.json) {
154
- outputJson({
155
- setupRequired: true,
156
- prompts: [
157
- {
158
- setting: 'username',
159
- prompt: 'What is your GitHub username?',
160
- current: config.githubUsername || null,
161
- required: true,
162
- type: 'string',
163
- },
164
- {
165
- setting: 'maxActivePRs',
166
- prompt: 'How many PRs do you want to work on at once?',
167
- current: config.maxActivePRs,
168
- default: 10,
169
- type: 'number',
170
- },
171
- {
172
- setting: 'dormantDays',
173
- prompt: 'After how many days of inactivity should a PR be considered dormant?',
174
- current: config.dormantThresholdDays,
175
- default: 30,
176
- type: 'number',
177
- },
178
- {
179
- setting: 'approachingDays',
180
- prompt: 'At how many days should we warn about approaching dormancy?',
181
- current: config.approachingDormantDays,
182
- default: 25,
183
- type: 'number',
184
- },
185
- {
186
- setting: 'languages',
187
- prompt: 'What programming languages do you want to contribute to?',
188
- current: config.languages,
189
- default: ['typescript', 'javascript'],
190
- type: 'list',
191
- },
192
- {
193
- setting: 'labels',
194
- prompt: 'What issue labels should we search for?',
195
- current: config.labels,
196
- default: ['good first issue', 'help wanted'],
197
- type: 'list',
198
- },
199
- {
200
- setting: 'aiPolicyBlocklist',
201
- prompt: 'Repos with anti-AI contribution policies to block (owner/repo, comma-separated)?',
202
- current: config.aiPolicyBlocklist ?? DEFAULT_CONFIG.aiPolicyBlocklist,
203
- default: ['matplotlib/matplotlib'],
204
- type: 'list',
205
- },
206
- ],
207
- });
208
- }
209
- else {
210
- console.log('\n⚙️ OSS Autopilot Setup\n');
211
- console.log('SETUP_REQUIRED');
212
- console.log('---');
213
- console.log('Please configure the following settings:\n');
214
- console.log('SETTING: username');
215
- console.log('PROMPT: What is your GitHub username?');
216
- console.log(`CURRENT: ${config.githubUsername || '(not set)'}`);
217
- console.log('REQUIRED: true');
218
- console.log('');
219
- console.log('SETTING: maxActivePRs');
220
- console.log('PROMPT: How many PRs do you want to work on at once?');
221
- console.log(`CURRENT: ${config.maxActivePRs}`);
222
- console.log('DEFAULT: 10');
223
- console.log('TYPE: number');
224
- console.log('');
225
- console.log('SETTING: dormantDays');
226
- console.log('PROMPT: After how many days of inactivity should a PR be considered dormant?');
227
- console.log(`CURRENT: ${config.dormantThresholdDays}`);
228
- console.log('DEFAULT: 30');
229
- console.log('TYPE: number');
230
- console.log('');
231
- console.log('SETTING: approachingDays');
232
- console.log('PROMPT: At how many days should we warn about approaching dormancy?');
233
- console.log(`CURRENT: ${config.approachingDormantDays}`);
234
- console.log('DEFAULT: 25');
235
- console.log('TYPE: number');
236
- console.log('');
237
- console.log('SETTING: languages');
238
- console.log('PROMPT: What programming languages do you want to contribute to? (comma-separated)');
239
- console.log(`CURRENT: ${config.languages.join(', ')}`);
240
- console.log('DEFAULT: typescript, javascript');
241
- console.log('TYPE: list');
242
- console.log('');
243
- console.log('SETTING: labels');
244
- console.log('PROMPT: What issue labels should we search for? (comma-separated)');
245
- console.log(`CURRENT: ${config.labels.join(', ')}`);
246
- console.log('DEFAULT: good first issue, help wanted');
247
- console.log('TYPE: list');
248
- console.log('');
249
- console.log('SETTING: aiPolicyBlocklist');
250
- console.log('PROMPT: Repos with anti-AI contribution policies to block? (owner/repo, comma-separated)');
251
- console.log(`CURRENT: ${(config.aiPolicyBlocklist ?? DEFAULT_CONFIG.aiPolicyBlocklist ?? []).join(', ')}`);
252
- console.log('DEFAULT: matplotlib/matplotlib');
253
- console.log('TYPE: list');
254
- console.log('');
255
- console.log('---');
256
- console.log('END_SETUP_PROMPTS');
257
- }
124
+ return {
125
+ setupRequired: true,
126
+ prompts: [
127
+ {
128
+ setting: 'username',
129
+ prompt: 'What is your GitHub username?',
130
+ current: config.githubUsername || null,
131
+ required: true,
132
+ type: 'string',
133
+ },
134
+ {
135
+ setting: 'maxActivePRs',
136
+ prompt: 'How many PRs do you want to work on at once?',
137
+ current: config.maxActivePRs,
138
+ default: 10,
139
+ type: 'number',
140
+ },
141
+ {
142
+ setting: 'dormantDays',
143
+ prompt: 'After how many days of inactivity should a PR be considered dormant?',
144
+ current: config.dormantThresholdDays,
145
+ default: 30,
146
+ type: 'number',
147
+ },
148
+ {
149
+ setting: 'approachingDays',
150
+ prompt: 'At how many days should we warn about approaching dormancy?',
151
+ current: config.approachingDormantDays,
152
+ default: 25,
153
+ type: 'number',
154
+ },
155
+ {
156
+ setting: 'languages',
157
+ prompt: 'What programming languages do you want to contribute to?',
158
+ current: config.languages,
159
+ default: ['typescript', 'javascript'],
160
+ type: 'list',
161
+ },
162
+ {
163
+ setting: 'labels',
164
+ prompt: 'What issue labels should we search for?',
165
+ current: config.labels,
166
+ default: ['good first issue', 'help wanted'],
167
+ type: 'list',
168
+ },
169
+ {
170
+ setting: 'aiPolicyBlocklist',
171
+ prompt: 'Repos with anti-AI contribution policies to block (owner/repo, comma-separated)?',
172
+ current: config.aiPolicyBlocklist ?? DEFAULT_CONFIG.aiPolicyBlocklist ?? null,
173
+ default: ['matplotlib/matplotlib'],
174
+ type: 'list',
175
+ },
176
+ ],
177
+ };
258
178
  }
259
- export async function runCheckSetup(options) {
179
+ export async function runCheckSetup() {
260
180
  const stateManager = getStateManager();
261
- if (options.json) {
262
- outputJson({
263
- setupComplete: stateManager.isSetupComplete(),
264
- username: stateManager.getState().config.githubUsername,
265
- });
266
- }
267
- else {
268
- if (stateManager.isSetupComplete()) {
269
- console.log('SETUP_COMPLETE');
270
- console.log(`username=${stateManager.getState().config.githubUsername}`);
271
- }
272
- else {
273
- console.log('SETUP_INCOMPLETE');
274
- }
275
- }
181
+ return {
182
+ setupComplete: stateManager.isSetupComplete(),
183
+ username: stateManager.getState().config.githubUsername,
184
+ };
276
185
  }
@@ -4,10 +4,18 @@
4
4
  * Shelved PRs are auto-unshelved when a maintainer engages.
5
5
  */
6
6
  import { PR_URL_PATTERN } from './validation.js';
7
- interface ShelveCommandOptions {
8
- prUrl: string;
9
- json?: boolean;
7
+ export interface ShelveOutput {
8
+ shelved: boolean;
9
+ url: string;
10
+ }
11
+ export interface UnshelveOutput {
12
+ unshelved: boolean;
13
+ url: string;
10
14
  }
11
15
  export { PR_URL_PATTERN };
12
- export declare function runShelve(options: ShelveCommandOptions): Promise<void>;
13
- export declare function runUnshelve(options: ShelveCommandOptions): Promise<void>;
16
+ export declare function runShelve(options: {
17
+ prUrl: string;
18
+ }): Promise<ShelveOutput>;
19
+ export declare function runUnshelve(options: {
20
+ prUrl: string;
21
+ }): Promise<UnshelveOutput>;
@@ -4,46 +4,26 @@
4
4
  * Shelved PRs are auto-unshelved when a maintainer engages.
5
5
  */
6
6
  import { getStateManager } from '../core/index.js';
7
- import { outputJson } from '../formatters/json.js';
8
7
  import { PR_URL_PATTERN, validateGitHubUrl, validateUrl } from './validation.js';
9
8
  // Re-export for backward compatibility with tests
10
9
  export { PR_URL_PATTERN };
11
10
  export async function runShelve(options) {
12
11
  validateUrl(options.prUrl);
13
- validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR', options.json);
12
+ validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR');
14
13
  const stateManager = getStateManager();
15
14
  const added = stateManager.shelvePR(options.prUrl);
16
15
  if (added) {
17
16
  stateManager.save();
18
17
  }
19
- if (options.json) {
20
- outputJson({ shelved: added, url: options.prUrl });
21
- }
22
- else if (added) {
23
- console.log(`Shelved: ${options.prUrl}`);
24
- console.log('This PR is now excluded from capacity and actionable issues.');
25
- console.log('It will auto-unshelve if a maintainer engages.');
26
- }
27
- else {
28
- console.log('PR is already shelved.');
29
- }
18
+ return { shelved: added, url: options.prUrl };
30
19
  }
31
20
  export async function runUnshelve(options) {
32
21
  validateUrl(options.prUrl);
33
- validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR', options.json);
22
+ validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR');
34
23
  const stateManager = getStateManager();
35
24
  const removed = stateManager.unshelvePR(options.prUrl);
36
25
  if (removed) {
37
26
  stateManager.save();
38
27
  }
39
- if (options.json) {
40
- outputJson({ unshelved: removed, url: options.prUrl });
41
- }
42
- else if (removed) {
43
- console.log(`Unshelved: ${options.prUrl}`);
44
- console.log('This PR is now active again.');
45
- }
46
- else {
47
- console.log('PR was not shelved.');
48
- }
28
+ return { unshelved: removed, url: options.prUrl };
49
29
  }
@@ -3,16 +3,22 @@
3
3
  * Manages snoozing CI failure notifications for PRs with known upstream/infrastructure issues.
4
4
  * Snoozed PRs are excluded from the actionable CI failure list until the snooze expires.
5
5
  */
6
- interface SnoozeCommandOptions {
6
+ export interface SnoozeOutput {
7
+ snoozed: boolean;
8
+ url: string;
9
+ days: number;
10
+ reason: string;
11
+ expiresAt: string | undefined;
12
+ }
13
+ export interface UnsnoozeOutput {
14
+ unsnoozed: boolean;
15
+ url: string;
16
+ }
17
+ export declare function runSnooze(options: {
7
18
  prUrl: string;
8
19
  reason: string;
9
20
  days?: number;
10
- json?: boolean;
11
- }
12
- interface UnsnoozeCommandOptions {
21
+ }): Promise<SnoozeOutput>;
22
+ export declare function runUnsnooze(options: {
13
23
  prUrl: string;
14
- json?: boolean;
15
- }
16
- export declare function runSnooze(options: SnoozeCommandOptions): Promise<void>;
17
- export declare function runUnsnooze(options: UnsnoozeCommandOptions): Promise<void>;
18
- export {};
24
+ }): Promise<UnsnoozeOutput>;
@@ -4,80 +4,37 @@
4
4
  * Snoozed PRs are excluded from the actionable CI failure list until the snooze expires.
5
5
  */
6
6
  import { getStateManager } from '../core/index.js';
7
- import { outputJson, outputJsonError } from '../formatters/json.js';
8
7
  import { PR_URL_PATTERN, validateGitHubUrl, validateUrl, validateMessage } from './validation.js';
9
8
  const DEFAULT_SNOOZE_DAYS = 7;
10
9
  export async function runSnooze(options) {
11
10
  validateUrl(options.prUrl);
12
- validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR', options.json);
11
+ validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR');
13
12
  validateMessage(options.reason);
14
13
  const days = options.days ?? DEFAULT_SNOOZE_DAYS;
15
14
  if (!Number.isFinite(days) || days <= 0) {
16
- if (options.json) {
17
- outputJsonError('Snooze duration must be a positive number of days.');
18
- }
19
- else {
20
- console.error('Error: Snooze duration must be a positive number of days.');
21
- }
22
- process.exit(1);
15
+ throw new Error('Snooze duration must be a positive number of days.');
23
16
  }
24
- try {
25
- const stateManager = getStateManager();
26
- const added = stateManager.snoozePR(options.prUrl, options.reason, days);
27
- if (added) {
28
- stateManager.save();
29
- }
30
- const snoozeInfo = stateManager.getSnoozeInfo(options.prUrl);
31
- if (options.json) {
32
- outputJson({
33
- snoozed: added,
34
- url: options.prUrl,
35
- days,
36
- reason: options.reason,
37
- expiresAt: snoozeInfo?.expiresAt,
38
- });
39
- }
40
- else if (added) {
41
- console.log(`Snoozed: ${options.prUrl}`);
42
- console.log(`Reason: ${options.reason}`);
43
- console.log(`Duration: ${days} day${days === 1 ? '' : 's'}`);
44
- console.log(`Expires: ${snoozeInfo?.expiresAt ? new Date(snoozeInfo.expiresAt).toLocaleString() : 'unknown'}`);
45
- console.log('CI failure notifications are now muted for this PR.');
46
- }
47
- else {
48
- console.log('PR is already snoozed.');
49
- if (snoozeInfo) {
50
- console.log(`Expires: ${new Date(snoozeInfo.expiresAt).toLocaleString()}`);
51
- }
52
- }
53
- }
54
- catch (error) {
55
- const msg = error instanceof Error ? error.message : String(error);
56
- if (options.json) {
57
- outputJsonError(`Snooze failed: ${msg}`);
58
- }
59
- else {
60
- console.error(`Error: Snooze failed: ${msg}`);
61
- }
62
- process.exit(1);
17
+ const stateManager = getStateManager();
18
+ const added = stateManager.snoozePR(options.prUrl, options.reason, days);
19
+ if (added) {
20
+ stateManager.save();
63
21
  }
22
+ const snoozeInfo = stateManager.getSnoozeInfo(options.prUrl);
23
+ return {
24
+ snoozed: added,
25
+ url: options.prUrl,
26
+ days,
27
+ reason: options.reason,
28
+ expiresAt: snoozeInfo?.expiresAt,
29
+ };
64
30
  }
65
31
  export async function runUnsnooze(options) {
66
32
  validateUrl(options.prUrl);
67
- validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR', options.json);
33
+ validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR');
68
34
  const stateManager = getStateManager();
69
35
  const removed = stateManager.unsnoozePR(options.prUrl);
70
36
  if (removed) {
71
37
  stateManager.save();
72
38
  }
73
- if (options.json) {
74
- outputJson({ unsnoozed: removed, url: options.prUrl });
75
- }
76
- else if (removed) {
77
- console.log(`Unsnoozed: ${options.prUrl}`);
78
- console.log('CI failure notifications are active again for this PR.');
79
- }
80
- else {
81
- console.log('PR was not snoozed.');
82
- }
39
+ return { unsnoozed: removed, url: options.prUrl };
83
40
  }
@@ -6,10 +6,7 @@
6
6
  * Replaces the ~100-line inline bash script in commands/oss.md with a single
7
7
  * `node cli.bundle.cjs startup --json` call, reducing UI noise in Claude Code.
8
8
  */
9
- import { type IssueListInfo } from '../formatters/json.js';
10
- interface StartupOptions {
11
- json?: boolean;
12
- }
9
+ import { type StartupOutput, type IssueListInfo } from '../formatters/json.js';
13
10
  /**
14
11
  * Parse issueListPath from a config file's YAML frontmatter.
15
12
  * Returns the path string or undefined if not found.
@@ -29,5 +26,13 @@ export declare function countIssueListItems(content: string): {
29
26
  * Returns IssueListInfo or undefined if no list found.
30
27
  */
31
28
  export declare function detectIssueList(): IssueListInfo | undefined;
32
- export declare function runStartup(options: StartupOptions): Promise<void>;
33
- export {};
29
+ /**
30
+ * Run startup checks and return structured output.
31
+ * Returns StartupOutput with one of three shapes:
32
+ * 1. Setup incomplete: { version, setupComplete: false }
33
+ * 2. Auth failure: { version, setupComplete: true, authError: "..." }
34
+ * 3. Success: { version, setupComplete: true, daily, dashboardPath?, issueList? }
35
+ *
36
+ * Errors from the daily check propagate to the caller.
37
+ */
38
+ export declare function runStartup(): Promise<StartupOutput>;