sessioncwd

package
v0.4.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sessioncwd exposes the shared session cwd binding to agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ Config, deps Deps) (agentkit.ToolProvider, error)

New registers tool/session-cwd: set or clear the calling session's cwd.

Best practices:

  • Mount through tools/runtime deps.dynamicTools to refresh the current cwd in the description each turn.
  • The same provider can be supplied to acp/session-mcp-tools; calls use their inbound session context.
  • Changes take effect next turn; an empty path clears only the session override.

Types

type Config

type Config struct{}

type Deps

type Deps struct {
	SessionStore agentkit.SessionStore `json:"sessionStore"`
	Workspace    workspace.Service     `json:"workspace"`
}

type Input

type Input struct {
	// Pointer distinguishes explicit reset from a missing or null path.
	Path *string `json:"path" jsonschema:"Existing directory to bind to this session; an empty string clears the session override. Required."`
}

type Output

type Output struct {
	CurrentPath string `json:"currentPath"`
	Path        string `json:"path"`
	Note        string `json:"note"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL