@hadoku/resume-bot 3.15.108 → 3.15.110
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.
- package/dist/{index-DVV6SMsJ.js → index-D6Xd4aSy.js} +112 -17
- package/dist/{node.browser-DkeWIwXw.js → node.browser-Bk9bty0A.js} +2 -2
- package/dist/{node.browser-BPhU4Bff.js → node.browser-CP5wfAdg.js} +1 -1
- package/dist/worker/application-extras.d.ts +7 -0
- package/dist/worker/application-extras.d.ts.map +1 -1
- package/dist/worker/constants.d.ts +1 -0
- package/dist/worker/constants.d.ts.map +1 -1
- package/dist/worker/form-answers.d.ts +38 -0
- package/dist/worker/form-answers.d.ts.map +1 -0
- package/dist/worker/index.d.ts.map +1 -1
- package/dist/worker.js +1 -1
- package/package.json +2 -2
|
@@ -15101,6 +15101,7 @@ const SELECTION_BUDGET = {
|
|
|
15101
15101
|
const FULL_JD_MAX_CHARS = 6e4;
|
|
15102
15102
|
const COVER_LETTER_TOKENS = 2048;
|
|
15103
15103
|
const APPLICATION_EXTRAS_TOKENS = 3500;
|
|
15104
|
+
const FORM_ANSWERS_TOKENS = 2500;
|
|
15104
15105
|
const OPERATION_BUDGET_MS = 1e5;
|
|
15105
15106
|
const MIN_ATTEMPT_MS = 3e3;
|
|
15106
15107
|
function kvKey(ip) {
|
|
@@ -48515,7 +48516,7 @@ var EnvironmentWorker = /* @__PURE__ */ (() => {
|
|
|
48515
48516
|
const ctrl = new AbortController();
|
|
48516
48517
|
const detachExternal = linkAbort(externalSignal, ctrl);
|
|
48517
48518
|
const lease = new Lease(ctrl);
|
|
48518
|
-
const agentToolset = await import("./node.browser-
|
|
48519
|
+
const agentToolset = await import("./node.browser-Bk9bty0A.js");
|
|
48519
48520
|
let leaseTtlMs;
|
|
48520
48521
|
let runner;
|
|
48521
48522
|
const heartbeatPromise = heartbeatLoop(sessionClient, work, lease, log, this.requestOptions, (ttlMs) => {
|
|
@@ -65144,7 +65145,7 @@ function redactSensitive(body) {
|
|
|
65144
65145
|
async function checkCredentialsFileSafety(path2, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
|
|
65145
65146
|
if (typeof process === "undefined" || process.platform === "win32")
|
|
65146
65147
|
return;
|
|
65147
|
-
const { fs } = await import("./node.browser-
|
|
65148
|
+
const { fs } = await import("./node.browser-CP5wfAdg.js");
|
|
65148
65149
|
let resolved = path2;
|
|
65149
65150
|
let st;
|
|
65150
65151
|
try {
|
|
@@ -65165,7 +65166,7 @@ async function checkCredentialsFileSafety(path2, onWarn = (m) => console.warn(`a
|
|
|
65165
65166
|
}
|
|
65166
65167
|
}
|
|
65167
65168
|
async function writeCredentialsFileAtomic(targetPath, data) {
|
|
65168
|
-
const { fs, path: path2 } = await import("./node.browser-
|
|
65169
|
+
const { fs, path: path2 } = await import("./node.browser-CP5wfAdg.js");
|
|
65169
65170
|
const dir = path2.dirname(targetPath);
|
|
65170
65171
|
await fs.promises.mkdir(dir, { recursive: true, mode: 448 });
|
|
65171
65172
|
const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
@@ -65384,7 +65385,7 @@ const loadConfigWithSource = async (profile) => {
|
|
|
65384
65385
|
return null;
|
|
65385
65386
|
}
|
|
65386
65387
|
validateProfileName(profileName);
|
|
65387
|
-
const { fs, path: path2 } = await import("./node.browser-
|
|
65388
|
+
const { fs, path: path2 } = await import("./node.browser-CP5wfAdg.js");
|
|
65388
65389
|
const configPath = path2.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
65389
65390
|
let configRaw;
|
|
65390
65391
|
try {
|
|
@@ -65445,14 +65446,14 @@ const getCredentialsPath = async (config2, profile) => {
|
|
|
65445
65446
|
return null;
|
|
65446
65447
|
}
|
|
65447
65448
|
validateProfileName(profileName);
|
|
65448
|
-
const { path: path2 } = await import("./node.browser-
|
|
65449
|
+
const { path: path2 } = await import("./node.browser-CP5wfAdg.js");
|
|
65449
65450
|
return path2.join(rootConfigPath, "credentials", `${profileName}.json`);
|
|
65450
65451
|
};
|
|
65451
65452
|
const getRootConfigPath = async () => {
|
|
65452
65453
|
if (!supportsLocalConfigFiles()) {
|
|
65453
65454
|
return null;
|
|
65454
65455
|
}
|
|
65455
|
-
const { path: path2 } = await import("./node.browser-
|
|
65456
|
+
const { path: path2 } = await import("./node.browser-CP5wfAdg.js");
|
|
65456
65457
|
const configDir = readEnv("ANTHROPIC_CONFIG_DIR");
|
|
65457
65458
|
if (configDir) {
|
|
65458
65459
|
return configDir;
|
|
@@ -65492,7 +65493,7 @@ const getActiveProfileName = async () => {
|
|
|
65492
65493
|
if (profileName) {
|
|
65493
65494
|
return profileName;
|
|
65494
65495
|
}
|
|
65495
|
-
const { fs, path: path2 } = await import("./node.browser-
|
|
65496
|
+
const { fs, path: path2 } = await import("./node.browser-CP5wfAdg.js");
|
|
65496
65497
|
const filePath = path2.join(rootConfigPath, "active_config");
|
|
65497
65498
|
try {
|
|
65498
65499
|
return (await fs.promises.readFile(filePath, "utf-8")).trim() || "default";
|
|
@@ -65508,7 +65509,7 @@ function identityTokenFromFile(path2) {
|
|
|
65508
65509
|
throw new AnthropicError("Identity token file path is empty");
|
|
65509
65510
|
}
|
|
65510
65511
|
return async () => {
|
|
65511
|
-
const { fs } = await import("./node.browser-
|
|
65512
|
+
const { fs } = await import("./node.browser-CP5wfAdg.js");
|
|
65512
65513
|
let content;
|
|
65513
65514
|
try {
|
|
65514
65515
|
content = await fs.promises.readFile(path2, "utf-8");
|
|
@@ -65587,7 +65588,7 @@ function oidcFederationProvider(config2) {
|
|
|
65587
65588
|
}
|
|
65588
65589
|
function userOAuthProvider(config2) {
|
|
65589
65590
|
return async (opts) => {
|
|
65590
|
-
const { fs } = await import("./node.browser-
|
|
65591
|
+
const { fs } = await import("./node.browser-CP5wfAdg.js");
|
|
65591
65592
|
await checkCredentialsFileSafety(config2.credentialsPath, config2.onSafetyWarning);
|
|
65592
65593
|
let raw;
|
|
65593
65594
|
try {
|
|
@@ -65754,7 +65755,7 @@ function resolveIdentityTokenProvider(auth) {
|
|
|
65754
65755
|
}
|
|
65755
65756
|
function cachedExchangeProvider(exchange, credentialsPath, onCacheWriteError, onSafetyWarning) {
|
|
65756
65757
|
return async (opts) => {
|
|
65757
|
-
const { fs } = await import("./node.browser-
|
|
65758
|
+
const { fs } = await import("./node.browser-CP5wfAdg.js");
|
|
65758
65759
|
await checkCredentialsFileSafety(credentialsPath, onSafetyWarning);
|
|
65759
65760
|
let existing;
|
|
65760
65761
|
try {
|
|
@@ -67322,7 +67323,7 @@ function clip(posting, chars2) {
|
|
|
67322
67323
|
return posting.length > chars2 ? `${posting.slice(0, chars2)}…` : posting;
|
|
67323
67324
|
}
|
|
67324
67325
|
const POSTING_INSTRUCTIONS_RULE = "If the posting asks applicants to do something specific in their application (mention a particular word or phrase, answer a question, follow a format), do it, naturally, in the cover letter and in the answers about why the candidate is applying.";
|
|
67325
|
-
const CACHE_TTL_SECONDS$
|
|
67326
|
+
const CACHE_TTL_SECONDS$3 = 2592e3;
|
|
67326
67327
|
function stripCodeFence(text) {
|
|
67327
67328
|
const trimmed = text.trim();
|
|
67328
67329
|
const match2 = /^```[^\n]*\n([\s\S]*)\n```$/.exec(trimmed);
|
|
@@ -67514,10 +67515,10 @@ Return only the full rewritten resume markdown, no preamble or explanation.`;
|
|
|
67514
67515
|
blocks_used: selectedIds,
|
|
67515
67516
|
cached: false
|
|
67516
67517
|
};
|
|
67517
|
-
await kv.put(key, JSON.stringify(result), { expirationTtl: CACHE_TTL_SECONDS$
|
|
67518
|
+
await kv.put(key, JSON.stringify(result), { expirationTtl: CACHE_TTL_SECONDS$3 });
|
|
67518
67519
|
return result;
|
|
67519
67520
|
}
|
|
67520
|
-
const CACHE_TTL_SECONDS$
|
|
67521
|
+
const CACHE_TTL_SECONDS$2 = 2592e3;
|
|
67521
67522
|
async function generateCoverLetter(client, kv, resumeContent, req, deadline = Date.now() + OPERATION_BUDGET_MS) {
|
|
67522
67523
|
const { job_title, company, description, tone = "conversational" } = req;
|
|
67523
67524
|
const key = await cacheKey("resume:coverletter", "full-posting", job_title, company, description);
|
|
@@ -67564,7 +67565,7 @@ Return only the cover letter in markdown, no preamble or explanation.`;
|
|
|
67564
67565
|
cover_letter_markdown: normalizeTypography(stripCodeFence(response.message)),
|
|
67565
67566
|
cached: false
|
|
67566
67567
|
};
|
|
67567
|
-
await kv.put(key, JSON.stringify(result), { expirationTtl: CACHE_TTL_SECONDS$
|
|
67568
|
+
await kv.put(key, JSON.stringify(result), { expirationTtl: CACHE_TTL_SECONDS$2 });
|
|
67568
67569
|
return result;
|
|
67569
67570
|
}
|
|
67570
67571
|
const CONTACT_KEY = "resume:profile:contact";
|
|
@@ -67584,7 +67585,7 @@ function renderStandardFields(p) {
|
|
|
67584
67585
|
`Relocation: ${p.relocation}`
|
|
67585
67586
|
].join("\n");
|
|
67586
67587
|
}
|
|
67587
|
-
const CACHE_TTL_SECONDS = 2592e3;
|
|
67588
|
+
const CACHE_TTL_SECONDS$1 = 2592e3;
|
|
67588
67589
|
const RESUME_CHARS = 4e3;
|
|
67589
67590
|
function cap(s, n) {
|
|
67590
67591
|
return s.length > n ? `${s.slice(0, n)}…` : s;
|
|
@@ -67692,9 +67693,94 @@ ${POSTING_INSTRUCTIONS_RULE}`;
|
|
|
67692
67693
|
linkedin_note: typeof parsed.linkedin_note === "string" ? clean(parsed.linkedin_note).slice(0, 300) : "",
|
|
67693
67694
|
talking_points: Array.isArray(parsed.talking_points) ? parsed.talking_points.filter((x) => typeof x === "string").map(clean) : []
|
|
67694
67695
|
};
|
|
67695
|
-
await kv.put(key, JSON.stringify(extras), { expirationTtl: CACHE_TTL_SECONDS });
|
|
67696
|
+
await kv.put(key, JSON.stringify(extras), { expirationTtl: CACHE_TTL_SECONDS$1 });
|
|
67696
67697
|
return { ...extras, standard_fields, contact, cached: false };
|
|
67697
67698
|
}
|
|
67699
|
+
const MAX_FORM_QUESTIONS = 25;
|
|
67700
|
+
const MAX_QUESTION_CHARS = 500;
|
|
67701
|
+
const CACHE_TTL_SECONDS = 2592e3;
|
|
67702
|
+
async function generateFormAnswers(client, kv, input, deadline = Date.now() + OPERATION_BUDGET_MS) {
|
|
67703
|
+
const { job_title, company, description, resume_markdown, contact, questions } = input;
|
|
67704
|
+
const key = await cacheKey(
|
|
67705
|
+
"resume:form-answers",
|
|
67706
|
+
job_title,
|
|
67707
|
+
company,
|
|
67708
|
+
description,
|
|
67709
|
+
resume_markdown,
|
|
67710
|
+
JSON.stringify(contact),
|
|
67711
|
+
input.job_location ?? "",
|
|
67712
|
+
input.workplace_type ?? "",
|
|
67713
|
+
JSON.stringify(questions)
|
|
67714
|
+
);
|
|
67715
|
+
const hit = await kv.get(key);
|
|
67716
|
+
if (hit) return JSON.parse(hit);
|
|
67717
|
+
const posting = jobText(description);
|
|
67718
|
+
const numbered = questions.map((q, i) => `${i + 1}. ${q}`).join("\n");
|
|
67719
|
+
const buildPrompt = (jd) => `You are filling in the free-text questions on ${contact.name}'s application for a job. Answer as the candidate, in the first person.
|
|
67720
|
+
|
|
67721
|
+
Candidate facts (use verbatim where relevant; never invent or contradict these):
|
|
67722
|
+
- Name: ${contact.name}
|
|
67723
|
+
- Location: ${contact.location}
|
|
67724
|
+
- Work authorization: ${contact.work_auth}
|
|
67725
|
+
- Relocation / remote: ${contact.relocation}
|
|
67726
|
+
- Target compensation: ${contact.salary_line}
|
|
67727
|
+
|
|
67728
|
+
Job: ${job_title} at ${company}
|
|
67729
|
+
Job location: ${input.job_location || "not stated in the posting"} (workplace type: ${input.workplace_type || "not stated"})
|
|
67730
|
+
|
|
67731
|
+
The full job posting:
|
|
67732
|
+
${jd}
|
|
67733
|
+
|
|
67734
|
+
The candidate's tailored résumé for this role:
|
|
67735
|
+
${resume_markdown}
|
|
67736
|
+
|
|
67737
|
+
The application form's questions:
|
|
67738
|
+
${numbered}
|
|
67739
|
+
|
|
67740
|
+
Rules:
|
|
67741
|
+
- Answer each question directly. A question asking for detail gets 2-5 sentences grounded in the résumé; a short factual question gets a short answer.
|
|
67742
|
+
- Keep everything truthful to the résumé and the candidate facts. Never invent employers, dates, metrics, people or events.
|
|
67743
|
+
- Asked who referred the candidate, or anything about a person: there is no referral, so answer the way the question says to when there is none (for example "N/A"), or "No" if it gives no such instruction.
|
|
67744
|
+
- Asked how the candidate heard about the job: they found the posting while searching for roles. Never name a website, event or person.
|
|
67745
|
+
- Asked for a fact you do not have (an address, a date, a number not in the résumé, a link not given above): return an empty string for that answer. The candidate will answer it themselves.
|
|
67746
|
+
- ${POSTING_INSTRUCTIONS_RULE} When the posting asks applicants to mention something, put it in the answer about why they are applying, or the closest fit.
|
|
67747
|
+
- Never use em dashes; use commas, colons, or hyphens instead.
|
|
67748
|
+
|
|
67749
|
+
Return ONLY a JSON object, no preamble and no markdown fence, with one answer per question in the same order:
|
|
67750
|
+
{"answers": ["answer to question 1", "answer to question 2"]}`;
|
|
67751
|
+
const promptChars = buildPrompt("").length;
|
|
67752
|
+
const messages2 = (provider) => [
|
|
67753
|
+
{
|
|
67754
|
+
role: "user",
|
|
67755
|
+
content: buildPrompt(
|
|
67756
|
+
clip(posting, postingCharsFor(provider, promptChars, FORM_ANSWERS_TOKENS))
|
|
67757
|
+
)
|
|
67758
|
+
}
|
|
67759
|
+
];
|
|
67760
|
+
const response = await sendChatCompletion(client, messages2, {
|
|
67761
|
+
maxTokens: FORM_ANSWERS_TOKENS,
|
|
67762
|
+
temperature: 0.4,
|
|
67763
|
+
deadline
|
|
67764
|
+
});
|
|
67765
|
+
let parsed;
|
|
67766
|
+
try {
|
|
67767
|
+
parsed = JSON.parse(stripCodeFence(response.message));
|
|
67768
|
+
} catch {
|
|
67769
|
+
throw new Error(`Form answers returned unparseable response: ${response.message.slice(0, 300)}`);
|
|
67770
|
+
}
|
|
67771
|
+
const raw = Array.isArray(parsed.answers) ? parsed.answers : [];
|
|
67772
|
+
const answers = questions.map((q, i) => ({
|
|
67773
|
+
q,
|
|
67774
|
+
a: typeof raw[i] === "string" ? normalizeTypography(raw[i]).trim() : ""
|
|
67775
|
+
}));
|
|
67776
|
+
await kv.put(key, JSON.stringify(answers), { expirationTtl: CACHE_TTL_SECONDS });
|
|
67777
|
+
return answers;
|
|
67778
|
+
}
|
|
67779
|
+
function readQuestions(value) {
|
|
67780
|
+
if (!Array.isArray(value)) return void 0;
|
|
67781
|
+
const questions = value.filter((q) => typeof q === "string" && q.trim() !== "").map((q) => q.trim().slice(0, MAX_QUESTION_CHARS)).slice(0, MAX_FORM_QUESTIONS);
|
|
67782
|
+
return questions.length ? questions : void 0;
|
|
67783
|
+
}
|
|
67698
67784
|
const VARIANT_PREFIX = "resume:variant:";
|
|
67699
67785
|
function randomSlug() {
|
|
67700
67786
|
const bytes = new Uint8Array(9);
|
|
@@ -68235,8 +68321,17 @@ function createResumeHandler(basePath, options = {}) {
|
|
|
68235
68321
|
}
|
|
68236
68322
|
try {
|
|
68237
68323
|
const client = createLLMClient(c.env, deferTo(c));
|
|
68324
|
+
const deadline = Date.now() + OPERATION_BUDGET_MS;
|
|
68238
68325
|
const result = await generateApplicationExtras(client, c.env.CONTENT_KV, body);
|
|
68239
|
-
|
|
68326
|
+
const questions = readQuestions(body.questions);
|
|
68327
|
+
if (!questions) return c.json(result);
|
|
68328
|
+
const form_answers = await generateFormAnswers(
|
|
68329
|
+
client,
|
|
68330
|
+
c.env.CONTENT_KV,
|
|
68331
|
+
{ ...body, contact: result.contact, questions },
|
|
68332
|
+
deadline
|
|
68333
|
+
);
|
|
68334
|
+
return c.json({ ...result, form_answers });
|
|
68240
68335
|
} catch (error2) {
|
|
68241
68336
|
logger2.error("application-extras generation failed", {
|
|
68242
68337
|
error: error2.message,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AnthropicError } from "./index-
|
|
2
|
-
import { D, M } from "./index-
|
|
1
|
+
import { A as AnthropicError } from "./index-D6Xd4aSy.js";
|
|
2
|
+
import { D, M } from "./index-D6Xd4aSy.js";
|
|
3
3
|
function nodeOnly(name) {
|
|
4
4
|
throw new AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
5
5
|
}
|
|
@@ -13,6 +13,11 @@ export interface ApplicationExtrasRequest {
|
|
|
13
13
|
job_location?: string;
|
|
14
14
|
/** The job's workplace type as posted: remote | hybrid | onsite | unknown. */
|
|
15
15
|
workplace_type?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The application form's own free-text questions, when the caller has read
|
|
18
|
+
* the form (the apply runner). Answered in `form_answers`; see form-answers.ts.
|
|
19
|
+
*/
|
|
20
|
+
questions?: unknown;
|
|
16
21
|
}
|
|
17
22
|
export interface ScreeningAnswer {
|
|
18
23
|
q: string;
|
|
@@ -40,6 +45,8 @@ export interface ApplicationExtras {
|
|
|
40
45
|
talking_points: string[];
|
|
41
46
|
}
|
|
42
47
|
export interface ApplicationExtrasResponse extends ApplicationExtras {
|
|
48
|
+
/** One answer per question in the request's `questions`, under its exact label. */
|
|
49
|
+
form_answers?: ScreeningAnswer[];
|
|
43
50
|
/** Deterministic copy-paste block for the boring repeated form fields. */
|
|
44
51
|
standard_fields: string;
|
|
45
52
|
/** Raw contact profile, so the UI can offer any single field on its own. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-extras.d.ts","sourceRoot":"","sources":["../../worker/src/application-extras.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EAAsB,KAAK,QAAQ,EAAoB,MAAM,UAAU,CAAA;AAK9E,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAK3F,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,uFAAuF;IACvF,eAAe,EAAE,MAAM,CAAA;IACvB;;+EAE2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"application-extras.d.ts","sourceRoot":"","sources":["../../worker/src/application-extras.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EAAsB,KAAK,QAAQ,EAAoB,MAAM,UAAU,CAAA;AAK9E,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAK3F,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,uFAAuF;IACvF,eAAe,EAAE,MAAM,CAAA;IACvB;;+EAE2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,qBAAqB,EAAE,MAAM,CAAA;IAC7B,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;IACnB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,iBAAiB,EAAE,eAAe,EAAE,CAAA;IACpC,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAA;IACnB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,mFAAmF;IACnF,YAAY,CAAC,EAAE,eAAe,EAAE,CAAA;IAChC,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAA;IACvB,4EAA4E;IAC5E,OAAO,EAAE,cAAc,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB;AAaD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,QAAQ,EAChB,EAAE,EAAE,WAAW,EACf,GAAG,EAAE,wBAAwB,GAC5B,OAAO,CAAC,yBAAyB,CAAC,CAuIpC"}
|
|
@@ -71,6 +71,7 @@ export declare const SELECTION_BUDGET: {
|
|
|
71
71
|
export declare const FULL_JD_MAX_CHARS = 60000;
|
|
72
72
|
export declare const COVER_LETTER_TOKENS = 2048;
|
|
73
73
|
export declare const APPLICATION_EXTRAS_TOKENS = 3500;
|
|
74
|
+
export declare const FORM_ANSWERS_TOKENS = 2500;
|
|
74
75
|
export declare const OPERATION_BUDGET_MS = 100000;
|
|
75
76
|
export declare const MIN_ATTEMPT_MS = 3000;
|
|
76
77
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../worker/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;CAGb,CAAA;AA0DV;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,CAAA;AAErB,eAAO,MAAM,aAAa,EAAE;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,EA4ES,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW;;;;;;;CAQd,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;CASzB,CAAA;AAUV,eAAO,MAAM,gBAAgB;;;;CAanB,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAMvC,eAAO,MAAM,yBAAyB,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../worker/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;CAGb,CAAA;AA0DV;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,CAAA;AAErB,eAAO,MAAM,aAAa,EAAE;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,EA4ES,CAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW;;;;;;;CAQd,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;CASzB,CAAA;AAUV,eAAO,MAAM,gBAAgB;;;;CAanB,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAMvC,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAI7C,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAwBvC,eAAO,MAAM,mBAAmB,SAAU,CAAA;AAM1C,eAAO,MAAM,cAAc,OAAQ,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { KVNamespace } from '@cloudflare/workers-types';
|
|
2
|
+
import { type ContactProfile } from './contact.js';
|
|
3
|
+
import { type LLMChain } from './llm.js';
|
|
4
|
+
import type { ScreeningAnswer } from './application-extras.js';
|
|
5
|
+
/**
|
|
6
|
+
* Answers to ONE form's own free-text questions.
|
|
7
|
+
*
|
|
8
|
+
* The kit drafts answers to six questions applications ask over and over, and
|
|
9
|
+
* the apply runner can only use one whose wording matches the form's. A
|
|
10
|
+
* question only this posting asks matched none: Fleetio's "How did you hear
|
|
11
|
+
* about Fleetio and what compelled you to apply?" went to the owner unanswered,
|
|
12
|
+
* while its posting asked applicants to mention "coffee" so it knows they read
|
|
13
|
+
* it (2026-11-23). The runner now sends the labels it could not answer, and
|
|
14
|
+
* they are drafted here with the whole posting in view.
|
|
15
|
+
*/
|
|
16
|
+
/** The most questions one call drafts; a form with more is not a normal form. */
|
|
17
|
+
export declare const MAX_FORM_QUESTIONS = 25;
|
|
18
|
+
/** The longest label kept; Greenhouse's longest real ones run ~300 characters. */
|
|
19
|
+
export declare const MAX_QUESTION_CHARS = 500;
|
|
20
|
+
export interface FormAnswersInput {
|
|
21
|
+
job_title: string;
|
|
22
|
+
company: string;
|
|
23
|
+
description: string;
|
|
24
|
+
resume_markdown: string;
|
|
25
|
+
job_location?: string;
|
|
26
|
+
workplace_type?: string;
|
|
27
|
+
contact: ContactProfile;
|
|
28
|
+
questions: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* One answer per question, in the order asked and under the exact label asked,
|
|
32
|
+
* since the runner matches on that label. An empty answer means "the owner
|
|
33
|
+
* should answer this": the model is told to return one rather than guess.
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateFormAnswers(client: LLMChain, kv: KVNamespace, input: FormAnswersInput, deadline?: number): Promise<ScreeningAnswer[]>;
|
|
36
|
+
/** The `questions` a caller sent, kept only when well-formed, else undefined. */
|
|
37
|
+
export declare function readQuestions(value: unknown): string[] | undefined;
|
|
38
|
+
//# sourceMappingURL=form-answers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-answers.d.ts","sourceRoot":"","sources":["../../worker/src/form-answers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAGlD,OAAO,EAAsB,KAAK,QAAQ,EAAoB,MAAM,UAAU,CAAA;AAG9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAE9D;;;;;;;;;;GAUG;AAEH,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,KAAK,CAAA;AACpC,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAKD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,QAAQ,EAChB,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,MAAyC,GAClD,OAAO,CAAC,eAAe,EAAE,CAAC,CAoF5B;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,CAOlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../worker/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../worker/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAgC5D,UAAU,SAAS;IACjB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qFAAqF;IACrF,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,KAAK,CAAA;KAAE,CAAA;IAC9B,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,8EAA8E;IAC9E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,WAAW,CAAA;IAC1B,UAAU,EAAE,WAAW,CAAA;CACxB;AAkBD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;cAUrD,SAAS;0CAka3C;AAED,YAAY,EAAE,SAAS,EAAE,CAAA"}
|
package/dist/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/resume-bot",
|
|
3
|
-
"version": "3.15.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "3.15.110",
|
|
4
|
+
"gitHead": "59f5909b5200af1cd188bab1c8d122fc57e57ca1",
|
|
5
5
|
"description": "AI-powered conversational interface for interactive resume exploration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|