agent-termo 0.0.0-stage → 1.0.1

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 (56) hide show
  1. package/.claude/agents/backend-architecture-designer.md +1250 -0
  2. package/.claude/agents/backend-expert.md +1731 -0
  3. package/.claude/agents/deployment-expert.md +1126 -0
  4. package/.claude/agents/dev-environment-initiator.md +788 -0
  5. package/.claude/agents/frontend-expert.md +1343 -0
  6. package/.claude/agents/frontend-planner.md +1044 -0
  7. package/.claude/agents/git-manager.md +811 -0
  8. package/.claude/agents/project-manager.md +843 -0
  9. package/.claude/agents/security-expert.md +835 -0
  10. package/.claude/agents/tech-stack-expert.md +1357 -0
  11. package/.claude/agents/test-agent.md +1372 -0
  12. package/.claude/agents/uiux-designer.md +955 -0
  13. package/.claude/commands/build.md +5 -0
  14. package/.claude/commands/deploy.md +3 -0
  15. package/.claude/commands/feature.md +3 -0
  16. package/.claude/commands/fix.md +3 -0
  17. package/.claude/skills/pdf-reader/.skillfish.json +10 -0
  18. package/.claude/skills/pdf-reader/SKILL.md +94 -0
  19. package/.claude/skills/pdf-reader/pdf-reader +203 -0
  20. package/README.md +163 -3
  21. package/dist/.claude/agents/backend-architecture-designer.md +1250 -0
  22. package/dist/.claude/agents/backend-expert.md +1731 -0
  23. package/dist/.claude/agents/deployment-expert.md +1126 -0
  24. package/dist/.claude/agents/dev-environment-initiator.md +788 -0
  25. package/dist/.claude/agents/frontend-expert.md +1343 -0
  26. package/dist/.claude/agents/frontend-planner.md +1044 -0
  27. package/dist/.claude/agents/git-manager.md +811 -0
  28. package/dist/.claude/agents/project-manager.md +843 -0
  29. package/dist/.claude/agents/security-expert.md +835 -0
  30. package/dist/.claude/agents/tech-stack-expert.md +1357 -0
  31. package/dist/.claude/agents/test-agent.md +1372 -0
  32. package/dist/.claude/agents/uiux-designer.md +955 -0
  33. package/dist/.claude/commands/build.md +5 -0
  34. package/dist/.claude/commands/deploy.md +3 -0
  35. package/dist/.claude/commands/feature.md +3 -0
  36. package/dist/.claude/commands/fix.md +3 -0
  37. package/dist/.claude/skills/pdf-reader/.skillfish.json +10 -0
  38. package/dist/.claude/skills/pdf-reader/SKILL.md +94 -0
  39. package/dist/.claude/skills/pdf-reader/pdf-reader +203 -0
  40. package/dist/cli.js +210 -0
  41. package/dist/cli.js.map +7 -0
  42. package/dist/main.js +173 -0
  43. package/dist/main.js.map +7 -0
  44. package/package.json +90 -6
  45. package/src/agents/index.ts +94 -0
  46. package/src/cli.ts +155 -0
  47. package/src/diff/index.ts +255 -0
  48. package/src/llm/client.ts +192 -0
  49. package/src/llm/tools.ts +206 -0
  50. package/src/main.ts +427 -0
  51. package/src/memory/index.ts +130 -0
  52. package/src/tools/index.ts +371 -0
  53. package/src/types/index.ts +151 -0
  54. package/src/ui/index.ts +519 -0
  55. package/src/utils/ansi.ts +134 -0
  56. package/src/utils/config.ts +118 -0
@@ -0,0 +1,5 @@
1
+ @"project-manager (agent)" @"tech-stack-expert (agent)" @"uiux-designer (agent)" @"backend-architecture-designer (agent)" @"backend-expert (agent)" @"frontend-planner (agent)" @"frontend-expert (agent)" @"dev-environment-initiator (agent)" @"deployment-expert (agent)" @"git-manager (agent)"
2
+
3
+ Use all the above agents in the correct dependency order to accomplish this task:
4
+
5
+ $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ @"project-manager (agent)" @"dev-environment-initiator (agent)" @"deployment-expert (agent)" @"git-manager (agent)"
2
+
3
+ Deploy this project: $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ @"project-manager (agent)" @"backend-expert (agent)" @"frontend-expert (agent)" @"git-manager (agent)"
2
+
3
+ Add this feature to the existing project: $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ @"project-manager (agent)" @"backend-expert (agent)" @"frontend-expert (agent)" @"git-manager (agent)"
2
+
3
+ Fix this bug: $ARGUMENTS
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 2,
3
+ "name": "pdf-reader",
4
+ "owner": "lorenzovenice",
5
+ "repo": "nanoclaw-venice",
6
+ "path": ".claude/skills/add-pdf-reader/add/container/skills/pdf-reader",
7
+ "branch": "main",
8
+ "sha": "8dc7e93c5d878c78697f0d054060d398996c7aec",
9
+ "source": "manual"
10
+ }
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: pdf-reader
3
+ description: Read and extract text from PDF files — documents, reports, contracts, spreadsheets. Use whenever you need to read PDF content, not just when explicitly asked. Handles local files, URLs, and WhatsApp attachments.
4
+ allowed-tools: Bash(pdf-reader:*)
5
+ ---
6
+
7
+ # PDF Reader
8
+
9
+ ## Quick start
10
+
11
+ ```bash
12
+ pdf-reader extract report.pdf # Extract all text
13
+ pdf-reader extract report.pdf --layout # Preserve tables/columns
14
+ pdf-reader fetch https://example.com/doc.pdf # Download and extract
15
+ pdf-reader info report.pdf # Show metadata + size
16
+ pdf-reader list # List all PDFs in directory tree
17
+ ```
18
+
19
+ ## Commands
20
+
21
+ ### extract — Extract text from PDF
22
+
23
+ ```bash
24
+ pdf-reader extract <file> # Full text to stdout
25
+ pdf-reader extract <file> --layout # Preserve layout (tables, columns)
26
+ pdf-reader extract <file> --pages 1-5 # Pages 1 through 5
27
+ pdf-reader extract <file> --pages 3-3 # Single page (page 3)
28
+ pdf-reader extract <file> --layout --pages 2-10 # Layout + page range
29
+ ```
30
+
31
+ Options:
32
+ - `--layout` — Maintains spatial positioning. Essential for tables, spreadsheets, multi-column docs.
33
+ - `--pages N-M` — Extract only pages N through M (1-based, inclusive).
34
+
35
+ ### fetch — Download and extract PDF from URL
36
+
37
+ ```bash
38
+ pdf-reader fetch <url> # Download, verify, extract with layout
39
+ pdf-reader fetch <url> report.pdf # Also save a local copy
40
+ ```
41
+
42
+ Downloads the PDF, verifies it has a valid `%PDF` header, then extracts text with layout preservation. Temporary files are cleaned up automatically.
43
+
44
+ ### info — PDF metadata and file size
45
+
46
+ ```bash
47
+ pdf-reader info <file>
48
+ ```
49
+
50
+ Shows title, author, page count, page size, PDF version, and file size on disk.
51
+
52
+ ### list — Find all PDFs in directory tree
53
+
54
+ ```bash
55
+ pdf-reader list
56
+ ```
57
+
58
+ Recursively lists all `.pdf` files with page count and file size.
59
+
60
+ ## WhatsApp PDF attachments
61
+
62
+ When a user sends a PDF on WhatsApp, it is automatically saved to the `attachments/` directory. The message will include a path hint like:
63
+
64
+ > [PDF attached: attachments/document.pdf]
65
+
66
+ To read the attached PDF:
67
+
68
+ ```bash
69
+ pdf-reader extract attachments/document.pdf --layout
70
+ ```
71
+
72
+ ## Example workflows
73
+
74
+ ### Read a contract and summarize key terms
75
+
76
+ ```bash
77
+ pdf-reader info attachments/contract.pdf
78
+ pdf-reader extract attachments/contract.pdf --layout
79
+ ```
80
+
81
+ ### Extract specific pages from a long report
82
+
83
+ ```bash
84
+ pdf-reader info report.pdf # Check total pages
85
+ pdf-reader extract report.pdf --pages 1-3 # Executive summary
86
+ pdf-reader extract report.pdf --pages 15-20 # Financial tables
87
+ ```
88
+
89
+ ### Fetch and analyze a public document
90
+
91
+ ```bash
92
+ pdf-reader fetch https://example.com/annual-report.pdf report.pdf
93
+ pdf-reader info report.pdf
94
+ ```
@@ -0,0 +1,203 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # pdf-reader — CLI wrapper around poppler-utils (pdftotext, pdfinfo)
5
+ # Provides extract, fetch, info, list commands for PDF processing.
6
+
7
+ VERSION="1.0.0"
8
+
9
+ usage() {
10
+ cat <<'USAGE'
11
+ pdf-reader — Extract text and metadata from PDF files
12
+
13
+ Usage:
14
+ pdf-reader extract <file> [--layout] [--pages N-M]
15
+ pdf-reader fetch <url> [filename]
16
+ pdf-reader info <file>
17
+ pdf-reader list
18
+ pdf-reader help
19
+
20
+ Commands:
21
+ extract Extract text from a PDF file to stdout
22
+ fetch Download a PDF from a URL and extract text
23
+ info Show PDF metadata and file size
24
+ list List all PDFs in current directory tree
25
+ help Show this help message
26
+
27
+ Extract options:
28
+ --layout Preserve original layout (tables, columns)
29
+ --pages Page range to extract (e.g. 1-5, 3-3 for single page)
30
+ USAGE
31
+ }
32
+
33
+ cmd_extract() {
34
+ local file=""
35
+ local layout=false
36
+ local first_page=""
37
+ local last_page=""
38
+
39
+ # Parse arguments
40
+ while [[ $# -gt 0 ]]; do
41
+ case "$1" in
42
+ --layout)
43
+ layout=true
44
+ shift
45
+ ;;
46
+ --pages)
47
+ if [[ -z "${2:-}" ]]; then
48
+ echo "Error: --pages requires a range argument (e.g. 1-5)" >&2
49
+ exit 1
50
+ fi
51
+ local range="$2"
52
+ first_page="${range%-*}"
53
+ last_page="${range#*-}"
54
+ shift 2
55
+ ;;
56
+ -*)
57
+ echo "Error: Unknown option: $1" >&2
58
+ exit 1
59
+ ;;
60
+ *)
61
+ if [[ -z "$file" ]]; then
62
+ file="$1"
63
+ else
64
+ echo "Error: Unexpected argument: $1" >&2
65
+ exit 1
66
+ fi
67
+ shift
68
+ ;;
69
+ esac
70
+ done
71
+
72
+ if [[ -z "$file" ]]; then
73
+ echo "Error: No file specified" >&2
74
+ echo "Usage: pdf-reader extract <file> [--layout] [--pages N-M]" >&2
75
+ exit 1
76
+ fi
77
+
78
+ if [[ ! -f "$file" ]]; then
79
+ echo "Error: File not found: $file" >&2
80
+ exit 1
81
+ fi
82
+
83
+ # Build pdftotext arguments
84
+ local args=()
85
+ if [[ "$layout" == true ]]; then
86
+ args+=(-layout)
87
+ fi
88
+ if [[ -n "$first_page" ]]; then
89
+ args+=(-f "$first_page")
90
+ fi
91
+ if [[ -n "$last_page" ]]; then
92
+ args+=(-l "$last_page")
93
+ fi
94
+
95
+ pdftotext ${args[@]+"${args[@]}"} "$file" -
96
+ }
97
+
98
+ cmd_fetch() {
99
+ local url="${1:-}"
100
+ local filename="${2:-}"
101
+
102
+ if [[ -z "$url" ]]; then
103
+ echo "Error: No URL specified" >&2
104
+ echo "Usage: pdf-reader fetch <url> [filename]" >&2
105
+ exit 1
106
+ fi
107
+
108
+ # Create temporary file
109
+ local tmpfile
110
+ tmpfile="$(mktemp /tmp/pdf-reader-XXXXXX.pdf)"
111
+ trap 'rm -f "$tmpfile"' EXIT
112
+
113
+ # Download
114
+ echo "Downloading: $url" >&2
115
+ if ! curl -sL -o "$tmpfile" "$url"; then
116
+ echo "Error: Failed to download: $url" >&2
117
+ exit 1
118
+ fi
119
+
120
+ # Verify PDF header
121
+ local header
122
+ header="$(head -c 4 "$tmpfile")"
123
+ if [[ "$header" != "%PDF" ]]; then
124
+ echo "Error: Downloaded file is not a valid PDF (header: $header)" >&2
125
+ exit 1
126
+ fi
127
+
128
+ # Save with name if requested
129
+ if [[ -n "$filename" ]]; then
130
+ cp "$tmpfile" "$filename"
131
+ echo "Saved to: $filename" >&2
132
+ fi
133
+
134
+ # Extract with layout
135
+ pdftotext -layout "$tmpfile" -
136
+ }
137
+
138
+ cmd_info() {
139
+ local file="${1:-}"
140
+
141
+ if [[ -z "$file" ]]; then
142
+ echo "Error: No file specified" >&2
143
+ echo "Usage: pdf-reader info <file>" >&2
144
+ exit 1
145
+ fi
146
+
147
+ if [[ ! -f "$file" ]]; then
148
+ echo "Error: File not found: $file" >&2
149
+ exit 1
150
+ fi
151
+
152
+ pdfinfo "$file"
153
+ echo ""
154
+ echo "File size: $(du -h "$file" | cut -f1)"
155
+ }
156
+
157
+ cmd_list() {
158
+ local found=false
159
+
160
+ # Use globbing to find PDFs (globstar makes **/ match recursively)
161
+ shopt -s nullglob globstar
162
+
163
+ # Use associative array to deduplicate (*.pdf overlaps with **/*.pdf)
164
+ declare -A seen
165
+ for pdf in *.pdf **/*.pdf; do
166
+ [[ -v seen["$pdf"] ]] && continue
167
+ seen["$pdf"]=1
168
+ found=true
169
+
170
+ local pages="?"
171
+ local size
172
+ size="$(du -h "$pdf" | cut -f1)"
173
+
174
+ # Try to get page count from pdfinfo
175
+ if page_line="$(pdfinfo "$pdf" 2>/dev/null | grep '^Pages:')"; then
176
+ pages="$(echo "$page_line" | awk '{print $2}')"
177
+ fi
178
+
179
+ printf "%-60s %5s pages %8s\n" "$pdf" "$pages" "$size"
180
+ done
181
+
182
+ if [[ "$found" == false ]]; then
183
+ echo "No PDF files found in current directory tree." >&2
184
+ fi
185
+ }
186
+
187
+ # Main dispatch
188
+ command="${1:-help}"
189
+ shift || true
190
+
191
+ case "$command" in
192
+ extract) cmd_extract "$@" ;;
193
+ fetch) cmd_fetch "$@" ;;
194
+ info) cmd_info "$@" ;;
195
+ list) cmd_list ;;
196
+ help|--help|-h) usage ;;
197
+ version|--version|-v) echo "pdf-reader $VERSION" ;;
198
+ *)
199
+ echo "Error: Unknown command: $command" >&2
200
+ echo "Run 'pdf-reader help' for usage." >&2
201
+ exit 1
202
+ ;;
203
+ esac
package/README.md CHANGED
@@ -1,3 +1,163 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Agent-Termo
2
+
3
+ Terminal-based AI coding agent that replicates Claude Code experience.
4
+
5
+ ## Overview
6
+
7
+ Agent-Termo is a CLI tool that uses Nvidia NIM APIs to provide AI-assisted coding capabilities directly in your terminal. It implements the 12-agent workflow system for autonomous software development.
8
+
9
+ ## Features
10
+
11
+ - **Interactive Terminal UI**: Beautiful dark-themed interface with markdown rendering
12
+ - **12-Agent System**: Complete workflow from planning to deployment
13
+ - **Streaming Responses**: Real-time AI output as tokens arrive
14
+ - **Tool Execution**: File operations, bash commands, git integration
15
+ - **Memory & Timeline**: Persistent project context across sessions
16
+
17
+ ## Installation
18
+
19
+ ### From npm (once published)
20
+
21
+ ```bash
22
+ npm install -g agent-termo
23
+ agent-termo
24
+ ```
25
+
26
+ ### From source
27
+
28
+ ```bash
29
+ git clone <repository>
30
+ cd agent-termo
31
+ npm install
32
+ npm run dev
33
+ ```
34
+
35
+ ## Prerequisites
36
+
37
+ - Node.js 20.x or higher
38
+ - Nvidia NIM API key (free tier available at https://build.nvidia.com/)
39
+
40
+ ## Configuration
41
+
42
+ On the first launch, Agent-Termo prompts you to enter your NVIDIA NIM API key. The input is hidden, and the key is saved in your user configuration at `~/.agent-termo/config.json` so you are not prompted again.
43
+
44
+ Get a free API key from [https://build.nvidia.com/](https://build.nvidia.com/).
45
+
46
+ You can also provide `NIM_API_KEY` through your shell environment or a project `.env` file. Existing environment variables take precedence over the saved key.
47
+
48
+ ## Usage
49
+
50
+ ### Start the tool
51
+
52
+ ```bash
53
+ agent-termo
54
+ ```
55
+
56
+ ### Tell it what to build
57
+
58
+ ```
59
+ > Build a REST API with authentication
60
+ ```
61
+
62
+ The tool will:
63
+ 1. Analyze requirements with project-manager
64
+ 2. Design architecture with backend-architecture-designer
65
+ 3. Implement the code with backend-expert
66
+ 4. Test with test-agent
67
+ 5. Deploy with deployment-expert
68
+
69
+ ## Architecture
70
+
71
+ ```
72
+ agent-termo/
73
+ ├── src/
74
+ │ ├── cli.ts # Commander entry point
75
+ │ ├── main.ts # Main application
76
+ │ ├── ui/ # Terminal UI (blessed)
77
+ │ ├── agents/ # 12 agent implementations
78
+ │ ├── llm/ # OpenAI/NIM integration
79
+ │ ├── tools/ # File, bash, git tools
80
+ │ └── memory/ # Memory system
81
+ ├── .claude/agents/ # Agent prompts
82
+ ├── tests/ # Test suites
83
+ └── docs/ # Documentation
84
+ ```
85
+
86
+ ## Technology Stack
87
+
88
+ - **Language**: TypeScript 5.x
89
+ - **Runtime**: Node.js 20.x LTS
90
+ - **TUI Framework**: blessed
91
+ - **LLM Client**: OpenAI SDK (with Nvidia NIM)
92
+ - **Build**: esbuild + pkg
93
+ - **Testing**: vitest
94
+
95
+ See [docs/TECH_STACK.md](docs/TECH_STACK.md) for complete technology decisions.
96
+
97
+ ## Development
98
+
99
+ ```bash
100
+ # Install dependencies
101
+ npm install
102
+
103
+ # Run in development mode
104
+ npm run dev
105
+
106
+ # Type check
107
+ npm run typecheck
108
+
109
+ # Lint
110
+ npm run lint
111
+
112
+ # Test
113
+ npm test
114
+
115
+ # Build
116
+ npm run build
117
+
118
+ # Build binaries (Windows, macOS, Linux)
119
+ npm run build:pkg
120
+ ```
121
+
122
+ ## Project Structure
123
+
124
+ This project uses the **12-agent system** defined in CLAUDE.md:
125
+
126
+ 1. project-manager - Orchestrates workflows
127
+ 2. tech-stack-expert - Technology selection (DONE)
128
+ 3. uiux-designer - Visual design
129
+ 4. backend-architecture-designer - API/database design
130
+ 5. frontend-planner - Frontend architecture
131
+ 6. frontend-expert - Frontend implementation
132
+ 7. backend-expert - Backend implementation
133
+ 8. dev-environment-initiator - Development setup
134
+ 9. security-expert - Security auditing
135
+ 10. test-agent - Testing strategy
136
+ 11. git-manager - Version control
137
+ 12. deployment-expert - Production deployment
138
+
139
+ ## Documentation
140
+
141
+ - [CLAUDE.md](CLAUDE.md) - Complete agent system specification
142
+ - [docs/TECH_STACK.md](docs/TECH_STACK.md) - Technology decisions
143
+ - [docs/MEMORY.md](docs/MEMORY.md) - Project memory
144
+ - [docs/TIMELINE.md](docs/TIMELINE.md) - Activity log
145
+ - [docs/PROJECT_PROGRESS.md](docs/PROJECT_PROGRESS.md) - Implementation roadmap
146
+
147
+ ## Contributing
148
+
149
+ 1. Fork the repository
150
+ 2. Create a feature branch
151
+ 3. Make your changes
152
+ 4. Run tests: `npm test`
153
+ 5. Submit a pull request
154
+
155
+ ## License
156
+
157
+ MIT
158
+
159
+ ## Acknowledgments
160
+
161
+ - Inspired by Claude Code and Anthropic's Claude
162
+ - Built with the 12-agent workflow system
163
+ - Powered by Nvidia NIM APIs