@oss-autopilot/core 1.10.0 → 1.12.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/README.md +8 -5
- package/dist/cli-registry.js +64 -0
- package/dist/cli.bundle.cjs +78 -117
- package/dist/cli.js +17 -0
- package/dist/commands/config.js +13 -1
- package/dist/commands/daily.js +17 -0
- package/dist/commands/dashboard-server.js +28 -6
- package/dist/commands/index.d.ts +10 -1
- package/dist/commands/index.js +9 -0
- package/dist/commands/scout-bridge.d.ts +15 -0
- package/dist/commands/scout-bridge.js +60 -0
- package/dist/commands/search.d.ts +1 -1
- package/dist/commands/search.js +10 -13
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +29 -1
- package/dist/commands/state-cmd.d.ts +22 -0
- package/dist/commands/state-cmd.js +64 -0
- package/dist/commands/vet-list.d.ts +1 -1
- package/dist/commands/vet-list.js +4 -5
- package/dist/commands/vet.d.ts +1 -1
- package/dist/commands/vet.js +4 -5
- package/dist/core/errors.d.ts +6 -0
- package/dist/core/errors.js +12 -0
- package/dist/core/gist-state-store.d.ts +12 -0
- package/dist/core/gist-state-store.js +49 -0
- package/dist/core/index.d.ts +1 -3
- package/dist/core/index.js +2 -3
- package/dist/core/state-schema.d.ts +29 -0
- package/dist/core/state-schema.js +4 -0
- package/dist/core/state.d.ts +5 -0
- package/dist/core/state.js +32 -3
- package/dist/core/types.d.ts +3 -2
- package/dist/core/types.js +2 -1
- package/package.json +2 -1
- package/dist/core/category-mapping.d.ts +0 -19
- package/dist/core/category-mapping.js +0 -58
- package/dist/core/issue-discovery.d.ts +0 -94
- package/dist/core/issue-discovery.js +0 -591
- package/dist/core/issue-eligibility.d.ts +0 -38
- package/dist/core/issue-eligibility.js +0 -151
- package/dist/core/issue-filtering.d.ts +0 -51
- package/dist/core/issue-filtering.js +0 -103
- package/dist/core/issue-scoring.d.ts +0 -43
- package/dist/core/issue-scoring.js +0 -97
- package/dist/core/issue-vetting.d.ts +0 -33
- package/dist/core/issue-vetting.js +0 -306
- package/dist/core/repo-health.d.ts +0 -24
- package/dist/core/repo-health.js +0 -194
- package/dist/core/search-budget.d.ts +0 -62
- package/dist/core/search-budget.js +0 -129
- package/dist/core/search-phases.d.ts +0 -83
- package/dist/core/search-phases.js +0 -238
package/README.md
CHANGED
|
@@ -53,7 +53,8 @@ All commands support `--json` for structured output:
|
|
|
53
53
|
## Library Usage
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
|
-
import { PRMonitor,
|
|
56
|
+
import { PRMonitor, getStateManager } from '@oss-autopilot/core';
|
|
57
|
+
import { runSearch, runVet } from '@oss-autopilot/core/commands';
|
|
57
58
|
|
|
58
59
|
const token = process.env.GITHUB_TOKEN!;
|
|
59
60
|
|
|
@@ -62,12 +63,14 @@ const monitor = new PRMonitor(token);
|
|
|
62
63
|
const result = await monitor.fetchUserOpenPRs();
|
|
63
64
|
|
|
64
65
|
// Manage state
|
|
65
|
-
const state =
|
|
66
|
+
const state = getStateManager();
|
|
66
67
|
const currentState = state.getState();
|
|
67
68
|
|
|
68
|
-
//
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
// Search for contributable issues (delegates to @oss-scout/core)
|
|
70
|
+
const searchResult = await runSearch({ maxResults: 10 });
|
|
71
|
+
|
|
72
|
+
// Vet a specific issue
|
|
73
|
+
const vetResult = await runVet({ issueUrl: 'https://github.com/owner/repo/issues/123' });
|
|
71
74
|
```
|
|
72
75
|
|
|
73
76
|
## Claude Code Plugin
|
package/dist/cli-registry.js
CHANGED
|
@@ -104,6 +104,70 @@ export const commands = [
|
|
|
104
104
|
});
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
|
+
// ── State ──────────────────────────────────────────────────────────────
|
|
108
|
+
{
|
|
109
|
+
name: 'state',
|
|
110
|
+
register(program) {
|
|
111
|
+
program
|
|
112
|
+
.command('state')
|
|
113
|
+
.description('Manage state persistence (local/gist)')
|
|
114
|
+
.option('--show', 'Display current persistence mode and Gist ID')
|
|
115
|
+
.option('--sync', 'Force push state to Gist (no-op if not in Gist mode)')
|
|
116
|
+
.option('--unlink', 'Switch from Gist back to local persistence')
|
|
117
|
+
.option('--json', 'Output as JSON')
|
|
118
|
+
.action(async (options) => {
|
|
119
|
+
try {
|
|
120
|
+
if (options.unlink) {
|
|
121
|
+
const { runStateUnlink } = await import('./commands/state-cmd.js');
|
|
122
|
+
const data = await runStateUnlink();
|
|
123
|
+
if (options.json) {
|
|
124
|
+
outputJson(data);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
console.log(`State written to ${data.localStatePath}`);
|
|
128
|
+
console.log('Persistence switched to local mode.');
|
|
129
|
+
if (data.previousGistId) {
|
|
130
|
+
console.log(`Previous Gist (${data.previousGistId}) was NOT deleted.`);
|
|
131
|
+
}
|
|
132
|
+
console.log('Restart any running processes (e.g. dashboard server) to pick up the change.');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else if (options.sync) {
|
|
136
|
+
const { runStateSync } = await import('./commands/state-cmd.js');
|
|
137
|
+
const data = await runStateSync();
|
|
138
|
+
if (options.json) {
|
|
139
|
+
outputJson(data);
|
|
140
|
+
}
|
|
141
|
+
else if (data.pushed) {
|
|
142
|
+
console.log(`State pushed to Gist ${data.gistId}`);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
console.log('Not in Gist mode. Nothing to sync.');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
// Default: --show
|
|
150
|
+
const { runStateShow } = await import('./commands/state-cmd.js');
|
|
151
|
+
const data = await runStateShow();
|
|
152
|
+
if (options.json) {
|
|
153
|
+
outputJson(data);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
console.log(`\nPersistence: ${data.persistence}`);
|
|
157
|
+
if (data.gistId)
|
|
158
|
+
console.log(`Gist ID: ${data.gistId}`);
|
|
159
|
+
if (data.gistDegraded)
|
|
160
|
+
console.log('Status: DEGRADED (using local cache)');
|
|
161
|
+
console.log(`Last run: ${data.lastRunAt ?? 'Never'}\n`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch (err) {
|
|
166
|
+
handleCommandError(err, options.json);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
},
|
|
107
171
|
// ── Search ─────────────────────────────────────────────────────────────
|
|
108
172
|
{
|
|
109
173
|
name: 'search',
|