agentweaver 0.1.11 → 0.1.13
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/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/artifacts.js +9 -0
- package/dist/doctor/checks/agentweaver-home.js +57 -0
- package/dist/doctor/checks/category.js +9 -0
- package/dist/doctor/checks/cwd-context.js +69 -0
- package/dist/doctor/checks/env-diagnostics.js +171 -0
- package/dist/doctor/checks/executors.js +106 -0
- package/dist/doctor/checks/flow-readiness.js +305 -0
- package/dist/doctor/checks/node-version.js +79 -0
- package/dist/doctor/checks/register.js +18 -0
- package/dist/doctor/checks/system.js +91 -0
- package/dist/doctor/index.js +4 -0
- package/dist/doctor/orchestrator.js +78 -0
- package/dist/doctor/registry.js +50 -0
- package/dist/doctor/runner.js +89 -0
- package/dist/doctor/types.js +12 -0
- package/dist/executors/codex-executor.js +2 -1
- package/dist/executors/jira-fetch-executor.js +1 -0
- package/dist/executors/opencode-executor.js +22 -11
- package/dist/executors/process-executor.js +3 -0
- package/dist/index.js +59 -35
- package/dist/interactive-ui.js +579 -159
- package/dist/jira.js +57 -0
- package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +105 -21
- package/dist/pipeline/flow-specs/review/review-fix.json +1 -0
- package/dist/pipeline/flow-specs/review/review-loop.json +2 -0
- package/dist/pipeline/flow-specs/task-describe.json +64 -3
- package/dist/pipeline/nodes/jira-fetch-node.js +3 -0
- package/dist/pipeline/nodes/review-findings-form-node.js +33 -3
- package/dist/pipeline/nodes/user-input-node.js +18 -4
- package/dist/pipeline/prompt-registry.js +2 -1
- package/dist/pipeline/spec-types.js +2 -0
- package/dist/pipeline/value-resolver.js +11 -1
- package/dist/prompts.js +17 -2
- package/dist/runtime/process-runner.js +9 -3
- package/dist/structured-artifact-schema-registry.js +1 -0
- package/dist/structured-artifact-schemas.json +22 -0
- package/dist/user-input.js +8 -1
- package/package.json +4 -2
- package/dist/pipeline/flow-model-settings.js +0 -77
|
@@ -505,6 +505,28 @@
|
|
|
505
505
|
},
|
|
506
506
|
"required": ["summary", "ready_to_merge", "findings"]
|
|
507
507
|
},
|
|
508
|
+
"review-assessment/v1": {
|
|
509
|
+
"type": "object",
|
|
510
|
+
"properties": {
|
|
511
|
+
"summary": { "type": "string", "nonEmpty": true },
|
|
512
|
+
"assessments": {
|
|
513
|
+
"type": "array",
|
|
514
|
+
"items": {
|
|
515
|
+
"type": "object",
|
|
516
|
+
"properties": {
|
|
517
|
+
"finding_title": { "type": "string", "nonEmpty": true },
|
|
518
|
+
"severity": { "type": "string", "nonEmpty": true },
|
|
519
|
+
"verdict": { "type": "string", "nonEmpty": true },
|
|
520
|
+
"rationale": { "type": "string", "nonEmpty": true },
|
|
521
|
+
"proposed_fix": { "type": "string", "nonEmpty": true },
|
|
522
|
+
"fix_required": { "type": "boolean" }
|
|
523
|
+
},
|
|
524
|
+
"required": ["finding_title", "severity", "verdict", "rationale", "proposed_fix", "fix_required"]
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"required": ["summary", "assessments"]
|
|
529
|
+
},
|
|
508
530
|
"review-fix-report/v1": {
|
|
509
531
|
"type": "object",
|
|
510
532
|
"properties": {
|
package/dist/user-input.js
CHANGED
|
@@ -152,7 +152,14 @@ export async function requestUserInputInTerminal(form) {
|
|
|
152
152
|
}
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
|
-
const options = field.options
|
|
155
|
+
const options = field.options
|
|
156
|
+
.map((option, index) => {
|
|
157
|
+
const description = option.description
|
|
158
|
+
? `\n ${option.description.split("\n").join("\n ")}`
|
|
159
|
+
: "";
|
|
160
|
+
return `${index + 1}. ${option.label}${description}`;
|
|
161
|
+
})
|
|
162
|
+
.join("\n");
|
|
156
163
|
process.stdout.write(`${field.label}\n${options}\n`);
|
|
157
164
|
if (field.type === "single-select") {
|
|
158
165
|
while (true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentweaver",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "CLI orchestrator for Jira/Codex engineering workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -50,11 +50,13 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.17.30",
|
|
53
|
+
"@types/semver": "^7.7.1",
|
|
53
54
|
"ts-node": "^10.9.2",
|
|
54
55
|
"typescript": "^5.8.3"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"markdown-it": "^14.1.1",
|
|
58
|
-
"neo-blessed": "^0.2.0"
|
|
59
|
+
"neo-blessed": "^0.2.0",
|
|
60
|
+
"semver": "^7.7.4"
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { DEFAULT_MODEL_BY_EXECUTOR, defaultModelForExecutor } from "./launch-profile-config.js";
|
|
4
|
-
import { scopeArtifactsDir } from "../artifacts.js";
|
|
5
|
-
const FLOW_MODEL_SETTINGS_FILE = "agentweaver-flow-model-settings.json";
|
|
6
|
-
function flowModelSettingsPath(scopeKey) {
|
|
7
|
-
return path.join(scopeArtifactsDir(scopeKey), FLOW_MODEL_SETTINGS_FILE);
|
|
8
|
-
}
|
|
9
|
-
function ensureArtifactsDir(scopeKey) {
|
|
10
|
-
const artifactsDir = scopeArtifactsDir(scopeKey);
|
|
11
|
-
if (!existsSync(artifactsDir)) {
|
|
12
|
-
mkdirSync(artifactsDir, { recursive: true });
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export function loadFlowModelSettings(scopeKey) {
|
|
16
|
-
const filePath = flowModelSettingsPath(scopeKey);
|
|
17
|
-
if (!existsSync(filePath)) {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
const content = readFileSync(filePath, "utf8");
|
|
22
|
-
const parsed = JSON.parse(content);
|
|
23
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
return parsed;
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
return {};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export function saveFlowModelSettings(scopeKey, store) {
|
|
33
|
-
ensureArtifactsDir(scopeKey);
|
|
34
|
-
const filePath = flowModelSettingsPath(scopeKey);
|
|
35
|
-
const tempPath = `${filePath}.tmp`;
|
|
36
|
-
const content = JSON.stringify(store, null, 2);
|
|
37
|
-
writeFileSync(tempPath, content, "utf8");
|
|
38
|
-
renameSync(tempPath, filePath);
|
|
39
|
-
}
|
|
40
|
-
export function getEffectiveModelForFlow(flowId, scopeKey, executor) {
|
|
41
|
-
const store = loadFlowModelSettings(scopeKey);
|
|
42
|
-
const flowSettings = store[flowId];
|
|
43
|
-
if (!flowSettings) {
|
|
44
|
-
return defaultModelForExecutor(executor);
|
|
45
|
-
}
|
|
46
|
-
if (flowSettings.lastSelectedModel && flowSettings.lastSelectedModel !== "default") {
|
|
47
|
-
return flowSettings.lastSelectedModel;
|
|
48
|
-
}
|
|
49
|
-
if (flowSettings.defaultModel && flowSettings.defaultModel !== "default") {
|
|
50
|
-
return flowSettings.defaultModel;
|
|
51
|
-
}
|
|
52
|
-
return defaultModelForExecutor(executor);
|
|
53
|
-
}
|
|
54
|
-
export function updateLastSelectedModel(flowId, scopeKey, executor, model) {
|
|
55
|
-
const store = loadFlowModelSettings(scopeKey);
|
|
56
|
-
const existingSettings = store[flowId];
|
|
57
|
-
if (existingSettings) {
|
|
58
|
-
store[flowId] = {
|
|
59
|
-
...existingSettings,
|
|
60
|
-
executor,
|
|
61
|
-
defaultModel: model,
|
|
62
|
-
lastSelectedModel: model,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
store[flowId] = {
|
|
67
|
-
executor,
|
|
68
|
-
defaultModel: DEFAULT_MODEL_BY_EXECUTOR[executor],
|
|
69
|
-
lastSelectedModel: model,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
saveFlowModelSettings(scopeKey, store);
|
|
73
|
-
}
|
|
74
|
-
export function getFlowModelSettings(flowId, scopeKey) {
|
|
75
|
-
const store = loadFlowModelSettings(scopeKey);
|
|
76
|
-
return store[flowId] ?? null;
|
|
77
|
-
}
|