@maintainabilityai/research-runner 0.1.17 → 0.1.19
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/dist/llm/llm-router.js
CHANGED
|
@@ -67,17 +67,24 @@ async function callAnthropicTier(opts, tierModels) {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* GitHub Models returns
|
|
71
|
-
* requested model
|
|
72
|
-
* tier
|
|
73
|
-
*
|
|
74
|
-
*
|
|
70
|
+
* GitHub Models returns these statuses when the token can't reach the
|
|
71
|
+
* requested model or is being throttled. All recoverable via the
|
|
72
|
+
* github-models→github-models fallback (custom-tier → low-tier).
|
|
73
|
+
*
|
|
74
|
+
* 401 / 403 — token lacks `models:read` or hasn't been enrolled in
|
|
75
|
+
* the custom tier (workflow bot vs Copilot PAT)
|
|
76
|
+
* 404 — model id not visible to this token tier
|
|
77
|
+
* 429 — rate limited on the primary tier; the low-tier model
|
|
78
|
+
* has its own bucket so the fallback often succeeds
|
|
79
|
+
*
|
|
80
|
+
* Everything else (timeouts, 5xx, 413 token cap, parse errors)
|
|
81
|
+
* propagates — those are not "wrong model" problems.
|
|
75
82
|
*/
|
|
76
83
|
function isModelAccessError(err) {
|
|
77
84
|
if (!(err instanceof Error)) {
|
|
78
85
|
return false;
|
|
79
86
|
}
|
|
80
|
-
return /GitHub Models returned
|
|
87
|
+
return /GitHub Models returned (?:401|403|404|429):/.test(err.message);
|
|
81
88
|
}
|
|
82
89
|
async function callGitHubModelsTier(opts, tierModels) {
|
|
83
90
|
if (!opts.githubToken) {
|
|
@@ -154,15 +154,13 @@ function formatForHuman(opts) {
|
|
|
154
154
|
lines.push('Assign this issue to `@github-copilot` (or another agent) to produce the synthesis. The assignee should:');
|
|
155
155
|
lines.push('');
|
|
156
156
|
lines.push('1. **Read every source** above. The `S[N]` ids are how you cite them.');
|
|
157
|
-
lines.push('2. **
|
|
158
|
-
lines.push('3. **
|
|
159
|
-
lines.push(' - 10 H2 sections in the order: `Executive Summary`, `Cross-Source Analysis`, `Jobs-to-be-Done Analysis`, `Whitespace Analysis`, `Patent Landscape`, `Community Signal`, `Academic Foundation`, `Conclusions`, `Recommendations`, `Open Questions`.');
|
|
160
|
-
lines.push(' - Every claim cites at least one `S[N]`.');
|
|
161
|
-
lines.push(' - Every Conclusion `C[N]` cites ≥2 sources (≥1 if confidence is LOW).');
|
|
162
|
-
lines.push(' - Every Recommendation references at least one `C[N]`.');
|
|
157
|
+
lines.push('2. **Read the synthesis spec FIRST**: `.caterpillar/prompts/research/synthesis.md` in this mesh is the canonical structure. **Do NOT use any section names, ordering, or formatting other than what that file specifies.** The list of sections, the per-finding scaffolding, the citation rules, and the heading drift constraints all live there — follow them exactly.');
|
|
158
|
+
lines.push('3. **Open a PR** with a new file under `research/<run-id>/synthesis.md` containing the synthesis markdown.');
|
|
163
159
|
lines.push('4. **PR labels** to apply: `research-synthesis`, `ai-assisted`.');
|
|
164
160
|
lines.push('5. **Once merged**, the PRD agent will read your synthesis + the mesh + impacted code repos to produce per-repo landing issues.');
|
|
165
161
|
lines.push('');
|
|
162
|
+
lines.push('> ⚠ Earlier iterations of this comment listed sections inline, which let agents skip the spec file. The spec at `.caterpillar/prompts/research/synthesis.md` is now the **single source of truth** for sections, ordering, citation rules, and per-finding format. The downstream PRD agent parses on exact heading strings — drift breaks the pipeline.');
|
|
163
|
+
lines.push('');
|
|
166
164
|
lines.push('---');
|
|
167
165
|
lines.push('');
|
|
168
166
|
lines.push(`🤖 Generated by \`research-runner archeologist\`. Run id: \`${runId}\` (see the Hatter's Tag for agent version + audit chain).`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maintainabilityai/research-runner",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Research + PRD agent runner — orchestrates the Archeologist and PRD pipelines for the MaintainabilityAI governance mesh",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MaintainabilityAI",
|