@jx-grxf/patchpilot 0.2.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.
- package/.env.example +13 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +71 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/agent.d.ts +21 -0
- package/dist/core/agent.js +346 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/codex.d.ts +22 -0
- package/dist/core/codex.js +242 -0
- package/dist/core/codex.js.map +1 -0
- package/dist/core/compute.d.ts +9 -0
- package/dist/core/compute.js +18 -0
- package/dist/core/compute.js.map +1 -0
- package/dist/core/doctor.d.ts +7 -0
- package/dist/core/doctor.js +226 -0
- package/dist/core/doctor.js.map +1 -0
- package/dist/core/env.d.ts +6 -0
- package/dist/core/env.js +103 -0
- package/dist/core/env.js.map +1 -0
- package/dist/core/gemini.d.ts +20 -0
- package/dist/core/gemini.js +177 -0
- package/dist/core/gemini.js.map +1 -0
- package/dist/core/json.d.ts +3 -0
- package/dist/core/json.js +95 -0
- package/dist/core/json.js.map +1 -0
- package/dist/core/modelClient.d.ts +8 -0
- package/dist/core/modelClient.js +42 -0
- package/dist/core/modelClient.js.map +1 -0
- package/dist/core/nvidia.d.ts +19 -0
- package/dist/core/nvidia.js +160 -0
- package/dist/core/nvidia.js.map +1 -0
- package/dist/core/ollama.d.ts +31 -0
- package/dist/core/ollama.js +176 -0
- package/dist/core/ollama.js.map +1 -0
- package/dist/core/openrouter.d.ts +27 -0
- package/dist/core/openrouter.js +168 -0
- package/dist/core/openrouter.js.map +1 -0
- package/dist/core/subagents.d.ts +14 -0
- package/dist/core/subagents.js +89 -0
- package/dist/core/subagents.js.map +1 -0
- package/dist/core/tokenAccounting.d.ts +6 -0
- package/dist/core/tokenAccounting.js +134 -0
- package/dist/core/tokenAccounting.js.map +1 -0
- package/dist/core/types.d.ts +90 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/workspace.d.ts +28 -0
- package/dist/core/workspace.js +616 -0
- package/dist/core/workspace.js.map +1 -0
- package/dist/tui/App.d.ts +6 -0
- package/dist/tui/App.js +1717 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/commands.d.ts +14 -0
- package/dist/tui/commands.js +210 -0
- package/dist/tui/commands.js.map +1 -0
- package/dist/tui/components/CommandSuggestions.d.ts +12 -0
- package/dist/tui/components/CommandSuggestions.js +12 -0
- package/dist/tui/components/CommandSuggestions.js.map +1 -0
- package/dist/tui/components/Composer.d.ts +13 -0
- package/dist/tui/components/Composer.js +29 -0
- package/dist/tui/components/Composer.js.map +1 -0
- package/dist/tui/components/Header.d.ts +25 -0
- package/dist/tui/components/Header.js +62 -0
- package/dist/tui/components/Header.js.map +1 -0
- package/dist/tui/components/OnboardingPanel.d.ts +38 -0
- package/dist/tui/components/OnboardingPanel.js +85 -0
- package/dist/tui/components/OnboardingPanel.js.map +1 -0
- package/dist/tui/components/Sidebar.d.ts +22 -0
- package/dist/tui/components/Sidebar.js +133 -0
- package/dist/tui/components/Sidebar.js.map +1 -0
- package/dist/tui/components/Transcript.d.ts +10 -0
- package/dist/tui/components/Transcript.js +111 -0
- package/dist/tui/components/Transcript.js.map +1 -0
- package/dist/tui/format.d.ts +29 -0
- package/dist/tui/format.js +202 -0
- package/dist/tui/format.js.map +1 -0
- package/dist/tui/hosts.d.ts +34 -0
- package/dist/tui/hosts.js +338 -0
- package/dist/tui/hosts.js.map +1 -0
- package/dist/tui/inputRouting.d.ts +8 -0
- package/dist/tui/inputRouting.js +94 -0
- package/dist/tui/inputRouting.js.map +1 -0
- package/dist/tui/platform.d.ts +2 -0
- package/dist/tui/platform.js +13 -0
- package/dist/tui/platform.js.map +1 -0
- package/dist/tui/systemStats.d.ts +25 -0
- package/dist/tui/systemStats.js +88 -0
- package/dist/tui/systemStats.js.map +1 -0
- package/dist/tui/types.d.ts +16 -0
- package/dist/tui/types.js +2 -0
- package/dist/tui/types.js.map +1 -0
- package/docs/showcase/patchpilot-showcase.svg +39 -0
- package/package.json +63 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SubagentRole } from "../core/types.js";
|
|
2
|
+
export type AgentMode = "plan" | "build";
|
|
3
|
+
export type LogTone = "muted" | "normal" | "success" | "warning" | "danger" | "accent";
|
|
4
|
+
export type LogLine = {
|
|
5
|
+
id: number;
|
|
6
|
+
tone: LogTone;
|
|
7
|
+
label: string;
|
|
8
|
+
text: string;
|
|
9
|
+
detail?: string;
|
|
10
|
+
};
|
|
11
|
+
export type AppendLine = (line: Omit<LogLine, "id">) => void;
|
|
12
|
+
export type AdvisorNote = {
|
|
13
|
+
role: SubagentRole;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const maxTranscriptLines = 300;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tui/types.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<svg width="920" height="520" viewBox="0 0 920 520" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">PatchPilot TUI showcase</title>
|
|
3
|
+
<desc id="desc">A stylized terminal interface for the PatchPilot local coding agent.</desc>
|
|
4
|
+
<rect width="920" height="520" rx="28" fill="#0B1020"/>
|
|
5
|
+
<rect x="32" y="32" width="856" height="456" rx="18" fill="#111827" stroke="#334155"/>
|
|
6
|
+
<rect x="32" y="32" width="856" height="48" rx="18" fill="#172033"/>
|
|
7
|
+
<circle cx="60" cy="56" r="7" fill="#EF4444"/>
|
|
8
|
+
<circle cx="84" cy="56" r="7" fill="#F59E0B"/>
|
|
9
|
+
<circle cx="108" cy="56" r="7" fill="#22C55E"/>
|
|
10
|
+
<text x="138" y="62" fill="#E5E7EB" font-family="Consolas, Menlo, monospace" font-size="18" font-weight="700">PatchPilot</text>
|
|
11
|
+
<rect x="704" y="45" width="146" height="24" rx="12" fill="#0F766E"/>
|
|
12
|
+
<text x="724" y="62" fill="#CCFBF1" font-family="Consolas, Menlo, monospace" font-size="13">qwen2.5-coder</text>
|
|
13
|
+
|
|
14
|
+
<rect x="56" y="104" width="228" height="338" rx="12" fill="#0F172A" stroke="#334155"/>
|
|
15
|
+
<text x="76" y="134" fill="#38BDF8" font-family="Consolas, Menlo, monospace" font-size="14" font-weight="700">Workspace</text>
|
|
16
|
+
<text x="76" y="166" fill="#CBD5E1" font-family="Consolas, Menlo, monospace" font-size="13">src/core/agent.ts</text>
|
|
17
|
+
<text x="76" y="194" fill="#CBD5E1" font-family="Consolas, Menlo, monospace" font-size="13">src/core/tools.ts</text>
|
|
18
|
+
<text x="76" y="222" fill="#CBD5E1" font-family="Consolas, Menlo, monospace" font-size="13">src/tui/App.tsx</text>
|
|
19
|
+
<text x="76" y="250" fill="#94A3B8" font-family="Consolas, Menlo, monospace" font-size="13">tests/parser.test.ts</text>
|
|
20
|
+
<rect x="76" y="290" width="168" height="30" rx="8" fill="#1E293B"/>
|
|
21
|
+
<text x="94" y="311" fill="#A7F3D0" font-family="Consolas, Menlo, monospace" font-size="13">write: disabled</text>
|
|
22
|
+
<rect x="76" y="332" width="168" height="30" rx="8" fill="#1E293B"/>
|
|
23
|
+
<text x="94" y="353" fill="#FDE68A" font-family="Consolas, Menlo, monospace" font-size="13">shell: ask first</text>
|
|
24
|
+
|
|
25
|
+
<rect x="308" y="104" width="556" height="338" rx="12" fill="#020617" stroke="#334155"/>
|
|
26
|
+
<text x="332" y="136" fill="#F8FAFC" font-family="Consolas, Menlo, monospace" font-size="15" font-weight="700">Agent transcript</text>
|
|
27
|
+
<text x="332" y="174" fill="#94A3B8" font-family="Consolas, Menlo, monospace" font-size="13">user</text>
|
|
28
|
+
<text x="390" y="174" fill="#E5E7EB" font-family="Consolas, Menlo, monospace" font-size="13">add parser tests and explain the diff</text>
|
|
29
|
+
<text x="332" y="216" fill="#38BDF8" font-family="Consolas, Menlo, monospace" font-size="13">pilot</text>
|
|
30
|
+
<text x="390" y="216" fill="#CBD5E1" font-family="Consolas, Menlo, monospace" font-size="13">reading parser and current tests...</text>
|
|
31
|
+
<rect x="332" y="244" width="492" height="42" rx="10" fill="#111827"/>
|
|
32
|
+
<text x="354" y="270" fill="#A7F3D0" font-family="Consolas, Menlo, monospace" font-size="13">tool read_file src/core/json.ts</text>
|
|
33
|
+
<rect x="332" y="302" width="492" height="42" rx="10" fill="#111827"/>
|
|
34
|
+
<text x="354" y="328" fill="#FDE68A" font-family="Consolas, Menlo, monospace" font-size="13">tool write_file denied: run with --apply</text>
|
|
35
|
+
<rect x="332" y="364" width="492" height="42" rx="10" fill="#111827"/>
|
|
36
|
+
<text x="354" y="390" fill="#C4B5FD" font-family="Consolas, Menlo, monospace" font-size="13">final review the proposed patch before commit</text>
|
|
37
|
+
<rect x="56" y="456" width="808" height="1" fill="#334155"/>
|
|
38
|
+
<text x="56" y="476" fill="#64748B" font-family="Consolas, Menlo, monospace" font-size="12">local model, visible tools, explicit permissions</text>
|
|
39
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jx-grxf/patchpilot",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Local-first coding agent TUI for visible, permissioned repo changes.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"patchpilot": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
".env.example",
|
|
13
|
+
"docs/showcase/patchpilot-showcase.svg",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/jx-grxf/PatchPilot.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/jx-grxf/PatchPilot/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/jx-grxf/PatchPilot#readme",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"dev": "tsx src/cli.tsx",
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"prepack": "npm run build",
|
|
32
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run build && npm audit --omit=dev --audit-level=moderate && npm pack --dry-run",
|
|
33
|
+
"start": "node dist/cli.js",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"typecheck": "tsc --noEmit"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"ollama",
|
|
39
|
+
"agent",
|
|
40
|
+
"tui",
|
|
41
|
+
"coding-agent",
|
|
42
|
+
"local-ai"
|
|
43
|
+
],
|
|
44
|
+
"author": "Johannes Grof",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"commander": "^14.0.3",
|
|
48
|
+
"ink": "^7.0.1",
|
|
49
|
+
"ink-text-input": "^6.0.0",
|
|
50
|
+
"react": "^19.2.1",
|
|
51
|
+
"zod": "^4.3.6"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^24.10.0",
|
|
55
|
+
"@types/react": "^19.2.6",
|
|
56
|
+
"tsx": "^4.21.0",
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"vitest": "^4.1.5"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=22"
|
|
62
|
+
}
|
|
63
|
+
}
|