mirror of
https://github.com/stripe/link-cli.git
synced 2026-09-14 16:41:26 +08:00
4ac7ebc8e2
- Normalize Incur global flags before intercepting skills add so generated skills cannot bypass the authored installer. - Remove legacy skills from every agent-specific path recorded by Incur while preserving authored skill directories. - Embed authored skill content and install it natively from standalone executables without requiring Node or npm. - Add regression coverage for flagged invocations, noncanonical cleanup paths, and native authored-only sync. Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
21 lines
560 B
TypeScript
21 lines
560 B
TypeScript
import { readFileSync } from 'node:fs';
|
|
import { join } from 'node:path';
|
|
|
|
const authoredSkillFiles = [
|
|
'create-payment-credential/SKILL.md',
|
|
'financial-insights/SKILL.md',
|
|
'link-cli/SKILL.md',
|
|
];
|
|
|
|
export function authoredSkillsDefine(packageDirectory: string): string {
|
|
const skillsDirectory = join(packageDirectory, '..', '..', 'skills');
|
|
return JSON.stringify(
|
|
Object.fromEntries(
|
|
authoredSkillFiles.map((relativePath) => [
|
|
relativePath,
|
|
readFileSync(join(skillsDirectory, relativePath), 'utf8'),
|
|
]),
|
|
),
|
|
);
|
|
}
|