Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Runtime config for the extension. API base is stored in chrome.storage so
// users can point the extension at localhost or prod without rebuilding.
export const DEFAULT_API_BASE = 'http://localhost:3000';
export const STORAGE_KEY_API_BASE = 'rolepatch_api_base';
const STORAGE_KEY_API_BASE = 'rolepatch_api_base';
export const STORAGE_KEY_LAST_PACKET = 'rolepatch_last_apply_packet';
export const SAVE_JOB_ENDPOINT = '/api/extension/save-job';
export const TAILOR_ENDPOINT = '/api/extension/tailor';
Expand Down
18 changes: 9 additions & 9 deletions extension/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ export interface ScrapedJob {
| 'generic';
}

export interface ApplyPacketProfileAnswer {
interface ApplyPacketProfileAnswer {
id: string;
category: string;
label: string;
answer: string;
sensitive: number | boolean;
}

export interface ApplyPacketReceipt {
interface ApplyPacketReceipt {
id: string;
status: 'filled' | 'submitted' | 'failed' | 'skipped';
}

export interface ApplyPacketProofItem {
interface ApplyPacketProofItem {
id: string;
title: string;
claim: string;
Expand All @@ -39,7 +39,7 @@ export interface ApplyPacketProofItem {
source_url?: string;
}

export interface ApplyPacket {
interface ApplyPacket {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore exports for shared extension payload types

The extension content and popup scripts still import ApplyPacket, FillResult, ReceiptField, FileAttachment, and related types from ./types (checked extension/src/content.ts and extension/src/popup.ts), but this change makes those interfaces local to the module. Because extension/tsconfig.json includes src/**/*.ts, the extension typecheck/build will fail with missing/non-exported type imports, so the Chrome extension cannot be built until these shared message/result types are exported again or the imports are removed.

Useful? React with 👍 / 👎.

job_id: string;
company?: string;
role?: string;
Expand All @@ -54,20 +54,20 @@ export interface ApplyPacket {
receipt?: ApplyPacketReceipt | null;
}

export interface ReceiptField {
interface ReceiptField {
label: string;
value: string;
source: 'profile' | 'resume' | 'cover_letter' | 'user' | 'system' | 'ats';
}

export interface FileAttachment {
interface FileAttachment {
kind: 'resume' | 'cover_letter' | 'other';
name: string;
type: string;
base64: string;
}

export interface FillResult {
interface FillResult {
ok: boolean;
job_id: string;
url: string;
Expand All @@ -82,7 +82,7 @@ export interface FillResult {
error?: string;
}

export interface SubmitResult {
interface SubmitResult {
ok: boolean;
job_id: string;
url: string;
Expand All @@ -96,7 +96,7 @@ export interface SubmitResult {
error?: string;
}

export interface FieldSnapshotResult {
interface FieldSnapshotResult {
ok: boolean;
fields: ReceiptField[];
error?: string;
Expand Down
100 changes: 100 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"$schema": "https://unpkg.com/knip@latest/schema.json",
"entry": ["open-next.config.ts", "agent-edge.mjs"],
"project": ["**/*.{ts,tsx,js,jsx,mjs,cjs,mts}"],
"ignore": [
"**/dist/**",
"**/build/**",
"**/.next/**",
"**/.astro/**",
"**/.output/**",
"**/node_modules/**",
"**/coverage/**",
"**/public/**",
"**/*.config.{js,ts,mjs,cjs}",
"**/eslint.config.*",
"**/blume.config.*",
"**/docs-blume/**",
"scripts/**",
"tests/e2e/**",
"test/**",
"**/*.test.{ts,tsx,js,mjs}",
"**/*.spec.{ts,tsx,js,mjs}",
"**/*.d.mts",
"**/*.d.ts",
"**/__tests__/**",
"**/playground/**",
"**/examples/**",
"extension/**"
],
"ignoreDependencies": [
"typescript",
"@types/*",
"biome",
"@biomejs/biome",
"prettier",
"prettier-plugin-tailwindcss",
"husky",
"lint-staged",
"vitest",
"@vitest/*",
"@cloudflare/vitest-pool-workers",
"playwright",
"@playwright/test",
"drizzle-kit",
"wrangler",
"opennextjs-cloudflare",
"tailwindcss",
"@tailwindcss/*",
"lightningcss",
"tsx",
"size-limit",
"knip",
"blume",
"@blume/*",
"stockfish",
"astro",
"@astrojs/*",
"@shikijs/*",
"shiki",
"@vercel/node",
"three-stdlib",
"@mozilla/readability",
"@sparticuz/chromium",
"mammoth",
"pdf-parse",
"puppeteer-core"
],
"ignoreBinaries": [
"next",
"astro",
"vite",
"wrangler",
"drizzle-kit",
"tsx",
"biome",
"playwright",
"vitest",
"knip",
"eslint",
"prettier",
"blume",
"yt-dlp",
"tailscale",
"gemini",
"fallow",
"security"
],
"ignoreIssues": {
"src/app/api/**/route.ts": ["exports", "types"],
"src/lib/actions/**": ["exports", "types"],
"lib/actions/**": ["exports", "types"],
"**/schema.ts": ["exports", "types"],
"**/db/schema*.ts": ["exports", "types"],
"**/commands/**": ["exports", "types"],
"**/agent-edge.*": ["exports", "types"],
"**/foundry-monitoring.ts": ["exports", "types"],
"**/analytics.ts": ["exports", "types"],
"**/api-timing.ts": ["exports", "types"]
}
}
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
"apply-agent:mcp": "node scripts/apply-agent-mcp.mjs",
"docs:check": "node scripts/check-docs.mjs",
"docs:build": "blume build",
"docs:dev": "blume dev"
"docs:dev": "blume dev",
"knip": "knip --no-exit-code --reporter symbols",
"knip:strict": "knip --reporter symbols"
},
"dependencies": {
"@ai-sdk/openai-compatible": "^2.0.41",
"@cloudflare/puppeteer": "^1.1.0",
"@codemirror/lang-markdown": "^6.5.0",
"@codemirror/language": "^6.12.1",
"@codemirror/state": "^6.5.4",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.39.15",
"@dodopayments/nextjs": "^0.3.4",
"@mozilla/readability": "^0.6.0",
"@saas-maker/feedback": "0.2.0",
"@sparticuz/chromium": "^147.0.2",
Expand All @@ -64,7 +64,6 @@
"web-vitals": "^4.2.4"
},
"devDependencies": {
"@axe-core/playwright": "^4.11.2",
"@opennextjs/cloudflare": "^1.19.4",
"@playwright/test": "^1.58.2",
"@tailwindcss/postcss": "^4",
Expand All @@ -74,12 +73,12 @@
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/uuid": "^11.0.0",
"@vitejs/plugin-react": "^6.0.1",
"babel-plugin-react-compiler": "1.0.0",
"beasties": "^0.3.5",
"husky": "^9.1.7",
"jsdom": "^29.0.0",
"knip": "^6.6.3",
"tailwindcss": "^4",
"typescript": "^5",
"vitest": "^4.1.0",
Expand Down
Loading