git-impact 0.2.2 → 0.6.2
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 +124 -78
- package/dist/cli/index.js +32 -211
- package/dist/cli/index.js.map +1 -1
- package/dist/init/installer.d.ts +6 -0
- package/dist/init/installer.d.ts.map +1 -1
- package/dist/init/installer.js +58 -5
- package/dist/init/installer.js.map +1 -1
- package/dist/init/installer.test.d.ts +2 -0
- package/dist/init/installer.test.d.ts.map +1 -0
- package/dist/init/installer.test.js +127 -0
- package/dist/init/installer.test.js.map +1 -0
- package/dist/init/templates.d.ts +8 -7
- package/dist/init/templates.d.ts.map +1 -1
- package/dist/init/templates.js +73 -252
- package/dist/init/templates.js.map +1 -1
- package/dist/mcp/resources.js +0 -1
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +64 -12
- package/dist/mcp/tools.js.map +1 -1
- package/dist/readers/git.d.ts +2 -1
- package/dist/readers/git.d.ts.map +1 -1
- package/dist/readers/git.js +12 -6
- package/dist/readers/git.js.map +1 -1
- package/dist/readers/redact.d.ts +29 -0
- package/dist/readers/redact.d.ts.map +1 -0
- package/dist/readers/redact.js +82 -0
- package/dist/readers/redact.js.map +1 -0
- package/dist/readers/redact.test.d.ts +2 -0
- package/dist/readers/redact.test.d.ts.map +1 -0
- package/dist/readers/redact.test.js +72 -0
- package/dist/readers/redact.test.js.map +1 -0
- package/dist/report/html.d.ts +2 -0
- package/dist/report/html.d.ts.map +1 -1
- package/dist/report/html.js +35 -1
- package/dist/report/html.js.map +1 -1
- package/dist/report/render.d.ts.map +1 -1
- package/dist/report/render.js +18 -8
- package/dist/report/render.js.map +1 -1
- package/dist/storage/db.d.ts +23 -2
- package/dist/storage/db.d.ts.map +1 -1
- package/dist/storage/db.js +12 -0
- package/dist/storage/db.js.map +1 -1
- package/dist/storage/db.test.d.ts +2 -0
- package/dist/storage/db.test.d.ts.map +1 -0
- package/dist/storage/db.test.js +152 -0
- package/dist/storage/db.test.js.map +1 -0
- package/package.json +7 -6
- package/skill/SKILL.md +132 -160
- package/skill/references/html-template.md +131 -0
- package/skill/references/translation-rules.md +87 -0
- package/dist/translator/prompt.d.ts +0 -21
- package/dist/translator/prompt.d.ts.map +0 -1
- package/dist/translator/prompt.js +0 -117
- package/dist/translator/prompt.js.map +0 -1
- package/dist/translator/translate.d.ts +0 -36
- package/dist/translator/translate.d.ts.map +0 -1
- package/dist/translator/translate.js +0 -73
- package/dist/translator/translate.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.test.js","sourceRoot":"","sources":["../../src/init/installer.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqE;AACrE,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,2CAAqD;AAErD,IAAI,GAAW,CAAC;AAEhB,IAAA,mBAAU,EAAC,GAAG,EAAE;IACd,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC;AAEH,IAAA,kBAAS,EAAC,GAAG,EAAE;IACb,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEH,IAAA,iBAAQ,EAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAA,WAAE,EAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,IAAA,eAAM,EAAC,IAAA,yBAAa,EAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,EAAE,C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,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,IAAA,mBAAO,EAAC;YACN,QAAQ,EAAE,GAAG;YACb,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;YACvD,OAAO,EAAE,EAAE,kBAAkB,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC1E,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;QACH,IAAA,eAAM,EAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1G,IAAA,eAAM,EAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvF,IAAA,eAAM,EAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/init/templates.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Editor-specific template content (Copilot, Cursor, Gemini).
|
|
3
|
+
*
|
|
4
|
+
* Note: the Claude Code skill is NOT embedded here — it's copied directly
|
|
5
|
+
* from the shipped `skill/` directory at install time so SKILL.md and its
|
|
6
|
+
* `references/` sub-files stay single-source. See `installer.ts`.
|
|
5
7
|
*/
|
|
6
|
-
export declare const CLAUDE_SKILL = "---\nname: git-impact\ndescription: >\n Translates git commits into plain-English business impact \u2014 for standups,\n manager updates, and performance reviews. Use this skill whenever the user\n says: \"do my standup\", \"translate my commits\", \"what did I ship today/this\n week\", \"write my standup\", \"show my impact\", \"git-impact\", \"/git-impact\",\n \"generate a performance review\", \"what have I done this quarter\", or any\n request to turn technical git output into something a non-technical manager\n can understand.\n---\n\n# git-impact\n\nTranslate git commits into plain-English business impact without an API key.\nRead git data with bash, load the repo's context file, and write the translation\ninline.\n\n## Sub-commands\n\n| User says | Mode |\n|---|---|\n| `do my standup`, `today`, no args | **today** |\n| `since yesterday`, `since 3d`, `since 2026-05-01` | **since \\<when\\>** |\n| `review`, `last 30 days`, `Q2 review` | **review** |\n| `init`, `set up context` | **init** |\n\n## Step 1 \u2014 Find the repo root\n\n```bash\ngit rev-parse --show-toplevel 2>/dev/null\n```\n\nIf it fails: *\"No git repository found. Open a project folder first.\"* Stop.\n\n## Step 2 \u2014 Load context\n\n```bash\ncat \"$REPO_ROOT/.git-impact/context.json\" 2>/dev/null || echo \"NONE\"\n```\n\nApply the glossary (technical term \u2192 plain English) and frame impact around\nmanager priorities. If no context file exists, use general language and\nsuggest running init.\n\n## Mode: today / since \\<when\\>\n\nFetch commits:\n```bash\n# today\ngit -C \"$REPO_ROOT\" log \\\n --since=\"$(date '+%Y-%m-%d') 00:00:00\" \\\n --format=\"%h|%s|%b|%an|%ad\" --date=short HEAD\n\n# since Nd \u2192 --since=\"N days ago 00:00:00\"\n# since YYYY-MM-DD \u2192 --since=\"YYYY-MM-DD 00:00:00\"\n```\n\nFetch files changed:\n```bash\nFIRST=$(git -C \"$REPO_ROOT\" log --since=\"...\" --format=\"%h\" HEAD | tail -1)\ngit -C \"$REPO_ROOT\" diff --stat \"$FIRST\"^ HEAD 2>/dev/null\n```\n\n**Translation rules:**\n1. Each bullet = what was done + WHY it matters to the business. Never restate the commit message.\n2. Apply glossary \u2014 replace every technical term listed in context.json.\n3. If impact can't be inferred \u2192 \"technical foundation work for [area]\". Never hallucinate.\n4. Group related commits \u2014 4 auth commits = 1 bullet.\n5. WIP commits \u2192 \"\u23F3 In progress: [what] \u2192 [expected outcome]\"\n6. Be specific \u2014 use numbers from commit messages when they exist.\n\n**Output:**\n```\n\uD83D\uDCC5 [Day, Date]\n\n\u2705 [Plain-English summary]\n \u2192 [Business impact \u2014 who it unblocks, what risk it reduces]\n\n\u23F3 In progress: [what]\n \u2192 [Expected outcome]\n\n\uD83D\uDCC1 [N] files changed across [areas]\n [N] commit(s) on [branch]\n```\n\nSave to history after printing. **The items_json shape matters** \u2014 the HTML\nreport and performance review reader expect this exact structure:\n\n```json\n[\n {\n \"status\": \"done\", // \"done\" | \"in_progress\" | \"blocked\"\n \"summary\": \"Plain-English what\", // REQUIRED \u2014 the bullet text\n \"impact\": \"Why it matters\", // optional \u2014 what was unblocked\n \"technical_note\": \"files/PR #refs\" // optional \u2014 small grey note\n }\n]\n```\n\nUse `summary` (not `title` or `text`) and always include `status`.\n\n```bash\nmkdir -p \"$REPO_ROOT/.git-impact\"\nsqlite3 \"$REPO_ROOT/.git-impact/history.db\" \"\n CREATE TABLE IF NOT EXISTS impact_entries (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n date TEXT NOT NULL, repo_name TEXT NOT NULL,\n total_commits INTEGER NOT NULL DEFAULT 0,\n total_files INTEGER NOT NULL DEFAULT 0,\n items_json TEXT NOT NULL DEFAULT '[]',\n created_at TEXT NOT NULL DEFAULT (datetime('now'))\n );\n INSERT INTO impact_entries (date, repo_name, total_commits, total_files, items_json)\n VALUES ('$(date +%Y-%m-%d)', '$(basename $REPO_ROOT)', $COMMITS, $FILES, '$JSON');\n\" 2>/dev/null || true\n```\n\n## Step 4 \u2014 Generate the HTML report (REQUIRED, run this)\n\nThis step is mandatory, not optional. After saving to history, you **must\nactually execute** the following bash command \u2014 do not just describe it.\nWithout this step, the file:// link you print will 404.\n\n```bash\ncd \"$REPO_ROOT\" && npx --yes git-impact@latest view --no-open --date \"$(date +%Y-%m-%d)\"\n```\n\nThis uses npx, so the user does **not** need to have `git-impact` installed\nlocally. If the command errors, surface the error to the user \u2014 don't swallow\nit. If it succeeds, `.git-impact/result.html` will exist.\n\nThen, and only then, print the link as the very last line of your response:\n\n```\n\uD83D\uDD17 file://$REPO_ROOT/.git-impact/result.html?date=$(date +%Y-%m-%d)\n```\n\nIf the npx command failed, instead print:\n```\n\u26A0\uFE0F HTML report could not be generated: <paste the error message>\n Run `npx git-impact@latest view` from the repo to retry.\n```\n\n## Mode: review\n\nQuery history and synthesise a performance review:\n```bash\nsqlite3 \"$REPO_ROOT/.git-impact/history.db\" \\\n \"SELECT date, repo_name, total_commits, items_json\n FROM impact_entries WHERE date >= '$FROM' AND date <= '$TO'\n ORDER BY date ASC;\" 2>/dev/null\n```\n\nIf no history: *\"No saved history yet. Run the standup daily for a few weeks first.\"*\n\nFormat:\n```\nPerformance Review \u2014 [Period]\n[Headline sentence \u2014 biggest contribution]\n\n\uD83D\uDE80 [High-impact theme]\n \u2022 Specific achievement with numbers...\n\n\u2705 [Medium theme] ...\n\uD83D\uDD27 [Lower theme] ...\n\n\uD83D\uDCCA [N] commits across [N] working days\n```\n\n## Mode: init\n\nAsk one at a time:\n1. \"What does your company/product do? (1\u20132 sentences)\"\n2. \"What does your manager care most about?\"\n3. \"Technical terms to translate? e.g. RLS=data security (blank to skip)\"\n\nWrite `.git-impact/context.json` and confirm:\n*\"Saved. Commit context.json to share the glossary with your team.\"*\n\n## Tone\n\nNon-technical manager audience. Short sentences. No filler. Confident \u2014 if\nyou know the impact, state it. 2 accurate bullets > 5 vague ones.\n";
|
|
7
8
|
export declare const CLAUDE_MD_BLOCK = "\n## git-impact\n\nThis repo uses [git-impact](https://github.com/you/git-impact) for standup and\nperformance review generation.\n\n- Say **\"do my standup\"** to translate today's commits into business impact\n- Say **\"git-impact since 3d\"** to look back further\n- Say **\"generate a performance review\"** after a few weeks of standups\n- Say **\"set up context for this repo\"** to configure the glossary\n\nContext is stored in `.git-impact/context.json` (committed, team-shared).\nHistory is stored in `.git-impact/history.db` (gitignored, per-machine).\n";
|
|
8
|
-
export declare const COPILOT_INSTRUCTIONS = "# git-impact\n\nTranslate git commits into plain-English
|
|
9
|
-
export declare const CURSOR_RULES = "---\ndescription: git-impact
|
|
10
|
-
export declare const GEMINI_COMMAND = "# git-impact\n\nTranslate git commits into plain-English
|
|
9
|
+
export declare const COPILOT_INSTRUCTIONS = "# git-impact\n\nTranslate git commits into plain-English business impact for standups,\nmanager updates, and performance review prep.\n\n## When to trigger\n\nUser says any of: \"do my standup\", \"/git-impact\", \"what did I ship today\",\n\"translate my commits\", \"since yesterday\", \"since 3d\", \"since last standup\",\n\"weekly summary\", \"performance review prep\", \"generate a review\".\n\n## Preferred path: MCP\n\nIf the `git-impact` MCP server is configured for this editor, use its tools:\n\n1. `get_last_standup_date` \u2014 find the lookback start\n2. `get_git_activity` (since_iso = day-after last standup, or start-of-today)\n3. `get_github_activity` if a github_token exists in context\n4. Translate using the rules below\n5. `save_impact_entry` with each item including `provenance`\n (`pr` | `commit_body` | `commit_message` | `ticket` | `inferred`)\n\n## Fallback path: bash\n\nIf MCP isn't available, run:\n```bash\nREPO=$(git rev-parse --show-toplevel)\ncat \"$REPO/.git-impact/context.json\" # glossary, manager priorities\ngit -C \"$REPO\" log --since=\"today 00:00:00\" --format=\"%h|%s|%b|%an|%ad\" --date=short HEAD\ngit -C \"$REPO\" diff --stat HEAD~5 HEAD\n```\n\nThen translate, then ask the user to run `git-impact view` to see the saved\nHTML report (the bash path can't write to history.db safely from this editor).\n\n## Translation rules\n\n1. **What + why**, not what + how. Never restate commit messages.\n2. **Apply the glossary** from context.json \u2014 replace technical terms with\n plain-English equivalents.\n3. **Provenance is mandatory** for every saved item:\n - `pr` \u2014 quoted from the linked PR description\n - `commit_body` \u2014 pulled from a multi-line commit body\n - `commit_message` \u2014 visible in the subject line\n - `ticket` \u2014 pulled from a linked Linear/Jira ticket\n - `inferred` \u2014 guessed without explicit text. Use this honestly.\n4. **Group related commits** into one bullet.\n5. WIP \u2192 `status: \"in_progress\"` with **expected outcome**, not progress so far.\n6. Blocked \u2192 `status: \"blocked\"`.\n7. **Be specific with numbers** \u2014 pull them from commits/PRs, never invent them.\n\n## Output\n\n```\n\uD83D\uDCC5 [Date or range]\n\u2705 [Plain-English summary]\n \u2192 [Why it matters]\n\u23F3 In progress: [What] \u2192 [Expected outcome]\n\uD83D\uDEAB Blocked: [What] \u2192 [What's needed]\n\uD83D\uDCC1 [N] files across [areas] \u00B7 [N] commit(s) on [branch]\n```\n\n## Tone\n\nNon-technical-manager audience. Short sentences. No filler. 2 accurate bullets\nbeat 5 vague ones. If you guessed the impact, label `provenance: inferred`\nand use phrasing like \"technical foundation work for X\" \u2014 never hedge with\n\"might potentially\".\n";
|
|
10
|
+
export declare const CURSOR_RULES = "---\ndescription: git-impact \u2014 turn git commits into plain-English standup bullets\nglobs: []\nalwaysApply: false\n---\n\n# git-impact\n\n## When to trigger\n\nUser says any of: \"do my standup\", \"/git-impact\", \"what did I ship today\",\n\"translate my commits\", \"since yesterday\", \"since 3d\", \"since last standup\",\n\"weekly summary\", \"performance review prep\", \"generate a review\".\n\n## Preferred path: MCP\n\nIf the `git-impact` MCP server is configured for this editor, use its tools:\n\n1. `get_last_standup_date` \u2014 find the lookback start\n2. `get_git_activity` (since_iso = day-after last standup, or start-of-today)\n3. `get_github_activity` if a github_token exists in context\n4. Translate using the rules below\n5. `save_impact_entry` with each item including `provenance`\n (`pr` | `commit_body` | `commit_message` | `ticket` | `inferred`)\n\n## Fallback path: bash\n\nIf MCP isn't available, run:\n```bash\nREPO=$(git rev-parse --show-toplevel)\ncat \"$REPO/.git-impact/context.json\" # glossary, manager priorities\ngit -C \"$REPO\" log --since=\"today 00:00:00\" --format=\"%h|%s|%b|%an|%ad\" --date=short HEAD\ngit -C \"$REPO\" diff --stat HEAD~5 HEAD\n```\n\nThen translate, then ask the user to run `git-impact view` to see the saved\nHTML report (the bash path can't write to history.db safely from this editor).\n\n## Translation rules\n\n1. **What + why**, not what + how. Never restate commit messages.\n2. **Apply the glossary** from context.json \u2014 replace technical terms with\n plain-English equivalents.\n3. **Provenance is mandatory** for every saved item:\n - `pr` \u2014 quoted from the linked PR description\n - `commit_body` \u2014 pulled from a multi-line commit body\n - `commit_message` \u2014 visible in the subject line\n - `ticket` \u2014 pulled from a linked Linear/Jira ticket\n - `inferred` \u2014 guessed without explicit text. Use this honestly.\n4. **Group related commits** into one bullet.\n5. WIP \u2192 `status: \"in_progress\"` with **expected outcome**, not progress so far.\n6. Blocked \u2192 `status: \"blocked\"`.\n7. **Be specific with numbers** \u2014 pull them from commits/PRs, never invent them.\n\n## Output\n\n```\n\uD83D\uDCC5 [Date or range]\n\u2705 [Plain-English summary]\n \u2192 [Why it matters]\n\u23F3 In progress: [What] \u2192 [Expected outcome]\n\uD83D\uDEAB Blocked: [What] \u2192 [What's needed]\n\uD83D\uDCC1 [N] files across [areas] \u00B7 [N] commit(s) on [branch]\n```\n\n## Tone\n\nNon-technical-manager audience. Short sentences. No filler. 2 accurate bullets\nbeat 5 vague ones. If you guessed the impact, label `provenance: inferred`\nand use phrasing like \"technical foundation work for X\" \u2014 never hedge with\n\"might potentially\".\n";
|
|
11
|
+
export declare const GEMINI_COMMAND = "# git-impact\n\nTranslate git commits into plain-English business impact.\n\n## When to trigger\n\nUser says any of: \"do my standup\", \"/git-impact\", \"what did I ship today\",\n\"translate my commits\", \"since yesterday\", \"since 3d\", \"since last standup\",\n\"weekly summary\", \"performance review prep\", \"generate a review\".\n\n## Preferred path: MCP\n\nIf the `git-impact` MCP server is configured for this editor, use its tools:\n\n1. `get_last_standup_date` \u2014 find the lookback start\n2. `get_git_activity` (since_iso = day-after last standup, or start-of-today)\n3. `get_github_activity` if a github_token exists in context\n4. Translate using the rules below\n5. `save_impact_entry` with each item including `provenance`\n (`pr` | `commit_body` | `commit_message` | `ticket` | `inferred`)\n\n## Fallback path: bash\n\nIf MCP isn't available, run:\n```bash\nREPO=$(git rev-parse --show-toplevel)\ncat \"$REPO/.git-impact/context.json\" # glossary, manager priorities\ngit -C \"$REPO\" log --since=\"today 00:00:00\" --format=\"%h|%s|%b|%an|%ad\" --date=short HEAD\ngit -C \"$REPO\" diff --stat HEAD~5 HEAD\n```\n\nThen translate, then ask the user to run `git-impact view` to see the saved\nHTML report (the bash path can't write to history.db safely from this editor).\n\n## Translation rules\n\n1. **What + why**, not what + how. Never restate commit messages.\n2. **Apply the glossary** from context.json \u2014 replace technical terms with\n plain-English equivalents.\n3. **Provenance is mandatory** for every saved item:\n - `pr` \u2014 quoted from the linked PR description\n - `commit_body` \u2014 pulled from a multi-line commit body\n - `commit_message` \u2014 visible in the subject line\n - `ticket` \u2014 pulled from a linked Linear/Jira ticket\n - `inferred` \u2014 guessed without explicit text. Use this honestly.\n4. **Group related commits** into one bullet.\n5. WIP \u2192 `status: \"in_progress\"` with **expected outcome**, not progress so far.\n6. Blocked \u2192 `status: \"blocked\"`.\n7. **Be specific with numbers** \u2014 pull them from commits/PRs, never invent them.\n\n## Output\n\n```\n\uD83D\uDCC5 [Date or range]\n\u2705 [Plain-English summary]\n \u2192 [Why it matters]\n\u23F3 In progress: [What] \u2192 [Expected outcome]\n\uD83D\uDEAB Blocked: [What] \u2192 [What's needed]\n\uD83D\uDCC1 [N] files across [areas] \u00B7 [N] commit(s) on [branch]\n```\n\n## Tone\n\nNon-technical-manager audience. Short sentences. No filler. 2 accurate bullets\nbeat 5 vague ones. If you guessed the impact, label `provenance: inferred`\nand use phrasing like \"technical foundation work for X\" \u2014 never hedge with\n\"might potentially\".\n";
|
|
11
12
|
export declare const CONTEXT_TEMPLATE: (companyDescription: string, managerPriorities: string, glossary: Record<string, string>) => string;
|
|
12
13
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,eAAe,yjBAa3B,CAAC;AAyEF,eAAO,MAAM,oBAAoB,mtFAKV,CAAC;AAIxB,eAAO,MAAM,YAAY,ytFAQF,CAAC;AAIxB,eAAO,MAAM,cAAc,upFAIJ,CAAC;AAIxB,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,MAAM,EAC1B,mBAAmB,MAAM,EACzB,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC/B,MAKO,CAAC"}
|
package/dist/init/templates.js
CHANGED
|
@@ -1,298 +1,119 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Editor-specific template content (Copilot, Cursor, Gemini).
|
|
4
|
+
*
|
|
5
|
+
* Note: the Claude Code skill is NOT embedded here — it's copied directly
|
|
6
|
+
* from the shipped `skill/` directory at install time so SKILL.md and its
|
|
7
|
+
* `references/` sub-files stay single-source. See `installer.ts`.
|
|
6
8
|
*/
|
|
7
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.CONTEXT_TEMPLATE = exports.GEMINI_COMMAND = exports.CURSOR_RULES = exports.COPILOT_INSTRUCTIONS = exports.CLAUDE_MD_BLOCK =
|
|
9
|
-
// ───
|
|
10
|
-
exports.
|
|
11
|
-
|
|
12
|
-
description: >
|
|
13
|
-
Translates git commits into plain-English business impact — for standups,
|
|
14
|
-
manager updates, and performance reviews. Use this skill whenever the user
|
|
15
|
-
says: "do my standup", "translate my commits", "what did I ship today/this
|
|
16
|
-
week", "write my standup", "show my impact", "git-impact", "/git-impact",
|
|
17
|
-
"generate a performance review", "what have I done this quarter", or any
|
|
18
|
-
request to turn technical git output into something a non-technical manager
|
|
19
|
-
can understand.
|
|
20
|
-
---
|
|
10
|
+
exports.CONTEXT_TEMPLATE = exports.GEMINI_COMMAND = exports.CURSOR_RULES = exports.COPILOT_INSTRUCTIONS = exports.CLAUDE_MD_BLOCK = void 0;
|
|
11
|
+
// ─── CLAUDE.md managed block ──────────────────────────────────────────────────
|
|
12
|
+
exports.CLAUDE_MD_BLOCK = `
|
|
13
|
+
## git-impact
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
This repo uses [git-impact](https://github.com/you/git-impact) for standup and
|
|
16
|
+
performance review generation.
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
- Say **"do my standup"** to translate today's commits into business impact
|
|
19
|
+
- Say **"git-impact since 3d"** to look back further
|
|
20
|
+
- Say **"generate a performance review"** after a few weeks of standups
|
|
21
|
+
- Say **"set up context for this repo"** to configure the glossary
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
Context is stored in \`.git-impact/context.json\` (committed, team-shared).
|
|
24
|
+
History is stored in \`.git-impact/history.db\` (gitignored, per-machine).
|
|
25
|
+
`;
|
|
26
|
+
// Shared instruction body used by Copilot, Cursor, Gemini.
|
|
27
|
+
// These editors don't auto-execute MCP tools the way Claude Code does, so
|
|
28
|
+
// the instructions here describe the bash fallback path. If the editor
|
|
29
|
+
// supports MCP, prefer the git-impact MCP server's tools over bash.
|
|
30
|
+
const SHARED_INSTRUCTIONS = `## When to trigger
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| \`since yesterday\`, \`since 3d\`, \`since 2026-05-01\` | **since \\<when\\>** |
|
|
34
|
-
| \`review\`, \`last 30 days\`, \`Q2 review\` | **review** |
|
|
35
|
-
| \`init\`, \`set up context\` | **init** |
|
|
32
|
+
User says any of: "do my standup", "/git-impact", "what did I ship today",
|
|
33
|
+
"translate my commits", "since yesterday", "since 3d", "since last standup",
|
|
34
|
+
"weekly summary", "performance review prep", "generate a review".
|
|
36
35
|
|
|
37
|
-
##
|
|
36
|
+
## Preferred path: MCP
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
git rev-parse --show-toplevel 2>/dev/null
|
|
41
|
-
\`\`\`
|
|
38
|
+
If the \`git-impact\` MCP server is configured for this editor, use its tools:
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
1. \`get_last_standup_date\` — find the lookback start
|
|
41
|
+
2. \`get_git_activity\` (since_iso = day-after last standup, or start-of-today)
|
|
42
|
+
3. \`get_github_activity\` if a github_token exists in context
|
|
43
|
+
4. Translate using the rules below
|
|
44
|
+
5. \`save_impact_entry\` with each item including \`provenance\`
|
|
45
|
+
(\`pr\` | \`commit_body\` | \`commit_message\` | \`ticket\` | \`inferred\`)
|
|
44
46
|
|
|
45
|
-
##
|
|
47
|
+
## Fallback path: bash
|
|
46
48
|
|
|
49
|
+
If MCP isn't available, run:
|
|
47
50
|
\`\`\`bash
|
|
48
|
-
|
|
51
|
+
REPO=$(git rev-parse --show-toplevel)
|
|
52
|
+
cat "$REPO/.git-impact/context.json" # glossary, manager priorities
|
|
53
|
+
git -C "$REPO" log --since="today 00:00:00" --format="%h|%s|%b|%an|%ad" --date=short HEAD
|
|
54
|
+
git -C "$REPO" diff --stat HEAD~5 HEAD
|
|
49
55
|
\`\`\`
|
|
50
56
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
suggest running init.
|
|
54
|
-
|
|
55
|
-
## Mode: today / since \\<when\\>
|
|
56
|
-
|
|
57
|
-
Fetch commits:
|
|
58
|
-
\`\`\`bash
|
|
59
|
-
# today
|
|
60
|
-
git -C "$REPO_ROOT" log \\
|
|
61
|
-
--since="$(date '+%Y-%m-%d') 00:00:00" \\
|
|
62
|
-
--format="%h|%s|%b|%an|%ad" --date=short HEAD
|
|
57
|
+
Then translate, then ask the user to run \`git-impact view\` to see the saved
|
|
58
|
+
HTML report (the bash path can't write to history.db safely from this editor).
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
# since YYYY-MM-DD → --since="YYYY-MM-DD 00:00:00"
|
|
66
|
-
\`\`\`
|
|
60
|
+
## Translation rules
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
1. **What + why**, not what + how. Never restate commit messages.
|
|
63
|
+
2. **Apply the glossary** from context.json — replace technical terms with
|
|
64
|
+
plain-English equivalents.
|
|
65
|
+
3. **Provenance is mandatory** for every saved item:
|
|
66
|
+
- \`pr\` — quoted from the linked PR description
|
|
67
|
+
- \`commit_body\` — pulled from a multi-line commit body
|
|
68
|
+
- \`commit_message\` — visible in the subject line
|
|
69
|
+
- \`ticket\` — pulled from a linked Linear/Jira ticket
|
|
70
|
+
- \`inferred\` — guessed without explicit text. Use this honestly.
|
|
71
|
+
4. **Group related commits** into one bullet.
|
|
72
|
+
5. WIP → \`status: "in_progress"\` with **expected outcome**, not progress so far.
|
|
73
|
+
6. Blocked → \`status: "blocked"\`.
|
|
74
|
+
7. **Be specific with numbers** — pull them from commits/PRs, never invent them.
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
1. Each bullet = what was done + WHY it matters to the business. Never restate the commit message.
|
|
76
|
-
2. Apply glossary — replace every technical term listed in context.json.
|
|
77
|
-
3. If impact can't be inferred → "technical foundation work for [area]". Never hallucinate.
|
|
78
|
-
4. Group related commits — 4 auth commits = 1 bullet.
|
|
79
|
-
5. WIP commits → "⏳ In progress: [what] → [expected outcome]"
|
|
80
|
-
6. Be specific — use numbers from commit messages when they exist.
|
|
76
|
+
## Output
|
|
81
77
|
|
|
82
|
-
**Output:**
|
|
83
78
|
\`\`\`
|
|
84
|
-
📅 [
|
|
85
|
-
|
|
79
|
+
📅 [Date or range]
|
|
86
80
|
✅ [Plain-English summary]
|
|
87
|
-
→ [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
📁 [N] files changed across [areas]
|
|
93
|
-
[N] commit(s) on [branch]
|
|
94
|
-
\`\`\`
|
|
95
|
-
|
|
96
|
-
Save to history after printing. **The items_json shape matters** — the HTML
|
|
97
|
-
report and performance review reader expect this exact structure:
|
|
98
|
-
|
|
99
|
-
\`\`\`json
|
|
100
|
-
[
|
|
101
|
-
{
|
|
102
|
-
"status": "done", // "done" | "in_progress" | "blocked"
|
|
103
|
-
"summary": "Plain-English what", // REQUIRED — the bullet text
|
|
104
|
-
"impact": "Why it matters", // optional — what was unblocked
|
|
105
|
-
"technical_note": "files/PR #refs" // optional — small grey note
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
\`\`\`
|
|
109
|
-
|
|
110
|
-
Use \`summary\` (not \`title\` or \`text\`) and always include \`status\`.
|
|
111
|
-
|
|
112
|
-
\`\`\`bash
|
|
113
|
-
mkdir -p "$REPO_ROOT/.git-impact"
|
|
114
|
-
sqlite3 "$REPO_ROOT/.git-impact/history.db" "
|
|
115
|
-
CREATE TABLE IF NOT EXISTS impact_entries (
|
|
116
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
117
|
-
date TEXT NOT NULL, repo_name TEXT NOT NULL,
|
|
118
|
-
total_commits INTEGER NOT NULL DEFAULT 0,
|
|
119
|
-
total_files INTEGER NOT NULL DEFAULT 0,
|
|
120
|
-
items_json TEXT NOT NULL DEFAULT '[]',
|
|
121
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
122
|
-
);
|
|
123
|
-
INSERT INTO impact_entries (date, repo_name, total_commits, total_files, items_json)
|
|
124
|
-
VALUES ('$(date +%Y-%m-%d)', '$(basename $REPO_ROOT)', $COMMITS, $FILES, '$JSON');
|
|
125
|
-
" 2>/dev/null || true
|
|
126
|
-
\`\`\`
|
|
127
|
-
|
|
128
|
-
## Step 4 — Generate the HTML report (REQUIRED, run this)
|
|
129
|
-
|
|
130
|
-
This step is mandatory, not optional. After saving to history, you **must
|
|
131
|
-
actually execute** the following bash command — do not just describe it.
|
|
132
|
-
Without this step, the file:// link you print will 404.
|
|
133
|
-
|
|
134
|
-
\`\`\`bash
|
|
135
|
-
cd "$REPO_ROOT" && npx --yes git-impact@latest view --no-open --date "$(date +%Y-%m-%d)"
|
|
136
|
-
\`\`\`
|
|
137
|
-
|
|
138
|
-
This uses npx, so the user does **not** need to have \`git-impact\` installed
|
|
139
|
-
locally. If the command errors, surface the error to the user — don't swallow
|
|
140
|
-
it. If it succeeds, \`.git-impact/result.html\` will exist.
|
|
141
|
-
|
|
142
|
-
Then, and only then, print the link as the very last line of your response:
|
|
143
|
-
|
|
144
|
-
\`\`\`
|
|
145
|
-
🔗 file://$REPO_ROOT/.git-impact/result.html?date=$(date +%Y-%m-%d)
|
|
146
|
-
\`\`\`
|
|
147
|
-
|
|
148
|
-
If the npx command failed, instead print:
|
|
149
|
-
\`\`\`
|
|
150
|
-
⚠️ HTML report could not be generated: <paste the error message>
|
|
151
|
-
Run \`npx git-impact@latest view\` from the repo to retry.
|
|
152
|
-
\`\`\`
|
|
153
|
-
|
|
154
|
-
## Mode: review
|
|
155
|
-
|
|
156
|
-
Query history and synthesise a performance review:
|
|
157
|
-
\`\`\`bash
|
|
158
|
-
sqlite3 "$REPO_ROOT/.git-impact/history.db" \\
|
|
159
|
-
"SELECT date, repo_name, total_commits, items_json
|
|
160
|
-
FROM impact_entries WHERE date >= '$FROM' AND date <= '$TO'
|
|
161
|
-
ORDER BY date ASC;" 2>/dev/null
|
|
162
|
-
\`\`\`
|
|
163
|
-
|
|
164
|
-
If no history: *"No saved history yet. Run the standup daily for a few weeks first."*
|
|
165
|
-
|
|
166
|
-
Format:
|
|
167
|
-
\`\`\`
|
|
168
|
-
Performance Review — [Period]
|
|
169
|
-
[Headline sentence — biggest contribution]
|
|
170
|
-
|
|
171
|
-
🚀 [High-impact theme]
|
|
172
|
-
• Specific achievement with numbers...
|
|
173
|
-
|
|
174
|
-
✅ [Medium theme] ...
|
|
175
|
-
🔧 [Lower theme] ...
|
|
176
|
-
|
|
177
|
-
📊 [N] commits across [N] working days
|
|
81
|
+
→ [Why it matters]
|
|
82
|
+
⏳ In progress: [What] → [Expected outcome]
|
|
83
|
+
🚫 Blocked: [What] → [What's needed]
|
|
84
|
+
📁 [N] files across [areas] · [N] commit(s) on [branch]
|
|
178
85
|
\`\`\`
|
|
179
86
|
|
|
180
|
-
## Mode: init
|
|
181
|
-
|
|
182
|
-
Ask one at a time:
|
|
183
|
-
1. "What does your company/product do? (1–2 sentences)"
|
|
184
|
-
2. "What does your manager care most about?"
|
|
185
|
-
3. "Technical terms to translate? e.g. RLS=data security (blank to skip)"
|
|
186
|
-
|
|
187
|
-
Write \`.git-impact/context.json\` and confirm:
|
|
188
|
-
*"Saved. Commit context.json to share the glossary with your team."*
|
|
189
|
-
|
|
190
87
|
## Tone
|
|
191
88
|
|
|
192
|
-
Non-technical
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
exports.CLAUDE_MD_BLOCK = `
|
|
197
|
-
## git-impact
|
|
198
|
-
|
|
199
|
-
This repo uses [git-impact](https://github.com/you/git-impact) for standup and
|
|
200
|
-
performance review generation.
|
|
201
|
-
|
|
202
|
-
- Say **"do my standup"** to translate today's commits into business impact
|
|
203
|
-
- Say **"git-impact since 3d"** to look back further
|
|
204
|
-
- Say **"generate a performance review"** after a few weeks of standups
|
|
205
|
-
- Say **"set up context for this repo"** to configure the glossary
|
|
206
|
-
|
|
207
|
-
Context is stored in \`.git-impact/context.json\` (committed, team-shared).
|
|
208
|
-
History is stored in \`.git-impact/history.db\` (gitignored, per-machine).
|
|
89
|
+
Non-technical-manager audience. Short sentences. No filler. 2 accurate bullets
|
|
90
|
+
beat 5 vague ones. If you guessed the impact, label \`provenance: inferred\`
|
|
91
|
+
and use phrasing like "technical foundation work for X" — never hedge with
|
|
92
|
+
"might potentially".
|
|
209
93
|
`;
|
|
210
94
|
// ─── GitHub Copilot instructions ──────────────────────────────────────────────
|
|
211
95
|
exports.COPILOT_INSTRUCTIONS = `# git-impact
|
|
212
96
|
|
|
213
|
-
Translate git commits into plain-English
|
|
214
|
-
|
|
215
|
-
"generate a performance review".
|
|
216
|
-
|
|
217
|
-
## How to translate commits
|
|
218
|
-
|
|
219
|
-
1. Run \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\` to get commits
|
|
220
|
-
2. Read \`.git-impact/context.json\` for glossary and company context
|
|
221
|
-
3. Translate into 2–5 bullets following these rules:
|
|
222
|
-
- What was done + WHY it matters (never restate commit messages)
|
|
223
|
-
- Apply glossary terms from context.json
|
|
224
|
-
- Group related commits into one bullet
|
|
225
|
-
- WIP commits → "⏳ In progress: [what] → [expected outcome]"
|
|
226
|
-
- If impact can't be inferred → "technical foundation work for [area]"
|
|
227
|
-
|
|
228
|
-
## Output format
|
|
229
|
-
|
|
230
|
-
\`\`\`
|
|
231
|
-
📅 [Date]
|
|
232
|
-
✅ [Summary] → [Business impact]
|
|
233
|
-
⏳ In progress: [What] → [Expected outcome]
|
|
234
|
-
📁 [N] files changed across [areas]
|
|
235
|
-
\`\`\`
|
|
97
|
+
Translate git commits into plain-English business impact for standups,
|
|
98
|
+
manager updates, and performance review prep.
|
|
236
99
|
|
|
237
|
-
|
|
238
|
-
`;
|
|
100
|
+
${SHARED_INSTRUCTIONS}`;
|
|
239
101
|
// ─── Cursor rules ─────────────────────────────────────────────────────────────
|
|
240
102
|
exports.CURSOR_RULES = `---
|
|
241
|
-
description: git-impact
|
|
103
|
+
description: git-impact — turn git commits into plain-English standup bullets
|
|
242
104
|
globs: []
|
|
243
105
|
alwaysApply: false
|
|
244
106
|
---
|
|
245
107
|
|
|
246
108
|
# git-impact
|
|
247
109
|
|
|
248
|
-
|
|
249
|
-
or "generate a performance review":
|
|
250
|
-
|
|
251
|
-
1. Find repo root: \`git rev-parse --show-toplevel\`
|
|
252
|
-
2. Load context: \`cat .git-impact/context.json\`
|
|
253
|
-
3. Fetch commits: \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\`
|
|
254
|
-
4. Translate into 2–5 plain-English bullets:
|
|
255
|
-
- Apply glossary from context.json
|
|
256
|
-
- Each bullet = what + why it matters (never restate commit messages)
|
|
257
|
-
- Group related commits, flag WIP with ⏳
|
|
258
|
-
5. Format: ✅ [summary] → [business impact]
|
|
259
|
-
6. Save to \`.git-impact/history.db\` via sqlite3
|
|
260
|
-
|
|
261
|
-
For reviews: query history.db and group by theme (Features, Security, Reliability, etc.)
|
|
262
|
-
`;
|
|
110
|
+
${SHARED_INSTRUCTIONS}`;
|
|
263
111
|
// ─── Gemini CLI commands ──────────────────────────────────────────────────────
|
|
264
112
|
exports.GEMINI_COMMAND = `# git-impact
|
|
265
113
|
|
|
266
|
-
Translate git commits into plain-English
|
|
267
|
-
|
|
268
|
-
## When to use
|
|
269
|
-
|
|
270
|
-
User says: "do my standup", "translate my commits", "what did I ship today/this week",
|
|
271
|
-
"generate a performance review", or "git-impact".
|
|
114
|
+
Translate git commits into plain-English business impact.
|
|
272
115
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
1. \`git rev-parse --show-toplevel\` → get repo root
|
|
276
|
-
2. \`cat .git-impact/context.json\` → load glossary and company context
|
|
277
|
-
3. \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\` → get commits
|
|
278
|
-
4. Translate into 2–5 bullets:
|
|
279
|
-
- Apply glossary (replace technical terms with plain-English equivalents)
|
|
280
|
-
- What was done + why it matters to the business
|
|
281
|
-
- Group related commits
|
|
282
|
-
- WIP commits: ⏳ In progress: [what] → [expected outcome]
|
|
283
|
-
5. End with: 📁 [N] files changed across [areas]
|
|
284
|
-
6. Save to .git-impact/history.db
|
|
285
|
-
|
|
286
|
-
## Context file format (.git-impact/context.json)
|
|
287
|
-
|
|
288
|
-
\`\`\`json
|
|
289
|
-
{
|
|
290
|
-
"companyDescription": "...",
|
|
291
|
-
"managerPriorities": "...",
|
|
292
|
-
"glossary": { "TERM": "plain English meaning" }
|
|
293
|
-
}
|
|
294
|
-
\`\`\`
|
|
295
|
-
`;
|
|
116
|
+
${SHARED_INSTRUCTIONS}`;
|
|
296
117
|
// ─── context.json template ────────────────────────────────────────────────────
|
|
297
118
|
const CONTEXT_TEMPLATE = (companyDescription, managerPriorities, glossary) => JSON.stringify({ companyDescription, managerPriorities, glossary }, null, 2) + "\n";
|
|
298
119
|
exports.CONTEXT_TEMPLATE = CONTEXT_TEMPLATE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iFAAiF;AAEpE,QAAA,eAAe,GAAG;;;;;;;;;;;;;CAa9B,CAAC;AAEF,2DAA2D;AAC3D,0EAA0E;AAC1E,uEAAuE;AACvE,oEAAoE;AACpE,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D3B,CAAC;AAEF,iFAAiF;AAEpE,QAAA,oBAAoB,GAAG;;;;;EAKlC,mBAAmB,EAAE,CAAC;AAExB,iFAAiF;AAEpE,QAAA,YAAY,GAAG;;;;;;;;EAQ1B,mBAAmB,EAAE,CAAC;AAExB,iFAAiF;AAEpE,QAAA,cAAc,GAAG;;;;EAI5B,mBAAmB,EAAE,CAAC;AAExB,iFAAiF;AAE1E,MAAM,gBAAgB,GAAG,CAC9B,kBAA0B,EAC1B,iBAAyB,EACzB,QAAgC,EACxB,EAAE,CACV,IAAI,CAAC,SAAS,CACZ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EACnD,IAAI,EACJ,CAAC,CACF,GAAG,IAAI,CAAC;AATE,QAAA,gBAAgB,oBASlB"}
|
package/dist/mcp/resources.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/mcp/resources.ts"],"names":[],"mappings":";;;A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,IAAI,EAAE,QAAQ;oBACd,aAAa,EAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC/B,WAAW,EAAK,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI;oBAChD,aAAa,EAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;iBAChE,CAAC;QACR,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IAEjE,OAAO;QACL,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KACvG,CAAC;AACJ,CAAC"}
|
package/dist/mcp/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAiB1D,eAAO,MAAM,gBAAgB,EAAE,IAAI,EAiJlC,CAAC;AAIF,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,UAAU,CAAC,CAUrB"}
|