mrvn-cli 0.5.8 → 0.5.10
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/index.js +28 -67
- package/dist/index.js.map +1 -1
- package/dist/marvin-serve.js +27 -66
- package/dist/marvin-serve.js.map +1 -1
- package/dist/marvin.js +28 -67
- package/dist/marvin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24932,11 +24932,11 @@ var JiraClient = class {
|
|
|
24932
24932
|
return response.json();
|
|
24933
24933
|
}
|
|
24934
24934
|
async searchIssues(jql, maxResults = 50) {
|
|
24935
|
-
|
|
24935
|
+
return this.searchIssuesV3(
|
|
24936
24936
|
jql,
|
|
24937
|
-
|
|
24938
|
-
|
|
24939
|
-
|
|
24937
|
+
["summary", "description", "status", "issuetype", "priority", "assignee", "labels", "created", "updated"],
|
|
24938
|
+
maxResults
|
|
24939
|
+
);
|
|
24940
24940
|
}
|
|
24941
24941
|
async searchIssuesV3(jql, fields = ["summary", "status", "issuetype", "priority", "assignee", "labels"], maxResults = 50) {
|
|
24942
24942
|
const params = new URLSearchParams({
|
|
@@ -25843,7 +25843,7 @@ function createJiraTools(store, projectConfig) {
|
|
|
25843
25843
|
// --- Local → Jira tools ---
|
|
25844
25844
|
tool20(
|
|
25845
25845
|
"push_artifact_to_jira",
|
|
25846
|
-
"Create a Jira issue from
|
|
25846
|
+
"Create a Jira issue from any Marvin artifact and link it directly via jiraKey on the artifact.",
|
|
25847
25847
|
{
|
|
25848
25848
|
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'D-001', 'A-003', 'T-002')"),
|
|
25849
25849
|
projectKey: external_exports.string().optional().describe("Jira project key (e.g. 'PROJ'). Falls back to jira.projectKey from .marvin/config.yaml if not provided."),
|
|
@@ -25886,46 +25886,18 @@ function createJiraTools(store, projectConfig) {
|
|
|
25886
25886
|
description,
|
|
25887
25887
|
issuetype: { name: args.issueType ?? "Task" }
|
|
25888
25888
|
});
|
|
25889
|
-
const
|
|
25890
|
-
|
|
25891
|
-
|
|
25892
|
-
|
|
25893
|
-
|
|
25894
|
-
|
|
25895
|
-
|
|
25896
|
-
tags: [...existingTags.filter((t) => !t.startsWith("jira:")), `jira:${jiraResult.key}`]
|
|
25897
|
-
});
|
|
25898
|
-
return {
|
|
25899
|
-
content: [
|
|
25900
|
-
{
|
|
25901
|
-
type: "text",
|
|
25902
|
-
text: `Created Jira ${jiraResult.key} from ${args.artifactId}. Linked directly on the artifact.`
|
|
25903
|
-
}
|
|
25904
|
-
]
|
|
25905
|
-
};
|
|
25906
|
-
}
|
|
25907
|
-
const jiDoc = store.create(
|
|
25908
|
-
JIRA_TYPE,
|
|
25909
|
-
{
|
|
25910
|
-
title: artifact.frontmatter.title,
|
|
25911
|
-
status: "open",
|
|
25912
|
-
jiraKey: jiraResult.key,
|
|
25913
|
-
jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
|
|
25914
|
-
issueType: args.issueType ?? "Task",
|
|
25915
|
-
priority: "Medium",
|
|
25916
|
-
assignee: "",
|
|
25917
|
-
labels: [],
|
|
25918
|
-
linkedArtifacts: [args.artifactId],
|
|
25919
|
-
tags: [`jira:${jiraResult.key}`],
|
|
25920
|
-
lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
25921
|
-
},
|
|
25922
|
-
""
|
|
25923
|
-
);
|
|
25889
|
+
const existingTags = artifact.frontmatter.tags ?? [];
|
|
25890
|
+
store.update(args.artifactId, {
|
|
25891
|
+
jiraKey: jiraResult.key,
|
|
25892
|
+
jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
|
|
25893
|
+
lastJiraSyncAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
25894
|
+
tags: [...existingTags.filter((t) => !t.startsWith("jira:")), `jira:${jiraResult.key}`]
|
|
25895
|
+
});
|
|
25924
25896
|
return {
|
|
25925
25897
|
content: [
|
|
25926
25898
|
{
|
|
25927
25899
|
type: "text",
|
|
25928
|
-
text: `Created Jira ${jiraResult.key} from ${args.artifactId}.
|
|
25900
|
+
text: `Created Jira ${jiraResult.key} from ${args.artifactId}. Linked directly on the artifact.`
|
|
25929
25901
|
}
|
|
25930
25902
|
]
|
|
25931
25903
|
};
|
|
@@ -26029,9 +26001,9 @@ function createJiraTools(store, projectConfig) {
|
|
|
26029
26001
|
// --- Direct Jira linking for actions/tasks ---
|
|
26030
26002
|
tool20(
|
|
26031
26003
|
"link_to_jira",
|
|
26032
|
-
"Link an existing Jira issue to
|
|
26004
|
+
"Link an existing Jira issue to any Marvin artifact (sets jiraKey directly on the artifact)",
|
|
26033
26005
|
{
|
|
26034
|
-
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'A-001', '
|
|
26006
|
+
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'A-001', 'D-003', 'T-002', 'Q-005')"),
|
|
26035
26007
|
jiraKey: external_exports.string().describe("Jira issue key (e.g. 'PROJ-123')")
|
|
26036
26008
|
},
|
|
26037
26009
|
async (args) => {
|
|
@@ -26046,17 +26018,6 @@ function createJiraTools(store, projectConfig) {
|
|
|
26046
26018
|
isError: true
|
|
26047
26019
|
};
|
|
26048
26020
|
}
|
|
26049
|
-
if (artifact.frontmatter.type !== "action" && artifact.frontmatter.type !== "task") {
|
|
26050
|
-
return {
|
|
26051
|
-
content: [
|
|
26052
|
-
{
|
|
26053
|
-
type: "text",
|
|
26054
|
-
text: `link_to_jira only supports action and task artifacts. ${args.artifactId} is type "${artifact.frontmatter.type}". Use link_artifact_to_jira for JI-xxx documents instead.`
|
|
26055
|
-
}
|
|
26056
|
-
],
|
|
26057
|
-
isError: true
|
|
26058
|
-
};
|
|
26059
|
-
}
|
|
26060
26021
|
const issue2 = await jira.client.getIssue(args.jiraKey);
|
|
26061
26022
|
const existingTags = artifact.frontmatter.tags ?? [];
|
|
26062
26023
|
store.update(args.artifactId, {
|
|
@@ -26383,15 +26344,15 @@ function formatIssueEntry(issue2) {
|
|
|
26383
26344
|
|
|
26384
26345
|
// src/skills/builtin/jira/index.ts
|
|
26385
26346
|
var COMMON_TOOLS = `**Available tools:**
|
|
26386
|
-
- \`
|
|
26387
|
-
- \`
|
|
26388
|
-
- \`push_artifact_to_jira\` \u2014 create a Jira issue from a Marvin artifact. For **actions and tasks**, links directly via \`jiraKey\` on the artifact (no JI-xxx intermediary). For other types, creates a JI-xxx tracking document.
|
|
26389
|
-
- \`link_to_jira\` \u2014 link an existing Jira issue to a Marvin action or task (sets \`jiraKey\` directly on the artifact)
|
|
26347
|
+
- \`push_artifact_to_jira\` \u2014 create a Jira issue from any Marvin artifact and link it directly via \`jiraKey\` on the artifact.
|
|
26348
|
+
- \`link_to_jira\` \u2014 link an existing Jira issue to any Marvin artifact (sets \`jiraKey\` directly on the artifact).
|
|
26390
26349
|
- \`fetch_jira_status\` \u2014 **read-only**: fetch current Jira status, subtask progress, and linked issues for Jira-linked actions/tasks. Returns proposed changes without applying them.
|
|
26391
26350
|
- \`fetch_jira_daily\` \u2014 **read-only**: fetch a daily/range summary of all Jira changes \u2014 status transitions, comments, linked Confluence pages, and cross-references with Marvin artifacts. Returns proposed actions (status updates, unlinked issues, question candidates, Confluence pages to review).
|
|
26392
26351
|
- \`fetch_jira_statuses\` \u2014 **read-only**: discover all Jira statuses in a project and show their Marvin mappings (mapped vs unmapped).
|
|
26393
|
-
- \`
|
|
26394
|
-
- \`
|
|
26352
|
+
- \`pull_jira_issue\` / \`pull_jira_issues_jql\` \u2014 import Jira issues as local JI-xxx documents (for Jira-originated items with no existing Marvin artifact).
|
|
26353
|
+
- \`list_jira_issues\` / \`get_jira_issue\` \u2014 browse locally imported JI-xxx documents.
|
|
26354
|
+
- \`sync_jira_issue\` \u2014 bidirectional sync of a local JI-xxx with Jira.
|
|
26355
|
+
- \`link_artifact_to_jira\` \u2014 link a Marvin artifact to an existing JI-xxx document.`;
|
|
26395
26356
|
var COMMON_WORKFLOW = `**Jira sync workflow:**
|
|
26396
26357
|
1. Call \`fetch_jira_status\` to see what Jira reports for linked artifacts
|
|
26397
26358
|
2. Analyze the proposed changes (status transitions, subtask progress, blockers from linked issues)
|
|
@@ -28682,22 +28643,22 @@ ${block.text}` };
|
|
|
28682
28643
|
function collectTools(marvinDir) {
|
|
28683
28644
|
const config2 = loadProjectConfig(marvinDir);
|
|
28684
28645
|
const plugin = resolvePlugin(config2.methodology);
|
|
28685
|
-
const
|
|
28686
|
-
const
|
|
28646
|
+
const pluginRegistrations = plugin?.documentTypeRegistrations ?? [];
|
|
28647
|
+
const allSkills = loadAllSkills(marvinDir);
|
|
28648
|
+
const allSkillIds = [...allSkills.keys()];
|
|
28649
|
+
const allSkillRegs = collectSkillRegistrations(allSkillIds, allSkills);
|
|
28650
|
+
const store = new DocumentStore(marvinDir, [...pluginRegistrations, ...allSkillRegs]);
|
|
28687
28651
|
const sourcesDir = path11.join(marvinDir, "sources");
|
|
28688
28652
|
const hasSourcesDir = fs11.existsSync(sourcesDir);
|
|
28689
28653
|
const manifest = hasSourcesDir ? new SourceManifestManager(marvinDir) : void 0;
|
|
28690
28654
|
const pluginTools = plugin ? getPluginTools(plugin, store, marvinDir) : [];
|
|
28691
28655
|
const sessionStore = new SessionStore(marvinDir);
|
|
28692
|
-
const allSkills = loadAllSkills(marvinDir);
|
|
28693
|
-
const allSkillIds = [...allSkills.keys()];
|
|
28694
28656
|
const codeSkillTools = getSkillTools(allSkillIds, allSkills, store, config2);
|
|
28695
28657
|
const skillsWithActions = allSkillIds.map((id) => allSkills.get(id)).filter((s) => s.actions && s.actions.length > 0);
|
|
28696
28658
|
const projectRoot = path11.dirname(marvinDir);
|
|
28697
28659
|
const actionTools = createSkillActionTools(skillsWithActions, { store, marvinDir, projectRoot });
|
|
28698
|
-
const allSkillRegs = collectSkillRegistrations(allSkillIds, allSkills);
|
|
28699
28660
|
const navGroups = buildNavGroups({
|
|
28700
|
-
pluginRegs:
|
|
28661
|
+
pluginRegs: pluginRegistrations,
|
|
28701
28662
|
skillRegs: allSkillRegs,
|
|
28702
28663
|
pluginName: plugin?.name
|
|
28703
28664
|
});
|
|
@@ -31914,7 +31875,7 @@ function createProgram() {
|
|
|
31914
31875
|
const program = new Command();
|
|
31915
31876
|
program.name("marvin").description(
|
|
31916
31877
|
"AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
|
|
31917
|
-
).version("0.5.
|
|
31878
|
+
).version("0.5.10");
|
|
31918
31879
|
program.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
|
|
31919
31880
|
await initCommand();
|
|
31920
31881
|
});
|