@dirgha/code 1.7.14 → 1.8.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 (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist_v2/cli/main.js +1 -0
  3. package/dist_v2/cli/main.js.map +1 -1
  4. package/dist_v2/cli/slash/index.js +2 -0
  5. package/dist_v2/cli/slash/index.js.map +1 -1
  6. package/dist_v2/cli/slash/paste.d.ts +20 -0
  7. package/dist_v2/cli/slash/paste.js +124 -0
  8. package/dist_v2/cli/slash/paste.js.map +1 -0
  9. package/dist_v2/cli/subcommands/index.js +2 -0
  10. package/dist_v2/cli/subcommands/index.js.map +1 -1
  11. package/dist_v2/cli/subcommands/scaffold.d.ts +26 -0
  12. package/dist_v2/cli/subcommands/scaffold.js +242 -0
  13. package/dist_v2/cli/subcommands/scaffold.js.map +1 -0
  14. package/dist_v2/cli/subcommands/skills.js +21 -8
  15. package/dist_v2/cli/subcommands/skills.js.map +1 -1
  16. package/dist_v2/cli/subcommands/update.js +7 -1
  17. package/dist_v2/cli/subcommands/update.js.map +1 -1
  18. package/dist_v2/extensions/api.js +5 -1
  19. package/dist_v2/extensions/api.js.map +1 -1
  20. package/dist_v2/skills/install-npm.js +10 -1
  21. package/dist_v2/skills/install-npm.js.map +1 -1
  22. package/dist_v2/tools/shell.js +6 -1
  23. package/dist_v2/tools/shell.js.map +1 -1
  24. package/dist_v2/tui/ink/App.js +30 -2
  25. package/dist_v2/tui/ink/App.js.map +1 -1
  26. package/dist_v2/tui/ink/components/InputBox.js +14 -2
  27. package/dist_v2/tui/ink/components/InputBox.js.map +1 -1
  28. package/dist_v2/tui/ink/components/PromptQueueIndicator.d.ts +17 -0
  29. package/dist_v2/tui/ink/components/PromptQueueIndicator.js +18 -0
  30. package/dist_v2/tui/ink/components/PromptQueueIndicator.js.map +1 -0
  31. package/package.json +2 -1
  32. package/scaffold-templates/hono-api/package.json +20 -0
  33. package/scaffold-templates/hono-api/src/index.ts +16 -0
  34. package/scaffold-templates/hono-api/tsconfig.json +13 -0
  35. package/scaffold-templates/vite-react/index.html +12 -0
  36. package/scaffold-templates/vite-react/package.json +22 -0
  37. package/scaffold-templates/vite-react/src/App.tsx +24 -0
  38. package/scaffold-templates/vite-react/src/main.tsx +9 -0
  39. package/scaffold-templates/vite-react/tsconfig.json +17 -0
  40. package/scaffold-templates/vite-react/vite.config.ts +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dirgha/code",
3
- "version": "1.7.14",
3
+ "version": "1.8.0",
4
4
  "description": "CLI coding agent for complex agentic workflows and long-horizon development. Local models (llama.cpp / Ollama), BYOK across 17 providers, parallel agents, persistent memory, scanned skills.",
5
5
  "type": "module",
6
6
  "main": "./dist_v2/index.js",
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "dist_v2/",
13
+ "scaffold-templates/",
13
14
  "README.md",
14
15
  "LICENSE",
15
16
  "CREDITS.md",
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "scaffolded-hono-api",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "tsx watch src/index.ts",
8
+ "start": "tsx src/index.ts",
9
+ "build": "tsc"
10
+ },
11
+ "dependencies": {
12
+ "@hono/node-server": "^1.13.0",
13
+ "hono": "^4.6.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/node": "^22.0.0",
17
+ "tsx": "^4.20.0",
18
+ "typescript": "^5.7.0"
19
+ }
20
+ }
@@ -0,0 +1,16 @@
1
+ import { serve } from '@hono/node-server';
2
+ import { Hono } from 'hono';
3
+
4
+ const app = new Hono();
5
+
6
+ app.get('/', c => c.json({ ok: true, msg: 'Scaffolded by dirgha. Edit src/index.ts.' }));
7
+
8
+ app.get('/health', c => c.json({ status: 'ok', uptime: process.uptime() }));
9
+
10
+ // Iterate via: dirgha ask "add a /todos endpoint with in-memory CRUD"
11
+ app.get('/echo/:msg', c => c.json({ echo: c.req.param('msg') }));
12
+
13
+ const port = Number(process.env.PORT) || 3001;
14
+ serve({ fetch: app.fetch, port }, info => {
15
+ console.log(`Hono API listening on http://localhost:${info.port}`);
16
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "resolveJsonModule": true,
9
+ "skipLibCheck": true,
10
+ "outDir": "dist"
11
+ },
12
+ "include": ["src"]
13
+ }
@@ -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>Scaffolded with Dirgha</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "scaffolded-vite-react",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^19.0.0",
13
+ "react-dom": "^19.0.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/react": "^19.0.0",
17
+ "@types/react-dom": "^19.0.0",
18
+ "@vitejs/plugin-react": "^5.0.0",
19
+ "typescript": "^5.7.0",
20
+ "vite": "^7.0.0"
21
+ }
22
+ }
@@ -0,0 +1,24 @@
1
+ import { useState } from 'react';
2
+
3
+ export default function App() {
4
+ const [count, setCount] = useState(0);
5
+ return (
6
+ <div style={{ fontFamily: 'system-ui, sans-serif', padding: 32, maxWidth: 640, margin: '0 auto' }}>
7
+ <h1 style={{ fontSize: 32, margin: 0 }}>Hello, Dirgha 👋</h1>
8
+ <p style={{ color: '#666', marginTop: 8 }}>
9
+ Scaffolded by <code>dirgha scaffold</code>. Edit <code>src/App.tsx</code> and the page reloads.
10
+ </p>
11
+ <button
12
+ onClick={() => setCount(c => c + 1)}
13
+ style={{ padding: '8px 16px', fontSize: 16, cursor: 'pointer', borderRadius: 6, border: '1px solid #888', background: 'white' }}
14
+ >
15
+ clicked {count} times
16
+ </button>
17
+ <hr style={{ margin: '32px 0', border: 0, borderTop: '1px solid #eee' }} />
18
+ <p style={{ color: '#888', fontSize: 14 }}>
19
+ Iterate with{' '}
20
+ <code>dirgha ask "make this a todo app with persistent storage"</code>.
21
+ </p>
22
+ </div>
23
+ );
24
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ ReactDOM.createRoot(document.getElementById('root')!).render(
6
+ <React.StrictMode>
7
+ <App />
8
+ </React.StrictMode>,
9
+ );
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM"],
7
+ "strict": true,
8
+ "jsx": "react-jsx",
9
+ "skipLibCheck": true,
10
+ "esModuleInterop": true,
11
+ "allowSyntheticDefaultImports": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true
15
+ },
16
+ "include": ["src"]
17
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ server: { port: 5173, host: true },
7
+ });