@lsctech/polaris 0.3.1 → 0.3.2
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.
|
@@ -13,6 +13,8 @@ const validate_instructions_js_1 = require("./validate-instructions.js");
|
|
|
13
13
|
const doctrine_js_1 = require("./doctrine.js");
|
|
14
14
|
const audit_js_1 = require("./audit.js");
|
|
15
15
|
const triage_js_1 = require("./triage.js");
|
|
16
|
+
const adapter_js_1 = require("../graph/store/adapter.js");
|
|
17
|
+
const index_js_1 = require("../graph/query/index.js");
|
|
16
18
|
/**
|
|
17
19
|
* Build and return the top-level "docs" Commander command group for Polaris docs lifecycle workflows.
|
|
18
20
|
*
|
|
@@ -160,18 +162,35 @@ function createDocsCommand(options = {}) {
|
|
|
160
162
|
.option("--resume", "Resume from last checkpoint (auto-detected by default)")
|
|
161
163
|
.option("--dry-run", "Plan batches and print cost estimate without calling the LLM")
|
|
162
164
|
.action(async (options) => {
|
|
165
|
+
const repoRoot = options.repoRoot;
|
|
166
|
+
const dbPath = (0, node_path_1.join)(repoRoot, ".polaris", "graph", "graph.sqlite");
|
|
167
|
+
const graphOutputPath = (0, node_path_1.join)(".polaris", "graph");
|
|
168
|
+
let store = null;
|
|
169
|
+
try {
|
|
170
|
+
store = new adapter_js_1.GraphStoreAdapter({ repoRoot, graphOutputPath, dbPath });
|
|
171
|
+
store.open();
|
|
172
|
+
(0, index_js_1.configureGraphQuery)({ graphStore: store });
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
(0, index_js_1.configureGraphQuery)({ graphStore: null });
|
|
176
|
+
}
|
|
163
177
|
try {
|
|
164
178
|
await (0, triage_js_1.runTriage)({
|
|
165
|
-
repoRoot
|
|
179
|
+
repoRoot,
|
|
166
180
|
batchSize: parseInt(options.batchSize, 10) || 10,
|
|
167
181
|
resume: options.resume,
|
|
168
182
|
dryRun: options.dryRun,
|
|
183
|
+
symbolLookup: (name) => (0, index_js_1.lookupSymbol)(name) !== null,
|
|
184
|
+
graphStats: () => (0, index_js_1.getGraphStats)(),
|
|
169
185
|
});
|
|
170
186
|
}
|
|
171
187
|
catch (err) {
|
|
172
188
|
console.error(`polaris docs triage: ${err instanceof Error ? err.message : String(err)}`);
|
|
173
189
|
process.exit(1);
|
|
174
190
|
}
|
|
191
|
+
finally {
|
|
192
|
+
store?.close();
|
|
193
|
+
}
|
|
175
194
|
});
|
|
176
195
|
docs
|
|
177
196
|
.command("migrate")
|