Skip to content

fix: allow temp directory access in yolo mode without approval - #8

Closed
kermanx wants to merge 3 commits into
MoonshotAI:mainfrom
kermanx:fix/yolo-temp-approval
Closed

fix: allow temp directory access in yolo mode without approval#8
kermanx wants to merge 3 commits into
MoonshotAI:mainfrom
kermanx:fix/yolo-temp-approval

Conversation

@kermanx

@kermanx kermanx commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

N/A

Description

In yolo mode, accessing files outside the workspace currently triggers an approval request. This PR adds an exception for the temp directory so that read, write, and search operations under the system temp directory do not require approval.

  • Add gettmpdir() to the Kaos interface and its LocalKaos / SSHKaos implementations.
  • Update YoloOutsideWorkspacePermissionPolicy to bypass approval when the target path is within the temp directory.
  • Update all mock Kaos objects and related tests to include gettmpdir().

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Made with kimoji~

@kermanx kermanx closed this May 25, 2026
wintrover added a commit to wintrover/kimy that referenced this pull request Jun 29, 2026
…nshotAI#8

Replace manual file-set declarations with build engine introspection.

- tsdown native config: add manifestPlugin() that writes build-manifest.json
  via OutputChunk.moduleIds (850 bundled modules, zero test files)
- kimy wrapper: lockfile-based dependency hashing via pnpm-lock.yaml importers
- kimy wrapper: manifest-based native hashing (bundledModules only)
- kimy wrapper: double-checked locking inside flock (TOCTOU fix)
- kimy wrapper: atomic hash file writes via temp + mv
asdshuaishuai pushed a commit to d2rabbit/kimi-code that referenced this pull request Jul 21, 2026
…, diff drawer, more rounded corners

Five user-reported issues fixed in this batch:

MoonshotAI#3 Font-size adjustment now actually works
  Root cause: App.svelte's :global(body) used the `font:` shorthand
  with a hardcoded 13px, which won over the global.css
  `body { font-size: var(--ui-font-size) }` rule (same specificity,
  later in cascade). The shorthand resets font-size and the slider had
  no effect.
  Fix: replace shorthand with individual properties
  (font-family/size/line-height), keep font-size: var(--ui-font-size).
  Verified via headless Chromium: default 14px, slider to 20px → 20px,
  back to 14px → 14px.

MoonshotAI#8 Plugin enable/disable ACL error
  Root cause: PluginPanel called Command.sidecar('kimi', ['plugin',
  'disable', id]) which needs shell:allow-execute permission that
  isn't (and shouldn't be) granted in tauri.conf.json.
  Fix: added Rust `toggle_plugin(plugin_id, enabled)` command that
  directly edits ~/.kimi-code/plugins/installed.json (atomic tmp+rename).
  PluginPanel now invoke()s the new command instead of spawning a
  sidecar. No ACL needed.

MoonshotAI#11 Softer UI — bumped radius tokens
  --r-sm 6→8, --r-md 8→10, --r-lg 10→14, --r-xl 12→18.
  Legacy scale bumped in parallel (--radius-xs 6→8, etc.). All
  components using these tokens get the bump automatically.

MoonshotAI#2 Sidebar workspace/session hierarchy
  Workspace headers are now visually bigger (30px tall, 12.5px bold,
  with a top border + subtle bg gradient) and the session rows are
  indented (margin-left: 20px, smaller 11.5px font-weight 400).
  Workspace count badge becomes a pill instead of plain text. The
  hierarchy reads cleanly now.

MoonshotAI#1 Working-directory diff → second-level right drawer
  New DiffDrawer.svelte component (540px, slides in from right with
  spring animation). Clicking a file in the '工作区改动' section of
  RightPanel opens the drawer; inline expansion is gone. Commit-
  history diffs stay inline (only the working-directory section was
  changed per UX request). Esc / ✕ / mask click closes.

MoonshotAI#9 Composer compact moved into the main control row
  '压缩' is now a pill button next to mode/model/thinking instead of
  a separate FAB below. Per UX request: 'mode / model / thinking /
  compact all in one row'.

Verified: svelte-check 0 errors, cargo check 0 warnings.
asdshuaishuai pushed a commit to d2rabbit/kimi-code that referenced this pull request Jul 21, 2026
…oonshotAI#8)

Closes the remaining MoonshotAI#8 asks: local install entry point and skill/mcp/
kimi/claude category bucketing in the plugin panel.

Rust (commands.rs / lib.rs / Cargo.toml):

  · install_plugin_from_local(local_path): spawns the kimi CLI outside
    the webview (no shell:allow-execute ACL needed). Accepts:
      - absolute path to a .zip
      - absolute path to an unpacked plugin dir
      - GitHub URL
      - the sentinel 'uninstall:<plugin-id>' to remove a plugin (same
        plumbing, different subcommand)
    Dev mode resolves kimi from apps/kimi-code/dist-native; packaged
    mode falls back to `which kimi`. Added the `which` crate (v7).

PluginPanel.svelte:

  · Local install button: triggers a hidden <input type=file
    accept=.zip>, reads the chosen file's Tauri-exposed .path, and
    pipes it to install_plugin_from_local. No tauri-plugin-dialog dep
    needed — the HTML input opens the OS file picker in the Tauri
    webview.

  · URL/GitHub install button: keeps the existing source-string form
    but now also routes through install_plugin_from_local (no more
    Command.sidecar, no ACL gate).

  · Uninstall: same install_plugin_from_local plumbing with the
    uninstall:<id> sentinel. Removes the second shell sidecar call.

  · 4-category grouping: plugins are bucketed into Skill / MCP / Kimi
    / Claude sections. Each section has its own icon, color, and a
    description tag. Inference:
      - hasMcp === true → mcp
      - skillCount > 0 → skill
      - originalSource/id contains 'claude' or 'anthropic' → claude
      - otherwise → kimi (native CLI-managed)
    Kimi and Claude are placeholder slots the user explicitly asked
    for: when empty, they render a 'support coming soon' notice; when
    non-empty (rare), the cards render but without enable/disable /
    uninstall buttons (since those formats aren't fully wired yet).
    Skill and MCP are the core categories and are fully actionable.

Verified: svelte-check 0 errors, cargo check 0 warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant