crewcode-plugin-cli 0.1.0

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.
Files changed (75) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +39 -0
  3. package/bin/crewcode.mjs +388 -0
  4. package/package.json +40 -0
  5. package/templates/plugins/README.md +25 -0
  6. package/templates/plugins/browser-docs-grabber/crewcode-plugin-api.js +80 -0
  7. package/templates/plugins/browser-docs-grabber/crewcode.plugin.json +13 -0
  8. package/templates/plugins/browser-docs-grabber/panel.html +1 -0
  9. package/templates/plugins/browser-docs-grabber/plugin.js +1 -0
  10. package/templates/plugins/codebase-graph-lite/crewcode-plugin-api.js +80 -0
  11. package/templates/plugins/codebase-graph-lite/crewcode.plugin.json +57 -0
  12. package/templates/plugins/codebase-graph-lite/panel.html +53 -0
  13. package/templates/plugins/codebase-graph-lite/plugin.js +49 -0
  14. package/templates/plugins/company-agent-http-adapter/crewcode-plugin-api.js +80 -0
  15. package/templates/plugins/company-agent-http-adapter/crewcode.plugin.json +24 -0
  16. package/templates/plugins/company-agent-http-adapter/panel.html +1 -0
  17. package/templates/plugins/company-agent-http-adapter/plugin.js +1 -0
  18. package/templates/plugins/company-agent-http-adapter/server.mjs +27 -0
  19. package/templates/plugins/git-risk-lens/crewcode-plugin-api.js +80 -0
  20. package/templates/plugins/git-risk-lens/crewcode.plugin.json +13 -0
  21. package/templates/plugins/git-risk-lens/panel.html +1 -0
  22. package/templates/plugins/git-risk-lens/plugin.js +2 -0
  23. package/templates/plugins/github-copilot-cli-provider/crewcode-plugin-api.js +80 -0
  24. package/templates/plugins/github-copilot-cli-provider/crewcode.plugin.json +42 -0
  25. package/templates/plugins/github-copilot-cli-provider/panel.html +1 -0
  26. package/templates/plugins/github-copilot-cli-provider/plugin.js +1 -0
  27. package/templates/plugins/handoff-pack/crewcode-plugin-api.js +80 -0
  28. package/templates/plugins/handoff-pack/crewcode.plugin.json +72 -0
  29. package/templates/plugins/handoff-pack/panel.html +63 -0
  30. package/templates/plugins/handoff-pack/plugin.js +156 -0
  31. package/templates/plugins/mcp-server-template/README.md +22 -0
  32. package/templates/plugins/mcp-server-template/crewcode-plugin-api.js +80 -0
  33. package/templates/plugins/mcp-server-template/crewcode.plugin.json +30 -0
  34. package/templates/plugins/mcp-server-template/panel.html +25 -0
  35. package/templates/plugins/mcp-server-template/plugin.js +9 -0
  36. package/templates/plugins/mcp-server-template/server.mjs +30 -0
  37. package/templates/plugins/mission-ci-widget/crewcode-plugin-api.js +80 -0
  38. package/templates/plugins/mission-ci-widget/crewcode.plugin.json +13 -0
  39. package/templates/plugins/mission-ci-widget/panel.html +1 -0
  40. package/templates/plugins/mission-ci-widget/plugin.js +1 -0
  41. package/templates/plugins/mock-agent-provider/crewcode-plugin-api.js +80 -0
  42. package/templates/plugins/mock-agent-provider/crewcode.plugin.json +38 -0
  43. package/templates/plugins/mock-agent-provider/panel.html +45 -0
  44. package/templates/plugins/mock-agent-provider/plugin.js +3 -0
  45. package/templates/plugins/openai-compatible-provider/README.md +17 -0
  46. package/templates/plugins/openai-compatible-provider/crewcode-plugin-api.js +80 -0
  47. package/templates/plugins/openai-compatible-provider/crewcode.plugin.json +28 -0
  48. package/templates/plugins/openai-compatible-provider/panel.html +1 -0
  49. package/templates/plugins/openai-compatible-provider/plugin.js +4 -0
  50. package/templates/plugins/openai-compatible-provider/server.mjs +21 -0
  51. package/templates/plugins/repo-radar/crewcode-plugin-api.js +80 -0
  52. package/templates/plugins/repo-radar/crewcode.plugin.json +55 -0
  53. package/templates/plugins/repo-radar/panel.html +56 -0
  54. package/templates/plugins/repo-radar/plugin.js +103 -0
  55. package/templates/plugins/static-panel-template/README.md +19 -0
  56. package/templates/plugins/static-panel-template/crewcode-plugin-api.js +80 -0
  57. package/templates/plugins/static-panel-template/crewcode.plugin.json +44 -0
  58. package/templates/plugins/static-panel-template/panel.html +36 -0
  59. package/templates/plugins/static-panel-template/plugin.js +30 -0
  60. package/templates/plugins/terminal-watchdog-lite/crewcode-plugin-api.js +80 -0
  61. package/templates/plugins/terminal-watchdog-lite/crewcode.plugin.json +13 -0
  62. package/templates/plugins/terminal-watchdog-lite/panel.html +1 -0
  63. package/templates/plugins/terminal-watchdog-lite/plugin.js +1 -0
  64. package/templates/plugins/typescript-panel-template/README.md +40 -0
  65. package/templates/plugins/typescript-panel-template/compiled/assets/panel-ECHDDxZz.js +8 -0
  66. package/templates/plugins/typescript-panel-template/compiled/assets/panel-u6HzQzUF.css +1 -0
  67. package/templates/plugins/typescript-panel-template/compiled/src/panel.html +13 -0
  68. package/templates/plugins/typescript-panel-template/crewcode.plugin.json +23 -0
  69. package/templates/plugins/typescript-panel-template/package.json +19 -0
  70. package/templates/plugins/typescript-panel-template/src/crewcode-api.ts +146 -0
  71. package/templates/plugins/typescript-panel-template/src/main.tsx +38 -0
  72. package/templates/plugins/typescript-panel-template/src/panel.html +12 -0
  73. package/templates/plugins/typescript-panel-template/src/style.css +17 -0
  74. package/templates/plugins/typescript-panel-template/tsconfig.json +20 -0
  75. package/templates/plugins/typescript-panel-template/vite.config.ts +14 -0
@@ -0,0 +1,38 @@
1
+ import React, { useEffect, useState } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import { crewcode, type CrewCodeContext } from './crewcode-api'
4
+ import './style.css'
5
+
6
+ function App() {
7
+ const [ctx, setCtx] = useState<CrewCodeContext | null>(null)
8
+ const [files, setFiles] = useState<string[]>([])
9
+ const [status, setStatus] = useState('waiting for CrewCode context…')
10
+
11
+ useEffect(() => crewcode.onContext(next => {
12
+ setCtx(next)
13
+ setStatus(next.workspace ? `connected to ${next.workspace.name}` : 'no workspace')
14
+ crewcode.workspace.listFiles()
15
+ .then(result => setFiles(result.files.slice(0, 50)))
16
+ .catch(err => setStatus(err.message))
17
+ }), [])
18
+
19
+ return (
20
+ <main>
21
+ <header>
22
+ <div>
23
+ <h1>TypeScript CrewCode Plugin</h1>
24
+ <p>{status}</p>
25
+ </div>
26
+ <code>{ctx?.permissions.join(', ') || 'no permissions'}</code>
27
+ </header>
28
+ <section>
29
+ <h2>first 50 workspace files</h2>
30
+ <ul>
31
+ {files.map(file => <li key={file}>{file}</li>)}
32
+ </ul>
33
+ </section>
34
+ </main>
35
+ )
36
+ }
37
+
38
+ createRoot(document.getElementById('root')!).render(<App />)
@@ -0,0 +1,12 @@
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>TypeScript CrewCode Plugin</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="./main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,17 @@
1
+ :root {
2
+ color-scheme: dark;
3
+ font-family: Inter, system-ui, sans-serif;
4
+ background: #0f120f;
5
+ color: #fafafa;
6
+ }
7
+
8
+ body { margin: 0; background: #0f120f; }
9
+ main { padding: 22px; display: grid; gap: 16px; }
10
+ header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #1c2f2f; padding-bottom: 12px; }
11
+ h1 { margin: 0; font-size: 18px; }
12
+ p, code { color: #8a948a; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }
13
+ section { border: 1px solid #1c2f2f; border-radius: 10px; background: #111611; overflow: hidden; }
14
+ h2 { margin: 0; padding: 10px 12px; font-size: 12px; border-bottom: 1px solid #1c2f2f; color: #8a948a; text-transform: uppercase; letter-spacing: .12em; }
15
+ ul { list-style: none; padding: 6px; margin: 0; }
16
+ li { padding: 6px 8px; border-radius: 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: #d7ddd7; }
17
+ li:hover { background: #1e3a30; }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
6
+ "allowJs": false,
7
+ "skipLibCheck": true,
8
+ "esModuleInterop": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "strict": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "module": "ESNext",
13
+ "moduleResolution": "Bundler",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": true,
17
+ "jsx": "react-jsx"
18
+ },
19
+ "include": ["src"]
20
+ }
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ base: './',
7
+ build: {
8
+ outDir: 'compiled',
9
+ emptyOutDir: true,
10
+ rollupOptions: {
11
+ input: { panel: 'src/panel.html' },
12
+ },
13
+ },
14
+ })