7b42e404f5f656d7bfb4aa5c7ddbcd1031264a86
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bc5b8332ec |
kimi-desktop 0.1.6: per-role reasoning effort and context input budget (#813)
kimi-desktop 0.1.6: separate reasoning effort and an optional context input budget for the primary and secondary roles.
The change (f07e7f4a..1d14a185, since the round-6 approval):
- The settings page and API save `<role>ReasoningEffort` and `<role>ContextTokens` for each role. Only efforts and context limits the catalog publishes are offered; an unknown limit allows no custom budget.
- Inference drops Kimi's top-level `thinking`, `reasoning` and `reasoning_effort`, and sends the chosen effort, or none for the provider default. Kimi's native menu aliases no longer choose the model.
- A custom budget counts a copy of the request through magpie's `/v1/messages/count_tokens`. Over the budget gives 400 `context_length_exceeded`; a failed count gives fixed 503 `context_count_unavailable`. No generation is sent in either case. Without a budget, nothing extra is sent.
- Role-scoped worker profiles (`v2:[model, role]`) tell primary from secondary even on the same model. Older roleless profiles keep their binding and use defaults.
- 1d14a185 removes blank lines only.
Run at 1d14a1859f63fd4bb512d492d1de419ad3e6c79a on mote (macOS, Bun 1.4.2, HOME/TMPDIR/XDG in the run's own folder):
- `bun test` in packages/kimi-desktop: 626 pass, 0 fail, 29 files.
- `bun scripts/check.mjs kimi-desktop`: exit 0.
- 14 hand breaks, each red in the package suite:
- drop `applyReasoningOptions`;
- strip thinking fields only when an effort is set;
- drop the budget check, or make it `>=`;
- `useFresh` false, or without its model check;
- a legacy roleless profile treated as primary;
- a profile name without its role;
- no `registerRoles`;
- no `optionsMatch` in save;
- no `refreshLiveModelOptions`;
- count with `redirect: 'follow'`, or with no reply size limit;
- a 131072 fallback for an unknown catalog context.
- CI at the head: test and on-npm pass. The PR merges onto main f379bf90+ with no conflicts.
Not blocking, left for a follow-up:
- Each inference now reads connection.json (adapter.mjs:547) with no fallback to the live connection. An unreadable file turns every request into 502, even without a budget.
- The comment above `applyReasoningOptions` ("Preserve the legacy connection untouched…") no longer matches the always-strip policy.
|
||
|
|
676198bbb9 |
kimi-desktop 0.1.5: Retry-After is kept, and an owner record is never left half-written (#225)
Kimi Work's 429/503 through the desktop adapter now keep the upstream Retry-After (seconds and HTTP-date); no other upstream header is copied. The adapter's owner record is written whole to a temp file and published with an exclusive hard link, so a crash mid-write can no longer leave an empty adapter-owner.json that blocks every later host. A malformed record reports adapter_lock_invalid (and an access failure adapter_lock_unavailable) in status.json and the log, instead of failing silently; the README says how to recover. Review merge: main (kimi-desktop 0.1.4) merged in, package.json the only conflict, version 0.1.5. Run at 3f65c63 (HOME=$(mktemp -d)): - mote: bun test packages/kimi-desktop 36 pass, 0 fail. - Windows (xiaomi-gpu, win-run): 36 pass, 0 fail (hard links on NTFS). - Broken by hand, each reverted: Retry-After not forwarded -> its test red; the owner record written in place instead of linked -> 3 lock tests red; a malformed record silently returning false -> the malformed-record test red. Not tried with the real Kimi desktop app. |
||
|
|
a9779ef864 |
kimi-work 0.1.12, kimi-desktop 0.1.4: Kimi's sign-in is read where daimon-storage.json points (#425)
Kimi 3.2.21 on Windows, installed on another drive than %APPDATA%'s,
keeps daimon-share at <install drive>\KimiData\daimon-share and writes
%APPDATA%\kimi-desktop\daimon-storage.json ({"version":1,"shareDir":...})
to point there. It writes the same pointer on any system when the user
moves its storage. Both packages read only
%APPDATA%\kimi-desktop\daimon-share, so the sign-in was "not found".
Read from Kimi's own code: Kimi-Setup-3.2.21.exe's app.asar,
out/main/index.js (string table decoded): the shareDir getter is
readPointer(userData) ?? join(userData, "daimon-share"); the pointer
reader takes an absolute shareDir and otherwise the default; the
"install-drive seed" writes the pointer on win32 when installRoot's drive
differs from userData's; driveDataDirName is "KimiData".
Both packages now follow the pointer the same way (unreadable, non-JSON
or non-absolute -> default, as Kimi does). kimi-work's sign-in failure
names the file it looked for, and a failed Work check (network, HTTP)
no longer says no sign-in was found.
Run at this tree (base
|
||
|
|
5fa537146e |
kimi-desktop 0.1.1: ordinary Kimi takes the Library's instructions, MCP and skills (#189)
Ordinary Kimi (agent-kimi-desktop) becomes a Library target: agent.library names ~/.config/magpie-kimi/AGENTS.md, library-native/mcp.json (format kimi) and library-skills. bootstrap() links library-native to Kimi's daimon/runtime/kimi-code/home and library-skills to daimon/skills (junction on Windows, dir symlink elsewhere); a different object at either path stops with library_path_conflict. The adapter reads AGENTS.md on every inference request and inserts one separate system message after the leading system/developer ones; an unreadable or non-UTF-8 file answers 503 instructions_unavailable. Run at the reviewed head 5b9f445 (by the reviewer, sandbox HOME, no real credentials): - bun test packages/kimi-desktop: 14 pass, 0 fail (95 expects), bun 1.4.2. - bun scripts/check.mjs: every package ok (agent packages are skipped there). - Against magpie's own Library code (origin/main e085d6e92): a throwaway Go test in internal/library loaded this kimi-desktop.agent.js through agentplug, ran prepareLibrary on a fake Kimi tree, then SaveInstructions, SaveServer and InstallSkills to the kimi-desktop target. The MCP server landed in the native runtime mcp.json beside the existing entry, the skill in daimon/skills, library-native stayed a symlink; applyInstructions put the written block in as a second system message. RemoveServer, RemoveSkill and clearing the instructions left the existing MCP entry and skill, and applyInstructions then added nothing. - CI on the PR: test and on-npm green. Not tried: a real Kimi desktop (the author's COMPATIBILITY.md records it on Windows 11 and macOS). agent-kimi-desktop is not on npm yet; it is served from the dist branch until the owner's first publish. |
||
|
|
646776060f |
kimi-desktop: Kimi desktop Work as an agent, through its local runtime (#169)
Adds agent-kimi-desktop 0.1.0 (kupakupar): Kimi desktop Work on magpie's
Agents page. It moves the runtime's daimon-kimi-code baseUrl to a
loopback bridge and back, through Kimi's local control API.
Re-reviewed at dd8ed2c against the last review at 6c584bb:
1. menu-hook.cjs and selection.mjs are removed; no injected code ships.
2. No full config backup is written. Only before-menu-models.json (the
model list and current choice) is kept, and it is removed on a clean
disconnect.
3. providers.json and settings.json are never opened. The catalog comes
from the gateway's /v1/models with the agent's key and its registered
UA "Desktop Kimi Work".
4. No signal handlers and no process.exit. Restore runs on the 'exit'
event, which fires when magpie closes the host's stdin (host.js
rl.on("close") -> process.exit(0)). The README gives manual recovery
after a SIGKILL.
5. macOS record: COMPATIBILITY.md (macOS 26.6.2 arm64, Kimi 3.2.17
build 3.2.17.4, magpie 0.1.1276, Bun 1.4.3). All four control methods
succeeded, a streamed request returned 200, and a restore followed.
The README says what happens when a private method fails.
6. Search and fetch pass Kimi's own request, with its own key, to Kimi's
own origin, unchanged. This is the user's own account used by that
user, the same rule as #171, so it is accepted.
Run at dd8ed2c, and merged onto origin/main
|