mrvn-cli 0.5.9 → 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 +24 -63
- package/dist/index.js.map +1 -1
- package/dist/marvin-serve.js +23 -62
- package/dist/marvin-serve.js.map +1 -1
- package/dist/marvin.js +24 -63
- package/dist/marvin.js.map +1 -1
- package/package.json +1 -1
package/dist/marvin.js
CHANGED
|
@@ -26089,7 +26089,7 @@ function createJiraTools(store, projectConfig) {
|
|
|
26089
26089
|
// --- Local → Jira tools ---
|
|
26090
26090
|
tool20(
|
|
26091
26091
|
"push_artifact_to_jira",
|
|
26092
|
-
"Create a Jira issue from
|
|
26092
|
+
"Create a Jira issue from any Marvin artifact and link it directly via jiraKey on the artifact.",
|
|
26093
26093
|
{
|
|
26094
26094
|
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'D-001', 'A-003', 'T-002')"),
|
|
26095
26095
|
projectKey: external_exports.string().optional().describe("Jira project key (e.g. 'PROJ'). Falls back to jira.projectKey from .marvin/config.yaml if not provided."),
|
|
@@ -26132,46 +26132,18 @@ function createJiraTools(store, projectConfig) {
|
|
|
26132
26132
|
description,
|
|
26133
26133
|
issuetype: { name: args.issueType ?? "Task" }
|
|
26134
26134
|
});
|
|
26135
|
-
const
|
|
26136
|
-
|
|
26137
|
-
|
|
26138
|
-
|
|
26139
|
-
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
tags: [...existingTags.filter((t) => !t.startsWith("jira:")), `jira:${jiraResult.key}`]
|
|
26143
|
-
});
|
|
26144
|
-
return {
|
|
26145
|
-
content: [
|
|
26146
|
-
{
|
|
26147
|
-
type: "text",
|
|
26148
|
-
text: `Created Jira ${jiraResult.key} from ${args.artifactId}. Linked directly on the artifact.`
|
|
26149
|
-
}
|
|
26150
|
-
]
|
|
26151
|
-
};
|
|
26152
|
-
}
|
|
26153
|
-
const jiDoc = store.create(
|
|
26154
|
-
JIRA_TYPE,
|
|
26155
|
-
{
|
|
26156
|
-
title: artifact.frontmatter.title,
|
|
26157
|
-
status: "open",
|
|
26158
|
-
jiraKey: jiraResult.key,
|
|
26159
|
-
jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
|
|
26160
|
-
issueType: args.issueType ?? "Task",
|
|
26161
|
-
priority: "Medium",
|
|
26162
|
-
assignee: "",
|
|
26163
|
-
labels: [],
|
|
26164
|
-
linkedArtifacts: [args.artifactId],
|
|
26165
|
-
tags: [`jira:${jiraResult.key}`],
|
|
26166
|
-
lastSyncedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26167
|
-
},
|
|
26168
|
-
""
|
|
26169
|
-
);
|
|
26135
|
+
const existingTags = artifact.frontmatter.tags ?? [];
|
|
26136
|
+
store.update(args.artifactId, {
|
|
26137
|
+
jiraKey: jiraResult.key,
|
|
26138
|
+
jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
|
|
26139
|
+
lastJiraSyncAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
26140
|
+
tags: [...existingTags.filter((t) => !t.startsWith("jira:")), `jira:${jiraResult.key}`]
|
|
26141
|
+
});
|
|
26170
26142
|
return {
|
|
26171
26143
|
content: [
|
|
26172
26144
|
{
|
|
26173
26145
|
type: "text",
|
|
26174
|
-
text: `Created Jira ${jiraResult.key} from ${args.artifactId}.
|
|
26146
|
+
text: `Created Jira ${jiraResult.key} from ${args.artifactId}. Linked directly on the artifact.`
|
|
26175
26147
|
}
|
|
26176
26148
|
]
|
|
26177
26149
|
};
|
|
@@ -26275,9 +26247,9 @@ function createJiraTools(store, projectConfig) {
|
|
|
26275
26247
|
// --- Direct Jira linking for actions/tasks ---
|
|
26276
26248
|
tool20(
|
|
26277
26249
|
"link_to_jira",
|
|
26278
|
-
"Link an existing Jira issue to
|
|
26250
|
+
"Link an existing Jira issue to any Marvin artifact (sets jiraKey directly on the artifact)",
|
|
26279
26251
|
{
|
|
26280
|
-
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'A-001', '
|
|
26252
|
+
artifactId: external_exports.string().describe("Marvin artifact ID (e.g. 'A-001', 'D-003', 'T-002', 'Q-005')"),
|
|
26281
26253
|
jiraKey: external_exports.string().describe("Jira issue key (e.g. 'PROJ-123')")
|
|
26282
26254
|
},
|
|
26283
26255
|
async (args) => {
|
|
@@ -26292,17 +26264,6 @@ function createJiraTools(store, projectConfig) {
|
|
|
26292
26264
|
isError: true
|
|
26293
26265
|
};
|
|
26294
26266
|
}
|
|
26295
|
-
if (artifact.frontmatter.type !== "action" && artifact.frontmatter.type !== "task") {
|
|
26296
|
-
return {
|
|
26297
|
-
content: [
|
|
26298
|
-
{
|
|
26299
|
-
type: "text",
|
|
26300
|
-
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.`
|
|
26301
|
-
}
|
|
26302
|
-
],
|
|
26303
|
-
isError: true
|
|
26304
|
-
};
|
|
26305
|
-
}
|
|
26306
26267
|
const issue2 = await jira.client.getIssue(args.jiraKey);
|
|
26307
26268
|
const existingTags = artifact.frontmatter.tags ?? [];
|
|
26308
26269
|
store.update(args.artifactId, {
|
|
@@ -26629,15 +26590,15 @@ function formatIssueEntry(issue2) {
|
|
|
26629
26590
|
|
|
26630
26591
|
// src/skills/builtin/jira/index.ts
|
|
26631
26592
|
var COMMON_TOOLS = `**Available tools:**
|
|
26632
|
-
- \`
|
|
26633
|
-
- \`
|
|
26634
|
-
- \`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.
|
|
26635
|
-
- \`link_to_jira\` \u2014 link an existing Jira issue to a Marvin action or task (sets \`jiraKey\` directly on the artifact)
|
|
26593
|
+
- \`push_artifact_to_jira\` \u2014 create a Jira issue from any Marvin artifact and link it directly via \`jiraKey\` on the artifact.
|
|
26594
|
+
- \`link_to_jira\` \u2014 link an existing Jira issue to any Marvin artifact (sets \`jiraKey\` directly on the artifact).
|
|
26636
26595
|
- \`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.
|
|
26637
26596
|
- \`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).
|
|
26638
26597
|
- \`fetch_jira_statuses\` \u2014 **read-only**: discover all Jira statuses in a project and show their Marvin mappings (mapped vs unmapped).
|
|
26639
|
-
- \`
|
|
26640
|
-
- \`
|
|
26598
|
+
- \`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).
|
|
26599
|
+
- \`list_jira_issues\` / \`get_jira_issue\` \u2014 browse locally imported JI-xxx documents.
|
|
26600
|
+
- \`sync_jira_issue\` \u2014 bidirectional sync of a local JI-xxx with Jira.
|
|
26601
|
+
- \`link_artifact_to_jira\` \u2014 link a Marvin artifact to an existing JI-xxx document.`;
|
|
26641
26602
|
var COMMON_WORKFLOW = `**Jira sync workflow:**
|
|
26642
26603
|
1. Call \`fetch_jira_status\` to see what Jira reports for linked artifacts
|
|
26643
26604
|
2. Analyze the proposed changes (status transitions, subtask progress, blockers from linked issues)
|
|
@@ -29781,22 +29742,22 @@ ${block.text}` };
|
|
|
29781
29742
|
function collectTools(marvinDir) {
|
|
29782
29743
|
const config2 = loadProjectConfig(marvinDir);
|
|
29783
29744
|
const plugin = resolvePlugin(config2.methodology);
|
|
29784
|
-
const
|
|
29785
|
-
const
|
|
29745
|
+
const pluginRegistrations = plugin?.documentTypeRegistrations ?? [];
|
|
29746
|
+
const allSkills = loadAllSkills(marvinDir);
|
|
29747
|
+
const allSkillIds = [...allSkills.keys()];
|
|
29748
|
+
const allSkillRegs = collectSkillRegistrations(allSkillIds, allSkills);
|
|
29749
|
+
const store = new DocumentStore(marvinDir, [...pluginRegistrations, ...allSkillRegs]);
|
|
29786
29750
|
const sourcesDir = path15.join(marvinDir, "sources");
|
|
29787
29751
|
const hasSourcesDir = fs14.existsSync(sourcesDir);
|
|
29788
29752
|
const manifest = hasSourcesDir ? new SourceManifestManager(marvinDir) : void 0;
|
|
29789
29753
|
const pluginTools = plugin ? getPluginTools(plugin, store, marvinDir) : [];
|
|
29790
29754
|
const sessionStore = new SessionStore(marvinDir);
|
|
29791
|
-
const allSkills = loadAllSkills(marvinDir);
|
|
29792
|
-
const allSkillIds = [...allSkills.keys()];
|
|
29793
29755
|
const codeSkillTools = getSkillTools(allSkillIds, allSkills, store, config2);
|
|
29794
29756
|
const skillsWithActions = allSkillIds.map((id) => allSkills.get(id)).filter((s) => s.actions && s.actions.length > 0);
|
|
29795
29757
|
const projectRoot = path15.dirname(marvinDir);
|
|
29796
29758
|
const actionTools = createSkillActionTools(skillsWithActions, { store, marvinDir, projectRoot });
|
|
29797
|
-
const allSkillRegs = collectSkillRegistrations(allSkillIds, allSkills);
|
|
29798
29759
|
const navGroups = buildNavGroups({
|
|
29799
|
-
pluginRegs:
|
|
29760
|
+
pluginRegs: pluginRegistrations,
|
|
29800
29761
|
skillRegs: allSkillRegs,
|
|
29801
29762
|
pluginName: plugin?.name
|
|
29802
29763
|
});
|
|
@@ -31906,7 +31867,7 @@ function createProgram() {
|
|
|
31906
31867
|
const program2 = new Command();
|
|
31907
31868
|
program2.name("marvin").description(
|
|
31908
31869
|
"AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
|
|
31909
|
-
).version("0.5.
|
|
31870
|
+
).version("0.5.10");
|
|
31910
31871
|
program2.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
|
|
31911
31872
|
await initCommand();
|
|
31912
31873
|
});
|