Documentation
¶
Overview ¶
Package engine is Blitz without a user interface: it opens a workspace (registries, tools, sessions, the model and the engine) and exposes what a front end needs as an api.Backend. The service and the CLI's --local mode run it; none of it prints (spec_workspace_018).
Index ¶
- Variables
- func AttachmentNote(imgs []*images.Image) string
- func DisplayPrompt(text string) string
- func FileVersion(data []byte) string
- func ModelErrorSummary(err error, cfg *config.Config) string
- func SecretRedactor(cfg *config.Config) *redact.Redactor
- func SetupLocale(cfg *config.Config, warn func(string)) *i18n.Bundle
- func StartObservability(ctx context.Context, cfg *config.Config, version string, warn func(string)) func()
- type DirListing
- type FileChangedError
- type FileContent
- type FileEntry
- type FileKind
- type Options
- type RunOptions
- type Workspace
- func (w *Workspace) ActiveAgent() api.AgentInfo
- func (w *Workspace) ActiveAgentTools() api.AgentTools
- func (w *Workspace) ActiveSession() (api.SessionInfo, bool)
- func (w *Workspace) AddImage(name string, data []byte) (*images.Image, error)
- func (w *Workspace) AddMemory(ctx context.Context, text string) (string, error)
- func (w *Workspace) AddPermissionRule(effect, rule string, save bool) (api.PermissionChange, error)
- func (w *Workspace) Agents() *agents.Registry
- func (w *Workspace) AllModelSettings() map[string]config.ModelSettings
- func (w *Workspace) Audit() *audit.Logger
- func (w *Workspace) AuditShell(command string, exitCode int, startErr error)
- func (w *Workspace) AvailableLocales() (list []api.LocaleInfo, customDir string)
- func (w *Workspace) Busy() bool
- func (w *Workspace) ClearApprovals() int
- func (w *Workspace) Close() error
- func (w *Workspace) Compact(ctx context.Context, focus string) (api.CompactResult, error)
- func (w *Workspace) Config() *config.Config
- func (w *Workspace) Context() (api.ContextInfo, error)
- func (w *Workspace) CreateFolder(p string) error
- func (w *Workspace) DeleteFile(ctx context.Context, p string) error
- func (w *Workspace) Dir() string
- func (w *Workspace) DisableWorker(name string) (api.WorkerInfo, error)
- func (w *Workspace) EnableWorker(name, hash string) (api.WorkerInfo, error)
- func (w *Workspace) Engine() *runtime.Engine
- func (w *Workspace) FindFiles(ctx context.Context, query string, limit int) ([]string, error)
- func (w *Workspace) GitDiff(ctx context.Context, color bool) (string, error)
- func (w *Workspace) ImagesEnabled() bool
- func (w *Workspace) ListAgents() []api.AgentInfo
- func (w *Workspace) ListApprovals() []api.Approval
- func (w *Workspace) ListCheckpoints() []api.Checkpoint
- func (w *Workspace) ListCommands() []api.CommandInfo
- func (w *Workspace) ListDir(ctx context.Context, p string, showHidden bool) (DirListing, error)
- func (w *Workspace) ListEnvs() ([]api.Env, error)
- func (w *Workspace) ListMCPServers() []api.MCPServer
- func (w *Workspace) ListPermissionRules() []api.PermissionRule
- func (w *Workspace) ListSessions(all bool) ([]api.SessionInfo, error)
- func (w *Workspace) ListSkills() []api.SkillInfo
- func (w *Workspace) ListWorkers() ([]api.WorkerInfo, error)
- func (w *Workspace) LoadAttachments(paths []string, prompt string, warn func(string)) ([]*images.Image, error)
- func (w *Workspace) LoadImage(path string) (*images.Image, error)
- func (w *Workspace) LoadSession(ref string) (s api.SessionInfo, branched bool, err error)
- func (w *Workspace) Locales() *i18n.Bundle
- func (w *Workspace) MemoryFiles() []string
- func (w *Workspace) Model() api.ModelInfo
- func (w *Workspace) ModelErr() error
- func (w *Workspace) ModelSettings(ref string) (api.ModelSettingsInfo, error)
- func (w *Workspace) NewSession() (api.SessionInfo, error)
- func (w *Workspace) OpenSession(resume string, cont bool) (api.SessionInfo, bool, error)
- func (w *Workspace) PinModel(ctx context.Context, agent, ref string) (api.PinResult, error)
- func (w *Workspace) Processes() api.Processes
- func (w *Workspace) PruneEnvs() (api.PruneResult, error)
- func (w *Workspace) ReadFile(p string) (FileContent, error)
- func (w *Workspace) ReloadMemory(ctx context.Context) ([]string, error)
- func (w *Workspace) ReloadProviders(ctx context.Context, cfg *config.Config) error
- func (w *Workspace) RemoveEnv(key string) error
- func (w *Workspace) RemovePermissionRule(rule string, save bool) (api.PermissionChange, error)
- func (w *Workspace) RenameFile(ctx context.Context, from, to string) error
- func (w *Workspace) RenameSession(title string) (api.SessionInfo, error)
- func (w *Workspace) RevokeApprovals(keys ...string) int
- func (w *Workspace) Rewind(ctx context.Context, index int, mode api.RewindMode, force bool) (api.RewindResult, error)
- func (w *Workspace) RewindPoints() ([]api.RewindPoint, error)
- func (w *Workspace) Run(ctx context.Context, sessionID string, t api.Turn, on func(api.Event)) (api.TurnResult, error)
- func (w *Workspace) RunWorker(ctx context.Context, name string, o RunOptions) (api.Run, error)
- func (w *Workspace) SandboxSummary() []string
- func (w *Workspace) SaveSnapshot(name string, force bool) (api.SessionInfo, error)
- func (w *Workspace) SearchProvider() (string, error)
- func (w *Workspace) SearchSession(terms string) (found int, prompt string)
- func (w *Workspace) SearchSkills(query string) []api.SkillInfo
- func (w *Workspace) SearchWeb(ctx context.Context, terms string) (api.WebSearch, error)
- func (w *Workspace) SessionDiff() string
- func (w *Workspace) SessionUsage() (api.Usage, error)
- func (w *Workspace) Set(ctx context.Context, key, value string) (string, error)
- func (w *Workspace) SetAgent(ctx context.Context, name string) (api.AgentInfo, error)
- func (w *Workspace) SetLocale(ctx context.Context, input string) (api.LocaleChange, error)
- func (w *Workspace) SetModel(ctx context.Context, ref string) (activePin string, err error)
- func (w *Workspace) SetPermissionMode(mode string) (string, error)
- func (w *Workspace) SetUI(approve api.Approver, ask api.UserPromptFunc)
- func (w *Workspace) Settings() api.Settings
- func (w *Workspace) Skill(name string) (api.SkillInfo, bool)
- func (w *Workspace) Skills() *skills.Provider
- func (w *Workspace) StatFiles(paths []string) map[string]string
- func (w *Workspace) Steer(ctx context.Context, sessionID, text string) error
- func (w *Workspace) Storage() *session.Storage
- func (w *Workspace) Tools() *tools.Registry
- func (w *Workspace) Undo(force bool) (api.UndoResult, error)
- func (w *Workspace) Unpin(ctx context.Context, agent string) (api.PinResult, error)
- func (w *Workspace) UpdateModelSettings(ref string, reset bool, changes []api.Setting) (api.ModelSettingsChange, error)
- func (w *Workspace) WorkerRuns(name string, limit int) ([]api.Run, error)
- func (w *Workspace) WriteFile(ctx context.Context, p, text, version string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrBadPath = errors.New("not a path in the workspace")
ErrBadPath: a path outside the workspace, or in .git.
Functions ¶
func AttachmentNote ¶
AttachmentNote is what the transcript records for images sent with a prompt: their names.
func DisplayPrompt ¶
DisplayPrompt is a prompt as the user wrote it: without the note about their edits (withUserEdits), which is for the agent.
func FileVersion ¶
FileVersion is the version of content: its SHA-256.
func ModelErrorSummary ¶
ModelErrorSummary makes a model initialisation error safe and readable: some SDK errors embed their whole client config, including the API key.
func SecretRedactor ¶
SecretRedactor masks configured credentials and the values of scrubbed environment variables in audit entries, logs and telemetry.
func SetupLocale ¶
SetupLocale loads translation catalogs (built in, then ui.locales_dir) and activates ui.locale for the process.
func StartObservability ¶
func StartObservability(ctx context.Context, cfg *config.Config, version string, warn func(string)) func()
StartObservability opens the diagnostic log and, when enabled, OpenTelemetry export, and makes the log the slog default. The returned func flushes both. Failures only disable the affected part: diagnostics must never stop a session.
Types ¶
type DirListing ¶
type DirListing struct {
Entries []FileEntry
Truncated bool
// Repo: the workspace is in a git repository.
Repo bool
}
DirListing is a folder's entries.
type FileChangedError ¶
type FileChangedError struct {
Path string
// Current is the file's version now ("" when it doesn't exist).
Current string
}
FileChangedError: a write's version doesn't match the file's (it was changed since it was read, or it exists when it was expected not to).
func (*FileChangedError) Error ¶
func (e *FileChangedError) Error() string
Error says the file changed, or was deleted, since it was opened.
type FileContent ¶
type FileContent struct {
Path string
Text string
Version string
Size int64
Binary bool
TooLarge bool
AgentRule string
}
FileContent is a file as the editor opens it.
type FileEntry ¶
type FileEntry struct {
Name string
Path string
Kind FileKind
Size int64
Modified time.Time
// Git is the entry's git status ("modified", "added", "renamed",
// "untracked", "conflicted"; "changed" for a folder with changes
// under it), "" when clean or outside a repository.
Git string
// Hidden says why the entry is hidden by default: "blocked" (the
// agent's blocked paths), "ignored" (git), "dot", or "".
Hidden string
// AgentRule is the agent's rule for the path: "blocked", "read_only"
// or "".
AgentRule string
}
FileEntry is one entry of a folder.
type Options ¶
type Options struct {
// Streaming asks the model for partial responses as they are generated.
Streaming bool
// Warn receives problems that don't stop the workspace from opening.
Warn func(string)
// Model replaces the model built from the configuration (tests use a
// mock). Agents with their own model still get theirs.
Model model.LLM
// Workers records which workers are enabled; one store serves every
// workspace in a process (nil: ~/.blitz/workers.json).
Workers *workers.Store
// NewModel builds models by name for /model, pins and agents' own
// models (nil: runtime.NewModel).
NewModel func(ctx context.Context, cfg *config.Config, name string) (model.LLM, error)
}
Options configure Open.
type RunOptions ¶
type RunOptions struct {
// Manual: started on request rather than by the schedule.
Manual bool
// OnStart receives the run's record as it starts (its ID and session).
OnStart func(api.Run)
// OnEvent receives the turn's events.
OnEvent func(api.Event)
}
RunWorker runs the named worker once, now, and records the run. The worker must be enabled at its current hash. The run has a session of its own (not the workspace's active one), gets exactly the worker's permissions after the host policy (anything else is refused and recorded), and stops at its limits. on receives the turn's events. A run of the same worker still going makes this ErrRunInProgress. RunOptions configure RunWorker.
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace is one open project: everything a session needs.
func Open ¶
Open wires registries, tools, the model and the engine for the workspace cfg.Tools.WorkspaceDir names. The workspace owns cfg from then on and changes it (the model, pins, settings), so each workspace needs its own copy. Open also activates cfg's interface language for the process.
func (*Workspace) ActiveAgent ¶
ActiveAgent describes the agent that answers prompts.
func (*Workspace) ActiveAgentTools ¶
func (w *Workspace) ActiveAgentTools() api.AgentTools
ActiveAgentTools returns what the active agent can use: its built-in tools and the MCP servers offered to it.
func (*Workspace) ActiveSession ¶
func (w *Workspace) ActiveSession() (api.SessionInfo, bool)
ActiveSession returns the session prompts go to, with its messages.
func (*Workspace) AddImage ¶
AddImage stores image data (e.g. pasted from the clipboard) for a prompt.
func (*Workspace) AddMemory ¶
AddMemory appends text to the last project instruction file (BLITZ.md when none is configured), reloads memory, and returns the file's path.
func (*Workspace) AddPermissionRule ¶
AddPermissionRule adds a rule for this session and, with save, to the config file's [permissions]. It applies at once, except read rules, which need saving and apply from the next start.
func (*Workspace) AllModelSettings ¶
func (w *Workspace) AllModelSettings() map[string]config.ModelSettings
AllModelSettings returns every model's settings, by model name.
func (*Workspace) AuditShell ¶
AuditShell records a command the user ran directly.
func (*Workspace) AvailableLocales ¶
func (w *Workspace) AvailableLocales() (list []api.LocaleInfo, customDir string)
AvailableLocales returns the interface languages with a catalog, and the directory custom catalogs are read from ("" if none is configured).
func (*Workspace) ClearApprovals ¶
ClearApprovals revokes every approval and returns how many there were.
func (*Workspace) Close ¶
Close kills background processes and MCP servers, flushes the audit log and releases the workspace.
func (*Workspace) Compact ¶
Compact summarises the active session's older turns, keeping the latest, to shrink the model's context. focus steers what the summary keeps.
func (*Workspace) Context ¶
func (w *Workspace) Context() (api.ContextInfo, error)
Context returns the active session's context size and compaction setting.
func (*Workspace) CreateFolder ¶
CreateFolder creates the folder p.
func (*Workspace) DeleteFile ¶
DeleteFile deletes p, a folder with everything in it.
func (*Workspace) DisableWorker ¶
func (w *Workspace) DisableWorker(name string) (api.WorkerInfo, error)
DisableWorker stops a worker from running.
func (*Workspace) EnableWorker ¶
func (w *Workspace) EnableWorker(name, hash string) (api.WorkerInfo, error)
EnableWorker lets a worker run on its schedule, pinned to hash: the one the caller reviewed, which must still be current (api.ErrHashMismatch otherwise). An invalid worker can't be enabled.
func (*Workspace) FindFiles ¶
FindFiles returns up to limit files whose path matches query, best first. Hidden files are left out.
func (*Workspace) GitDiff ¶
GitDiff runs git diff (stat and patch) in the workspace. color keeps git's terminal colours. On failure the output holds git's message.
The agent can write the repository's .git/config, and git diff would run commands named there (fsmonitor, external diff, textconv and filter drivers) outside the sandbox. They are all switched off.
func (*Workspace) ImagesEnabled ¶
ImagesEnabled reports whether images can be attached.
func (*Workspace) ListAgents ¶
ListAgents returns every agent, in registry order.
func (*Workspace) ListApprovals ¶
ListApprovals returns this session's approvals, then saved ones.
func (*Workspace) ListCheckpoints ¶
func (w *Workspace) ListCheckpoints() []api.Checkpoint
ListCheckpoints returns the turns that changed files, newest first.
func (*Workspace) ListCommands ¶
func (w *Workspace) ListCommands() []api.CommandInfo
ListCommands returns the custom slash commands, by name. Files that don't parse are reported through the workspace's warnings.
func (*Workspace) ListDir ¶
ListDir lists the folder p (the workspace for ""), folders first. Hidden entries are left out unless showHidden.
func (*Workspace) ListMCPServers ¶
ListMCPServers returns the configured MCP servers, or none when none could be started.
func (*Workspace) ListPermissionRules ¶
func (w *Workspace) ListPermissionRules() []api.PermissionRule
ListPermissionRules returns the rules in force: deny, then ask, then allow.
func (*Workspace) ListSessions ¶
func (w *Workspace) ListSessions(all bool) ([]api.SessionInfo, error)
ListSessions returns this workspace's sessions, or with all every saved session, newest first. Messages are left out.
func (*Workspace) ListSkills ¶
ListSkills returns every skill found.
func (*Workspace) ListWorkers ¶
func (w *Workspace) ListWorkers() ([]api.WorkerInfo, error)
ListWorkers returns the workspace's workers, by name.
func (*Workspace) LoadAttachments ¶
func (w *Workspace) LoadAttachments(paths []string, prompt string, warn func(string)) ([]*images.Image, error)
LoadAttachments loads image files (failures are errors naming the path) and @image mentions in prompt (failures are warnings: the prompt may be piped text that merely contains an @path) through the workspace sandbox. Identical images are attached once.
func (*Workspace) LoadSession ¶
LoadSession makes the session ref names active: an ID, or the name of a snapshot, which starts a new session copied from it (branched). A session from another workspace can be loaded by ID.
func (*Workspace) MemoryFiles ¶
MemoryFiles are the project instruction file names looked for, in order.
func (*Workspace) ModelErr ¶
ModelErr is why the configured model failed to initialise (nil if it didn't). The workspace then runs on a placeholder model.
func (*Workspace) ModelSettings ¶
func (w *Workspace) ModelSettings(ref string) (api.ModelSettingsInfo, error)
ModelSettings returns ref's settings ("provider/" optional).
func (*Workspace) NewSession ¶
func (w *Workspace) NewSession() (api.SessionInfo, error)
NewSession starts a new session for the active agent and makes it active. It is named after its first prompt.
func (*Workspace) OpenSession ¶
OpenSession picks the session to use and points the audit log at it: the session resume names (an ID, or a snapshot to start a new session from), the most recent one in this workspace when cont is set or resume is "latest", or else a new session. It reports whether a session was resumed.
func (*Workspace) PinModel ¶
PinModel runs agent on ref from now on and saves the pin in the config file.
func (*Workspace) PruneEnvs ¶
func (w *Workspace) PruneEnvs() (api.PruneResult, error)
PruneEnvs removes environments no script the policy lets run needs, and incomplete ones.
func (*Workspace) ReadFile ¶
func (w *Workspace) ReadFile(p string) (FileContent, error)
ReadFile opens the file p for the editor: binary files and files over the editor's limit come without their text.
func (*Workspace) ReloadMemory ¶
ReloadMemory re-reads project instruction files into the engine and returns their paths.
func (*Workspace) ReloadProviders ¶
ReloadProviders applies the provider settings (keys, endpoints, provider) of cfg, a fresh load of this workspace's settings, and rebuilds the model: a key set in the settings takes effect without reopening the workspace. It returns why the model still can't be built, if it can't.
func (*Workspace) RemovePermissionRule ¶
RemovePermissionRule removes a rule (any effect) for this session and, with save, from the config file.
func (*Workspace) RenameFile ¶
RenameFile moves from to to (a file or a folder); to must not exist.
func (*Workspace) RenameSession ¶
func (w *Workspace) RenameSession(title string) (api.SessionInfo, error)
RenameSession sets the active session's title. An empty title is refused.
func (*Workspace) RevokeApprovals ¶
RevokeApprovals removes approvals by key, for this session and from the saved ones, and returns how many keys it was given.
func (*Workspace) Rewind ¶
func (w *Workspace) Rewind(ctx context.Context, index int, mode api.RewindMode, force bool) (api.RewindResult, error)
Rewind takes the active session back to the prompt at transcript index index. Files are restored first (refusing on conflicts unless force), so a refused rewind changes nothing; then the conversation is cut before the prompt, whose text is returned to send again.
func (*Workspace) RewindPoints ¶
func (w *Workspace) RewindPoints() ([]api.RewindPoint, error)
RewindPoints lists the active session's prompts, oldest first.
func (*Workspace) Run ¶
func (w *Workspace) Run(ctx context.Context, sessionID string, t api.Turn, on func(api.Event)) (api.TurnResult, error)
Run sends one prompt to the agent in the session and passes its events to on as they happen. It runs prompt_submit hooks, audits the prompt, starts a checkpoint for /undo and records both sides in the transcript. A refused prompt is a *BlockedError. A turn that fails part way still returns what it produced.
func (*Workspace) RunWorker ¶
RunWorker runs the named worker once, as its schedule would: in a session of its own, with only the permissions it declares and within its limits, recorded in the run log. The worker must be enabled; a scheduled run of one that isn't is recorded as skipped.
func (*Workspace) SandboxSummary ¶
SandboxSummary describes the sandbox commands run in, one line each.
func (*Workspace) SaveSnapshot ¶
SaveSnapshot saves a copy of the active session under name. Snapshots are never continued in place: loading one starts a new session from it.
func (*Workspace) SearchProvider ¶
SearchProvider names the web search provider, or ErrNoFetch.
func (*Workspace) SearchSession ¶
SearchSession looks for terms in the active session's transcript (which keeps what compaction removed from the model's context) and returns how many passages matched and the prompt that asks the agent about them.
func (*Workspace) SearchSkills ¶
SearchSkills returns the skills matching query.
func (*Workspace) SearchWeb ¶
SearchWeb searches the web for terms and prepares the agent's prompt from the results it can read.
func (*Workspace) SessionDiff ¶
SessionDiff is a unified diff of every file the agent changed in the active session, against its state before the first change ("" when none). Checkpoints persist, so this spans the session's earlier runs.
func (*Workspace) SessionUsage ¶
SessionUsage returns the active session's usage.
func (*Workspace) Set ¶
Set changes a setting for this session ("agency" or "agency_level") and returns the key in canonical form. The agents' instructions embed it, so they are rebuilt.
func (*Workspace) SetLocale ¶
SetLocale switches the language the model replies in, for this workspace, and saves it as ui.locale in the config file. input is a language tag or name. The interface language belongs to the client: a front end switches its own (i18n.SetCurrent) with the returned Tag.
func (*Workspace) SetModel ¶
SetModel switches every unpinned agent to ref (a name or "provider/model"). It returns the active agent's pin when there is one, since that still decides what the active agent runs on.
func (*Workspace) SetPermissionMode ¶
SetPermissionMode changes which actions run without asking, for every session of the workspace, and returns the mode's canonical name. Bypass needs the OS sandbox (ErrBypassNeedsSandbox).
func (*Workspace) SetUI ¶
func (w *Workspace) SetUI(approve api.Approver, ask api.UserPromptFunc)
SetUI routes approval requests and questions to the front end.
func (*Workspace) StatFiles ¶
StatFiles returns each file's version, "" for one that's gone (or isn't a readable file). Files over the editor's limit get their size and time instead of a hash.
func (*Workspace) Steer ¶
Steer queues a message for the agent while a turn runs in the session; the agent reads it with its next tool result. prompt_submit hooks apply, as to any prompt (a refusal is a *BlockedError), and the transcript records it.
func (*Workspace) Tools ¶
Tools returns the tool registry: workspace, approvals, processes, MCP, hooks.
func (*Workspace) Undo ¶
func (w *Workspace) Undo(force bool) (api.UndoResult, error)
Undo restores the files the latest turn with changes modified, and audits it. A partial restore returns both what was restored and why the rest wasn't.
func (*Workspace) Unpin ¶
Unpin returns agent to the configured model, or to its own default_model if it declares one, and removes the pin from the config file.
func (*Workspace) UpdateModelSettings ¶
func (w *Workspace) UpdateModelSettings(ref string, reset bool, changes []api.Setting) (api.ModelSettingsChange, error)
UpdateModelSettings applies changes to ref's settings (reset clears them all first). They apply from the next model call and are saved in the config file, under the key it already uses for the model if any.
func (*Workspace) WorkerRuns ¶
WorkerRuns returns a worker's recorded runs, newest first.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agents loads the agents a workspace offers: the built-in ones and Markdown files with YAML frontmatter from ~/.blitz/agents (and the project's, when it's trusted), each a name, a description, a system prompt, the tools it may use and optionally its own model (spec_agents_014).
|
Package agents loads the agents a workspace offers: the built-in ones and Markdown files with YAML frontmatter from ~/.blitz/agents (and the project's, when it's trusted), each a name, a description, a system prompt, the tools it may use and optionally its own model (spec_agents_014). |
|
builtin
Package builtin holds the agents Blitz ships with, as Markdown files embedded in the binary.
|
Package builtin holds the agents Blitz ships with, as Markdown files embedded in the binary. |
|
Package audit writes an append-only JSONL record of what tools did and what the user approved or denied.
|
Package audit writes an append-only JSONL record of what tools did and what the user approved or denied. |
|
Package breaker is a small circuit breaker for dependencies that fail persistently (MCP servers, model APIs): after a run of failures calls are refused for a cooldown that grows with each failed trial.
|
Package breaker is a small circuit breaker for dependencies that fail persistently (MCP servers, model APIs): after a run of failures calls are refused for a cooldown that grows with each failed trial. |
|
Package commands loads custom slash commands: Markdown files whose body is a prompt, from the user's and the project's command directories, plus the bundled ones.
|
Package commands loads custom slash commands: Markdown files whose body is a prompt, from the user's and the project's command directories, plus the bundled ones. |
|
Package memory loads project instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, BLITZ.md), the files they import, and rule files, which are added to the agents' system prompt.
|
Package memory loads project instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, BLITZ.md), the files they import, and rule files, which are added to the agents' system prompt. |
|
Package runtime runs the agent: it wraps Google's ADK runner, builds the agent tree with its tools and sub-agents, runs a prompt as a turn within its limits, delivers steering mid-turn, answers side questions without touching history, compacts history, and records usage and traces.
|
Package runtime runs the agent: it wraps Google's ADK runner, builds the agent tree with its tools and sub-agents, runs a prompt as a turn within its limits, delivers steering mid-turn, answers side questions without touching history, compacts history, and records usage and traces. |
|
Package session stores conversations: each session's metadata and its messages and events on disk, snapshots to branch from, search over a session's history, and the store ADK reads the conversation from (spec_sessions_017).
|
Package session stores conversations: each session's metadata and its messages and events on disk, snapshots to branch from, search over a session's history, and the store ADK reads the conversation from (spec_sessions_017). |
|
Package skills loads the skills a workspace offers: a SKILL.md with frontmatter and instructions, optionally scripts, from the built-in set, ~/.blitz/skills and (when trusted) the project; and the policy that caps what their scripts may do (spec_skills_013).
|
Package skills loads the skills a workspace offers: a SKILL.md with frontmatter and instructions, optionally scripts, from the built-in set, ~/.blitz/skills and (when trusted) the project; and the policy that caps what their scripts may do (spec_skills_013). |
|
builtin
Package builtin holds the skills Blitz ships with (a SKILL.md each), embedded in the binary.
|
Package builtin holds the skills Blitz ships with (a SKILL.md each), embedded in the binary. |
|
Package tools is everything the agent can do and the rules it does it under: file tools through the workspace's sandbox (with checkpoints for undo), shell commands under the command policy and the OS sandbox, approvals and permission rules, web fetch and search, MCP servers, skill scripts, images, the task list and questions to the user (spec_filetools_006, spec_shell_007, spec_approvals_005).
|
Package tools is everything the agent can do and the rules it does it under: file tools through the workspace's sandbox (with checkpoints for undo), shell commands under the command policy and the OS sandbox, approvals and permission rules, web fetch and search, MCP servers, skill scripts, images, the task list and questions to the user (spec_filetools_006, spec_shell_007, spec_approvals_005). |
|
Package workers reads workers: scheduled workflows a workspace defines in workers/<name>/WORKER.md (ROADMAP item 24).
|
Package workers reads workers: scheduled workflows a workspace defines in workers/<name>/WORKER.md (ROADMAP item 24). |