@hadoku/resume-bot 3.15.32 → 3.15.33

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 +173 -173
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,173 +1,173 @@
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` needs a credential, because the `@wolffm/*` dependencies come from GitHub
18
- Packages. The same credential gives you `RESUME_FRIEND_KEY` for the friend-gated API
19
- routes. `pnpm dev` itself needs none: it talks to the public `hadoku.me/resume/api`.
20
- You hold your own credential, which lasts 7 days; no hadoku_site clone and no GitHub
21
- token are needed.
22
-
23
- 1. Ask the operator for a service grant for `resume-bot-service-key`. Your hadoku.me
24
- account must be friend tier or above. You cannot request one yourself.
25
- 2. Sign in at [hadoku.me](https://hadoku.me) on the computer you will approve from.
26
- If you have no passkey yet, the approval page asks you to save one first (Windows
27
- Hello, Touch ID, or your phone).
28
- 3. In your clone, run `npx @hadoku/dev-vault login`. It prints a code and a link to
29
- `https://hadoku.me/account/device?code=XXXX-XXXX`; leave it running. The request
30
- lives 24 hours.
31
- 4. Open the link. The first time only: "Set up" → tap your passkey → scan the QR into an
32
- authenticator app (Google Authenticator, Microsoft Authenticator, 1Password, …) → type
33
- its 6-digit code → Confirm. Then pick the identity, type the app's current code,
34
- Approve, and tap your passkey.
35
- 5. The command writes `.devvault.local.json` (gitignored, mode 0600) with your `key`,
36
- `expiresAt` and `identity`. Check it with `npx @hadoku/dev-vault --check`.
37
- 6. Add `//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}` to your user `.npmrc`
38
- (`~/.npmrc`, or `%USERPROFILE%\.npmrc` on Windows), then install with
39
- `npx @hadoku/dev-vault -- pnpm install`. dev-vault fills `NODE_AUTH_TOKEN` (and
40
- `RESUME_FRIEND_KEY`) for whatever it runs.
41
-
42
- When the credential expires, run `npx @hadoku/dev-vault login` again.
43
-
44
- - **The passkey dialog is empty** ("Choose a passkey" with nothing in it, on Windows):
45
- the passkey is not on this computer. Pick "Use another device"
46
- and scan the QR with the phone that holds yours.
47
- - **"Cloudflare refused this network"**: cloud servers, Codespaces and some VPNs are
48
- blocked before hadoku.me sees them. Run it from a home or office connection.
49
- - **The request expired**: run `npx @hadoku/dev-vault login` again.
50
- - **401, or "required: friend", from hadoku.me**: the credential has expired, or you hold
51
- no grant. Log in again; if that is refused, ask the operator.
52
-
53
- ### Local Development Setup
54
-
55
- This package includes a development environment for testing the component locally:
56
-
57
- ```bash
58
- # Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
59
- pnpm install
60
-
61
- # Start dev server (opens http://localhost:5173)
62
- pnpm dev
63
-
64
- # Build for production
65
- pnpm build
66
-
67
- # Lint and format
68
- pnpm lint:fix
69
- pnpm format
70
- ```
71
-
72
- The dev server uses `index.html` which imports and mounts the component directly. You can pass different configurations via URL parameters:
73
-
74
- **Example URLs:**
75
-
76
- ```bash
77
- # Default configuration
78
- http://localhost:5173
79
-
80
- # Custom theme
81
- http://localhost:5173?theme=ocean
82
-
83
- # Admin user
84
- http://localhost:5173?userType=admin&sessionId=test-123
85
-
86
- # Full configuration
87
- http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session
88
- ```
89
-
90
- ## Integration
91
-
92
- This app is a child component of the [hadoku_site](https://github.com/WolffM/hadoku_site) parent application.
93
-
94
- ### Props
95
-
96
- ```typescript
97
- interface ResumeBotAppProps {
98
- theme?: string // Optional: 'default', 'ocean', 'forest', etc.
99
- apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
100
- ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
101
- }
102
- ```
103
-
104
- ### Mounting
105
-
106
- ```typescript
107
- import { mount, unmount } from '@wolffm/resume-bot'
108
-
109
- // Mount the app
110
- const element = document.getElementById('app-root')
111
- mount(element, {
112
- theme: 'ocean', // optional
113
- apiBaseUrl: '/resume/api' // required - path to the API root
114
- })
115
-
116
- // Unmount when done
117
- unmount(element)
118
- ```
119
-
120
- **Important:** `apiBaseUrl` is the **API root**, matching the rest of the hadoku
121
- ecosystem (`/oss/api`, `/jobplatform/api`). Endpoints are appended to it directly.
122
- It can be either:
123
-
124
- - A **path** (e.g., `/resume/api`) if the backend is hosted on the same domain
125
- - A **full URL** (e.g., `https://api.yourapp.com/api`) if the backend is on a different domain
126
-
127
- > **Breaking change in 2.0.0.** Through 1.x this prop was the _app_ root (`/resume`)
128
- > and the package appended `/api/...` itself; 1.3.14 accepted both spellings. 2.0.0
129
- > removes that shim — pass the API root. Passing `/resume` now requests `/resume/chat`
130
- > and 404s. Migration is a one-line change at the mount site: `/resume` -> `/resume/api`.
131
- > This does not affect the `./api` worker export — `createResumeHandler(basePath)` is
132
- > unchanged.
133
-
134
- The backend handles these endpoints (public unless noted; non-public routes are
135
- gated in-worker via `@wolffm/worker-utils` edge-auth — see `worker/src/index.ts`):
136
-
137
- - `${apiBaseUrl}/chat` - POST - Chat with the bot (public, rate-limited)
138
- - `${apiBaseUrl}/resume` - GET - Fetch resume content, incl. `?v={slug}` variants (public)
139
- - `${apiBaseUrl}/system-prompt` - GET - Fetch system prompt (admin/friend)
140
- - `${apiBaseUrl}/tailored-resume` - POST - Per-job tailored resume (admin/friend/service)
141
- - `${apiBaseUrl}/cover-letter` - POST - Per-job cover letter (admin/friend/service)
142
- - `${apiBaseUrl}/variants` - POST/GET/DELETE - Variant management (admin/friend)
143
-
144
- ## Deployment
145
-
146
- Pushes to `main` automatically:
147
-
148
- 1. Build and publish to GitHub Packages
149
- 2. Notify parent site to update
150
- 3. Parent pulls new version and redeploys
151
-
152
- ### Versioning
153
-
154
- Version bumps are handled automatically through two mechanisms:
155
-
156
- 1. **Pre-commit hook** (primary): The `.husky/pre-commit` hook automatically bumps the version for every commit
157
- 2. **Workflow fallback**: The publish workflow checks if the current version already exists in the registry and bumps it if needed
158
-
159
- This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, `--no-verify` commits).
160
-
161
- Version bumping follows this pattern:
162
-
163
- - Patch version increments on each commit (1.1.8 → 1.1.9)
164
- - At patch 20, rolls over to next minor (1.1.20 → 1.2.0)
165
-
166
- ## Architecture
167
-
168
- This package has two exports:
169
-
170
- - **UI component** (`.` export): `mount(el, props)` / `unmount(el)` — React app from `src/entry.tsx`
171
- - **Worker API** (`./api` export): `createResumeHandler(basePath, options)` — Hono router from `worker/src/index.ts` (`options.ownerName` sets the chat owner)
172
-
173
- Both are built and published together as `@wolffm/resume-bot`.
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` needs a credential, because the `@wolffm/*` dependencies come from GitHub
18
+ Packages. The same credential gives you `RESUME_FRIEND_KEY` for the friend-gated API
19
+ routes. `pnpm dev` itself needs none: it talks to the public `hadoku.me/resume/api`.
20
+ You hold your own credential, which lasts 7 days; no hadoku_site clone and no GitHub
21
+ token are needed.
22
+
23
+ 1. Ask the operator for a service grant for `resume-bot-service-key`. Your hadoku.me
24
+ account must be friend tier or above. You cannot request one yourself.
25
+ 2. Sign in at [hadoku.me](https://hadoku.me) on the computer you will approve from.
26
+ If you have no passkey yet, the approval page asks you to save one first (Windows
27
+ Hello, Touch ID, or your phone).
28
+ 3. In your clone, run `npx @hadoku/dev-vault login`. It prints a code and a link to
29
+ `https://hadoku.me/account/device?code=XXXX-XXXX`; leave it running. The request
30
+ lives 24 hours.
31
+ 4. Open the link. The first time only: "Set up" → tap your passkey → scan the QR into an
32
+ authenticator app (Google Authenticator, Microsoft Authenticator, 1Password, …) → type
33
+ its 6-digit code → Confirm. Then pick the identity, type the app's current code,
34
+ Approve, and tap your passkey.
35
+ 5. The command writes `.devvault.local.json` (gitignored, mode 0600) with your `key`,
36
+ `expiresAt` and `identity`. Check it with `npx @hadoku/dev-vault --check`.
37
+ 6. Add `//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}` to your user `.npmrc`
38
+ (`~/.npmrc`, or `%USERPROFILE%\.npmrc` on Windows), then install with
39
+ `npx @hadoku/dev-vault -- pnpm install`. dev-vault fills `NODE_AUTH_TOKEN` (and
40
+ `RESUME_FRIEND_KEY`) for whatever it runs.
41
+
42
+ When the credential expires, run `npx @hadoku/dev-vault login` again.
43
+
44
+ - **The passkey dialog is empty** ("Choose a passkey" with nothing in it, on Windows):
45
+ the passkey is not on this computer. Pick "Use another device"
46
+ and scan the QR with the phone that holds yours.
47
+ - **"Cloudflare refused this network"**: cloud servers, Codespaces and some VPNs are
48
+ blocked before hadoku.me sees them. Run it from a home or office connection.
49
+ - **The request expired**: run `npx @hadoku/dev-vault login` again.
50
+ - **401, or "required: friend", from hadoku.me**: the credential has expired, or you hold
51
+ no grant. Log in again; if that is refused, ask the operator.
52
+
53
+ ### Local Development Setup
54
+
55
+ This package includes a development environment for testing the component locally:
56
+
57
+ ```bash
58
+ # Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
59
+ pnpm install
60
+
61
+ # Start dev server (opens http://localhost:5173)
62
+ pnpm dev
63
+
64
+ # Build for production
65
+ pnpm build
66
+
67
+ # Lint and format
68
+ pnpm lint:fix
69
+ pnpm format
70
+ ```
71
+
72
+ The dev server uses `index.html` which imports and mounts the component directly. You can pass different configurations via URL parameters:
73
+
74
+ **Example URLs:**
75
+
76
+ ```bash
77
+ # Default configuration
78
+ http://localhost:5173
79
+
80
+ # Custom theme
81
+ http://localhost:5173?theme=ocean
82
+
83
+ # Admin user
84
+ http://localhost:5173?userType=admin&sessionId=test-123
85
+
86
+ # Full configuration
87
+ http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session
88
+ ```
89
+
90
+ ## Integration
91
+
92
+ This app is a child component of the [hadoku_site](https://github.com/WolffM/hadoku_site) parent application.
93
+
94
+ ### Props
95
+
96
+ ```typescript
97
+ interface ResumeBotAppProps {
98
+ theme?: string // Optional: 'default', 'ocean', 'forest', etc.
99
+ apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
100
+ ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
101
+ }
102
+ ```
103
+
104
+ ### Mounting
105
+
106
+ ```typescript
107
+ import { mount, unmount } from '@wolffm/resume-bot'
108
+
109
+ // Mount the app
110
+ const element = document.getElementById('app-root')
111
+ mount(element, {
112
+ theme: 'ocean', // optional
113
+ apiBaseUrl: '/resume/api' // required - path to the API root
114
+ })
115
+
116
+ // Unmount when done
117
+ unmount(element)
118
+ ```
119
+
120
+ **Important:** `apiBaseUrl` is the **API root**, matching the rest of the hadoku
121
+ ecosystem (`/oss/api`, `/jobplatform/api`). Endpoints are appended to it directly.
122
+ It can be either:
123
+
124
+ - A **path** (e.g., `/resume/api`) if the backend is hosted on the same domain
125
+ - A **full URL** (e.g., `https://api.yourapp.com/api`) if the backend is on a different domain
126
+
127
+ > **Breaking change in 2.0.0.** Through 1.x this prop was the _app_ root (`/resume`)
128
+ > and the package appended `/api/...` itself; 1.3.14 accepted both spellings. 2.0.0
129
+ > removes that shim — pass the API root. Passing `/resume` now requests `/resume/chat`
130
+ > and 404s. Migration is a one-line change at the mount site: `/resume` -> `/resume/api`.
131
+ > This does not affect the `./api` worker export — `createResumeHandler(basePath)` is
132
+ > unchanged.
133
+
134
+ The backend handles these endpoints (public unless noted; non-public routes are
135
+ gated in-worker via `@wolffm/worker-utils` edge-auth — see `worker/src/index.ts`):
136
+
137
+ - `${apiBaseUrl}/chat` - POST - Chat with the bot (public, rate-limited)
138
+ - `${apiBaseUrl}/resume` - GET - Fetch resume content, incl. `?v={slug}` variants (public)
139
+ - `${apiBaseUrl}/system-prompt` - GET - Fetch system prompt (admin/friend)
140
+ - `${apiBaseUrl}/tailored-resume` - POST - Per-job tailored resume (admin/friend/service)
141
+ - `${apiBaseUrl}/cover-letter` - POST - Per-job cover letter (admin/friend/service)
142
+ - `${apiBaseUrl}/variants` - POST/GET/DELETE - Variant management (admin/friend)
143
+
144
+ ## Deployment
145
+
146
+ Pushes to `main` automatically:
147
+
148
+ 1. Build and publish to GitHub Packages
149
+ 2. Notify parent site to update
150
+ 3. Parent pulls new version and redeploys
151
+
152
+ ### Versioning
153
+
154
+ Version bumps are handled automatically through two mechanisms:
155
+
156
+ 1. **Pre-commit hook** (primary): The `.husky/pre-commit` hook automatically bumps the version for every commit
157
+ 2. **Workflow fallback**: The publish workflow checks if the current version already exists in the registry and bumps it if needed
158
+
159
+ This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, `--no-verify` commits).
160
+
161
+ Version bumping follows this pattern:
162
+
163
+ - Patch version increments on each commit (1.1.8 → 1.1.9)
164
+ - At patch 20, rolls over to next minor (1.1.20 → 1.2.0)
165
+
166
+ ## Architecture
167
+
168
+ This package has two exports:
169
+
170
+ - **UI component** (`.` export): `mount(el, props)` / `unmount(el)` — React app from `src/entry.tsx`
171
+ - **Worker API** (`./api` export): `createResumeHandler(basePath, options)` — Hono router from `worker/src/index.ts` (`options.ownerName` sets the chat owner)
172
+
173
+ 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.32",
4
- "gitHead": "028ec91af606e654288d6402649ebf3f761d3aef",
3
+ "version": "3.15.33",
4
+ "gitHead": "547c7e722cd2b4b50969bccf6eddd6583ffa352f",
5
5
  "description": "AI-powered conversational interface for interactive resume exploration",
6
6
  "license": "MIT",
7
7
  "type": "module",