@rwendell/dossier 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +322 -2
- package/agents/dossier-answerer.md +168 -0
- package/agents/dossier-proposer.md +215 -0
- package/agents/dossier-tailor.md +232 -0
- package/dist/answer/prompt.d.ts +17 -0
- package/dist/answer/prompt.js +44 -0
- package/dist/answer/prompt.js.map +1 -0
- package/dist/answer/run.d.ts +21 -0
- package/dist/answer/run.js +272 -0
- package/dist/answer/run.js.map +1 -0
- package/dist/career/import-resume.d.ts +17 -0
- package/dist/career/import-resume.js +194 -0
- package/dist/career/import-resume.js.map +1 -0
- package/dist/career/load.d.ts +10 -0
- package/dist/career/load.js +96 -0
- package/dist/career/load.js.map +1 -0
- package/dist/career/schema.d.ts +147 -0
- package/dist/career/schema.js +95 -0
- package/dist/career/schema.js.map +1 -0
- package/dist/clean/run.d.ts +1 -0
- package/dist/clean/run.js +8 -0
- package/dist/clean/run.js.map +1 -0
- package/dist/cli/commands/answer.d.ts +23 -0
- package/dist/cli/commands/answer.js +110 -0
- package/dist/cli/commands/answer.js.map +1 -0
- package/dist/cli/commands/clean.d.ts +2 -0
- package/dist/cli/commands/clean.js +11 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.js +83 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +7 -0
- package/dist/cli/commands/init.js +80 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/paths.d.ts +7 -0
- package/dist/cli/commands/paths.js +42 -0
- package/dist/cli/commands/paths.js.map +1 -0
- package/dist/cli/commands/proposal.d.ts +30 -0
- package/dist/cli/commands/proposal.js +148 -0
- package/dist/cli/commands/proposal.js.map +1 -0
- package/dist/cli/commands/pull-private.d.ts +8 -0
- package/dist/cli/commands/pull-private.js +30 -0
- package/dist/cli/commands/pull-private.js.map +1 -0
- package/dist/cli/commands/score.d.ts +11 -0
- package/dist/cli/commands/score.js +58 -0
- package/dist/cli/commands/score.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +13 -0
- package/dist/cli/commands/sync.js +65 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/tailor.d.ts +24 -0
- package/dist/cli/commands/tailor.js +113 -0
- package/dist/cli/commands/tailor.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +6 -0
- package/dist/cli/commands/verify.js +15 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +85 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/config.d.ts +36 -0
- package/dist/config/config.js +71 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/paths.d.ts +34 -0
- package/dist/config/paths.js +126 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/evidence/numbers.d.ts +2 -0
- package/dist/evidence/numbers.js +26 -0
- package/dist/evidence/numbers.js.map +1 -0
- package/dist/evidence/verify.d.ts +109 -0
- package/dist/evidence/verify.js +445 -0
- package/dist/evidence/verify.js.map +1 -0
- package/dist/job/input.d.ts +9 -0
- package/dist/job/input.js +141 -0
- package/dist/job/input.js.map +1 -0
- package/dist/job/page.d.ts +14 -0
- package/dist/job/page.js +426 -0
- package/dist/job/page.js.map +1 -0
- package/dist/job/types.d.ts +30 -0
- package/dist/job/types.js +2 -0
- package/dist/job/types.js.map +1 -0
- package/dist/llm/agents.d.ts +7 -0
- package/dist/llm/agents.js +46 -0
- package/dist/llm/agents.js.map +1 -0
- package/dist/llm/opencode.d.ts +19 -0
- package/dist/llm/opencode.js +117 -0
- package/dist/llm/opencode.js.map +1 -0
- package/dist/llm/providers.d.ts +63 -0
- package/dist/llm/providers.js +207 -0
- package/dist/llm/providers.js.map +1 -0
- package/dist/private/pull.d.ts +7 -0
- package/dist/private/pull.js +168 -0
- package/dist/private/pull.js.map +1 -0
- package/dist/projects/rank.d.ts +17 -0
- package/dist/projects/rank.js +100 -0
- package/dist/projects/rank.js.map +1 -0
- package/dist/projects/store.d.ts +7 -0
- package/dist/projects/store.js +31 -0
- package/dist/projects/store.js.map +1 -0
- package/dist/projects/sync-github.d.ts +11 -0
- package/dist/projects/sync-github.js +269 -0
- package/dist/projects/sync-github.js.map +1 -0
- package/dist/projects/sync-local.d.ts +8 -0
- package/dist/projects/sync-local.js +318 -0
- package/dist/projects/sync-local.js.map +1 -0
- package/dist/projects/types.d.ts +71 -0
- package/dist/projects/types.js +2 -0
- package/dist/projects/types.js.map +1 -0
- package/dist/proposal/prompt.d.ts +20 -0
- package/dist/proposal/prompt.js +64 -0
- package/dist/proposal/prompt.js.map +1 -0
- package/dist/proposal/run.d.ts +28 -0
- package/dist/proposal/run.js +386 -0
- package/dist/proposal/run.js.map +1 -0
- package/dist/resume/basics.d.ts +4 -0
- package/dist/resume/basics.js +33 -0
- package/dist/resume/basics.js.map +1 -0
- package/dist/resume/find.d.ts +12 -0
- package/dist/resume/find.js +27 -0
- package/dist/resume/find.js.map +1 -0
- package/dist/resume/format.d.ts +3 -0
- package/dist/resume/format.js +53 -0
- package/dist/resume/format.js.map +1 -0
- package/dist/resume/one-page.d.ts +149 -0
- package/dist/resume/one-page.js +164 -0
- package/dist/resume/one-page.js.map +1 -0
- package/dist/resume/prompt.d.ts +10 -0
- package/dist/resume/prompt.js +23 -0
- package/dist/resume/prompt.js.map +1 -0
- package/dist/resume/render.d.ts +8 -0
- package/dist/resume/render.js +84 -0
- package/dist/resume/render.js.map +1 -0
- package/dist/resume/run.d.ts +21 -0
- package/dist/resume/run.js +350 -0
- package/dist/resume/run.js.map +1 -0
- package/dist/resume/skills.d.ts +6 -0
- package/dist/resume/skills.js +47 -0
- package/dist/resume/skills.js.map +1 -0
- package/dist/resume/trace.d.ts +13 -0
- package/dist/resume/trace.js +82 -0
- package/dist/resume/trace.js.map +1 -0
- package/dist/resume/types.d.ts +94 -0
- package/dist/resume/types.js +2 -0
- package/dist/resume/types.js.map +1 -0
- package/dist/resume/verify.d.ts +19 -0
- package/dist/resume/verify.js +193 -0
- package/dist/resume/verify.js.map +1 -0
- package/dist/upwork/profile.d.ts +50 -0
- package/dist/upwork/profile.js +302 -0
- package/dist/upwork/profile.js.map +1 -0
- package/dist/upwork/settings.d.ts +96 -0
- package/dist/upwork/settings.js +166 -0
- package/dist/upwork/settings.js.map +1 -0
- package/dist/util/open-file.d.ts +1 -0
- package/dist/util/open-file.js +24 -0
- package/dist/util/open-file.js.map +1 -0
- package/dist/util/slug.d.ts +2 -0
- package/dist/util/slug.js +13 -0
- package/dist/util/slug.js.map +1 -0
- package/dist/verify/run.d.ts +4 -0
- package/dist/verify/run.js +91 -0
- package/dist/verify/run.js.map +1 -0
- package/package.json +67 -4
- package/templates/career.example.yml +63 -0
- package/templates/career.private.example.yml +10 -0
- package/templates/config.example.yml +16 -0
- package/templates/freelance.example.yml +48 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { loadConfig } from '../../config/config.js';
|
|
2
|
+
import { careerFile, configDir, configFile, dataDir, getCacheDir, getCacheMode, getCacheSource, getProfileCacheDir, getRuntimeDir, freelanceFile, resolveOutputDir, stateDir, } from '../../config/paths.js';
|
|
3
|
+
export const pathsCommand = {
|
|
4
|
+
command: 'paths',
|
|
5
|
+
describe: 'Print the resolved data, config, cache, and output paths',
|
|
6
|
+
builder: (yargs) => yargs
|
|
7
|
+
.option('json', {
|
|
8
|
+
type: 'boolean',
|
|
9
|
+
describe: 'Print JSON',
|
|
10
|
+
default: false,
|
|
11
|
+
})
|
|
12
|
+
.option('out', {
|
|
13
|
+
type: 'string',
|
|
14
|
+
describe: 'Override the output directory',
|
|
15
|
+
}),
|
|
16
|
+
handler: (argv) => {
|
|
17
|
+
const { config } = loadConfig();
|
|
18
|
+
const output = resolveOutputDir(config.output.dir, argv.out);
|
|
19
|
+
const paths = {
|
|
20
|
+
mode: getCacheMode(),
|
|
21
|
+
cacheSource: getCacheSource(),
|
|
22
|
+
data: dataDir,
|
|
23
|
+
config: configDir,
|
|
24
|
+
configFile,
|
|
25
|
+
cache: getCacheDir(),
|
|
26
|
+
state: stateDir,
|
|
27
|
+
runtime: getRuntimeDir(),
|
|
28
|
+
profileCache: getProfileCacheDir(),
|
|
29
|
+
career: careerFile,
|
|
30
|
+
freelance: freelanceFile,
|
|
31
|
+
output,
|
|
32
|
+
};
|
|
33
|
+
if (argv.json) {
|
|
34
|
+
console.log(JSON.stringify(paths, null, 2));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
for (const [label, value] of Object.entries(paths)) {
|
|
38
|
+
console.log(`${label.padEnd(12)} ${value}`);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/cli/commands/paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAO/B,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,0DAA0D;IACpE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,+BAA+B;KAC1C,CAAC;IACN,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,KAAK,GAAG;YACZ,IAAI,EAAE,YAAY,EAAE;YACpB,WAAW,EAAE,cAAc,EAAE;YAC7B,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,SAAS;YACjB,UAAU;YACV,KAAK,EAAE,WAAW,EAAE;YACpB,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,aAAa,EAAE;YACxB,YAAY,EAAE,kBAAkB,EAAE;YAClC,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,aAAa;YACxB,MAAM;SACP,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO;QACT,CAAC;QAED,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
|
+
interface ProposalArgs {
|
|
3
|
+
input?: string;
|
|
4
|
+
out?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
company?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
client?: string;
|
|
11
|
+
profile?: string;
|
|
12
|
+
noProfile?: boolean;
|
|
13
|
+
question?: string[];
|
|
14
|
+
questions?: string;
|
|
15
|
+
hint?: string[];
|
|
16
|
+
rate?: number;
|
|
17
|
+
rateType?: string;
|
|
18
|
+
noRate?: boolean;
|
|
19
|
+
timeline?: string;
|
|
20
|
+
availability?: string;
|
|
21
|
+
provider?: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
timeout?: number;
|
|
24
|
+
refresh?: boolean;
|
|
25
|
+
noSync?: boolean;
|
|
26
|
+
noCopy?: boolean;
|
|
27
|
+
debug?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const proposalCommand: CommandModule<object, ProposalArgs>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { runProposal } from '../../proposal/run.js';
|
|
2
|
+
export const proposalCommand = {
|
|
3
|
+
command: 'proposal [input]',
|
|
4
|
+
describe: 'Write a grounded Upwork proposal for a job',
|
|
5
|
+
builder: (yargs) => yargs
|
|
6
|
+
.positional('input', {
|
|
7
|
+
type: 'string',
|
|
8
|
+
describe: 'Job URL, job file, or job description',
|
|
9
|
+
})
|
|
10
|
+
.option('out', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
describe: 'Output directory (default: current directory)',
|
|
13
|
+
})
|
|
14
|
+
.option('name', {
|
|
15
|
+
type: 'string',
|
|
16
|
+
describe: 'Proposal filename suffix',
|
|
17
|
+
})
|
|
18
|
+
.option('client', {
|
|
19
|
+
type: 'string',
|
|
20
|
+
describe: 'Client context text or file',
|
|
21
|
+
})
|
|
22
|
+
.option('profile', {
|
|
23
|
+
type: 'string',
|
|
24
|
+
describe: 'Public Upwork profile URL for defaults',
|
|
25
|
+
})
|
|
26
|
+
.option('no-profile', {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
describe: 'Ignore profile.url from freelance.yml',
|
|
29
|
+
default: false,
|
|
30
|
+
})
|
|
31
|
+
.option('question', {
|
|
32
|
+
alias: 'q',
|
|
33
|
+
type: 'string',
|
|
34
|
+
array: true,
|
|
35
|
+
describe: 'Screening question text or file (repeatable)',
|
|
36
|
+
})
|
|
37
|
+
.option('questions', {
|
|
38
|
+
type: 'string',
|
|
39
|
+
describe: 'File with one screening question per line',
|
|
40
|
+
})
|
|
41
|
+
.option('hint', {
|
|
42
|
+
alias: 'H',
|
|
43
|
+
type: 'string',
|
|
44
|
+
array: true,
|
|
45
|
+
describe: 'Positioning or tone guidance (repeatable)',
|
|
46
|
+
})
|
|
47
|
+
.option('rate', {
|
|
48
|
+
type: 'number',
|
|
49
|
+
describe: 'Hourly rate or fixed bid to use',
|
|
50
|
+
})
|
|
51
|
+
.option('rate-type', {
|
|
52
|
+
type: 'string',
|
|
53
|
+
choices: ['hourly', 'fixed'],
|
|
54
|
+
describe: 'Rate type',
|
|
55
|
+
})
|
|
56
|
+
.option('no-rate', {
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
describe: 'Keep the rate out of the proposal text',
|
|
59
|
+
default: false,
|
|
60
|
+
})
|
|
61
|
+
.option('timeline', {
|
|
62
|
+
type: 'string',
|
|
63
|
+
describe: 'Delivery timeline, e.g. "2 weeks"',
|
|
64
|
+
})
|
|
65
|
+
.option('availability', {
|
|
66
|
+
type: 'string',
|
|
67
|
+
describe: 'Availability, e.g. "20 hrs/week, UK overlap"',
|
|
68
|
+
})
|
|
69
|
+
.option('title', {
|
|
70
|
+
type: 'string',
|
|
71
|
+
describe: 'Job title override',
|
|
72
|
+
})
|
|
73
|
+
.option('company', {
|
|
74
|
+
type: 'string',
|
|
75
|
+
describe: 'Client/company override',
|
|
76
|
+
})
|
|
77
|
+
.option('url', {
|
|
78
|
+
type: 'string',
|
|
79
|
+
describe: 'Job URL when not using a positional input',
|
|
80
|
+
})
|
|
81
|
+
.option('description', {
|
|
82
|
+
type: 'string',
|
|
83
|
+
describe: 'Job description text, file, or URL',
|
|
84
|
+
})
|
|
85
|
+
.option('provider', {
|
|
86
|
+
type: 'string',
|
|
87
|
+
choices: ['auto', 'opencode', 'go', 'openrouter'],
|
|
88
|
+
describe: 'Model provider',
|
|
89
|
+
})
|
|
90
|
+
.option('model', {
|
|
91
|
+
type: 'string',
|
|
92
|
+
describe: 'Exact model and skip provider fallback',
|
|
93
|
+
})
|
|
94
|
+
.option('timeout', {
|
|
95
|
+
type: 'number',
|
|
96
|
+
describe: 'Per-provider timeout in seconds',
|
|
97
|
+
})
|
|
98
|
+
.option('refresh', {
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
describe: 'Refresh the cached Upwork profile',
|
|
101
|
+
default: false,
|
|
102
|
+
})
|
|
103
|
+
.option('no-sync', {
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
describe: 'Accepted for compatibility; v0.1 has no GitHub sync',
|
|
106
|
+
default: false,
|
|
107
|
+
})
|
|
108
|
+
.option('no-copy', {
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
describe: 'Do not copy the proposal to the clipboard',
|
|
111
|
+
default: false,
|
|
112
|
+
})
|
|
113
|
+
.option('debug', {
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
describe: 'Save the prompt and raw OpenCode output',
|
|
116
|
+
default: false,
|
|
117
|
+
}),
|
|
118
|
+
handler: async (argv) => {
|
|
119
|
+
await runProposal({
|
|
120
|
+
input: argv.input,
|
|
121
|
+
out: argv.out,
|
|
122
|
+
name: argv.name,
|
|
123
|
+
title: argv.title,
|
|
124
|
+
company: argv.company,
|
|
125
|
+
url: argv.url,
|
|
126
|
+
description: argv.description,
|
|
127
|
+
client: argv.client,
|
|
128
|
+
profile: argv.profile,
|
|
129
|
+
noProfile: argv.noProfile,
|
|
130
|
+
question: argv.question,
|
|
131
|
+
questions: argv.questions,
|
|
132
|
+
hint: argv.hint,
|
|
133
|
+
rate: argv.rate,
|
|
134
|
+
rateType: argv.rateType,
|
|
135
|
+
noRate: argv.noRate,
|
|
136
|
+
timeline: argv.timeline,
|
|
137
|
+
availability: argv.availability,
|
|
138
|
+
provider: argv.provider,
|
|
139
|
+
model: argv.model,
|
|
140
|
+
timeout: argv.timeout != null ? Number(argv.timeout) * 1000 : undefined,
|
|
141
|
+
refresh: argv.refresh,
|
|
142
|
+
noSync: argv.noSync,
|
|
143
|
+
noCopy: argv.noCopy,
|
|
144
|
+
debug: argv.debug,
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=proposal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposal.js","sourceRoot":"","sources":["../../../src/cli/commands/proposal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA8BpD,MAAM,CAAC,MAAM,eAAe,GAAwC;IAClE,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EAAE,4CAA4C;IACtD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,OAAO,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,uCAAuC;KAClD,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,+CAA+C;KAC1D,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,0BAA0B;KACrC,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,6BAA6B;KACxC,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,wCAAwC;KACnD,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,uCAAuC;QACjD,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;QAClB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,8CAA8C;KACzD,CAAC;SACD,MAAM,CAAC,WAAW,EAAE;QAC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EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EACL,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS;YAChE,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { loadConfig } from '../../config/config.js';
|
|
2
|
+
import { pullPrivate } from '../../private/pull.js';
|
|
3
|
+
export const pullPrivateCommand = {
|
|
4
|
+
command: 'pull-private',
|
|
5
|
+
describe: 'Pull career.private.yml from a secret GitHub gist',
|
|
6
|
+
builder: (yargs) => yargs
|
|
7
|
+
.option('gist', {
|
|
8
|
+
type: 'string',
|
|
9
|
+
describe: 'Gist id or URL (default: CAREER_PRIVATE_GIST_ID or auto-discover)',
|
|
10
|
+
})
|
|
11
|
+
.option('file', {
|
|
12
|
+
type: 'string',
|
|
13
|
+
describe: 'Gist filename',
|
|
14
|
+
default: 'career.private.yml',
|
|
15
|
+
})
|
|
16
|
+
.option('allow-public', {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
describe: 'Permit a public gist; not recommended for PII',
|
|
19
|
+
default: false,
|
|
20
|
+
}),
|
|
21
|
+
handler: (argv) => {
|
|
22
|
+
loadConfig();
|
|
23
|
+
pullPrivate({
|
|
24
|
+
gist: argv.gist,
|
|
25
|
+
file: argv.file,
|
|
26
|
+
allowPublic: argv.allowPublic,
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=pull-private.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull-private.js","sourceRoot":"","sources":["../../../src/cli/commands/pull-private.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQpD,MAAM,CAAC,MAAM,kBAAkB,GAA2C;IACxE,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,mDAAmD;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,mEAAmE;KAC9E,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,oBAAoB;KAC9B,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,+CAA+C;QACzD,OAAO,EAAE,KAAK;KACf,CAAC;IACN,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,UAAU,EAAE,CAAC;QACb,WAAW,CAAC;YACV,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
|
+
interface ScoreArgs {
|
|
3
|
+
input?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
company?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const scoreCommand: CommandModule<object, ScoreArgs>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { loadCareer } from '../../career/load.js';
|
|
2
|
+
import { loadConfig } from '../../config/config.js';
|
|
3
|
+
import { readJobInput } from '../../job/input.js';
|
|
4
|
+
import { rankProjects } from '../../projects/rank.js';
|
|
5
|
+
import { loadGithub, loadLocal } from '../../projects/store.js';
|
|
6
|
+
export const scoreCommand = {
|
|
7
|
+
command: 'score [input]',
|
|
8
|
+
describe: 'Explain project candidate scores for a job',
|
|
9
|
+
builder: (yargs) => yargs
|
|
10
|
+
.positional('input', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
describe: 'Job URL, job file, or job description',
|
|
13
|
+
})
|
|
14
|
+
.option('title', { type: 'string', describe: 'Job title override' })
|
|
15
|
+
.option('company', {
|
|
16
|
+
type: 'string',
|
|
17
|
+
describe: 'Client/company override',
|
|
18
|
+
})
|
|
19
|
+
.option('url', { type: 'string', describe: 'Job URL' })
|
|
20
|
+
.option('description', {
|
|
21
|
+
type: 'string',
|
|
22
|
+
describe: 'Job description text, file, or URL',
|
|
23
|
+
})
|
|
24
|
+
.option('limit', {
|
|
25
|
+
type: 'number',
|
|
26
|
+
describe: 'Number of candidates to show',
|
|
27
|
+
default: 12,
|
|
28
|
+
}),
|
|
29
|
+
handler: async (argv) => {
|
|
30
|
+
loadConfig();
|
|
31
|
+
const { career } = loadCareer();
|
|
32
|
+
const job = await readJobInput({
|
|
33
|
+
input: argv.input,
|
|
34
|
+
title: argv.title,
|
|
35
|
+
company: argv.company,
|
|
36
|
+
url: argv.url,
|
|
37
|
+
description: argv.description,
|
|
38
|
+
});
|
|
39
|
+
const github = loadGithub();
|
|
40
|
+
const local = loadLocal();
|
|
41
|
+
if (!github && !local) {
|
|
42
|
+
throw new Error('No project metadata cached. Run `dossier sync github` or `dossier sync local` first.');
|
|
43
|
+
}
|
|
44
|
+
const result = rankProjects(github, local, career, job, argv.limit ?? 12);
|
|
45
|
+
console.log(`dossier: ${result.tokens.length} job keyword(s)`);
|
|
46
|
+
console.log(`dossier: ${result.scored.length} project candidate(s)`);
|
|
47
|
+
console.log('');
|
|
48
|
+
for (const entry of result.scored.slice(0, argv.limit ?? 12)) {
|
|
49
|
+
const repo = entry.repo;
|
|
50
|
+
const evidence = repo.evidence ||
|
|
51
|
+
('fullName' in repo && repo.fullName
|
|
52
|
+
? `github:${repo.fullName}`
|
|
53
|
+
: `github:${repo.name}`);
|
|
54
|
+
console.log(`${String(entry.score).padStart(3)} ${evidence} ${entry.matched.length > 0 ? entry.matched.join(', ') : '(no keyword matches)'}`);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score.js","sourceRoot":"","sources":["../../../src/cli/commands/score.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAWhE,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,4CAA4C;IACtD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,OAAO,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,uCAAuC;KAClD,CAAC;SACD,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;SACnE,MAAM,CAAC,SAAS,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QACrE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,MAAM,QAAQ,GACZ,IAAI,CAAC,QAAQ;gBACb,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ;oBAClC,CAAC,CAAC,UAAU,IAAI,CAAC,QAAQ,EAAE;oBAC3B,CAAC,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC7B,OAAO,CAAC,GAAG,CACT,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,KAC7C,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,sBACxD,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
|
+
interface SyncArgs {
|
|
3
|
+
target?: 'github' | 'local' | 'all';
|
|
4
|
+
user?: string;
|
|
5
|
+
root?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
readmeChars?: number;
|
|
8
|
+
publicOnly?: boolean;
|
|
9
|
+
skipOrgs?: boolean;
|
|
10
|
+
skipLocal?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const syncCommand: CommandModule<object, SyncArgs>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { loadConfig } from '../../config/config.js';
|
|
2
|
+
import { syncGithub } from '../../projects/sync-github.js';
|
|
3
|
+
import { syncLocal } from '../../projects/sync-local.js';
|
|
4
|
+
export const syncCommand = {
|
|
5
|
+
command: 'sync <target>',
|
|
6
|
+
describe: 'Sync GitHub/org and local project metadata into the cache',
|
|
7
|
+
builder: (yargs) => yargs
|
|
8
|
+
.positional('target', {
|
|
9
|
+
type: 'string',
|
|
10
|
+
choices: ['github', 'local', 'all'],
|
|
11
|
+
describe: 'What to sync',
|
|
12
|
+
})
|
|
13
|
+
.option('user', {
|
|
14
|
+
type: 'string',
|
|
15
|
+
describe: 'GitHub username override',
|
|
16
|
+
})
|
|
17
|
+
.option('root', {
|
|
18
|
+
type: 'string',
|
|
19
|
+
describe: 'Local projects root (default: ~/projects)',
|
|
20
|
+
})
|
|
21
|
+
.option('limit', {
|
|
22
|
+
type: 'number',
|
|
23
|
+
describe: 'Maximum repos per GitHub owner',
|
|
24
|
+
})
|
|
25
|
+
.option('readme-chars', {
|
|
26
|
+
type: 'number',
|
|
27
|
+
describe: 'README characters to keep',
|
|
28
|
+
})
|
|
29
|
+
.option('public-only', {
|
|
30
|
+
type: 'boolean',
|
|
31
|
+
describe: 'Exclude private org repositories',
|
|
32
|
+
default: false,
|
|
33
|
+
})
|
|
34
|
+
.option('skip-orgs', {
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
describe: 'Only sync personal GitHub repositories',
|
|
37
|
+
default: false,
|
|
38
|
+
})
|
|
39
|
+
.option('skip-local', {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
describe: 'Do not scan local projects after GitHub sync',
|
|
42
|
+
default: false,
|
|
43
|
+
}),
|
|
44
|
+
handler: (argv) => {
|
|
45
|
+
loadConfig();
|
|
46
|
+
if (!argv.target)
|
|
47
|
+
throw new Error('Choose github, local, or all.');
|
|
48
|
+
if (argv.target === 'local') {
|
|
49
|
+
syncLocal({
|
|
50
|
+
root: argv.root,
|
|
51
|
+
readmeChars: argv.readmeChars,
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
syncGithub({
|
|
56
|
+
user: argv.user,
|
|
57
|
+
limit: argv.limit,
|
|
58
|
+
readmeChars: argv.readmeChars,
|
|
59
|
+
publicOnly: argv.publicOnly,
|
|
60
|
+
skipOrgs: argv.skipOrgs,
|
|
61
|
+
skipLocal: argv.target === 'github' ? argv.skipLocal : false,
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/cli/commands/sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAazD,MAAM,CAAC,MAAM,WAAW,GAAoC;IAC1D,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,2DAA2D;IACrE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,QAAQ,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAU;QAC5C,QAAQ,EAAE,cAAc;KACzB,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,0BAA0B;KACrC,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2CAA2C;KACtD,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,gCAAgC;KAC3C,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2BAA2B;KACtC,CAAC;SACD,MAAM,CAAC,aAAa,EAAE;QACrB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,kCAAkC;QAC5C,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,WAAW,EAAE;QACnB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,wCAAwC;QAClD,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,8CAA8C;QACxD,OAAO,EAAE,KAAK;KACf,CAAC;IACN,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,UAAU,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnE,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;YAC5B,SAAS,CAAC;gBACR,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,UAAU,CAAC;YACT,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;SAC7D,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
|
+
interface TailorArgs {
|
|
3
|
+
input?: string;
|
|
4
|
+
out?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
company?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
generic?: boolean;
|
|
11
|
+
profile?: string;
|
|
12
|
+
noProfile?: boolean;
|
|
13
|
+
theme?: string;
|
|
14
|
+
provider?: string;
|
|
15
|
+
model?: string;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
refresh?: boolean;
|
|
18
|
+
noRender?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
noOpen?: boolean;
|
|
21
|
+
debug?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const tailorCommand: CommandModule<object, TailorArgs>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { runTailor } from '../../resume/run.js';
|
|
2
|
+
export const tailorCommand = {
|
|
3
|
+
command: 'tailor [input]',
|
|
4
|
+
describe: 'Tailor a one-page JSON Resume and PDF for a job',
|
|
5
|
+
builder: (yargs) => yargs
|
|
6
|
+
.positional('input', {
|
|
7
|
+
type: 'string',
|
|
8
|
+
describe: 'Job URL, job file, or job description',
|
|
9
|
+
})
|
|
10
|
+
.option('out', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
describe: 'Output directory (default: current directory)',
|
|
13
|
+
})
|
|
14
|
+
.option('name', {
|
|
15
|
+
type: 'string',
|
|
16
|
+
describe: 'Resume filename suffix',
|
|
17
|
+
})
|
|
18
|
+
.option('generic', {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
describe: 'Build a general-purpose resume; default when no job is given',
|
|
21
|
+
default: false,
|
|
22
|
+
})
|
|
23
|
+
.option('profile', {
|
|
24
|
+
type: 'string',
|
|
25
|
+
describe: 'Public Upwork profile URL for identity/location defaults',
|
|
26
|
+
})
|
|
27
|
+
.option('no-profile', {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
describe: 'Ignore profile.url from freelance.yml',
|
|
30
|
+
default: false,
|
|
31
|
+
})
|
|
32
|
+
.option('theme', {
|
|
33
|
+
type: 'string',
|
|
34
|
+
describe: 'JSON Resume theme package',
|
|
35
|
+
})
|
|
36
|
+
.option('title', {
|
|
37
|
+
type: 'string',
|
|
38
|
+
describe: 'Job title override',
|
|
39
|
+
})
|
|
40
|
+
.option('company', {
|
|
41
|
+
type: 'string',
|
|
42
|
+
describe: 'Client/company override',
|
|
43
|
+
})
|
|
44
|
+
.option('url', {
|
|
45
|
+
type: 'string',
|
|
46
|
+
describe: 'Job URL when not using a positional input',
|
|
47
|
+
})
|
|
48
|
+
.option('description', {
|
|
49
|
+
type: 'string',
|
|
50
|
+
describe: 'Job description text, file, or URL',
|
|
51
|
+
})
|
|
52
|
+
.option('provider', {
|
|
53
|
+
type: 'string',
|
|
54
|
+
choices: ['auto', 'opencode', 'go', 'openrouter'],
|
|
55
|
+
describe: 'Model provider',
|
|
56
|
+
})
|
|
57
|
+
.option('model', {
|
|
58
|
+
type: 'string',
|
|
59
|
+
describe: 'Exact model and skip provider fallback',
|
|
60
|
+
})
|
|
61
|
+
.option('timeout', {
|
|
62
|
+
type: 'number',
|
|
63
|
+
describe: 'Per-provider timeout in seconds',
|
|
64
|
+
})
|
|
65
|
+
.option('refresh', {
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
describe: 'Refresh the cached Upwork profile',
|
|
68
|
+
default: false,
|
|
69
|
+
})
|
|
70
|
+
.option('no-render', {
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
describe: 'Write JSON/trace only; skip PDF rendering',
|
|
73
|
+
default: false,
|
|
74
|
+
})
|
|
75
|
+
.option('open', {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
describe: 'Open the rendered PDF when finished',
|
|
78
|
+
default: true,
|
|
79
|
+
})
|
|
80
|
+
.option('no-open', {
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
describe: 'Do not open the rendered PDF',
|
|
83
|
+
default: false,
|
|
84
|
+
})
|
|
85
|
+
.option('debug', {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
describe: 'Save the prompt and raw OpenCode output',
|
|
88
|
+
default: false,
|
|
89
|
+
}),
|
|
90
|
+
handler: async (argv) => {
|
|
91
|
+
await runTailor({
|
|
92
|
+
input: argv.input,
|
|
93
|
+
out: argv.out,
|
|
94
|
+
name: argv.name,
|
|
95
|
+
title: argv.title,
|
|
96
|
+
company: argv.company,
|
|
97
|
+
url: argv.url,
|
|
98
|
+
description: argv.description,
|
|
99
|
+
generic: argv.generic,
|
|
100
|
+
profile: argv.profile,
|
|
101
|
+
noProfile: argv.noProfile,
|
|
102
|
+
theme: argv.theme,
|
|
103
|
+
provider: argv.provider,
|
|
104
|
+
model: argv.model,
|
|
105
|
+
timeout: argv.timeout != null ? Number(argv.timeout) * 1000 : undefined,
|
|
106
|
+
refresh: argv.refresh,
|
|
107
|
+
noRender: argv.noRender,
|
|
108
|
+
open: argv.noOpen ? false : argv.open,
|
|
109
|
+
debug: argv.debug,
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=tailor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailor.js","sourceRoot":"","sources":["../../../src/cli/commands/tailor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAwBhD,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,iDAAiD;IAC3D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,OAAO,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,uCAAuC;KAClD,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,+CAA+C;KAC1D,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,wBAAwB;KACnC,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,8DAA8D;QACxE,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAA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AK;SAClB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { runVerify } from '../../verify/run.js';
|
|
2
|
+
export const verifyCommand = {
|
|
3
|
+
command: 'verify <input>',
|
|
4
|
+
describe: 'Verify a generated resume JSON/trace and PDF page count',
|
|
5
|
+
builder: (yargs) => yargs.positional('input', {
|
|
6
|
+
type: 'string',
|
|
7
|
+
describe: 'Resume JSON/PDF path or resume slug',
|
|
8
|
+
}),
|
|
9
|
+
handler: async (argv) => {
|
|
10
|
+
if (!argv.input)
|
|
11
|
+
throw new Error('Provide a resume to verify.');
|
|
12
|
+
await runVerify({ input: argv.input });
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../src/cli/commands/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMhD,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,yDAAyD;IACnE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,qCAAqC;KAChD,CAAC;IACJ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAChE,MAAM,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACzC,CAAC;CACF,CAAC"}
|