autogit-tool 1.0.18 → 1.0.21

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 (109) hide show
  1. package/README.md +61 -7
  2. package/dist/ai/code-reader.d.ts.map +1 -1
  3. package/dist/ai/code-reader.js +22 -9
  4. package/dist/ai/code-reader.js.map +1 -1
  5. package/dist/ai/prompts.d.ts +6 -0
  6. package/dist/ai/prompts.d.ts.map +1 -1
  7. package/dist/ai/prompts.js +154 -49
  8. package/dist/ai/prompts.js.map +1 -1
  9. package/dist/ai/provider.d.ts.map +1 -1
  10. package/dist/ai/provider.js +27 -0
  11. package/dist/ai/provider.js.map +1 -1
  12. package/dist/ai/readme-agent.d.ts +5 -0
  13. package/dist/ai/readme-agent.d.ts.map +1 -0
  14. package/dist/ai/readme-agent.js +126 -0
  15. package/dist/ai/readme-agent.js.map +1 -0
  16. package/dist/cli.js +62 -1
  17. package/dist/cli.js.map +1 -1
  18. package/dist/commands/brag.d.ts +2 -0
  19. package/dist/commands/brag.d.ts.map +1 -0
  20. package/dist/commands/brag.js +10 -0
  21. package/dist/commands/brag.js.map +1 -0
  22. package/dist/commands/config.d.ts +2 -0
  23. package/dist/commands/config.d.ts.map +1 -1
  24. package/dist/commands/config.js +18 -2
  25. package/dist/commands/config.js.map +1 -1
  26. package/dist/commands/github.d.ts +1 -0
  27. package/dist/commands/github.d.ts.map +1 -1
  28. package/dist/commands/github.js +11 -2
  29. package/dist/commands/github.js.map +1 -1
  30. package/dist/commands/linkedin.d.ts +3 -0
  31. package/dist/commands/linkedin.d.ts.map +1 -1
  32. package/dist/commands/linkedin.js +124 -12
  33. package/dist/commands/linkedin.js.map +1 -1
  34. package/dist/commands/publish.d.ts.map +1 -1
  35. package/dist/commands/publish.js +15 -46
  36. package/dist/commands/publish.js.map +1 -1
  37. package/dist/commands/readme.d.ts.map +1 -1
  38. package/dist/commands/readme.js +14 -0
  39. package/dist/commands/readme.js.map +1 -1
  40. package/dist/commands/resume.d.ts +2 -0
  41. package/dist/commands/resume.d.ts.map +1 -1
  42. package/dist/commands/resume.js +311 -81
  43. package/dist/commands/resume.js.map +1 -1
  44. package/dist/commands/setup.d.ts +3 -0
  45. package/dist/commands/setup.d.ts.map +1 -0
  46. package/dist/commands/setup.js +58 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/showcase.d.ts +4 -0
  49. package/dist/commands/showcase.d.ts.map +1 -0
  50. package/dist/commands/showcase.js +35 -0
  51. package/dist/commands/showcase.js.map +1 -0
  52. package/dist/config/manager.d.ts +16 -1
  53. package/dist/config/manager.d.ts.map +1 -1
  54. package/dist/config/manager.js +9 -0
  55. package/dist/config/manager.js.map +1 -1
  56. package/dist/pipeline/main-pipeline.d.ts +2 -0
  57. package/dist/pipeline/main-pipeline.d.ts.map +1 -1
  58. package/dist/pipeline/main-pipeline.js +135 -119
  59. package/dist/pipeline/main-pipeline.js.map +1 -1
  60. package/dist/services/brag-agent.d.ts +19 -0
  61. package/dist/services/brag-agent.d.ts.map +1 -0
  62. package/dist/services/brag-agent.js +177 -0
  63. package/dist/services/brag-agent.js.map +1 -0
  64. package/dist/services/brag-runtime.d.ts +7 -0
  65. package/dist/services/brag-runtime.d.ts.map +1 -0
  66. package/dist/services/brag-runtime.js +68 -0
  67. package/dist/services/brag-runtime.js.map +1 -0
  68. package/dist/services/commit-workflow.d.ts +2 -0
  69. package/dist/services/commit-workflow.d.ts.map +1 -0
  70. package/dist/services/commit-workflow.js +60 -0
  71. package/dist/services/commit-workflow.js.map +1 -0
  72. package/dist/services/git-service.d.ts +12 -1
  73. package/dist/services/git-service.d.ts.map +1 -1
  74. package/dist/services/git-service.js +42 -3
  75. package/dist/services/git-service.js.map +1 -1
  76. package/dist/services/pdf-to-latex.d.ts +17 -0
  77. package/dist/services/pdf-to-latex.d.ts.map +1 -0
  78. package/dist/services/pdf-to-latex.js +108 -0
  79. package/dist/services/pdf-to-latex.js.map +1 -0
  80. package/dist/services/publish-workflow.d.ts +14 -0
  81. package/dist/services/publish-workflow.d.ts.map +1 -0
  82. package/dist/services/publish-workflow.js +96 -0
  83. package/dist/services/publish-workflow.js.map +1 -0
  84. package/dist/services/readme-manager.d.ts +2 -1
  85. package/dist/services/readme-manager.d.ts.map +1 -1
  86. package/dist/services/readme-manager.js +35 -24
  87. package/dist/services/readme-manager.js.map +1 -1
  88. package/dist/services/resume-manager.js +1 -1
  89. package/dist/services/share-package.d.ts +10 -0
  90. package/dist/services/share-package.d.ts.map +1 -0
  91. package/dist/services/share-package.js +21 -0
  92. package/dist/services/share-package.js.map +1 -0
  93. package/dist/services/showcase-cards.d.ts +7 -0
  94. package/dist/services/showcase-cards.d.ts.map +1 -0
  95. package/dist/services/showcase-cards.js +47 -0
  96. package/dist/services/showcase-cards.js.map +1 -0
  97. package/dist/services/showcase.d.ts +16 -0
  98. package/dist/services/showcase.d.ts.map +1 -0
  99. package/dist/services/showcase.js +79 -0
  100. package/dist/services/showcase.js.map +1 -0
  101. package/dist/services/social-generator.d.ts +5 -0
  102. package/dist/services/social-generator.d.ts.map +1 -1
  103. package/dist/services/social-generator.js +34 -0
  104. package/dist/services/social-generator.js.map +1 -1
  105. package/dist/services/social-images.d.ts +5 -0
  106. package/dist/services/social-images.d.ts.map +1 -0
  107. package/dist/services/social-images.js +79 -0
  108. package/dist/services/social-images.js.map +1 -0
  109. package/package.json +5 -1
package/README.md CHANGED
@@ -25,8 +25,11 @@ When you run `autogit` inside a project directory it:
25
25
  5. Stages, commits, and pushes to GitHub — creating the repository if it doesn't exist
26
26
  6. Updates your LaTeX resume with an AI-written project entry
27
27
  7. Generates a LinkedIn post, X (Twitter) post, DEV.to draft, and resume bullet
28
+ 8. Saves a share package with a sourced LinkedIn post, text drafts, evidence, and three PNG cards; offers a Brag video when its optional setup is installed
28
29
 
29
- Everything is previewed and requires confirmation before writing. Pass `--yes` to skip all prompts.
30
+ The share package is saved under `~/.autogit/social/<project>/`. LinkedIn publishing and image upload still require your review. Destructive or public-facing Git actions require confirmation; pass `--yes` to skip prompts.
31
+
32
+ The main run creates three evidence cards automatically. It can also add a real screenshot from a running web app with `autogit --screenshot-url http://localhost:3000`, or conceptual artwork with `autogit --promo-image` when OpenAI image generation is configured. Interactive runs offer these choices after the share package is created.
30
33
 
31
34
  ---
32
35
 
@@ -40,6 +43,10 @@ npm install -g autogit-tool
40
43
 
41
44
  **Requirements:** Node.js 18+, Git
42
45
 
46
+ On the first interactive `autogit` run, setup asks for **Default** (preselected) or **Customize**, then whether to include Brag (**Yes** preselected), and finally which AI provider to use. AutoGit then installs a matching coding agent and its Brag skill: Codex for OpenAI, Claude Code for Anthropic, or OpenCode for other providers. Rerun the wizard with `autogit setup`. npm does not reliably expose interactive package-install prompts, so the questions appear on first launch, not while `npm install` is running. Non-interactive runs and `--yes` skip the wizard.
47
+
48
+ The optional Brag step installs a matching agent and its skill globally. Run `autogit brag` from a project folder to start the video workflow. AutoGit passes the selected AI credential only to that agent process; it does not copy the key into the agent's settings. During opted-in setup, AutoGit installs Node 22 and FFmpeg into its user-data folder if needed; Brag uses `npx hyperframes` to fetch its renderer on first use. The managed FFmpeg binary is a third-party GPL-licensed component. The image-card showcase works without those video tools. Azure OpenAI is not yet mapped to the OpenCode runner.
49
+
43
50
  ---
44
51
 
45
52
  ## Quick start
@@ -48,11 +55,11 @@ npm install -g autogit-tool
48
55
  # 1. Go to any project folder
49
56
  cd my-project
50
57
 
51
- # 2. Set up your GitHub token (first time only)
52
- autogit login
58
+ # 2. First run opens the Default/Customize and AI setup wizard
59
+ autogit setup
53
60
 
54
- # 3. Set up your AI provider (first time only)
55
- autogit config
61
+ # 3. Set up your GitHub token (first time only)
62
+ autogit login
56
63
 
57
64
  # 4. Run
58
65
  autogit
@@ -80,7 +87,11 @@ AutoGit supports 13 AI providers. Configure via `autogit config` or environment
80
87
  | **Ollama** | `OLLAMA_ENDPOINT` | `llama3.1` | ✔ Local |
81
88
  | **Azure OpenAI** | `AZURE_OPENAI_KEY` | your deployment | — |
82
89
  | **NVIDIA NIM** | `NVIDIA_API_KEY` | `meta/llama-3.3-70b-instruct` | ✔ Free credits |
83
- | **Custom** | `CUSTOM_API_KEY` | your model | — |
90
+ | **Cerebras** | `CEREBRAS_API_KEY` | `gpt-oss-120b` | — |
91
+ | **DeepInfra** | `DEEPINFRA_API_KEY` | `deepseek-ai/DeepSeek-V3.2` | — |
92
+ | **Hugging Face Inference** | `HUGGINGFACE_API_KEY` or `HF_TOKEN` | `openai/gpt-oss-120b:fastest` | ✔ Limited |
93
+ | **Fireworks AI** | `FIREWORKS_API_KEY` | `accounts/fireworks/models/llama-v3p1-8b-instruct` | — |
94
+ | **Custom OpenAI-compatible** | `CUSTOM_API_KEY` | your model | — |
84
95
 
85
96
  **Recommended for free usage:** [Groq](https://console.groq.com) — fastest free API, no credit card required. [NVIDIA NIM](https://build.nvidia.com) also provides free credits on signup.
86
97
 
@@ -117,6 +128,10 @@ set GROQ_API_KEY=gsk_your_key_here
117
128
  autogit config --test
118
129
  ```
119
130
 
131
+ ### Custom endpoint
132
+
133
+ Choose **custom** in `autogit config` to use any service that implements the OpenAI chat-completions API. Enter its base endpoint, model name, and API key. The key is optional for local servers such as LM Studio, LocalAI, vLLM, and llama.cpp. The same endpoint, model, and key are passed to OpenCode for the optional Brag workflow; credentials are not saved in OpenCode.
134
+
120
135
  ---
121
136
 
122
137
  ## GitHub Authentication
@@ -179,8 +194,12 @@ autogit resume # update resume for current project
179
194
  autogit resume --no-ai # use template bullets instead of AI
180
195
  autogit resume --show # check configured path
181
196
  autogit resume --setup # reconfigure
197
+ autogit resume --file resume.tex # use an existing LaTeX file
198
+ autogit resume --from-pdf resume.pdf # convert a text-based PDF to LaTeX
182
199
  ```
183
200
 
201
+ PDF conversion extracts text locally, sends the extracted resume content to your configured AI provider, and writes a `.tex` file beside the PDF when that location is writable. Scanned, image-only PDFs require OCR first. Review the generated LaTeX before using it.
202
+
184
203
  The resume step runs automatically in the main pipeline. Skip it with:
185
204
 
186
205
  ```bash
@@ -193,13 +212,16 @@ autogit --skip-resume
193
212
 
194
213
  | Command | Description |
195
214
  |---|---|
196
- | `autogit` | Full pipeline: scan → docs → resume → commit → push → social |
215
+ | `autogit` | Full pipeline: scan → docs → resume → commit → push → share package, with optional Brag video |
197
216
  | `autogit init` | Initialize Git and generate `.gitignore` |
198
217
  | `autogit docs` | Generate `PROJECT_SUMMARY.md`, `ARCHITECTURE.md`, `CONTRIBUTING.md` |
199
218
  | `autogit readme` | Generate or update README only |
200
219
  | `autogit publish` | Commit and push to GitHub |
201
220
  | `autogit github` | Create GitHub repository |
202
221
  | `autogit linkedin` | Generate all social content (short/medium/long LinkedIn, Twitter, DEV.to, resume bullet) |
222
+ | `autogit setup` | Configure defaults, optional Brag skill, and AI provider |
223
+ | `autogit brag` | Run Brag video creation with the matched coding agent |
224
+ | `autogit showcase` | Create a sourced project post and three LinkedIn-ready PNG cards |
203
225
  | `autogit release` | Create a GitHub release with tag and notes |
204
226
  | `autogit resume` | Update LaTeX resume with current project |
205
227
  | `autogit analyze` | Project score card: documentation, code quality, maintainability |
@@ -209,6 +231,31 @@ autogit --skip-resume
209
231
 
210
232
  ---
211
233
 
234
+ ## Publishing Safely
235
+
236
+ Before committing, AutoGit shows files already staged, files it plans to stage, the current branch, and the `origin` remote. Partially staged files keep their staged version; their remaining edits stay unstaged. Obvious credential files such as `.env` and private keys stop the commit. A failed push returns an error, while the local commit remains available to retry.
237
+
238
+ If `origin` exists, AutoGit pushes there without changing its URL or requiring a GitHub API token. If there is no remote, AutoGit can create a new repository; new repositories are private by default unless `--public` or a saved public visibility default is specified. If a same-named repository already exists, AutoGit asks you to set `origin` yourself so it cannot choose the wrong destination. `--yes` skips prompts but does not bypass the credential-file check.
239
+
240
+ ---
241
+
242
+ ## LinkedIn Images
243
+
244
+ For any project, including a CLI, API, library, or data project, run `autogit showcase`. It detects the project type, uses traceable project facts, and saves a post, three PNG cards, editable SVG versions, and an `evidence.json` file under `~/.autogit/social/<project>/showcase-<timestamp>/`. Review the draft before sharing. It never runs project commands or invents terminal output, performance results, or a UI screenshot. The PNG renderer is included in AutoGit's npm dependencies; no coding agent, browser, FFmpeg, or Hyperframes installation is required. Use `autogit showcase --no-ai` for a factual offline template. Videos are not generated by this command.
245
+
246
+ Run `autogit linkedin` and choose a real screenshot, conceptual promotional artwork, or both. Images are saved under AutoGit's user data directory and must be uploaded in LinkedIn's composer; opening the share dialog does not attach local image files.
247
+
248
+ ```bash
249
+ autogit linkedin --screenshot-url http://localhost:3000
250
+ autogit linkedin --promo-image
251
+ autogit linkedin --showcase-cards
252
+ autogit linkedin --screenshot-url http://localhost:3000 --promo-image "minimal product illustration"
253
+ ```
254
+
255
+ Screenshots capture a running web app using Chrome, Edge, or Chromium installed on the computer. Promotional artwork uses the OpenAI image API when OpenAI is the selected AI provider; other providers are not switched automatically. Set an image model with `autogit config --set ai.imageModel=gpt-image-1.5` or `AUTOGIT_IMAGE_MODEL`; the default is `gpt-image-1.5`. Artwork is conceptual and should not be presented as a screenshot of the app.
256
+
257
+ ---
258
+
212
259
  ## All Flags
213
260
 
214
261
  | Flag | Description |
@@ -312,6 +359,12 @@ autogit --no-ai
312
359
 
313
360
  README, docs, commit messages, resume entries, and social posts are all generated from templates based on the project analysis. Quality is lower but it works offline with no API keys.
314
361
 
362
+ ### Project-aware README generation
363
+
364
+ With an AI provider configured, `autogit readme` inspects the current project in several steps. It can search the project file list and read relevant source and configuration files before drafting. AutoGit shows the proposed README or a diff and asks before writing. No separate coding-agent program is required; the feature uses AutoGit's existing AI provider configuration.
365
+
366
+ Sensitive files such as `.env`, private keys, and lockfiles are excluded from this inspection. If AI generation fails or no provider is configured while a README already exists, AutoGit leaves that file unchanged. For a new project, it falls back to a template. Use `autogit readme --no-ai` to request template generation explicitly.
367
+
315
368
  ---
316
369
 
317
370
  ## Contributing
@@ -331,6 +384,7 @@ npm link # install autogit globally from this local folder
331
384
  | Script | What it does |
332
385
  |---|---|
333
386
  | `npm run build` | Compile TypeScript to `dist/` (required before running) |
387
+ | `npm test` | Build and run the README agent tests |
334
388
  | `npm run dev` | Watch mode — recompiles automatically on every file save |
335
389
  | `npm start` | Run the CLI directly via `node dist/cli.js` |
336
390
  | `npm run lint` | Run ESLint across `src/` |
@@ -1 +1 @@
1
- {"version":3,"file":"code-reader.d.ts","sourceRoot":"","sources":["../../src/ai/code-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAgBD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,WAAW,CAAC,CAkDtB"}
1
+ {"version":3,"file":"code-reader.d.ts","sourceRoot":"","sources":["../../src/ai/code-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAwBD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,WAAW,CAAC,CAoDtB"}
@@ -1,3 +1,4 @@
1
+ import { getAIConfig } from '../config/manager.js';
1
2
  const IGNORED_PATTERNS = [
2
3
  /node_modules/i, /\.git/i, /dist\//i, /build\//i, /__pycache__/i,
3
4
  /\.min\.js$/i, /\.map$/i, /\.lock$/i, /package-lock\.json$/i,
@@ -6,9 +7,16 @@ const SOURCE_EXTS = new Set([
6
7
  '.py', '.ts', '.tsx', '.js', '.jsx', '.go', '.rs', '.java',
7
8
  '.kt', '.cs', '.rb', '.php', '.swift', '.vue', '.svelte',
8
9
  ]);
9
- // Keep under ~7k tokens (≈28k chars) safe for Groq free tier (12k TPM limit)
10
- const MAX_TOTAL_CHARS = 22_000;
11
- const MAX_FILE_CHARS = 18_000;
10
+ // Generous providers (Gemini, OpenAI, Anthropic, etc.) get full content
11
+ // Conservative providers (Groq free tier) get reduced content
12
+ const GENEROUS_PROVIDERS = new Set(['gemini', 'openai', 'anthropic', 'openrouter', 'mistral', 'deepseek', 'azure-openai', 'xai']);
13
+ function getTokenBudget() {
14
+ const cfg = getAIConfig();
15
+ const isGenerous = GENEROUS_PROVIDERS.has(cfg.provider);
16
+ return isGenerous
17
+ ? { maxTotal: 160_000, maxFile: 120_000 } // ~40k tokens — Gemini handles 1M/day
18
+ : { maxTotal: 22_000, maxFile: 18_000 }; // ~5k tokens — Groq 12k TPM safe
19
+ }
12
20
  /**
13
21
  * Build a smart code summary — extracts meaningful logic, strips boilerplate.
14
22
  *
@@ -19,6 +27,7 @@ const MAX_FILE_CHARS = 18_000;
19
27
  */
20
28
  export async function buildCodeSummary(rootDir, scan) {
21
29
  const { readFileSync } = await import('fs');
30
+ const { maxTotal, maxFile } = getTokenBudget();
22
31
  const sourceFiles = scan.files
23
32
  .filter(f => SOURCE_EXTS.has(f.extension) &&
24
33
  !IGNORED_PATTERNS.some(p => p.test(f.relativePath)))
@@ -27,7 +36,7 @@ export async function buildCodeSummary(rootDir, scan) {
27
36
  let totalChars = 0;
28
37
  let filesRead = 0;
29
38
  for (const file of sourceFiles) {
30
- if (totalChars >= MAX_TOTAL_CHARS)
39
+ if (totalChars >= maxTotal)
31
40
  break;
32
41
  let raw;
33
42
  try {
@@ -44,7 +53,7 @@ export async function buildCodeSummary(rootDir, scan) {
44
53
  .replace(/\n{3,}/g, '\n\n');
45
54
  let content;
46
55
  if (file.extension === '.py') {
47
- content = extractPythonCore(raw);
56
+ content = extractPythonCore(raw, maxTotal);
48
57
  }
49
58
  else if (['.ts', '.tsx', '.js', '.jsx'].includes(file.extension)) {
50
59
  content = extractJSCore(raw);
@@ -52,11 +61,11 @@ export async function buildCodeSummary(rootDir, scan) {
52
61
  else {
53
62
  content = raw.slice(0, 6000);
54
63
  }
55
- const remaining = MAX_TOTAL_CHARS - totalChars;
64
+ const remaining = maxTotal - totalChars;
56
65
  if (content.length > remaining)
57
66
  content = content.slice(0, remaining) + '\n# [truncated]';
58
- if (content.length > MAX_FILE_CHARS)
59
- content = content.slice(0, MAX_FILE_CHARS) + '\n# [truncated]';
67
+ if (content.length > maxFile)
68
+ content = content.slice(0, maxFile) + '\n# [truncated]';
60
69
  if (!content.trim())
61
70
  continue;
62
71
  parts.push(`\n${'─'.repeat(50)}\n# FILE: ${file.relativePath}\n${'─'.repeat(50)}\n${content}`);
@@ -69,7 +78,11 @@ export async function buildCodeSummary(rootDir, scan) {
69
78
  * Python: imports + constants + each function (docstring + first 30 body lines)
70
79
  * Skips functions that are >40% st.markdown/HTML rendering calls.
71
80
  */
72
- function extractPythonCore(raw) {
81
+ function extractPythonCore(raw, maxTotal) {
82
+ // For generous providers (Gemini etc.) — return the full cleaned file
83
+ if (maxTotal > 50_000) {
84
+ return raw;
85
+ }
73
86
  const lines = raw.split('\n');
74
87
  const out = [];
75
88
  // Imports
@@ -1 +1 @@
1
- {"version":3,"file":"code-reader.js","sourceRoot":"","sources":["../../src/ai/code-reader.ts"],"names":[],"mappings":"AAQA,MAAM,gBAAgB,GAAG;IACvB,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc;IAChE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB;CAC7D,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO;IAC1D,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SA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,CAAC;QAElB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,GAAG,EAAE,EAAE,CAAC;YAC1C,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACpB,KAAK,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,CAAC,EAAE,CAAC;YACJ,SAAS,EAAE,CAAC;YACZ,IAAI,KAAK,IAAI,CAAC;gBAAE,MAAM;QACxB,CAAC;QAED,IAAI,KAAK,GAAG,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC9C,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
@@ -12,4 +12,10 @@ export declare function insightsPrompt(analysis: ProjectAnalysis): string;
12
12
  export declare function readmeGenerationPromptWithCode(analysis: ProjectAnalysis, code: CodeSummary, existingReadme?: string): string;
13
13
  /** Resume entry generation with actual source code content */
14
14
  export declare function resumePromptWithCode(analysis: ProjectAnalysis, code: CodeSummary, ownerName: string): string;
15
+ /** Convert a plain-text resume extracted from PDF into a professional LaTeX file */
16
+ export declare function pdfToLatexPrompt(resumeText: string, ownerInfo: {
17
+ name?: string;
18
+ email?: string;
19
+ website?: string;
20
+ }): string;
15
21
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/ai/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK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AAQ,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAsCjG;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAW3D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CA0BxG;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAenE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAiBtE;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAmBhG;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAsBhE;AAED,wDAAwD;AACxD,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,WAAW,EACjB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAuDR;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAgDR;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAkFT"}
@@ -169,81 +169,186 @@ Be honest and constructive. Return ONLY valid JSON.`;
169
169
  /** README generation with actual source code content */
170
170
  export function readmeGenerationPromptWithCode(analysis, code, existingReadme) {
171
171
  const context = buildProjectContext(analysis);
172
- const codeSection = `
173
- SOURCE CODE (${code.filesRead} file${code.filesRead !== 1 ? 's' : ''}, ${code.charCount.toLocaleString()} chars):
174
- ${code.content}
175
- `.trim();
172
+ const displayName = analysis.displayName || analysis.name;
173
+ const codeSection = `SOURCE CODE (${code.filesRead} file${code.filesRead !== 1 ? 's' : ''}, ${code.charCount.toLocaleString()} chars read):
174
+ ${code.content}`;
176
175
  if (existingReadme) {
177
- return `You are a technical documentation expert. Read the SOURCE CODE below to understand what this project actually does, then improve the README.
176
+ return `You are a senior technical writer. Read EVERY LINE of the source code below, then rewrite the README to accurately describe what this project actually does.
178
177
 
179
178
  ${codeSection}
180
179
 
181
180
  ---
182
- PROJECT METADATA:
183
- ${context}
181
+ METADATA: ${context}
184
182
 
185
183
  EXISTING README:
186
184
  ${existingReadme}
187
185
 
188
- INSTRUCTIONS:
189
- - Read the source code carefully to understand the real features, logic, and purpose.
190
- - Preserve existing custom content, badges, images, and links.
191
- - Fill in missing sections based on what you actually see in the code.
192
- - Do NOT invent features not present in the source code.
193
- - Use professional Markdown formatting.
194
- - Return ONLY the improved README content, no explanations.`;
186
+ REQUIREMENTS — the README must:
187
+ 1. Title: Use "${displayName}" (not the folder name)
188
+ 2. Description: 2-3 sentences describing the REAL purpose based on the code — what problem it solves, who uses it
189
+ 3. Features: Bullet list of CONCRETE features visible in the code (functions, UI sections, calculations, integrations)
190
+ 4. Tech Stack: Every library imported in the source files
191
+ 5. Installation: Exact commands including dependencies visible in imports
192
+ 6. Usage: Step-by-step based on actual entry points seen in the code
193
+ 7. Preserve any badges, links, or custom content already in the README
194
+
195
+ Do NOT use vague phrases like "manages data" or "provides functionality".
196
+ Be specific: name the actual algorithms, calculations, integrations, and UI sections you see.
197
+ Return ONLY the README markdown, no explanations.`;
195
198
  }
196
- return `You are a technical documentation expert. Read the SOURCE CODE below carefully to understand what this project does, then generate a professional README.md.
199
+ return `You are a senior technical writer. Read EVERY LINE of the source code below, then write a professional README that accurately describes what this project does.
197
200
 
198
201
  ${codeSection}
199
202
 
200
203
  ---
201
- PROJECT METADATA:
202
- ${context}
204
+ METADATA: ${context}
205
+
206
+ REQUIREMENTS — the README must:
207
+ 1. Title: Use "${displayName}"
208
+ 2. Description (2-3 sentences): What does this software actually DO? What problem does it solve? Be specific.
209
+ 3. Features: Bullet list of REAL features from the code — name actual functions, algorithms, UI components, data flows
210
+ 4. Tech Stack: Every library found in import statements
211
+ 5. Installation: Exact commands based on what you see in the code
212
+ 6. Usage: Step-by-step instructions based on actual entry points and UI flow visible in the code
213
+ 7. How It Works (optional): If there's interesting logic (formulas, algorithms), briefly explain it
214
+ 8. Contributing section
203
215
 
204
- INSTRUCTIONS:
205
- - Read the source code to understand the real features, algorithms, and purpose don't just rely on metadata.
206
- - Include: Title, Description (what it actually does), Features (from code), Tech Stack, Installation, Usage, Contributing, License.
207
- - For the Description: describe what the software actually does based on the code, not generic phrases.
208
- - For Features: list concrete capabilities you can see in the code.
209
- - For Usage: include the actual command to run it and what it does.
210
- - Do NOT invent anything not in the code.
211
- - Return ONLY the README content, no explanations.`;
216
+ Rules:
217
+ - Name the actual algorithms and calculations you see (e.g. "longation percentage calculation")
218
+ - Reference real UI sections, tabs, and input fields seen in the code
219
+ - Do NOT invent features not in the code
220
+ - Do NOT use generic placeholder text
221
+ Return ONLY the README markdown, nothing else.`;
212
222
  }
213
223
  /** Resume entry generation with actual source code content */
214
224
  export function resumePromptWithCode(analysis, code, ownerName) {
215
225
  const displayName = analysis.displayName || analysis.name;
216
226
  const techStack = [...analysis.languages, ...analysis.frameworks, ...analysis.libraries]
217
227
  .filter(Boolean).join(', ');
218
- return `You are a professional resume writer. Read the SOURCE CODE below to understand what this project does, then write a LaTeX resume entry for ${ownerName}'s technical resume.
228
+ return `You are a senior software engineer writing resume bullets for ${ownerName}. Your task is to read the source code below and write resume bullets that are SPECIFIC, TECHNICAL, and IMPRESSIVE matching the quality of the examples below.
229
+
230
+ QUALITY EXAMPLES (these are the style and depth you must match):
231
+
232
+ Example 1 — ERP system:
233
+ \\resumeItem{Engineered a robust SQL Server-to-Cloud sync engine using \\texttt{pyodbc} and \\texttt{FastAPI} that performs real-time data extraction of sales orders, invoices, and ledger masters with read-only transaction isolation level settings.}
234
+ \\resumeItem{Implemented a complex financial outstanding calculation engine that replicates \\texttt{PROC\\_OUTSTANDING} logic, accurately reconciling bill-wise receivables by aggregating \\texttt{PARTYDETAIL} bills against \\texttt{ADJMASTER} receipts and unallocated \\texttt{TRAN\\_DETAIL} credits.}
235
+
236
+ Example 2 — CLI tool:
237
+ \\resumeItem{Engineered a recursive project scanner using \\texttt{readdirSync} and \\texttt{statSync} to perform deep dependency analysis, identifying build systems, test frameworks, and environment variables across multi-directory architectures.}
238
+ \\resumeItem{Developed a robust Git automation service using \\texttt{simple-git} that performs intelligent staging, generates conventional commit messages via diff analysis, and manages remote repository synchronization via the GitHub API.}
239
+
240
+ Example 3 — Inventory system:
241
+ \\resumeItem{Developed TSPL thermal printer integration (TSC TTP-244 Pro) via Windows Print Spooler (\\texttt{pywin32}), generating Code 39 barcodes across a 3-column label grid with sub-millimeter alignment calibration.}
242
+ \\resumeItem{Engineered a global barcode scanner intercept using injected JavaScript that detects rapid keystroke patterns ($<$500ms) to distinguish scanner input from human typing, auto-redirecting to the usage page with pre-filled data.}
243
+
244
+ ---
245
+ NOW READ THIS SOURCE CODE CAREFULLY:
219
246
 
220
- SOURCE CODE (${code.filesRead} file${code.filesRead !== 1 ? 's' : ''}):
221
247
  ${code.content}
222
248
 
223
249
  ---
224
- PROJECT METADATA:
225
- - Name: ${displayName}
226
- - Tech Stack: ${techStack}
227
- - Features detected: ${analysis.codeFeatures.join(', ') || 'See code'}
250
+ PROJECT: ${displayName}
251
+ TECH STACK: ${techStack}
252
+
253
+ WRITE THE RESUME ENTRY following these rules:
254
+ 1. Name ACTUAL functions, classes, algorithms, and data structures from the code (wrap in \\texttt{})
255
+ 2. Include numbers and specifics where visible (e.g. table counts, threshold values, timing constraints)
256
+ 3. Explain the WHY or technical challenge — not just what was built
257
+ 4. Use strong past-tense verbs: Engineered, Implemented, Developed, Designed, Built
258
+ 5. Each bullet should be 1-2 sentences, dense with technical detail
259
+
260
+ REQUIRED FORMAT:
261
+ \\resumeProjectHeading
262
+ {\\textbf{${displayName}} $|$ \\emph{[category reflecting what the code does]}}{}
263
+ \\resumeItemListStart
264
+ \\resumeItem{[most impressive/complex core feature]}
265
+ \\resumeItem{[second major feature or technical decision]}
266
+ \\resumeItem{[third feature — could be UI, data handling, or integration]}
267
+ \\resumeItem{\\textbf{Tech Stack:} ${techStack}}
268
+ \\resumeItemListEnd
269
+
270
+ Return ONLY the LaTeX block. No explanation, no markdown fences, no commentary.`;
271
+ }
272
+ /** Convert a plain-text resume extracted from PDF into a professional LaTeX file */
273
+ export function pdfToLatexPrompt(resumeText, ownerInfo) {
274
+ const templatePreamble = `%-------------------------
275
+ % Resume in LaTeX
276
+ %-------------------------
277
+ \\documentclass[letterpaper,11pt]{article}
278
+ \\usepackage{latexsym}
279
+ \\usepackage[empty]{fullpage}
280
+ \\usepackage{titlesec}
281
+ \\usepackage{marvosym}
282
+ \\usepackage[usenames,dvipsnames]{color}
283
+ \\usepackage{verbatim}
284
+ \\usepackage{enumitem}
285
+ \\usepackage[hidelinks]{hyperref}
286
+ \\usepackage{fancyhdr}
287
+ \\usepackage[english]{babel}
288
+ \\usepackage{tabularx}
289
+ \\usepackage{geometry}
290
+ \\geometry{letterpaper,top=0.5in,bottom=0.5in,left=0.55in,right=0.55in}
291
+ \\pagestyle{fancy}
292
+ \\fancyhf{}
293
+ \\fancyfoot{}
294
+ \\renewcommand{\\headrulewidth}{0pt}
295
+ \\renewcommand{\\footrulewidth}{0pt}
296
+ \\urlstyle{same}
297
+ \\raggedbottom
298
+ \\raggedright
299
+ \\setlength{\\tabcolsep}{0in}
300
+ \\titleformat{\\section}{\\vspace{-4pt}\\scshape\\raggedright\\large}{}{0em}{}[\\color{black}\\titlerule \\vspace{-5pt}]
301
+ \\newcommand{\\resumeItem}[1]{\\item\\small{{#1 \\vspace{-2pt}}}}
302
+ \\newcommand{\\resumeSubheading}[4]{
303
+ \\vspace{-2pt}\\item
304
+ \\begin{tabular*}{0.97\\textwidth}[t]{l@{\\extracolsep{\\fill}}r}
305
+ \\textbf{#1} & #2 \\\\
306
+ \\textit{\\small#3} & \\textit{\\small #4} \\\\
307
+ \\end{tabular*}\\vspace{-7pt}}
308
+ \\newcommand{\\resumeProjectHeading}[2]{
309
+ \\item
310
+ \\begin{tabular*}{0.97\\textwidth}{l@{\\extracolsep{\\fill}}r}
311
+ \\small#1 & #2 \\\\
312
+ \\end{tabular*}\\vspace{-7pt}}
313
+ \\newcommand{\\resumeSubItem}[1]{\\resumeItem{#1}\\vspace{-4pt}}
314
+ \\renewcommand\\labelitemii{$\\vcenter{\\hbox{\\tiny$\\bullet$}}$}
315
+ \\newcommand{\\resumeSubHeadingListStart}{\\begin{itemize}[leftmargin=0.15in, label={}]}
316
+ \\newcommand{\\resumeSubHeadingListEnd}{\\end{itemize}}
317
+ \\newcommand{\\resumeItemListStart}{\\begin{itemize}}
318
+ \\newcommand{\\resumeItemListEnd}{\\end{itemize}\\vspace{-5pt}}`;
319
+ const name = ownerInfo.name || 'Your Name';
320
+ const email = ownerInfo.email || 'email@example.com';
321
+ const website = ownerInfo.website || '';
322
+ return `You are a LaTeX expert. Convert the resume text below into a professional LaTeX resume using the exact template structure provided.
323
+
324
+ RESUME TEXT (extracted from PDF):
325
+ ---
326
+ ${resumeText}
327
+ ---
328
+
329
+ TEMPLATE PREAMBLE TO USE (copy this exactly):
330
+ ${templatePreamble}
228
331
 
229
332
  INSTRUCTIONS:
230
- 1. Read the code carefully. Understand the real algorithms, data flows, and capabilities.
231
- 2. Use this EXACT LaTeX structure:
232
- \\resumeProjectHeading
233
- {\\textbf{${displayName}} $|$ \\emph{Category}}{}
234
- \\resumeItemListStart
235
- \\resumeItem{Bullet 1}
236
- \\resumeItem{Bullet 2}
237
- \\resumeItem{Bullet 3}
238
- \\resumeItem{\\textbf{Tech Stack:} ${techStack}}
239
- \\resumeItemListEnd
240
-
241
- 3. Write 3-5 bullets that are SPECIFIC to this codebase:
242
- - Mention actual algorithms, calculations, or business logic you see in the code
243
- - Reference real UI components, data flows, or integrations
244
- - Use strong action verbs (Built, Implemented, Engineered, Designed, Developed)
245
- - Be technical and concreteavoid vague generic bullets
246
- 4. Last bullet MUST be: \\textbf{Tech Stack:} ${techStack}
247
- 5. Return ONLY the LaTeX block — no explanation, no markdown fences, no commentary.`;
333
+ 1. Use the template preamble above verbatim do not change any \\newcommand or package definitions.
334
+ 2. For the heading section use:
335
+ \\begin{center}
336
+ {\\Huge \\scshape ${name}} \\\\ \\vspace{4pt}
337
+ \\small
338
+ \\href{mailto:${email}}{\\underline{${email}}} $|$
339
+ \\href{https://linkedin.com/in/...}{\\underline{linkedin.com/in/...}} $|$
340
+ \\href{https://github.com/...}{\\underline{github.com/...}}${website ? ` $|$\n \\href{https://${website}}{\\underline{${website}}}` : ''}
341
+ \\end{center}
342
+ 3. Fill in the actual LinkedIn/GitHub/website URLs from the resume text if present.
343
+ 4. Map each section from the PDF to the correct LaTeX environment:
344
+ - Work experience \\resumeSubheading{Company}{Location}{Title}{Dates} + \\resumeItemListStart/End
345
+ - Education \\resumeSubheading{Institution}{Location}{Degree}{Dates}
346
+ - Projects \\resumeProjectHeading{\\textbf{Name} $|$ \\emph{Type}}{} + \\resumeItemListStart/End
347
+ - Skills \\begin{itemize} with \\textbf{Category}{: items} rows
348
+ 5. Preserve ALL content from the PDF do not skip any section, job, project, or skill.
349
+ 6. For project bullets: keep them technical and specific. Use \\texttt{} for function names, libraries, and technical terms.
350
+ 7. End with \\end{document}.
351
+
352
+ Return ONLY the complete LaTeX source code, nothing else. No explanation, no markdown fences.`;
248
353
  }
249
354
  //# sourceMappingURL=prompts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/ai/prompts.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CAAC,QAAyB;IAC3D,OAAO;WACE,QAAQ,CAAC,IAAI;EACtB,QAAQ,C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AAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7G,YAAY,IAAI,OAAO,CAAC;CACzB;AAmeD,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAiBrD;AAED,wBAAgB,aAAa,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAAE,CAwB7F"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/ai/provider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7G,YAAY,IAAI,OAAO,CAAC;CACzB;AAyfD,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAiBrD;AAED,wBAAgB,aAAa,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAAE,CA4B7F"}
@@ -288,6 +288,25 @@ class NvidiaProvider {
288
288
  return { content, provider: 'nvidia', model };
289
289
  }
290
290
  }
291
+ class HostedOpenAICompatibleProvider {
292
+ name;
293
+ endpoint;
294
+ defaultModel;
295
+ getKey;
296
+ constructor(name, endpoint, defaultModel, getKey) {
297
+ this.name = name;
298
+ this.endpoint = endpoint;
299
+ this.defaultModel = defaultModel;
300
+ this.getKey = getKey;
301
+ }
302
+ isConfigured() { return !!this.getKey(); }
303
+ async generate(messages, options) {
304
+ const cfg = getAIConfig();
305
+ const model = cfg.model || this.defaultModel;
306
+ const content = await openAICompatPost(this.endpoint, this.getKey(), model, messages, options);
307
+ return { content, provider: this.name, model };
308
+ }
309
+ }
291
310
  // ─── Custom OpenAI-compatible endpoint ───────────────────────────────────────
292
311
  // Works with any server that speaks the OpenAI chat completions format:
293
312
  // LM Studio, Jan, LocalAI, vLLM, llama.cpp server, text-generation-webui, etc.
@@ -349,6 +368,10 @@ const providers = {
349
368
  xai: new XAIProvider(),
350
369
  'azure-openai': new AzureOpenAIProvider(),
351
370
  nvidia: new NvidiaProvider(),
371
+ cerebras: new HostedOpenAICompatibleProvider('cerebras', 'https://api.cerebras.ai/v1/chat/completions', 'gpt-oss-120b', () => getAIConfig().cerebrasKey),
372
+ deepinfra: new HostedOpenAICompatibleProvider('deepinfra', 'https://api.deepinfra.com/v1/openai/chat/completions', 'deepseek-ai/DeepSeek-V3.2', () => getAIConfig().deepinfraKey),
373
+ huggingface: new HostedOpenAICompatibleProvider('huggingface', 'https://router.huggingface.co/v1/chat/completions', 'openai/gpt-oss-120b:fastest', () => getAIConfig().huggingfaceKey),
374
+ fireworks: new HostedOpenAICompatibleProvider('fireworks', 'https://api.fireworks.ai/inference/v1/chat/completions', 'accounts/fireworks/models/llama-v3p1-8b-instruct', () => getAIConfig().fireworksKey),
352
375
  custom: new CustomProvider(),
353
376
  };
354
377
  export function getProvider(name) {
@@ -380,6 +403,10 @@ export function listProviders() {
380
403
  xai: 'grok-3-fast-beta',
381
404
  'azure-openai': '(your deployment name)',
382
405
  nvidia: 'meta/llama-3.3-70b-instruct',
406
+ cerebras: 'gpt-oss-120b',
407
+ deepinfra: 'deepseek-ai/DeepSeek-V3.2',
408
+ huggingface: 'openai/gpt-oss-120b:fastest',
409
+ fireworks: 'accounts/fireworks/models/llama-v3p1-8b-instruct',
383
410
  custom: '(your model name)',
384
411
  };
385
412
  return Object.entries(providers).map(([name, p]) => ({