erdos-problems 0.1.13 → 0.2.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 +77 -4
- package/docs/RESEARCH_LOOP.md +14 -2
- package/package.json +1 -1
- package/packs/number-theory/README.md +13 -0
- package/packs/number-theory/problems/1/CONTEXT.md +8 -0
- package/packs/number-theory/problems/1/context.yaml +25 -0
- package/packs/number-theory/problems/2/CONTEXT.md +8 -0
- package/packs/number-theory/problems/2/context.yaml +25 -0
- package/packs/sunflower/README.md +17 -4
- package/packs/sunflower/problems/20/CHECKPOINT_TEMPLATE.md +29 -0
- package/packs/sunflower/problems/20/FRONTIER_NOTE.md +13 -0
- package/packs/sunflower/problems/20/OPS_DETAILS.yaml +44 -0
- package/packs/sunflower/problems/20/REPORT_TEMPLATE.md +23 -0
- package/packs/sunflower/problems/20/ROUTE_HISTORY.md +18 -0
- package/packs/sunflower/problems/536/OPS_DETAILS.yaml +39 -0
- package/packs/sunflower/problems/856/OPS_DETAILS.yaml +39 -0
- package/packs/sunflower/problems/857/CHECKPOINT_TEMPLATE.md +32 -0
- package/packs/sunflower/problems/857/FRONTIER_NOTE.md +18 -0
- package/packs/sunflower/problems/857/OPS_DETAILS.yaml +65 -0
- package/packs/sunflower/problems/857/REPORT_TEMPLATE.md +26 -0
- package/packs/sunflower/problems/857/ROUTE_HISTORY.md +25 -0
- package/src/cli/index.js +14 -2
- package/src/commands/archive.js +46 -0
- package/src/commands/maintainer.js +20 -2
- package/src/commands/problem.js +3 -0
- package/src/commands/pull.js +127 -4
- package/src/commands/sunflower.js +290 -12
- package/src/commands/upstream.js +129 -0
- package/src/commands/workspace.js +4 -0
- package/src/runtime/archive.js +87 -0
- package/src/runtime/checkpoints.js +27 -0
- package/src/runtime/maintainer-seed.js +70 -0
- package/src/runtime/paths.js +16 -0
- package/src/runtime/state.js +32 -3
- package/src/runtime/sunflower.js +329 -2
- package/src/runtime/workspace.js +4 -0
- package/src/upstream/literature.js +83 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Problem 857 Report Template
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
- Route worked:
|
|
6
|
+
- Ticket worked:
|
|
7
|
+
- Atom worked:
|
|
8
|
+
- Claim level achieved:
|
|
9
|
+
|
|
10
|
+
## Artifacts
|
|
11
|
+
|
|
12
|
+
- Lean/module artifacts:
|
|
13
|
+
- Board artifacts:
|
|
14
|
+
- Compute/run artifacts:
|
|
15
|
+
- Checkpoint updates:
|
|
16
|
+
|
|
17
|
+
## Frontier shift
|
|
18
|
+
|
|
19
|
+
- Old frontier:
|
|
20
|
+
- New frontier:
|
|
21
|
+
- Did the route breakthrough state change?
|
|
22
|
+
|
|
23
|
+
## Honesty check
|
|
24
|
+
|
|
25
|
+
- What remains open?
|
|
26
|
+
- What should not be overclaimed?
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Problem 857 Route History
|
|
2
|
+
|
|
3
|
+
## Closed public route layers
|
|
4
|
+
|
|
5
|
+
- `global_family_card_export`
|
|
6
|
+
- `explicit_remainder_export`
|
|
7
|
+
- `explicit_M_remainder_export`
|
|
8
|
+
- `o1a_existential_explicit_export`
|
|
9
|
+
|
|
10
|
+
## Historical context routes
|
|
11
|
+
|
|
12
|
+
- `o1a_foundation`
|
|
13
|
+
- `o1a_certificate_reduction`
|
|
14
|
+
- `o1a_residual_router`
|
|
15
|
+
- `o1a_hard_upgrade`
|
|
16
|
+
- `b2_recurrence_spine`
|
|
17
|
+
- `post_counting_redesign`
|
|
18
|
+
|
|
19
|
+
## Current frontier route
|
|
20
|
+
|
|
21
|
+
- `anchored_selector_linearization`
|
|
22
|
+
|
|
23
|
+
Why it matters:
|
|
24
|
+
- this is the first route that still exposes live public pressure in the pack
|
|
25
|
+
- it links the local theorem stack to a problem-facing public frontier without pretending the open problem is solved
|
package/src/cli/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { runArchiveCommand } from '../commands/archive.js';
|
|
1
2
|
import { runBootstrapCommand } from '../commands/bootstrap.js';
|
|
2
3
|
import { runCheckpointsCommand } from '../commands/checkpoints.js';
|
|
3
4
|
import { runClusterCommand } from '../commands/cluster.js';
|
|
@@ -26,6 +27,8 @@ function printUsage() {
|
|
|
26
27
|
console.log(' erdos problem artifacts [<id>] [--json]');
|
|
27
28
|
console.log(' erdos cluster list');
|
|
28
29
|
console.log(' erdos cluster show <name>');
|
|
30
|
+
console.log(' erdos archive show <id>');
|
|
31
|
+
console.log(' erdos archive scaffold <id>');
|
|
29
32
|
console.log(' erdos workspace show');
|
|
30
33
|
console.log(' erdos orp show [--json]');
|
|
31
34
|
console.log(' erdos orp sync [--json]');
|
|
@@ -41,17 +44,24 @@ function printUsage() {
|
|
|
41
44
|
console.log(' erdos sunflower ladder [<id>] [--json]');
|
|
42
45
|
console.log(' erdos sunflower routes [<id>] [--json]');
|
|
43
46
|
console.log(' erdos sunflower tickets [<id>] [--json]');
|
|
47
|
+
console.log(' erdos sunflower frontier [<id>] [--json]');
|
|
48
|
+
console.log(' erdos sunflower route <problem-id> <route-id> [--json]');
|
|
49
|
+
console.log(' erdos sunflower ticket <problem-id> <ticket-id> [--json]');
|
|
50
|
+
console.log(' erdos sunflower atom <problem-id> <atom-id> [--json]');
|
|
51
|
+
console.log(' erdos sunflower compute run [<id>] [--json]');
|
|
44
52
|
console.log(' erdos dossier show <id>');
|
|
45
53
|
console.log(' erdos upstream show');
|
|
46
54
|
console.log(' erdos upstream sync [--write-package-snapshot]');
|
|
47
55
|
console.log(' erdos upstream diff [--write-package-report]');
|
|
56
|
+
console.log(' erdos upstream drift [<id>] [--include-site] [--json]');
|
|
48
57
|
console.log(' erdos scaffold problem <id> [--dest <path>]');
|
|
49
58
|
console.log(' erdos bootstrap problem <id> [--dest <path>] [--sync-upstream]');
|
|
50
59
|
console.log(' erdos seed problem <id> [--include-site|--no-site] [--include-public-search|--no-public-search] [--refresh-upstream] [--cluster <name>] [--repo-status <status>] [--harness-depth <depth>] [--title <title>] [--family-tag <tag>] [--related <id>] [--formalization-status <status>] [--active-route <route>] [--route-breakthrough] [--problem-solved] [--allow-non-open] [--dest-root <path>] [--no-activate] [--no-loop-sync] [--force] [--json]');
|
|
51
|
-
console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--refresh-upstream]');
|
|
60
|
+
console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
|
|
52
61
|
console.log(' erdos pull artifacts <id> [--dest <path>] [--refresh-upstream]');
|
|
53
|
-
console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--refresh-upstream]');
|
|
62
|
+
console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
|
|
54
63
|
console.log(' erdos maintainer seed problem <id> [--from-pull <path>] [--dest-root <path>] [--cluster <name>] [--allow-non-open]');
|
|
64
|
+
console.log(' erdos maintainer review problem <id> [--from-pull <path>] [--dest-root <path>] [--title <title>]');
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
const args = process.argv.slice(2);
|
|
@@ -65,6 +75,8 @@ if (!command || command === 'help' || command === '--help') {
|
|
|
65
75
|
exitCode = runProblemCommand(rest);
|
|
66
76
|
} else if (command === 'cluster') {
|
|
67
77
|
exitCode = runClusterCommand(rest);
|
|
78
|
+
} else if (command === 'archive') {
|
|
79
|
+
exitCode = runArchiveCommand(rest);
|
|
68
80
|
} else if (command === 'workspace') {
|
|
69
81
|
exitCode = runWorkspaceCommand(rest);
|
|
70
82
|
} else if (command === 'orp') {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getArchiveView, scaffoldArchive } from '../runtime/archive.js';
|
|
2
|
+
|
|
3
|
+
export function runArchiveCommand(args) {
|
|
4
|
+
const [subcommand, problemId] = args;
|
|
5
|
+
|
|
6
|
+
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
7
|
+
console.log('Usage:');
|
|
8
|
+
console.log(' erdos archive show <id>');
|
|
9
|
+
console.log(' erdos archive scaffold <id>');
|
|
10
|
+
return 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (!problemId) {
|
|
14
|
+
console.error('Missing problem id.');
|
|
15
|
+
return 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (subcommand === 'show') {
|
|
19
|
+
const archive = getArchiveView(problemId);
|
|
20
|
+
if (!archive) {
|
|
21
|
+
console.error(`Unknown problem: ${problemId}`);
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
console.log(`${archive.displayName} archive view`);
|
|
25
|
+
console.log(`Title: ${archive.title}`);
|
|
26
|
+
console.log(`Solved: ${archive.solved ? 'yes' : 'no'}`);
|
|
27
|
+
console.log(`Archive mode: ${archive.archiveMode}`);
|
|
28
|
+
console.log(`Next move: ${archive.nextMove}`);
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (subcommand === 'scaffold') {
|
|
33
|
+
try {
|
|
34
|
+
const result = scaffoldArchive(problemId);
|
|
35
|
+
console.log(`Archive scaffold created: ${result.archiveDir}`);
|
|
36
|
+
console.log(`Archive mode: ${result.payload.archiveMode}`);
|
|
37
|
+
return 0;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(String(error.message ?? error));
|
|
40
|
+
return 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.error(`Unknown archive subcommand: ${subcommand}`);
|
|
45
|
+
return 1;
|
|
46
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { seedProblemFromPullBundle } from '../runtime/maintainer-seed.js';
|
|
2
|
+
import { reviewPullBundleForSeeding, seedProblemFromPullBundle } from '../runtime/maintainer-seed.js';
|
|
3
3
|
|
|
4
4
|
function parseMaintainerSeedArgs(args) {
|
|
5
5
|
const [kind, problemToken, ...rest] = args;
|
|
@@ -137,10 +137,11 @@ export function runMaintainerCommand(args) {
|
|
|
137
137
|
if (!subcommand || subcommand === 'help' || subcommand === '--help') {
|
|
138
138
|
console.log('Usage:');
|
|
139
139
|
console.log(' erdos maintainer seed problem <id> [--from-pull <path>] [--dest-root <path>] [--cluster <name>] [--repo-status <status>] [--harness-depth <depth>] [--title <title>] [--family-tag <tag>] [--related <id>] [--formalization-status <status>] [--active-route <route>] [--route-breakthrough] [--problem-solved] [--allow-non-open] [--force]');
|
|
140
|
+
console.log(' erdos maintainer review problem <id> [--from-pull <path>] [--dest-root <path>] [--title <title>]');
|
|
140
141
|
return 0;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
if (
|
|
144
|
+
if (!['seed', 'review'].includes(subcommand)) {
|
|
144
145
|
console.error(`Unknown maintainer subcommand: ${subcommand}`);
|
|
145
146
|
return 1;
|
|
146
147
|
}
|
|
@@ -156,6 +157,23 @@ export function runMaintainerCommand(args) {
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
try {
|
|
160
|
+
if (subcommand === 'review') {
|
|
161
|
+
const result = reviewPullBundleForSeeding(parsed.problemId, {
|
|
162
|
+
fromPullDir: parsed.fromPullDir ? path.resolve(parsed.fromPullDir) : null,
|
|
163
|
+
destRoot: parsed.destRoot ? path.resolve(parsed.destRoot) : null,
|
|
164
|
+
title: parsed.title,
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
console.log(`Prepared maintainer review for problem ${parsed.problemId}`);
|
|
168
|
+
console.log(`Review checklist: ${result.reviewPath}`);
|
|
169
|
+
console.log(`Proposed destination: ${result.destinationDir}`);
|
|
170
|
+
console.log(`Title: ${result.title}`);
|
|
171
|
+
console.log(`Upstream record used: ${result.usedUpstreamRecord ? 'yes' : 'no'}`);
|
|
172
|
+
console.log(`Site snapshot used: ${result.usedSiteSnapshot ? 'yes' : 'no'}`);
|
|
173
|
+
console.log(`Public status review used: ${result.usedPublicStatusReview ? 'yes' : 'no'}`);
|
|
174
|
+
return 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
159
177
|
const result = seedProblemFromPullBundle(parsed.problemId, {
|
|
160
178
|
fromPullDir: parsed.fromPullDir ? path.resolve(parsed.fromPullDir) : null,
|
|
161
179
|
destRoot: parsed.destRoot ? path.resolve(parsed.destRoot) : null,
|
package/src/commands/problem.js
CHANGED
|
@@ -94,6 +94,9 @@ function printProblem(problem) {
|
|
|
94
94
|
console.log(`Repo status: ${problem.repoStatus}`);
|
|
95
95
|
console.log(`Cluster: ${problem.cluster}`);
|
|
96
96
|
console.log(`Harness depth: ${problem.harnessDepth}`);
|
|
97
|
+
if (String(problem.siteStatus).toLowerCase() === 'solved') {
|
|
98
|
+
console.log('Archive mode: method_exemplar');
|
|
99
|
+
}
|
|
97
100
|
console.log(`Prize: ${problem.prize ?? '(none)'}`);
|
|
98
101
|
console.log(`Formalization: ${problem.formalizationStatus}`);
|
|
99
102
|
console.log(`Upstream formalized: ${problem.upstreamFormalizedState ?? '(unknown)'}`);
|
package/src/commands/pull.js
CHANGED
|
@@ -10,6 +10,7 @@ import { getProblemArtifactInventory, scaffoldProblem } from '../runtime/problem
|
|
|
10
10
|
import { loadActiveUpstreamSnapshot, syncUpstream } from '../upstream/sync.js';
|
|
11
11
|
import { fetchProblemSiteSnapshot } from '../upstream/site.js';
|
|
12
12
|
import { buildProblemSearchQueries, fetchProblemPublicSearchReview } from '../upstream/public-search.js';
|
|
13
|
+
import { fetchCrossrefLiterature, fetchOpenAlexLiterature } from '../upstream/literature.js';
|
|
13
14
|
|
|
14
15
|
function normalizeClusterLabel(rawTag) {
|
|
15
16
|
return String(rawTag ?? '')
|
|
@@ -44,12 +45,14 @@ function inferClusterFromUpstream(upstreamRecord) {
|
|
|
44
45
|
function parsePullArgs(args) {
|
|
45
46
|
const [kind, value, ...rest] = args;
|
|
46
47
|
if (!['problem', 'artifacts', 'literature'].includes(kind)) {
|
|
47
|
-
return { error: 'Usage: erdos pull problem|artifacts|literature <id> [--dest <path>] [--include-site] [--refresh-upstream]' };
|
|
48
|
+
return { error: 'Usage: erdos pull problem|artifacts|literature <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]' };
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
let destination = null;
|
|
51
52
|
let includeSite = false;
|
|
52
53
|
let includePublicSearch = false;
|
|
54
|
+
let includeCrossref = false;
|
|
55
|
+
let includeOpenAlex = false;
|
|
53
56
|
let refreshUpstream = false;
|
|
54
57
|
|
|
55
58
|
for (let index = 0; index < rest.length; index += 1) {
|
|
@@ -70,6 +73,14 @@ function parsePullArgs(args) {
|
|
|
70
73
|
includePublicSearch = true;
|
|
71
74
|
continue;
|
|
72
75
|
}
|
|
76
|
+
if (token === '--include-crossref') {
|
|
77
|
+
includeCrossref = true;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (token === '--include-openalex') {
|
|
81
|
+
includeOpenAlex = true;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
73
84
|
if (token === '--refresh-upstream') {
|
|
74
85
|
refreshUpstream = true;
|
|
75
86
|
continue;
|
|
@@ -83,6 +94,8 @@ function parsePullArgs(args) {
|
|
|
83
94
|
destination,
|
|
84
95
|
includeSite,
|
|
85
96
|
includePublicSearch,
|
|
97
|
+
includeCrossref,
|
|
98
|
+
includeOpenAlex,
|
|
86
99
|
refreshUpstream,
|
|
87
100
|
};
|
|
88
101
|
}
|
|
@@ -318,7 +331,66 @@ async function maybeWritePublicSearchBundle(problemId, title, destination, inclu
|
|
|
318
331
|
}
|
|
319
332
|
}
|
|
320
333
|
|
|
321
|
-
async function
|
|
334
|
+
async function maybeWriteLiteratureAdapter(problemId, title, destination, includeAdapter, label, fetcher) {
|
|
335
|
+
if (!includeAdapter) {
|
|
336
|
+
return {
|
|
337
|
+
attempted: false,
|
|
338
|
+
included: false,
|
|
339
|
+
error: null,
|
|
340
|
+
resultCount: 0,
|
|
341
|
+
filePrefix: label.toUpperCase(),
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const filePrefix = label.toUpperCase();
|
|
346
|
+
|
|
347
|
+
try {
|
|
348
|
+
const payload = await fetcher(problemId, title);
|
|
349
|
+
writeJson(path.join(destination, `${filePrefix}_RESULTS.json`), payload);
|
|
350
|
+
writeText(
|
|
351
|
+
path.join(destination, `${filePrefix}_RESULTS.md`),
|
|
352
|
+
[
|
|
353
|
+
`# ${label} Results`,
|
|
354
|
+
'',
|
|
355
|
+
`Fetched at: ${payload.fetchedAt}`,
|
|
356
|
+
`Query: ${payload.query}`,
|
|
357
|
+
'',
|
|
358
|
+
...(payload.results.length > 0
|
|
359
|
+
? payload.results.map((result) => `- [${result.title || '(untitled)'}](${result.url || '#'})`)
|
|
360
|
+
: ['- *(no results captured)*']),
|
|
361
|
+
'',
|
|
362
|
+
].join('\n'),
|
|
363
|
+
);
|
|
364
|
+
return {
|
|
365
|
+
attempted: true,
|
|
366
|
+
included: true,
|
|
367
|
+
error: null,
|
|
368
|
+
resultCount: payload.results.length,
|
|
369
|
+
filePrefix,
|
|
370
|
+
};
|
|
371
|
+
} catch (error) {
|
|
372
|
+
const message = String(error?.message ?? error);
|
|
373
|
+
writeText(path.join(destination, `${filePrefix}_ERROR.txt`), message);
|
|
374
|
+
return {
|
|
375
|
+
attempted: true,
|
|
376
|
+
included: false,
|
|
377
|
+
error: message,
|
|
378
|
+
resultCount: 0,
|
|
379
|
+
filePrefix,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
async function writeLiteratureLane(
|
|
385
|
+
problemId,
|
|
386
|
+
destination,
|
|
387
|
+
localProblem,
|
|
388
|
+
upstreamRecord,
|
|
389
|
+
includeSite,
|
|
390
|
+
includePublicSearch,
|
|
391
|
+
includeCrossref,
|
|
392
|
+
includeOpenAlex,
|
|
393
|
+
) {
|
|
322
394
|
ensureDir(destination);
|
|
323
395
|
|
|
324
396
|
const includedFiles = [];
|
|
@@ -355,6 +427,23 @@ async function writeLiteratureLane(problemId, destination, localProblem, upstrea
|
|
|
355
427
|
destination,
|
|
356
428
|
includePublicSearch,
|
|
357
429
|
);
|
|
430
|
+
const literatureTitle = localProblem?.title ?? upstreamRecord?.title ?? `Erdos Problem #${problemId}`;
|
|
431
|
+
const crossref = await maybeWriteLiteratureAdapter(
|
|
432
|
+
problemId,
|
|
433
|
+
literatureTitle,
|
|
434
|
+
destination,
|
|
435
|
+
includeCrossref,
|
|
436
|
+
'Crossref',
|
|
437
|
+
fetchCrossrefLiterature,
|
|
438
|
+
);
|
|
439
|
+
const openalex = await maybeWriteLiteratureAdapter(
|
|
440
|
+
problemId,
|
|
441
|
+
literatureTitle,
|
|
442
|
+
destination,
|
|
443
|
+
includeOpenAlex,
|
|
444
|
+
'OpenAlex',
|
|
445
|
+
fetchOpenAlexLiterature,
|
|
446
|
+
);
|
|
358
447
|
const problemRecord = buildProblemRecord(problemId, localProblem, upstreamRecord);
|
|
359
448
|
writeJson(path.join(destination, 'PROBLEM.json'), problemRecord);
|
|
360
449
|
writeJson(path.join(destination, 'LITERATURE_INDEX.json'), {
|
|
@@ -368,6 +457,10 @@ async function writeLiteratureLane(problemId, destination, localProblem, upstrea
|
|
|
368
457
|
includedPublicSearch: publicSearch.included,
|
|
369
458
|
publicSearchError: publicSearch.error,
|
|
370
459
|
publicSearchQueries: publicSearch.queries,
|
|
460
|
+
includedCrossref: crossref.included,
|
|
461
|
+
crossrefError: crossref.error,
|
|
462
|
+
includedOpenAlex: openalex.included,
|
|
463
|
+
openAlexError: openalex.error,
|
|
371
464
|
});
|
|
372
465
|
writeText(
|
|
373
466
|
path.join(destination, 'README.md'),
|
|
@@ -380,6 +473,8 @@ async function writeLiteratureLane(problemId, destination, localProblem, upstrea
|
|
|
380
473
|
`- Upstream record included: ${upstreamRecord ? 'yes' : 'no'}`,
|
|
381
474
|
`- Live site snapshot included: ${siteStatus.included ? 'yes' : 'no'}`,
|
|
382
475
|
`- Public search review included: ${publicSearch.included ? 'yes' : 'no'}`,
|
|
476
|
+
`- Crossref adapter included: ${crossref.included ? 'yes' : 'no'}`,
|
|
477
|
+
`- OpenAlex adapter included: ${openalex.included ? 'yes' : 'no'}`,
|
|
383
478
|
'',
|
|
384
479
|
].join('\n'),
|
|
385
480
|
);
|
|
@@ -389,6 +484,8 @@ async function writeLiteratureLane(problemId, destination, localProblem, upstrea
|
|
|
389
484
|
includedFiles,
|
|
390
485
|
siteStatus,
|
|
391
486
|
publicSearch,
|
|
487
|
+
crossref,
|
|
488
|
+
openalex,
|
|
392
489
|
};
|
|
393
490
|
}
|
|
394
491
|
|
|
@@ -433,9 +530,9 @@ export async function runPullCommand(args, options = {}) {
|
|
|
433
530
|
if (args.length === 0 || args[0] === 'help' || args[0] === '--help') {
|
|
434
531
|
if (!silent) {
|
|
435
532
|
console.log('Usage:');
|
|
436
|
-
console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--refresh-upstream]');
|
|
533
|
+
console.log(' erdos pull problem <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
|
|
437
534
|
console.log(' erdos pull artifacts <id> [--dest <path>] [--refresh-upstream]');
|
|
438
|
-
console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--refresh-upstream]');
|
|
535
|
+
console.log(' erdos pull literature <id> [--dest <path>] [--include-site] [--include-public-search] [--include-crossref] [--include-openalex] [--refresh-upstream]');
|
|
439
536
|
}
|
|
440
537
|
return 0;
|
|
441
538
|
}
|
|
@@ -494,6 +591,8 @@ export async function runPullCommand(args, options = {}) {
|
|
|
494
591
|
upstreamRecord,
|
|
495
592
|
parsed.includeSite,
|
|
496
593
|
parsed.includePublicSearch,
|
|
594
|
+
parsed.includeCrossref,
|
|
595
|
+
parsed.includeOpenAlex,
|
|
497
596
|
);
|
|
498
597
|
if (!silent) {
|
|
499
598
|
console.log(`Literature bundle created: ${destination}`);
|
|
@@ -501,12 +600,20 @@ export async function runPullCommand(args, options = {}) {
|
|
|
501
600
|
console.log(`Upstream record included: ${upstreamRecord ? 'yes' : 'no'}`);
|
|
502
601
|
console.log(`Live site snapshot included: ${result.siteStatus.included ? 'yes' : 'no'}`);
|
|
503
602
|
console.log(`Public search review included: ${result.publicSearch.included ? 'yes' : 'no'}`);
|
|
603
|
+
console.log(`Crossref adapter included: ${result.crossref.included ? 'yes' : 'no'}`);
|
|
604
|
+
console.log(`OpenAlex adapter included: ${result.openalex.included ? 'yes' : 'no'}`);
|
|
504
605
|
if (result.siteStatus.error) {
|
|
505
606
|
console.log(`Live site snapshot note: ${result.siteStatus.error}`);
|
|
506
607
|
}
|
|
507
608
|
if (result.publicSearch.error) {
|
|
508
609
|
console.log(`Public search note: ${result.publicSearch.error}`);
|
|
509
610
|
}
|
|
611
|
+
if (result.crossref.error) {
|
|
612
|
+
console.log(`Crossref note: ${result.crossref.error}`);
|
|
613
|
+
}
|
|
614
|
+
if (result.openalex.error) {
|
|
615
|
+
console.log(`OpenAlex note: ${result.openalex.error}`);
|
|
616
|
+
}
|
|
510
617
|
}
|
|
511
618
|
return 0;
|
|
512
619
|
}
|
|
@@ -526,6 +633,8 @@ export async function runPullCommand(args, options = {}) {
|
|
|
526
633
|
upstreamRecord,
|
|
527
634
|
parsed.includeSite,
|
|
528
635
|
parsed.includePublicSearch,
|
|
636
|
+
parsed.includeCrossref,
|
|
637
|
+
parsed.includeOpenAlex,
|
|
529
638
|
);
|
|
530
639
|
|
|
531
640
|
writeJson(path.join(rootDestination, 'PULL_STATUS.json'), {
|
|
@@ -545,6 +654,12 @@ export async function runPullCommand(args, options = {}) {
|
|
|
545
654
|
publicSearchAttempted: literatureResult.publicSearch.attempted,
|
|
546
655
|
publicSearchIncluded: literatureResult.publicSearch.included,
|
|
547
656
|
publicSearchError: literatureResult.publicSearch.error,
|
|
657
|
+
crossrefAttempted: literatureResult.crossref.attempted,
|
|
658
|
+
crossrefIncluded: literatureResult.crossref.included,
|
|
659
|
+
crossrefError: literatureResult.crossref.error,
|
|
660
|
+
openAlexAttempted: literatureResult.openalex.attempted,
|
|
661
|
+
openAlexIncluded: literatureResult.openalex.included,
|
|
662
|
+
openAlexError: literatureResult.openalex.error,
|
|
548
663
|
});
|
|
549
664
|
|
|
550
665
|
if (!silent) {
|
|
@@ -555,12 +670,20 @@ export async function runPullCommand(args, options = {}) {
|
|
|
555
670
|
console.log(`Upstream record included: ${upstreamRecord ? 'yes' : 'no'}`);
|
|
556
671
|
console.log(`Live site snapshot included: ${literatureResult.siteStatus.included ? 'yes' : 'no'}`);
|
|
557
672
|
console.log(`Public search review included: ${literatureResult.publicSearch.included ? 'yes' : 'no'}`);
|
|
673
|
+
console.log(`Crossref adapter included: ${literatureResult.crossref.included ? 'yes' : 'no'}`);
|
|
674
|
+
console.log(`OpenAlex adapter included: ${literatureResult.openalex.included ? 'yes' : 'no'}`);
|
|
558
675
|
if (literatureResult.siteStatus.error) {
|
|
559
676
|
console.log(`Live site snapshot note: ${literatureResult.siteStatus.error}`);
|
|
560
677
|
}
|
|
561
678
|
if (literatureResult.publicSearch.error) {
|
|
562
679
|
console.log(`Public search note: ${literatureResult.publicSearch.error}`);
|
|
563
680
|
}
|
|
681
|
+
if (literatureResult.crossref.error) {
|
|
682
|
+
console.log(`Crossref note: ${literatureResult.crossref.error}`);
|
|
683
|
+
}
|
|
684
|
+
if (literatureResult.openalex.error) {
|
|
685
|
+
console.log(`OpenAlex note: ${literatureResult.openalex.error}`);
|
|
686
|
+
}
|
|
564
687
|
}
|
|
565
688
|
return 0;
|
|
566
689
|
}
|