gm-copilot-cli 2.0.165 → 2.0.167
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/copilot-profile.md +1 -1
- package/hooks/pre-tool-use-hook.js +13 -0
- package/hooks/session-end-hook.js +8 -4
- package/index.html +47 -0
- package/manifest.yml +1 -1
- package/package.json +2 -1
- package/tools.json +1 -1
package/copilot-profile.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
5
6
|
const { execSync, spawnSync } = require('child_process');
|
|
6
7
|
|
|
7
8
|
const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
|
|
@@ -100,6 +101,18 @@ const run = () => {
|
|
|
100
101
|
if (cwd) args.push(`--cwd=${cwd}`);
|
|
101
102
|
args.push(code);
|
|
102
103
|
} else {
|
|
104
|
+
const isMultiLine = code.includes('\n');
|
|
105
|
+
if (isMultiLine) {
|
|
106
|
+
const extMap = { nodejs: 'mjs', typescript: 'ts', python: 'py', go: 'go', rust: 'rs', deno: 'ts' };
|
|
107
|
+
const ext = extMap[lang] || 'mjs';
|
|
108
|
+
const tmpFile = path.join(os.tmpdir(), `gm-exec-${Date.now()}.${ext}`);
|
|
109
|
+
fs.writeFileSync(tmpFile, code, 'utf-8');
|
|
110
|
+
args = ['x', 'gm-exec', 'exec', `--lang=${lang}`, `--file=${tmpFile}`];
|
|
111
|
+
if (cwd) args.push(`--cwd=${cwd}`);
|
|
112
|
+
const result = runExec(args);
|
|
113
|
+
try { fs.unlinkSync(tmpFile); } catch (e) {}
|
|
114
|
+
return { block: true, reason: result || '(no output)' };
|
|
115
|
+
}
|
|
103
116
|
args = ['x', 'gm-exec', 'exec', `--lang=${lang}`];
|
|
104
117
|
if (cwd) args.push(`--cwd=${cwd}`);
|
|
105
118
|
args.push(code);
|
|
@@ -22,10 +22,14 @@ const run = () => {
|
|
|
22
22
|
if (fs.existsSync(prdFile)) {
|
|
23
23
|
const prdContent = fs.readFileSync(prdFile, 'utf-8').trim();
|
|
24
24
|
if (prdContent.length > 0) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
let items;
|
|
26
|
+
try { items = JSON.parse(prdContent); } catch { items = null; }
|
|
27
|
+
if (!Array.isArray(items) || items.length > 0) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
reason: `Work items remain in ${prdFile}. Remove completed items as they finish. Current items:\n\n${prdContent}`
|
|
31
|
+
};
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
return { ok: true };
|
package/index.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Copilot CLI - gm plugin</title>
|
|
7
|
+
<link rel="stylesheet" href="https://unpkg.com/rippleui@1.12.1/dist/css/styles.css">
|
|
8
|
+
<script type="importmap">{"imports":{"webjsx":"https://cdn.jsdelivr.net/npm/webjsx@0.0.42/dist/index.js"}}</script>
|
|
9
|
+
<style>
|
|
10
|
+
body{background:#0f172a;color:#e2e8f0;font-family:system-ui,sans-serif;margin:0}
|
|
11
|
+
.gradient-hero{background:linear-gradient(135deg,#0f172a 0%,#1e1b4b 50%,#0f172a 100%)}
|
|
12
|
+
.card-hover{transition:transform .2s,box-shadow .2s}
|
|
13
|
+
.card-hover:hover{transform:translateY(-2px);box-shadow:0 8px 30px rgba(0,0,0,.3)}
|
|
14
|
+
pre{scrollbar-width:thin;background:#020617;border:1px solid #1e293b;border-radius:8px;padding:12px 16px;color:#4ade80;overflow-x:auto;font-size:.875rem}
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<script type="module">
|
|
19
|
+
import { createElement as h, applyDiff, Fragment } from "webjsx";
|
|
20
|
+
const PLATFORM_NAME="Copilot CLI",PLATFORM_TYPE="CLI Tool",PLATFORM_TYPE_COLOR="#3b82f6";
|
|
21
|
+
const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.167";
|
|
22
|
+
const GITHUB_URL="https://github.com/AnEntrypoint/gm-copilot-cli",BADGE_LABEL="copilot-cli";
|
|
23
|
+
const FEATURES=[{"title":"State Machine","desc":"Immutable PLAN→EXECUTE→EMIT→VERIFY→COMPLETE phases with full mutable tracking"},{"title":"Semantic Search","desc":"Natural language codebase exploration via codesearch skill — no grep needed"},{"title":"Hooks","desc":"Pre-tool, session-start, prompt-submit, and stop hooks for full lifecycle control"},{"title":"Agents","desc":"gm, codesearch, and websearch agents pre-configured and ready to use"},{"title":"MCP Integration","desc":"Model Context Protocol server support built in"},{"title":"Auto-Recovery","desc":"Supervisor hierarchy ensures the system never crashes"}],INSTALL_STEPS=[{"desc":"Install via GitHub CLI","cmd":"gh extension install AnEntrypoint/gm-copilot-cli"},{"desc":"Restart your terminal — activates automatically"}];
|
|
24
|
+
const CURRENT_PLATFORM="gm-copilot-cli";
|
|
25
|
+
const ALL_PLATFORMS=[
|
|
26
|
+
{id:'gm-cc',label:'Claude Code',type:'cli'},{id:'gm-gc',label:'Gemini CLI',type:'cli'},
|
|
27
|
+
{id:'gm-oc',label:'OpenCode',type:'cli'},{id:'gm-kilo',label:'Kilo Code',type:'cli'},
|
|
28
|
+
{id:'gm-codex',label:'Codex',type:'cli'},{id:'gm-copilot-cli',label:'Copilot CLI',type:'cli'},
|
|
29
|
+
{id:'gm-vscode',label:'VS Code',type:'ide'},{id:'gm-cursor',label:'Cursor',type:'ide'},
|
|
30
|
+
{id:'gm-zed',label:'Zed',type:'ide'},{id:'gm-jetbrains',label:'JetBrains',type:'ide'},
|
|
31
|
+
];
|
|
32
|
+
const GH_ICON='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z';
|
|
33
|
+
function NavBar(){return h('nav',{class:'border-b border-gray-800 bg-gray-950/80 backdrop-blur sticky top-0 z-10'},h('div',{class:'max-w-5xl mx-auto px-4 py-3 flex items-center justify-between'},h('div',{class:'flex items-center gap-3'},h('a',{href:'https://anentrypoint.github.io/plugforge',class:'text-white font-bold text-lg hover:text-indigo-400 transition-colors'},'gm'),h('span',{class:'text-gray-500'},'/'),h('span',{class:'text-gray-300 font-medium'},BADGE_LABEL)),h('a',{href:GITHUB_URL,target:'_blank',rel:'noopener',class:'flex items-center gap-2 text-gray-400 hover:text-white transition-colors text-sm'},h('svg',{viewBox:'0 0 16 16',class:'w-5 h-5 fill-current','aria-hidden':'true'},h('path',{d:GH_ICON})),'GitHub')));}
|
|
34
|
+
function Badge({label,color}){return h('span',{class:'inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold text-white',style:`background-color:${color}`},label);}
|
|
35
|
+
function Hero(){return h('section',{class:'gradient-hero py-20 px-4'},h('div',{class:'max-w-5xl mx-auto text-center'},h('div',{class:'flex justify-center gap-2 mb-6'},h(Badge,{label:PLATFORM_TYPE,color:PLATFORM_TYPE_COLOR}),h(Badge,{label:'v'+VERSION,color:'#374151'})),h('h1',{class:'text-4xl md:text-5xl font-bold text-white mb-4'},PLATFORM_NAME),h('p',{class:'text-lg text-gray-300 max-w-2xl mx-auto mb-8'},DESCRIPTION),h('a',{href:GITHUB_URL,target:'_blank',rel:'noopener',class:'inline-flex items-center gap-2 bg-indigo-600 hover:bg-indigo-500 text-white font-semibold px-6 py-3 rounded-lg transition-colors'},'View on GitHub')));}
|
|
36
|
+
function FeatureCard({title,desc}){return h('div',{class:'card-hover bg-gray-900 border border-gray-800 rounded-xl p-5'},h('h3',{class:'font-semibold text-white mb-2'},title),h('p',{class:'text-gray-400 text-sm leading-relaxed'},desc));}
|
|
37
|
+
function FeaturesSection(){return h('section',{class:'py-16 px-4'},h('div',{class:'max-w-5xl mx-auto'},h('h2',{class:'text-2xl font-bold text-white mb-8 text-center'},'Features'),h('div',{class:'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'},...FEATURES.map(f=>h(FeatureCard,{title:f.title,desc:f.desc})))));}
|
|
38
|
+
function InstallStep({step,index}){return h('div',{class:'flex gap-4 items-start'},h('div',{class:'flex-shrink-0 w-7 h-7 rounded-full bg-indigo-600 flex items-center justify-center text-xs font-bold text-white'},String(index+1)),h('div',{class:'flex-1'},h('p',{class:'text-gray-300 text-sm mb-1'},step.desc),step.cmd?h('pre',{class:'bg-gray-950 border border-gray-700 rounded-lg px-4 py-2 text-sm text-green-400 overflow-x-auto mt-1'},step.cmd):null));}
|
|
39
|
+
function InstallSection(){if(!INSTALL_STEPS.length)return null;return h('section',{class:'py-16 px-4 bg-gray-900/50'},h('div',{class:'max-w-2xl mx-auto'},h('h2',{class:'text-2xl font-bold text-white mb-8 text-center'},'Installation'),h('div',{class:'space-y-6'},...INSTALL_STEPS.map((step,i)=>h(InstallStep,{step,index:i})))));}
|
|
40
|
+
function PlatformLink({p}){const isCurrent=p.id===CURRENT_PLATFORM;return h('a',{href:isCurrent?'#':`https://anentrypoint.github.io/${p.id}`,class:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${isCurrent?'bg-indigo-600 text-white cursor-default':'bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-white'}`},p.label);}
|
|
41
|
+
function AlsoAvailableSection(){const cli=ALL_PLATFORMS.filter(p=>p.type==='cli'),ide=ALL_PLATFORMS.filter(p=>p.type==='ide');return h('section',{class:'py-16 px-4 bg-gray-900/30'},h('div',{class:'max-w-5xl mx-auto'},h('h2',{class:'text-2xl font-bold text-white mb-8 text-center'},'Also Available For'),h('div',{class:'space-y-6'},h('div',null,h('p',{class:'text-xs font-semibold text-blue-400 uppercase tracking-wider mb-3'},'CLI Tools'),h('div',{class:'flex flex-wrap gap-2'},...cli.map(p=>h(PlatformLink,{p,key:p.id})))),h('div',null,h('p',{class:'text-xs font-semibold text-purple-400 uppercase tracking-wider mb-3'},'IDE Extensions'),h('div',{class:'flex flex-wrap gap-2'},...ide.map(p=>h(PlatformLink,{p,key:p.id}))))),h('div',{class:'mt-8 text-center'},h('a',{href:'https://anentrypoint.github.io/plugforge',class:'text-sm text-gray-400 hover:text-indigo-300 transition-colors'},'← Back to plugforge hub'))));}
|
|
42
|
+
function Footer(){return h('footer',{class:'border-t border-gray-800 py-8 px-4 text-center text-gray-500 text-sm'},h('p',null,'Generated by ',h('a',{href:'https://github.com/AnEntrypoint/plugforge',class:'text-indigo-400 hover:text-indigo-300'},'plugforge'),' — convention-driven multi-platform plugin generator'));}
|
|
43
|
+
function App(){return h(Fragment,null,h(NavBar,null),h(Hero,null),h(FeaturesSection,null),h(InstallSection,null),h(AlsoAvailableSection,null),h(Footer,null));}
|
|
44
|
+
applyDiff(document.body,[h(App,null)]);
|
|
45
|
+
</script>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
package/manifest.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-copilot-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.167",
|
|
4
4
|
"description": "State machine agent with hooks, skills, and automated git enforcement",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"manifest.yml",
|
|
35
35
|
".mcp.json",
|
|
36
36
|
"README.md",
|
|
37
|
+
"index.html",
|
|
37
38
|
"COPILOT.md"
|
|
38
39
|
]
|
|
39
40
|
}
|