feat: relicense AGPL-3.0 → MIT (v2.7.0)
Clear the 3 Unsloth-Studio-derived AGPL files and flip LICENSE + 5 package.json from AGPL-3.0-only to MIT. - html-to-md.ts → MIT node-html-markdown (parse5 dropped) - llama-args-validator.ts → clean-room (flag denylist = facts) - tool-call-parser.ts → delete dead Unsloth-ported code; keep extractToolCallBlocks/stripToolMarkup byte-identical (no behavior change) - LICENSE → MIT (Copyright (c) 2026 indifferentketchup); 5 package.json → MIT; AGPL SPDX headers removed; README License section; license-mit guard test - roadmap License-debt batch marked shipped; openspec/changes/license-debt-mit Decouples the relicense from the native-parsing retirement (the ported parser was dead code). Server suite 519 passing; build + coder typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
46
apps/server/src/services/__tests__/license-mit.test.ts
Normal file
46
apps/server/src/services/__tests__/license-mit.test.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
|
||||
// Guards the AGPL-3.0 -> MIT relicense (openspec license-debt-mit). If any of
|
||||
// these fail, AGPL-derived provenance has crept back in.
|
||||
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../../../../..');
|
||||
|
||||
describe('license: MIT relicense guard', () => {
|
||||
it('LICENSE is MIT (no Affero/AGPL text)', () => {
|
||||
const license = readFileSync(resolve(ROOT, 'LICENSE'), 'utf8');
|
||||
expect(license).toMatch(/^MIT License/);
|
||||
expect(license).not.toMatch(/AFFERO|AGPL/i);
|
||||
});
|
||||
|
||||
const PACKAGE_JSONS = [
|
||||
'package.json',
|
||||
'apps/server/package.json',
|
||||
'apps/web/package.json',
|
||||
'apps/coder/package.json',
|
||||
'apps/booterm/package.json',
|
||||
];
|
||||
for (const rel of PACKAGE_JSONS) {
|
||||
it(`${rel} declares "license": "MIT"`, () => {
|
||||
const pkg = JSON.parse(readFileSync(resolve(ROOT, rel), 'utf8')) as { license?: string };
|
||||
expect(pkg.license).toBe('MIT');
|
||||
});
|
||||
}
|
||||
|
||||
// The three files that were ported from Unsloth Studio (AGPL-3.0-only) and
|
||||
// cleared in this batch — they must carry no AGPL/Unsloth provenance.
|
||||
const FORMERLY_AGPL = [
|
||||
'apps/server/src/services/inference/tool-call-parser.ts',
|
||||
'apps/server/src/services/web/html-to-md.ts',
|
||||
'apps/server/src/services/inference/llama-args-validator.ts',
|
||||
];
|
||||
for (const rel of FORMERLY_AGPL) {
|
||||
it(`${rel} carries no AGPL / Unsloth provenance`, () => {
|
||||
const src = readFileSync(resolve(ROOT, rel), 'utf8');
|
||||
expect(src).not.toMatch(/AGPL/);
|
||||
expect(src).not.toMatch(/SPDX-License-Identifier:\s*AGPL/);
|
||||
expect(src).not.toMatch(/Unsloth/i);
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user