@hadoku/resume-bot 3.15.83 → 3.15.85

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/README.md +144 -142
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,142 +1,144 @@
1
- # @wolffm/resume-bot
2
-
3
- AI-powered conversational interface for interactive resume exploration — chat with an AI about my background, skills, and experience while browsing the resume itself.
4
-
5
- **See it live:** [hadoku.me/resume](https://hadoku.me/resume)
6
-
7
- This repo is the npm package that powers that widget. The rest of this README is for contributors working on the package itself.
8
-
9
- ## Overview
10
-
11
- Two-panel UI: a markdown resume viewer on the left, an AI chat interface on the right. The chat uses Groq's LLM to answer questions about the resume. Also exposes a worker API for generating tailored resumes and cover letters.
12
-
13
- ## Development
14
-
15
- ### Getting access
16
-
17
- `pnpm install` and the friend-only API routes need your own credential; `pnpm dev`
18
- needs none. Getting one is the same for every hadoku repo, so the steps live on one page:
19
- **[hadoku.me/docs/contributing/#resume-bot](https://hadoku.me/docs/contributing/#resume-bot)**.
20
- The identity to ask for is `resume-bot-service-key`.
21
-
22
- ### Local Development Setup
23
-
24
- This package includes a development environment for testing the component locally:
25
-
26
- ```bash
27
- # Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
28
- pnpm install
29
-
30
- # Start dev server (opens http://localhost:5173)
31
- pnpm dev
32
-
33
- # Build for production
34
- pnpm build
35
-
36
- # Lint and format
37
- pnpm lint:fix
38
- pnpm format
39
- ```
40
-
41
- The dev server uses `index.html` which imports and mounts the component directly. You can pass different configurations via URL parameters:
42
-
43
- **Example URLs:**
44
-
45
- ```bash
46
- # Default configuration
47
- http://localhost:5173
48
-
49
- # Custom theme
50
- http://localhost:5173?theme=ocean
51
-
52
- # Admin user
53
- http://localhost:5173?userType=admin&sessionId=test-123
54
-
55
- # Full configuration
56
- http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session
57
- ```
58
-
59
- ## Integration
60
-
61
- This app is a child component of the [hadoku_site](https://github.com/WolffM/hadoku_site) parent application.
62
-
63
- ### Props
64
-
65
- ```typescript
66
- interface ResumeBotAppProps {
67
- theme?: string // Optional: 'default', 'ocean', 'forest', etc.
68
- apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
69
- ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
70
- }
71
- ```
72
-
73
- ### Mounting
74
-
75
- ```typescript
76
- import { mount, unmount } from '@wolffm/resume-bot'
77
-
78
- // Mount the app
79
- const element = document.getElementById('app-root')
80
- mount(element, {
81
- theme: 'ocean', // optional
82
- apiBaseUrl: '/resume/api' // required - path to the API root
83
- })
84
-
85
- // Unmount when done
86
- unmount(element)
87
- ```
88
-
89
- **Important:** `apiBaseUrl` is the **API root**, matching the rest of the hadoku
90
- ecosystem (`/oss/api`, `/jobplatform/api`). Endpoints are appended to it directly.
91
- It can be either:
92
-
93
- - A **path** (e.g., `/resume/api`) if the backend is hosted on the same domain
94
- - A **full URL** (e.g., `https://api.yourapp.com/api`) if the backend is on a different domain
95
-
96
- > **Breaking change in 2.0.0.** Through 1.x this prop was the _app_ root (`/resume`)
97
- > and the package appended `/api/...` itself; 1.3.14 accepted both spellings. 2.0.0
98
- > removes that shim — pass the API root. Passing `/resume` now requests `/resume/chat`
99
- > and 404s. Migration is a one-line change at the mount site: `/resume` -> `/resume/api`.
100
- > This does not affect the `./api` worker export — `createResumeHandler(basePath)` is
101
- > unchanged.
102
-
103
- The backend handles these endpoints (public unless noted; non-public routes are
104
- gated in-worker via `@wolffm/worker-utils` edge-auth — see `worker/src/index.ts`):
105
-
106
- - `${apiBaseUrl}/chat` - POST - Chat with the bot (public, rate-limited)
107
- - `${apiBaseUrl}/resume` - GET - Fetch resume content, incl. `?v={slug}` variants (public)
108
- - `${apiBaseUrl}/system-prompt` - GET - Fetch system prompt (admin/friend)
109
- - `${apiBaseUrl}/tailored-resume` - POST - Per-job tailored resume (admin/friend/service)
110
- - `${apiBaseUrl}/cover-letter` - POST - Per-job cover letter (admin/friend/service)
111
- - `${apiBaseUrl}/variants` - POST/GET/DELETE - Variant management (admin/friend)
112
-
113
- ## Deployment
114
-
115
- Pushes to `main` automatically:
116
-
117
- 1. Build and publish to GitHub Packages
118
- 2. Notify parent site to update
119
- 3. Parent pulls new version and redeploys
120
-
121
- ### Versioning
122
-
123
- Version bumps are handled automatically through two mechanisms:
124
-
125
- 1. **Pre-commit hook** (primary): The `.husky/pre-commit` hook automatically bumps the version for every commit
126
- 2. **Workflow fallback**: The publish workflow checks if the current version already exists in the registry and bumps it if needed
127
-
128
- This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, `--no-verify` commits).
129
-
130
- Version bumping follows this pattern:
131
-
132
- - Patch version increments on each commit (1.1.8 → 1.1.9)
133
- - At patch 20, rolls over to next minor (1.1.20 → 1.2.0)
134
-
135
- ## Architecture
136
-
137
- This package has two exports:
138
-
139
- - **UI component** (`.` export): `mount(el, props)` / `unmount(el)` — React app from `src/entry.tsx`
140
- - **Worker API** (`./api` export): `createResumeHandler(basePath, options)` — Hono router from `worker/src/index.ts` (`options.ownerName` sets the chat owner)
141
-
142
- Both are built and published together as `@wolffm/resume-bot`.
1
+ # @wolffm/resume-bot
2
+
3
+ **Guide:** [overview](docs/guide/index.md) · [features](docs/guide/features.md) · [contributing](docs/guide/contributing.md) · [history](docs/guide/history.md) · [trivia](docs/guide/trivia.md)
4
+
5
+ AI-powered conversational interface for interactive resume exploration — chat with an AI about my background, skills, and experience while browsing the resume itself.
6
+
7
+ **See it live:** [hadoku.me/resume](https://hadoku.me/resume)
8
+
9
+ This repo is the npm package that powers that widget. The rest of this README is for contributors working on the package itself.
10
+
11
+ ## Overview
12
+
13
+ Two-panel UI: a markdown resume viewer on the left, an AI chat interface on the right. The chat uses Groq's LLM to answer questions about the resume. Also exposes a worker API for generating tailored resumes and cover letters.
14
+
15
+ ## Development
16
+
17
+ ### Getting access
18
+
19
+ `pnpm install` and the friend-only API routes need your own credential; `pnpm dev`
20
+ needs none. Getting one is the same for every hadoku repo, so the steps live on one page:
21
+ **[hadoku.me/docs/contributing/#resume-bot](https://hadoku.me/docs/contributing/#resume-bot)**.
22
+ The identity to ask for is `resume-bot-service-key`.
23
+
24
+ ### Local Development Setup
25
+
26
+ This package includes a development environment for testing the component locally:
27
+
28
+ ```bash
29
+ # Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
30
+ pnpm install
31
+
32
+ # Start dev server (opens http://localhost:5173)
33
+ pnpm dev
34
+
35
+ # Build for production
36
+ pnpm build
37
+
38
+ # Lint and format
39
+ pnpm lint:fix
40
+ pnpm format
41
+ ```
42
+
43
+ The dev server uses `index.html` which imports and mounts the component directly. You can pass different configurations via URL parameters:
44
+
45
+ **Example URLs:**
46
+
47
+ ```bash
48
+ # Default configuration
49
+ http://localhost:5173
50
+
51
+ # Custom theme
52
+ http://localhost:5173?theme=ocean
53
+
54
+ # Admin user
55
+ http://localhost:5173?userType=admin&sessionId=test-123
56
+
57
+ # Full configuration
58
+ http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session
59
+ ```
60
+
61
+ ## Integration
62
+
63
+ This app is a child component of the [hadoku_site](https://github.com/WolffM/hadoku_site) parent application.
64
+
65
+ ### Props
66
+
67
+ ```typescript
68
+ interface ResumeBotAppProps {
69
+ theme?: string // Optional: 'default', 'ocean', 'forest', etc.
70
+ apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
71
+ ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
72
+ }
73
+ ```
74
+
75
+ ### Mounting
76
+
77
+ ```typescript
78
+ import { mount, unmount } from '@wolffm/resume-bot'
79
+
80
+ // Mount the app
81
+ const element = document.getElementById('app-root')
82
+ mount(element, {
83
+ theme: 'ocean', // optional
84
+ apiBaseUrl: '/resume/api' // required - path to the API root
85
+ })
86
+
87
+ // Unmount when done
88
+ unmount(element)
89
+ ```
90
+
91
+ **Important:** `apiBaseUrl` is the **API root**, matching the rest of the hadoku
92
+ ecosystem (`/oss/api`, `/jobplatform/api`). Endpoints are appended to it directly.
93
+ It can be either:
94
+
95
+ - A **path** (e.g., `/resume/api`) if the backend is hosted on the same domain
96
+ - A **full URL** (e.g., `https://api.yourapp.com/api`) if the backend is on a different domain
97
+
98
+ > **Breaking change in 2.0.0.** Through 1.x this prop was the _app_ root (`/resume`)
99
+ > and the package appended `/api/...` itself; 1.3.14 accepted both spellings. 2.0.0
100
+ > removes that shim — pass the API root. Passing `/resume` now requests `/resume/chat`
101
+ > and 404s. Migration is a one-line change at the mount site: `/resume` -> `/resume/api`.
102
+ > This does not affect the `./api` worker export — `createResumeHandler(basePath)` is
103
+ > unchanged.
104
+
105
+ The backend handles these endpoints (public unless noted; non-public routes are
106
+ gated in-worker via `@wolffm/worker-utils` edge-auth — see `worker/src/index.ts`):
107
+
108
+ - `${apiBaseUrl}/chat` - POST - Chat with the bot (public, rate-limited)
109
+ - `${apiBaseUrl}/resume` - GET - Fetch resume content, incl. `?v={slug}` variants (public)
110
+ - `${apiBaseUrl}/system-prompt` - GET - Fetch system prompt (admin/friend)
111
+ - `${apiBaseUrl}/tailored-resume` - POST - Per-job tailored resume (admin/friend/service)
112
+ - `${apiBaseUrl}/cover-letter` - POST - Per-job cover letter (admin/friend/service)
113
+ - `${apiBaseUrl}/variants` - POST/GET/DELETE - Variant management (admin/friend)
114
+
115
+ ## Deployment
116
+
117
+ Pushes to `main` automatically:
118
+
119
+ 1. Build and publish to GitHub Packages
120
+ 2. Notify parent site to update
121
+ 3. Parent pulls new version and redeploys
122
+
123
+ ### Versioning
124
+
125
+ Version bumps are handled automatically through two mechanisms:
126
+
127
+ 1. **Pre-commit hook** (primary): The `.husky/pre-commit` hook automatically bumps the version for every commit
128
+ 2. **Workflow fallback**: The publish workflow checks if the current version already exists in the registry and bumps it if needed
129
+
130
+ This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, `--no-verify` commits).
131
+
132
+ Version bumping follows this pattern:
133
+
134
+ - Patch version increments on each commit (1.1.8 → 1.1.9)
135
+ - At patch 20, rolls over to next minor (1.1.20 → 1.2.0)
136
+
137
+ ## Architecture
138
+
139
+ This package has two exports:
140
+
141
+ - **UI component** (`.` export): `mount(el, props)` / `unmount(el)` — React app from `src/entry.tsx`
142
+ - **Worker API** (`./api` export): `createResumeHandler(basePath, options)` — Hono router from `worker/src/index.ts` (`options.ownerName` sets the chat owner)
143
+
144
+ Both are built and published together as `@wolffm/resume-bot`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/resume-bot",
3
- "version": "3.15.83",
4
- "gitHead": "77b7bc5194606f6309139a87d91a943295756c41",
3
+ "version": "3.15.85",
4
+ "gitHead": "4cbae966f7606f135c268d5ab712fe7ee3e84693",
5
5
  "description": "AI-powered conversational interface for interactive resume exploration",
6
6
  "license": "MIT",
7
7
  "type": "module",