tools

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileInput

type CompileInput struct {
	Path    string `` /* 133-byte string literal not displayed */
	Message string `json:"message,omitempty" jsonschema:"Snapshot message"`
}

type DeltaInput

type DeltaInput struct {
	SinceSnapshot int64 `json:"since_snapshot,omitempty" jsonschema:"Snapshot ID to diff from (0 for all changes)"`
}

type Deps

type Deps struct {
	Store            *store.Store
	Engine           *query.Engine
	Resolver         *relations.Resolver
	Tracker          *temperature.Tracker
	Redactor         *redaction.Redactor
	Logger           *slog.Logger
	SourceDir        string
	WorkspaceConfig  config.Config
	HotThreshold     float64
	ColdThreshold    float64
	SummarizeRebound float64
	Notifier         *notify.Publisher
}

func (*Deps) HandleCompile

func (d *Deps) HandleCompile(ctx context.Context, _ *gomcp.CallToolRequest, input CompileInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleDelta

func (d *Deps) HandleDelta(ctx context.Context, _ *gomcp.CallToolRequest, input DeltaInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleDiff added in v0.3.1

func (d *Deps) HandleDiff(ctx context.Context, _ *gomcp.CallToolRequest, input DiffInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleFetch

func (d *Deps) HandleFetch(ctx context.Context, _ *gomcp.CallToolRequest, input FetchInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleFetchBatch added in v0.3.0

func (d *Deps) HandleFetchBatch(ctx context.Context, _ *gomcp.CallToolRequest, input FetchBatchInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleForget added in v0.3.1

func (d *Deps) HandleForget(ctx context.Context, _ *gomcp.CallToolRequest, input ForgetInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleHistory

func (d *Deps) HandleHistory(ctx context.Context, _ *gomcp.CallToolRequest, input HistoryInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandlePin added in v0.3.0

func (d *Deps) HandlePin(ctx context.Context, _ *gomcp.CallToolRequest, input PinInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleRelate added in v0.3.0

func (d *Deps) HandleRelate(ctx context.Context, _ *gomcp.CallToolRequest, input RelateInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleRelated added in v0.3.0

func (d *Deps) HandleRelated(ctx context.Context, _ *gomcp.CallToolRequest, input RelatedInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleRollback added in v0.3.1

func (d *Deps) HandleRollback(ctx context.Context, _ *gomcp.CallToolRequest, input RollbackInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleSearch

func (d *Deps) HandleSearch(ctx context.Context, _ *gomcp.CallToolRequest, input SearchInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleStats added in v0.3.0

func (d *Deps) HandleStats(ctx context.Context, _ *gomcp.CallToolRequest, _ StatsInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleSummarize

func (d *Deps) HandleSummarize(ctx context.Context, _ *gomcp.CallToolRequest, input SummarizeInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleTree

func (d *Deps) HandleTree(ctx context.Context, _ *gomcp.CallToolRequest, input TreeInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleUnpin added in v0.3.0

func (d *Deps) HandleUnpin(ctx context.Context, _ *gomcp.CallToolRequest, input UnpinInput) (_ *gomcp.CallToolResult, _ any, err error)

func (*Deps) HandleWrite

func (d *Deps) HandleWrite(ctx context.Context, _ *gomcp.CallToolRequest, input WriteInput) (_ *gomcp.CallToolResult, _ any, err error)

type DiffInput added in v0.3.1

type DiffInput struct {
	FromSnapshotID int64 `json:"from_snapshot_id" jsonschema:"Lower-bound snapshot ID (exclusive); use the older of the two snapshots"`
	ToSnapshotID   int64 `json:"to_snapshot_id"   jsonschema:"Upper-bound snapshot ID (inclusive); use the newer of the two snapshots"`
}

type FetchBatchInput added in v0.3.0

type FetchBatchInput struct {
	NodeIDs []string `json:"node_ids" jsonschema:"List of node IDs to fetch (max 256)"`
	Budget  int      `json:"budget,omitempty" jsonschema:"Token budget shared across the batch (0 or omitted = configured default, else unlimited)"`
}

type FetchInput

type FetchInput struct {
	Anchor string `json:"anchor" jsonschema:"Node ID to fetch context around"`
	Budget int    `json:"budget,omitempty" jsonschema:"Token budget for the response (0 or omitted = configured default, else unlimited)"`
	Depth  int    `json:"depth,omitempty" jsonschema:"Max descendant depth (1-128, default 32); 0 uses engine default"`
}

type ForgetInput added in v0.3.1

type ForgetInput struct {
	NodeID string `json:"node_id" jsonschema:"ID of the node to delete"`
	Mode   string `` /* 248-byte string literal not displayed */
}

type HistoryInput

type HistoryInput struct {
	Anchor string `json:"anchor" jsonschema:"Node ID to view history for"`
	Depth  int    `json:"depth,omitempty" jsonschema:"Maximum number of history entries (default 10)"`
}

type PinInput added in v0.3.0

type PinInput struct {
	NodeID      string   `json:"node_id"               jsonschema:"Node ID to pin against temperature decay and cold-set selection"`
	Temperature *float64 `` /* 140-byte string literal not displayed */
}

type RelateInput added in v0.3.0

type RelateInput struct {
	SourceID     string  `json:"source_id"                 jsonschema:"Existing node ID (the link source)"`
	TargetID     string  `json:"target_id,omitempty"       jsonschema:"Explicit target node ID (highest priority)"`
	TargetLabel  string  `json:"target_label,omitempty"    jsonschema:"Heading label to resolve (used if target_id absent)"`
	TargetSource string  `json:"target_source,omitempty"   jsonschema:"Source-file qualifier for target_label (hard constraint)"`
	Weight       float64 `json:"weight,omitempty"          jsonschema:"Edge weight (default 1.0)"`
}

type RelatedInput added in v0.3.0

type RelatedInput struct {
	Anchor    string  `json:"anchor"                jsonschema:"Node ID to traverse from"`
	Direction string  `json:"direction,omitempty"   jsonschema:"'out' | 'in' | 'both' (default 'both')"`
	Depth     int     `json:"depth,omitempty"       jsonschema:"Hop count 1-5 (default 1)"`
	Budget    int     `json:"budget,omitempty"      jsonschema:"Token budget for the response (default 1000)"`
	WeightMin float64 `json:"weight_min,omitempty"  jsonschema:"Filter edges with weight >= this (default 0)"`
}

type RollbackInput added in v0.3.1

type RollbackInput struct {
	SnapshotID int64 `json:"snapshot_id" jsonschema:"Target snapshot ID to restore"`
	DropAfter  bool  `` /* 174-byte string literal not displayed */
}

type SearchInput

type SearchInput struct {
	Query  string `json:"query" jsonschema:"Full-text search query"`
	Budget int    `json:"budget,omitempty" jsonschema:"Token budget for the response (0 or omitted = configured default, else unlimited)"`
}

type StatsInput added in v0.3.0

type StatsInput struct{}

type SummarizeInput

type SummarizeInput struct {
	NodeID      string   `json:"node_id" jsonschema:"Node ID to summarize"`
	Summary     string   `json:"summary" jsonschema:"Summary text to replace the node content"`
	Temperature *float64 `json:"temperature,omitempty" jsonschema:"Optional post-summarize temperature in [0, 1]; defaults to Config.SummarizeRebound"`
}

type TreeInput

type TreeInput struct {
	Root  string `json:"root,omitempty" jsonschema:"Root node ID (empty for full tree)"`
	Depth int    `json:"depth,omitempty" jsonschema:"Maximum depth to traverse (default 5)"`
}

type UnpinInput added in v0.3.0

type UnpinInput struct {
	NodeID string `json:"node_id" jsonschema:"Node ID to unpin"`
}

type WriteInput

type WriteInput struct {
	Anchor  string `json:"anchor,omitempty" jsonschema:"Existing node ID to update (empty to create new)"`
	Payload string `json:"payload" jsonschema:"Content to write"`
}

Jump to

Keyboard shortcuts

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