(options: {
readonly artifacts: boolean;
readonly discovery?: "execute" | "search-invoke";
})
| 651 | * does not have; a session that opted in gets the full {@link SKILLS} list. |
| 652 | */ |
| 653 | export const skillCatalogFor = (options: { |
| 654 | readonly artifacts: boolean; |
| 655 | readonly discovery?: "execute" | "search-invoke"; |
| 656 | }): readonly Skill[] => { |
| 657 | if (options.discovery === "search-invoke") { |
| 658 | return options.artifacts |
| 659 | ? [ |
| 660 | { |
| 661 | ...CREATE_ARTIFACT_SKILL, |
| 662 | summary: |
| 663 | "Build a live React artifact after discovering accounts and data with integrations, search, and invoke.", |
| 664 | body: createArtifactSkillBody(true), |
| 665 | }, |
| 666 | ARTIFACT_STYLE_SKILL, |
| 667 | ] |
| 668 | : []; |
| 669 | } |
| 670 | return options.artifacts ? SKILLS : SKILLS.filter((skill) => !ARTIFACT_SKILLS.has(skill)); |
| 671 | }; |
| 672 | |
| 673 | /** Look up a skill by its exact name within a session's catalog. */ |
| 674 | export const findSkill = (name: string, catalog: readonly Skill[] = SKILLS): Skill | undefined => |
no test coverage detected