workspaces

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package workspaces declares the agent workspace and scheduled chat operations of the desktop's app-control MCP server.

Index

Constants

This section is empty.

Variables

View Source
var ScheduleDelete = ops.Spec[ScheduleIn]{
	Name: "schedule.delete", Owner: ops.OwnerDesktop, Effect: ops.EffectWrite, Toolset: Toolset,
	Summary: "Remove a scheduled chat",
	Guidance: "Delete one schedule from a workspace's agent-workspace.yaml. Its run history stays readable through schedule_run_list. " +
		"An id that matches no schedule is not_found; nothing is ever reported as removed that was not.",
	Args: []string{"id"},
}
View Source
var ScheduleList = ops.Spec[WorkspaceIn]{
	Name: "schedule.list", Owner: ops.OwnerDesktop, Effect: ops.EffectRead, Toolset: Toolset,
	Summary: "List a workspace's scheduled chats",
	Guidance: "List one workspace's schedules in manifest order, each with when it fires next and its newest run whatever the outcome. " +
		"A workspace that does not exist is not_found; one whose manifest does not parse is invalid, with the reason.",
}
View Source
var SchedulePreview = ops.Spec[SchedulePreviewIn]{
	Name: "schedule.preview", Owner: ops.OwnerDesktop, Effect: ops.EffectRead, Toolset: Toolset,
	Summary: "Dry-run a schedule edit",
	Guidance: "Report the next occurrences a cron expression produces and the prompt template rendered against sample data, both with a previous run " +
		"behind it and as the first run sees it with .LastRun unset, without saving anything. " +
		"A cron or template that does not parse comes back in cronError or promptError rather than as a failed call. Use it before schedule_put.",
}
View Source
var SchedulePut = ops.Spec[SchedulePutIn]{
	Name: "schedule.put", Owner: ops.OwnerDesktop, Effect: ops.EffectWrite, Toolset: Toolset,
	Summary: "Create or update a scheduled chat",
	Guidance: "Create one schedule in a workspace's agent-workspace.yaml, or patch one that exists. A new id is appended and needs cron and prompt. " +
		"An existing id is patched in place, field by field: a field you omit keeps its stored value, so re-timing a paused schedule leaves it paused, " +
		"and name: \"\" clears the name. Every other key and comment in the file is kept. The cron and the prompt template are validated before " +
		"anything is written; a rejected edit is invalid and leaves the file as it was. The schedule is live as soon as the call returns. " +
		"A new or re-timed schedule never fires for a time before it existed.",
	Args:   []string{"id"},
	Fields: ops.Constraints{"onMissed": {Enum: []string{"run", "skip"}}},
}
View Source
var ScheduleRunList = ops.Spec[ScheduleRunListIn]{
	Name: "schedule_run.list", Owner: ops.OwnerDesktop, Effect: ops.EffectRead, Toolset: Toolset,
	Summary: "Read a schedule's run history",
	Guidance: "List one schedule's runs, newest first: what each honored, why it ran, whether it launched a chat, and any error. " +
		"An empty list means the schedule has not run. History outlives the schedule, so a removed schedule still answers; a workspace that does not exist, " +
		"or an id that is neither declared nor has ever run, is not_found. A run's session is the chat it launched, gone once that chat has ended. " +
		"Running a schedule now is not a tool here: it spawns an agent CLI, which this server never does. That is the Chats area's \"Run now\".",
	Args: []string{"id"},
}
View Source
var Toolset = ops.Toolset{Name: "workspaces", MCPPath: "/mcp"}
View Source
var WorkspaceList = ops.Spec[ops.NoInput]{
	Name: "workspace.list", Owner: ops.OwnerDesktop, Effect: ops.EffectRead, Toolset: Toolset,
	Summary: "List agent workspaces",
	Guidance: "List every agent workspace with its command template, whether that command carries a permission bypass (danger), and its schedule ids. " +
		"dir is what every schedule tool's workspace argument takes. A workspace whose manifest does not parse still lists, " +
		"with problem set; it refuses schedule writes until the file is fixed.",
}

Functions

func All

func All() []ops.Op

Types

type ScheduleIn

type ScheduleIn struct {
	Workspace string `` /* 247-byte string literal not displayed */
	ID        string `json:"id"`
}

type SchedulePreviewIn

type SchedulePreviewIn struct {
	Workspace string `` /* 247-byte string literal not displayed */
	Cron      string `json:"cron"`
	Prompt    string `json:"prompt"`
}

type SchedulePutIn

type SchedulePutIn struct {
	Workspace string  `` /* 256-byte string literal not displayed */
	ID        string  `` /* 133-byte string literal not displayed */
	Name      *string `` /* 207-byte string literal not displayed */
	Cron      *string `` /* 156-byte string literal not displayed */
	Prompt    *string `` /* 543-byte string literal not displayed */
	Disabled  *bool   `` /* 129-byte string literal not displayed */
	OnMissed  *string `` /* 234-byte string literal not displayed */
}

SchedulePutIn's optional fields are pointers so an omitted field can be told from one set to its zero value: omitted keeps what the schedule has.

type ScheduleRunListIn

type ScheduleRunListIn struct {
	Workspace string `` /* 253-byte string literal not displayed */
	ID        string `json:"id"`
	Limit     int    `json:"limit,omitempty" jsonschema:"How many newest runs to return. 0 takes the default of 50."`
}

type WorkspaceIn

type WorkspaceIn struct {
	Workspace string `` /* 247-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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