kimiflare 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3720,8 +3720,20 @@ init_loop();
|
|
|
3720
3720
|
init_system_prompt();
|
|
3721
3721
|
init_executor();
|
|
3722
3722
|
import { Command } from "commander";
|
|
3723
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
3724
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
3725
|
+
import { dirname as dirname3, join as join6 } from "path";
|
|
3726
|
+
function readPackageVersion() {
|
|
3727
|
+
try {
|
|
3728
|
+
const here = dirname3(fileURLToPath2(import.meta.url));
|
|
3729
|
+
const pkg = JSON.parse(readFileSync2(join6(here, "..", "package.json"), "utf8"));
|
|
3730
|
+
return pkg.version ?? "0.0.0";
|
|
3731
|
+
} catch {
|
|
3732
|
+
return "0.0.0";
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3723
3735
|
var program = new Command();
|
|
3724
|
-
program.name("kimiflare").description("Terminal coding agent powered by Kimi-K2.6 on Cloudflare Workers AI.").version(
|
|
3736
|
+
program.name("kimiflare").description("Terminal coding agent powered by Kimi-K2.6 on Cloudflare Workers AI.").version(readPackageVersion()).option("-p, --print <prompt>", "one-shot mode: send prompt, stream reply to stdout, exit").option("-m, --model <id>", "model id (defaults to @cf/moonshotai/kimi-k2.6)").option("--dangerously-allow-all", "auto-approve every permission prompt (print mode only)").option("--reasoning", "include reasoning in stdout (print mode only)").parse();
|
|
3725
3737
|
var opts = program.opts();
|
|
3726
3738
|
async function main() {
|
|
3727
3739
|
const cfg = await loadConfig();
|