Files
kandev/docs/public
João Salavisa 9381a6a9f7 feat(mcp): session spawning, sibling messaging, and renameable tabs (#1734)
* fix(scripts): launch dev-isolated backend via __backend subcommand

The kandev binary became a bundle launcher with the restart supervisor
(ADR 0019) and exits without KANDEV_BUNDLE_DIR when invoked bare; the
isolated dev instance must run the backend entrypoint directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(mcp): session spawning, sibling messaging, and renameable tabs

- spawn_session_kandev spawns an additional agent session on an existing
  task (default: the caller's own) via LaunchSession(IntentStart), with
  optional agent_profile_id (defaults to the spawner's profile) and a
  session name; the initial prompt carries spawner attribution and reply
  instructions.
- message_task_kandev accepts an optional session_id to target a specific
  session, enabling same-task sibling messaging. Explicit targets are
  pinned through dispatch so the idle-path primary-session re-resolution
  cannot reroute a sibling message back to its sender (regression-tested).
- task_sessions gains a name column (migration ordered after the
  agent_execution_id-drop rebuild), a session.rename WS action, and inline
  tab rename UI; custom names take precedence over derived agent/model
  labels across the tab, agents dropdown, mobile list, chat header, and
  dockview panel titles.
- Inter-session messages stamp sender_session_name into metadata so the
  sender badge shows which session sent the message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(mcp): address review findings on session spawn/rename/messaging

- include name in task-session DTOs (list + full, no omitempty) so
  persisted tab names survive list hydration and clears propagate
- sanitize sender task/session ids embedded in <kandev-system> blocks
- reject cross-workspace spawn targets; require sender_task_id
- truncate session names by runes, not bytes
- distinguish not-found from internal errors in message target lookup
- guard TabRenameInput blur-commit after Enter/Escape resolution
- cap optimistic rename length client-side and toast on rename failure
- add tests: spawn launch-failure and cross-workspace paths, renameSession
  API client

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(mcp): round-two review fixes for spawn/rename lint and hardening

- extract spawn validation/authorization helpers (cyclop/nestif limits)
- make stripSystemTag replace until stable to block nested tag evasion
- load session before rename so a durable rename can never skip its
  broadcast; surface lookup failures to the caller instead
- drop redundant sessionLauncher nil check (guarded registration)
- add maxLength to the rename input matching the server cap
- add tests: nested sanitizer evasion, spawn rename-failure tolerance

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 17:26:50 +01:00
..

Contributing to the Public Docs

Files in this directory are the source for kandev.ai/docs. A merged change under docs/public/** triggers a Cloudflare Pages rebuild automatically.

The docs have two audiences:

  • Use Kandev explains product tasks, configuration, security implications, limitations, and operations.
  • Contribute to Kandev explains repository structure, code boundaries, testing, extension points, releases, and docs maintenance.

Keep a page focused on one audience. Link across the boundary when a user-facing explanation needs contributor detail, but do not mix internal implementation notes into a task guide.

Update an Existing Page

Edit the relevant Markdown file directly. Verify commands, configuration keys, default values, API names, labels, and screenshots against the implementation in the same pull request.

Use relative links between published pages, for example [CLI](cli.md). The website build rewrites those links to /docs/... routes. Links to repository files outside docs/public are rewritten to their GitHub source URLs.

When behavior is conditional, say whether it is:

  • supported by default;
  • optional and dependent on an executor, integration, platform, or credential;
  • experimental or feature-flagged;
  • in progress or internal.

Do not describe an ADR, spec, plan, hidden route, or feature flag as generally available without confirming its runtime and UI path.

Add a Page

  1. Decide whether the page belongs under Use Kandev or Contribute to Kandev. Search existing pages first; prefer extending one task guide over creating overlapping reference pages.

  2. Create a lowercase, kebab-case Markdown file in this directory, such as custom-executors.md. Its filename becomes its stable route: /docs/custom-executors.

  3. Start the file with non-empty title and description frontmatter, followed by one level-one heading:

    ---
    title: "Custom Executors"
    description: "Configure a custom executor for Kandev tasks."
    ---
    
    # Custom Executors
    
    Page content starts here.
    
  4. Add the filename without .md to meta.json exactly once, below the correct audience heading. Its position controls sidebar order. Keep routes flat unless a concrete publication constraint requires a directory.

  5. Link the new page from index.md and from closely related guides. Use relative Markdown links and repository-owned assets.

  6. Include prerequisites, a concrete workflow, exact configuration, limitations or failure modes, and related pages where those sections apply.

Pages omitted from meta.json, duplicate entries, unknown entries, broken local Markdown links, and missing frontmatter fail validation.

Assets and Diagrams

  • Keep user-facing screenshots under docs/screenshots/ and reference them relatively.
  • Do not link temporary capture output, local paths, or third-party hotlinked images.
  • Mermaid code fences render on the website. Keep diagrams readable at docs-column width, use stable node labels, and provide surrounding prose that carries the same essential meaning.
  • Prefer commands and text examples over screenshots when the UI changes frequently.

Validate

Run the focused dependency-free docs checks from the Kandev repository root:

node --test scripts/validate-public-docs.test.mjs
node scripts/validate-public-docs.mjs

The broader repository script suite requires the pinned repository toolchain and installed dependencies:

make test-scripts

To build the complete docs site, clone kdlbs/landing beside this repository and run with the toolchain expected by Landing:

cd ../landing
pnpm install --frozen-lockfile
KANDEV_DOCS_SOURCE_PATH=../kandev/docs pnpm --filter @kandev/docs build

Before opening a pull request, also check:

  • every new or renamed page appears once in meta.json;
  • links resolve from the source file, not from the repository root;
  • user claims are supported by current code or tests;
  • feature status and platform limitations are explicit;
  • generated files under the Landing docs app were not committed.