kimiflare 0.8.1 → 0.9.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sina Meraji
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,18 @@
1
- # kimiflare
2
-
3
- A terminal coding agent powered by **[Kimi-K2.6](https://developers.cloudflare.com/workers-ai/models/kimi-k2.6/)** on Cloudflare Workers AI. Moonshot's 1T-parameter open-source model runs directly on your Cloudflare account. You bring the token, your traffic goes straight to Cloudflare.
1
+ <p align="center">
2
+ <img src="docs/logo.png" alt="kimiflare" width="180">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/kimiflare"><img src="https://img.shields.io/npm/v/kimiflare?style=flat-square&color=cb3837" alt="npm version"></a>
7
+ <a href="https://github.com/sinameraji/kimiflare/blob/main/LICENSE"><img src="https://img.shields.io/github/license/sinameraji/kimiflare?style=flat-square&color=2ea44f" alt="license"></a>
8
+ <img src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js >= 20">
9
+ <img src="https://img.shields.io/badge/typescript-5.7-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
10
+ <a href="https://developers.cloudflare.com/workers-ai/models/kimi-k2.6/"><img src="https://img.shields.io/badge/powered%20by-Kimi--K2.6-f59e0b?style=flat-square" alt="Powered by Kimi-K2.6"></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ A terminal coding agent powered by <strong><a href="https://developers.cloudflare.com/workers-ai/models/kimi-k2.6/">Kimi-K2.6</a></strong> on Cloudflare Workers AI. Moonshot's 1T-parameter open-source model runs directly on your Cloudflare account. You bring the token, your traffic goes straight to Cloudflare.
15
+ </p>
4
16
 
5
17
  ```
6
18
  $ kimiflare
@@ -198,4 +210,4 @@ Early but functional. Transport + tools + agent loop + print mode are verified e
198
210
 
199
211
  ## License
200
212
 
201
- TBD.
213
+ [MIT](LICENSE) © Sina Meraji
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ function readCoauthorEnv() {
25
25
  const enabled = process.env.KIMIFLARE_COAUTHOR;
26
26
  if (enabled === "0" || enabled === "false") return void 0;
27
27
  const name = process.env.KIMIFLARE_COAUTHOR_NAME || "kimiflare";
28
- const email = process.env.KIMIFLARE_COAUTHOR_EMAIL || "sinameraji@gmail.com";
28
+ const email = process.env.KIMIFLARE_COAUTHOR_EMAIL || "kimiflare@proton.me";
29
29
  return { enabled: true, name, email };
30
30
  }
31
31
  async function loadConfig() {
@@ -520,7 +520,7 @@ How to work:
520
520
  - You have a 262k-token context window. Read as much of a file as needed rather than guessing.
521
521
  - If a request is ambiguous, ask one focused question instead of making large assumptions.
522
522
  - When you finish a task, stop. Do not add a closing summary.
523
- - When creating git commits, you may include \`Co-authored-by: kimiflare <sinameraji@gmail.com>\` in the commit message so kimiflare is credited as a contributor. The bash tool will also auto-append this trailer when it detects \`git commit\` commands.`;
523
+ - When creating git commits, you may include \`Co-authored-by: kimiflare <kimiflare@proton.me>\` in the commit message so kimiflare is credited as a contributor. The bash tool will also auto-append this trailer when it detects \`git commit\` commands.`;
524
524
  const ctx = loadContextFile(opts2.cwd);
525
525
  const contextBlock = ctx ? `
526
526
 
@@ -1902,7 +1902,7 @@ var init_resume_picker = __esm({
1902
1902
  import { Box as Box8, Text as Text8 } from "ink";
1903
1903
  import SelectInput3 from "ink-select-input";
1904
1904
  import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1905
- function ThemePicker({ themes, current, onPick }) {
1905
+ function ThemePicker({ themes, current, onPick, onPreview }) {
1906
1906
  const items = themes.map((t) => ({
1907
1907
  label: t.label,
1908
1908
  value: t.name,
@@ -1919,7 +1919,7 @@ function ThemePicker({ themes, current, onPick }) {
1919
1919
  onHighlight: (item) => {
1920
1920
  if (item.value !== "__cancel__") {
1921
1921
  const highlighted = themes.find((t) => t.name === item.value);
1922
- if (highlighted) onPick(highlighted);
1922
+ if (highlighted) onPreview?.(highlighted);
1923
1923
  }
1924
1924
  },
1925
1925
  onSelect: (item) => {
@@ -3603,7 +3603,7 @@ function App({ initialCfg, initialUpdateResult }) {
3603
3603
  cwd,
3604
3604
  signal: controller.signal,
3605
3605
  reasoningEffort: effortRef.current,
3606
- coauthor: cfg.coauthor !== false ? { name: cfg.coauthorName || "kimiflare", email: cfg.coauthorEmail || "sinameraji@gmail.com" } : void 0,
3606
+ coauthor: cfg.coauthor !== false ? { name: cfg.coauthorName || "kimiflare", email: cfg.coauthorEmail || "kimiflare@proton.me" } : void 0,
3607
3607
  callbacks: {
3608
3608
  onAssistantStart: () => {
3609
3609
  const id = nextAssistantId++;
@@ -3977,7 +3977,7 @@ use: /thinking low | medium | high`
3977
3977
  cwd: process.cwd(),
3978
3978
  signal: controller.signal,
3979
3979
  reasoningEffort: effortRef.current,
3980
- coauthor: cfg.coauthor !== false ? { name: cfg.coauthorName || "kimiflare", email: cfg.coauthorEmail || "sinameraji@gmail.com" } : void 0,
3980
+ coauthor: cfg.coauthor !== false ? { name: cfg.coauthorName || "kimiflare", email: cfg.coauthorEmail || "kimiflare@proton.me" } : void 0,
3981
3981
  callbacks: {
3982
3982
  onAssistantStart: () => {
3983
3983
  const id = nextAssistantId++;
@@ -4143,7 +4143,7 @@ use: /thinking low | medium | high`
4143
4143
  return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ResumePicker, { sessions: resumeSessions, onPick: handleResumePick, theme }) });
4144
4144
  }
4145
4145
  if (showThemePicker) {
4146
- return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ThemePicker, { themes: themeList(), current: theme, onPick: handleThemePick }) });
4146
+ return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ThemePicker, { themes: themeList(), current: theme, onPick: handleThemePick, onPreview: (t) => setTheme(t) }) });
4147
4147
  }
4148
4148
  const hasConversation = events.some((e) => e.kind === "user" || e.kind === "assistant");
4149
4149
  return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
@@ -4364,7 +4364,7 @@ async function runPrintMode(opts2) {
4364
4364
  executor,
4365
4365
  cwd,
4366
4366
  signal: controller.signal,
4367
- coauthor: opts2.coauthor !== false ? { name: opts2.coauthorName || "kimiflare", email: opts2.coauthorEmail || "sinameraji@gmail.com" } : void 0,
4367
+ coauthor: opts2.coauthor !== false ? { name: opts2.coauthorName || "kimiflare", email: opts2.coauthorEmail || "kimiflare@proton.me" } : void 0,
4368
4368
  callbacks: {
4369
4369
  onReasoningDelta: opts2.showReasoning ? (delta) => {
4370
4370
  if (!printedReasoningHeader) {