Add HyperFrames skills
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011h6NB8JQtfPc6eRCefEzBB
This commit is contained in:
964 files changed
+142321
No files matched your search
@@ -0,0 +1,33 @@
|
||||
// Resolve CLI ownership once for matting, transcription, and shell rendering.
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const os = require("node:os");
|
||||
function hfCli(checkout) {
|
||||
const root = path.resolve(__dirname, "../../..");
|
||||
for (const dir of [checkout, process.env.HYPERFRAMES_ROOT].filter(Boolean)) {
|
||||
const cli = path.join(dir, "packages/cli/dist/cli.js");
|
||||
if (fs.existsSync(cli)) return cli;
|
||||
}
|
||||
const manifests = [
|
||||
"plugin.json",
|
||||
".claude-plugin/plugin.json",
|
||||
".codex-plugin/plugin.json",
|
||||
".cursor-plugin/plugin.json",
|
||||
"gemini-extension.json",
|
||||
];
|
||||
if (
|
||||
!fs.existsSync(path.join(root, "packages/cli/dist/cli.js")) &&
|
||||
manifests.some((p) => fs.existsSync(path.join(root, p)))
|
||||
) {
|
||||
return path.join(root, "skills/hyperframes/scripts/plugin-cli.mjs");
|
||||
}
|
||||
for (const dir of [root, path.join(os.homedir(), "Downloads/hyperframes")].filter(Boolean)) {
|
||||
const cli = path.join(dir, "packages/cli/dist/cli.js");
|
||||
if (fs.existsSync(cli)) return cli;
|
||||
}
|
||||
throw new Error(
|
||||
"HyperFrames CLI unavailable: install the full plugin or set HYPERFRAMES_ROOT to a built checkout.",
|
||||
);
|
||||
}
|
||||
module.exports = { hfCli };
|
||||
if (require.main === module) console.log(hfCli(process.argv[2]));
|
||||
Reference in new issue
Block a user