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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ associated with your Firecrawl API key:

```bash
npx firecrawl-cli@alexandria alexandria terms accept benzinga \
--version '<reviewed-version>' --digest '<reviewed-sha256>' --confirm
--terms-version '<reviewed-version>' --digest '<reviewed-sha256>' --confirm
```

This posts to `/exchange/provider-terms/accept`. No automatic acceptance or retry
Expand Down
2 changes: 1 addition & 1 deletion src/commands/alexandria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function handleAlexandria(
if (failed) process.exitCode = 1;
if (envelope.code === 'THIRD_PARTY_DATA_TERMS_REQUIRED') {
console.error(
'Review the provider terms with firecrawl alexandria terms show <provider>. After review, accept with firecrawl alexandria terms accept <provider> --version <version> --digest <sha256> --confirm.'
'Review the provider terms with firecrawl alexandria terms show <provider>. After review, accept with firecrawl alexandria terms accept <provider> --terms-version <version> --digest <sha256> --confirm.'
);
}
writeOutput(
Expand Down
2 changes: 1 addition & 1 deletion src/commands/terms.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vi.mock('../utils/config', () => ({
getConfig: () => ({}),
}));
afterEach(() => vi.unstubAllGlobals());
const options = { version: 'v1', digest: 'a'.repeat(64), confirm: true };
const options = { termsVersion: 'v1', digest: 'a'.repeat(64), confirm: true };
it('requires explicit confirmation without making any request', async () => {
const fetcher = vi.fn();
vi.stubGlobal('fetch', fetcher);
Expand Down
12 changes: 6 additions & 6 deletions src/commands/terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { writeOutput } from '../utils/output';
type TermsOptions = {
apiKey?: string;
apiUrl?: string;
version?: string;
termsVersion?: string;
digest?: string;
confirm?: boolean;
json?: boolean;
Expand All @@ -22,12 +22,12 @@ export async function requestTerms(
if (
accept &&
(!options.confirm ||
!options.version?.trim() ||
options.version.length > 200 ||
!options.termsVersion?.trim() ||
options.termsVersion.length > 200 ||
!/^[a-f0-9]{64}$/.test(options.digest ?? ''))
) {
throw new Error(
'Review the terms, then supply --version, --digest (64 lowercase hex characters), and --confirm.'
'Review the terms, then supply --terms-version, --digest (64 lowercase hex characters), and --confirm.'
);
}
const key = getApiKey(options.apiKey);
Expand All @@ -50,7 +50,7 @@ export async function requestTerms(
? {
body: JSON.stringify({
provider,
version: options.version,
version: options.termsVersion,
digest: options.digest,
confirmed: true,
}),
Expand Down Expand Up @@ -116,7 +116,7 @@ export function createTermsCommand(): Command {
if (name === 'accept')
command
.requiredOption(
'--version <version>',
'--terms-version <version>',
'Exact version of the terms you reviewed'
)
.requiredOption(
Expand Down
Loading