structurecc 2.0.3 → 2.0.5

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 (2) hide show
  1. package/bin/install.js +19 -64
  2. package/package.json +1 -1
package/bin/install.js CHANGED
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
6
 
7
- const VERSION = '2.0.0';
7
+ const VERSION = '2.0.5';
8
8
  const PACKAGE_NAME = 'structurecc';
9
9
 
10
10
  // Agent files in v2.0
@@ -39,23 +39,18 @@ function log(msg, color = '') {
39
39
  function banner() {
40
40
  const c = colors;
41
41
  console.log('');
42
- console.log(c.cyan + ' ┌─────────────────────────────────────────────────────┐' + c.reset);
43
- console.log(c.cyan + ' │ │' + c.reset);
44
- console.log(c.cyan + ' ' + c.bright + 'S T R U C T U R E v2.0' + c.reset + c.cyan + ' │' + c.reset);
45
- console.log(c.cyan + ' │ │' + c.reset);
46
- console.log(c.cyan + ' ' + c.reset + 'Agentic Document Structuring' + c.cyan + ' │' + c.reset);
47
- console.log(c.cyan + ' ' + c.dim + 'Verbatim extraction. Quality verified.' + c.reset + c.cyan + ' │' + c.reset);
48
- console.log(c.cyan + ' │ │' + c.reset);
49
- console.log(c.cyan + ' ├─────────────────────────────────────────────────────┤' + c.reset);
50
- console.log(c.cyan + ' │ │' + c.reset);
51
- console.log(c.cyan + '' + c.yellow + 'PDF' + c.reset + ' ──▶ ' + c.magenta + '[Classify]' + c.reset + ' ──▶ ' + c.green + '[Extract]' + c.reset + ' ──▶ ' + c.cyan + '[Verify]' + c.reset + ' ' + c.cyan + '│' + c.reset);
52
- console.log(c.cyan + ' │ ↑_______↻_______↓ │' + c.reset);
53
- console.log(c.cyan + ' │ │' + c.reset);
54
- console.log(c.cyan + ' │ ' + c.white + '3-phase pipeline with quality scoring' + c.reset + c.cyan + ' │' + c.reset);
55
- console.log(c.cyan + ' │ │' + c.reset);
56
- console.log(c.cyan + ' └─────────────────────────────────────────────────────┘' + c.reset);
42
+ console.log(c.cyan + ' ███████╗████████╗██████╗ ██╗ ██╗ ██████╗████████╗██╗ ██╗██████╗ ███████╗' + c.reset);
43
+ console.log(c.cyan + ' ██╔════╝╚══██╔══╝██╔══██╗██║ ██║██╔════╝╚══██╔══╝██║ ██║██╔══██╗██╔════╝' + c.reset);
44
+ console.log(c.cyan + ' ███████╗ ██║ ██████╔╝██║ ██║██║ ██║ ██║ ██║██████╔╝█████╗ ' + c.reset);
45
+ console.log(c.cyan + ' ╚════██║ ██║ ██╔══██╗██║ ██║██║ ██║ ██║ ██║██╔══██╗██╔══╝ ' + c.reset);
46
+ console.log(c.cyan + ' ███████║ ██║ ██║ ██║╚██████╔╝╚██████╗ ██║ ╚██████╔╝██║ ██║███████╗' + c.reset);
47
+ console.log(c.cyan + ' ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝' + c.reset);
48
+ console.log('');
49
+ console.log(c.dim + ' Agentic Document Structuring' + c.reset + ' ' + c.yellow + 'v' + VERSION + c.reset);
50
+ console.log(c.dim + ' Verbatim extraction. Quality verified.' + c.reset);
51
+ console.log('');
52
+ console.log(c.dim + ' ─────────────────────────────────────────────────────────────────────────────' + c.reset);
57
53
  console.log('');
58
- console.log(c.bright + 'structurecc' + c.reset + ' v' + VERSION);
59
54
  }
60
55
 
61
56
  function getClaudeDir() {
@@ -93,13 +88,13 @@ function install() {
93
88
  const srcCommandsDir = path.join(packageDir, 'commands', 'structure');
94
89
  const srcAgentsDir = path.join(packageDir, 'agents');
95
90
 
96
- log('Installing structurecc v2.0...', colors.yellow);
91
+ log('Installing...', colors.dim);
97
92
  log('');
98
93
 
99
94
  // Install command
100
95
  if (fs.existsSync(srcCommandsDir)) {
101
96
  copyDir(srcCommandsDir, commandsDir);
102
- log(' ✓ Installed /structure command (3-phase pipeline)', colors.green);
97
+ log(' ✓ /structure command', colors.green);
103
98
  }
104
99
 
105
100
  // Install agents
@@ -115,11 +110,8 @@ function install() {
115
110
  if (fs.existsSync(srcPath)) {
116
111
  fs.copyFileSync(srcPath, destPath);
117
112
  const agentName = file.replace('.md', '');
118
- log(` ✓ Installed ${agentName}`, colors.green);
113
+ log(` ✓ ${agentName}`, colors.green);
119
114
  installed++;
120
- } else {
121
- log(` ⚠ Missing ${file}`, colors.yellow);
122
- skipped++;
123
115
  }
124
116
  }
125
117
 
@@ -127,29 +119,11 @@ function install() {
127
119
  const oldExtractor = path.join(agentsDir, 'structurecc-extractor.md');
128
120
  if (fs.existsSync(oldExtractor)) {
129
121
  fs.unlinkSync(oldExtractor);
130
- log(' ✓ Removed legacy structurecc-extractor', colors.dim);
131
- }
132
-
133
- log('');
134
- log(` Agents installed: ${installed}`, colors.dim);
135
- if (skipped > 0) {
136
- log(` Agents skipped: ${skipped}`, colors.yellow);
137
122
  }
138
123
  }
139
124
 
140
125
  log('');
141
- log(`${colors.green}Done!${colors.reset}`);
142
- log('');
143
- log(`${colors.bright}What's new in v2.0:${colors.reset}`);
144
- log(` • 3-phase pipeline: Classify → Extract → Verify`, colors.dim);
145
- log(` • 7 specialized extractors (tables, charts, heatmaps, etc.)`, colors.dim);
146
- log(` • Verbatim extraction with quality scoring`, colors.dim);
147
- log(` • Auto-revision loop for failed extractions`, colors.dim);
148
- log('');
149
- log(`Run in Claude Code:`, colors.bright);
150
- log(` /structure path/to/document.pdf`, colors.cyan);
151
- log('');
152
- log(`${colors.dim}Supports: PDF, DOCX, PNG, JPG, TIFF${colors.reset}`);
126
+ log(`${colors.green}Done!${colors.reset} Run ${colors.cyan}/structure <path>${colors.reset} to extract.`);
153
127
  log('');
154
128
  }
155
129
 
@@ -187,9 +161,6 @@ function uninstall() {
187
161
  function showVersion() {
188
162
  log(`structurecc v${VERSION}`, colors.bright);
189
163
  log('');
190
- log('Pipeline: 3-phase with verification', colors.dim);
191
- log('Agents: 8 (classifier + 6 extractors + verifier)', colors.dim);
192
- log('');
193
164
  }
194
165
 
195
166
  // Main
@@ -204,27 +175,11 @@ if (args.includes('--uninstall') || args.includes('-u')) {
204
175
  } else if (args.includes('--help') || args.includes('-h')) {
205
176
  log('Usage: npx structurecc [options]', colors.bright);
206
177
  log('');
207
- log('Options:', colors.bright);
208
- log(' --help, -h Show this help', colors.dim);
209
- log(' --version, -v Show version info', colors.dim);
210
- log(' --uninstall, -u Remove from Claude Code', colors.dim);
178
+ log('Options:', colors.dim);
179
+ log(' --uninstall, -u Remove from Claude Code');
211
180
  log('');
212
- log('After install, use in Claude Code:', colors.bright);
181
+ log('After install, run in Claude Code:', colors.bright);
213
182
  log(' /structure path/to/document.pdf', colors.cyan);
214
- log(' /structure path/to/document.docx', colors.cyan);
215
- log('');
216
- log('Pipeline:', colors.bright);
217
- log(' Phase 1: Classification (haiku - fast triage)', colors.dim);
218
- log(' Phase 2: Specialized extraction (opus - quality)', colors.dim);
219
- log(' Phase 3: Verification (sonnet - balance)', colors.dim);
220
- log('');
221
- log('Extractors:', colors.bright);
222
- log(' • structurecc-extract-table - Tables with cell-by-cell accuracy', colors.dim);
223
- log(' • structurecc-extract-chart - Charts with axes, legends, data', colors.dim);
224
- log(' • structurecc-extract-heatmap - Heatmaps with color scales', colors.dim);
225
- log(' • structurecc-extract-diagram - Flowcharts, timelines, networks', colors.dim);
226
- log(' • structurecc-extract-multipanel - Multi-panel figures (A,B,C,D)', colors.dim);
227
- log(' • structurecc-extract-generic - Fallback for other visuals', colors.dim);
228
183
  log('');
229
184
  } else {
230
185
  install();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "structurecc",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Extract structured data from PDFs, Word docs, and images using Claude Code.",
5
5
  "keywords": [
6
6
  "document-extraction",