Documentation
¶
Index ¶
- Constants
- Variables
- func IsBlocked(blockedBy []string, entities []*domain.Page) bool
- func IsOwnDailyNoteEntry(checkboxText string, taskName string) bool
- func ResolveLauncher(ctx context.Context, vaultScript string, taskLauncher string, ...) (string, error)
- func ResolveTaskLauncher(ctx context.Context, goalStorage storage.GoalStorage, vaultPath string, ...) (resolved string, warnings []string, err error)
- type AppendMetricsSessionOperation
- type BackfillResult
- type ClaudeResumer
- type ClaudeSessionStarter
- type CompleteOperation
- type DecisionAckOperation
- type DecisionListItem
- type DecisionListOperation
- type DeferOperation
- type EnsureAllTaskIdentifiersOperation
- type EntityClearOperation
- func NewGoalClearOperation(goalStorage storage.GoalStorage) EntityClearOperation
- func NewObjectiveClearOperation(objectiveStorage storage.ObjectiveStorage) EntityClearOperation
- func NewThemeClearOperation(themeStorage storage.ThemeStorage) EntityClearOperation
- func NewTopicClearOperation(topicStorage storage.TopicStorage) EntityClearOperation
- func NewVisionClearOperation(visionStorage storage.VisionStorage) EntityClearOperation
- type EntityGetOperation
- func NewGoalGetOperation(goalStorage storage.GoalStorage) EntityGetOperation
- func NewObjectiveGetOperation(objectiveStorage storage.ObjectiveStorage) EntityGetOperation
- func NewThemeGetOperation(themeStorage storage.ThemeStorage) EntityGetOperation
- func NewTopicGetOperation(topicStorage storage.TopicStorage) EntityGetOperation
- func NewVisionGetOperation(visionStorage storage.VisionStorage) EntityGetOperation
- type EntityListAddOperation
- func NewGoalListAddOperation(goalStorage storage.GoalStorage) EntityListAddOperation
- func NewObjectiveListAddOperation(objectiveStorage storage.ObjectiveStorage) EntityListAddOperation
- func NewTaskListAddOperation(taskStorage storage.TaskStorage) EntityListAddOperation
- func NewThemeListAddOperation(themeStorage storage.ThemeStorage) EntityListAddOperation
- func NewTopicListAddOperation(topicStorage storage.TopicStorage) EntityListAddOperation
- func NewVisionListAddOperation(visionStorage storage.VisionStorage) EntityListAddOperation
- type EntityListRemoveOperation
- func NewGoalListRemoveOperation(goalStorage storage.GoalStorage) EntityListRemoveOperation
- func NewObjectiveListRemoveOperation(objectiveStorage storage.ObjectiveStorage) EntityListRemoveOperation
- func NewTaskListRemoveOperation(taskStorage storage.TaskStorage) EntityListRemoveOperation
- func NewThemeListRemoveOperation(themeStorage storage.ThemeStorage) EntityListRemoveOperation
- func NewTopicListRemoveOperation(topicStorage storage.TopicStorage) EntityListRemoveOperation
- func NewVisionListRemoveOperation(visionStorage storage.VisionStorage) EntityListRemoveOperation
- type EntitySetOperation
- func NewGoalSetOperation(goalStorage storage.GoalStorage) EntitySetOperation
- func NewObjectiveSetOperation(objectiveStorage storage.ObjectiveStorage) EntitySetOperation
- func NewThemeSetOperation(themeStorage storage.ThemeStorage) EntitySetOperation
- func NewTopicSetOperation(topicStorage storage.TopicStorage) EntitySetOperation
- func NewVisionSetOperation(visionStorage storage.VisionStorage) EntitySetOperation
- type EntityShowOperation
- func NewGoalShowOperation(goalStorage storage.GoalStorage) EntityShowOperation
- func NewObjectiveShowOperation(objectiveStorage storage.ObjectiveStorage) EntityShowOperation
- func NewThemeShowOperation(themeStorage storage.ThemeStorage) EntityShowOperation
- func NewTopicShowOperation(topicStorage storage.TopicStorage) EntityShowOperation
- func NewVisionShowOperation(visionStorage storage.VisionStorage) EntityShowOperation
- type EntityShowResult
- type Escalation
- type EscalationPublisher
- type FrontmatterClearOperation
- type FrontmatterEntity
- type FrontmatterGetOperation
- type FrontmatterSetOperation
- type GoalCompleteOperation
- type GoalDeferOperation
- type GoalWorkOnOperation
- type InteractionCounter
- type IssueType
- type LauncherFactory
- type LintIssue
- type LintIssueJSON
- type LintOperation
- type ListOperation
- type MutationResult
- type NotificationPublishCommandSender
- type NotificationSenderFactory
- type ObjectiveCompleteOperation
- type RemoveMetricsSessionOperation
- type ResolveOperation
- type RollupBaseline
- type RollupBaselineDelta
- type RollupBaselineDeltas
- type RollupFamily
- type RollupWeeklyOperation
- type RollupWeeklyResult
- type SearchOperation
- type SessionLock
- type SessionLocker
- type ShowOperation
- type TaskAnswerOperation
- type TaskApproveOperation
- type TaskDetail
- type TaskListItem
- type TopicCompleteOperation
- type TopicDeferOperation
- type TopicWorkOnOperation
- type UpdateOperation
- type ValidateIssueJSON
- type ValidateResult
- type VaultDispatcher
- type WatchDir
- type WatchEvent
- type WatchOperation
- type WatchTarget
- type WorkOnOperation
Constants ¶
const EscalationPublishTimeout = 5 * time.Second
EscalationPublishTimeout bounds a single publish attempt. A vault-cli invocation must never hang on an unreachable broker, so the publish is raced against this deadline and the command returns when it expires.
const PageTypeTask = "task"
PageTypeTask is the lint page type that carries the task-identifier invariants. The two identifier checks (MISSING_TASK_IDENTIFIER, INVALID_TASK_IDENTIFIER) run only when the caller passes this value. Any other page type — including an unrecognised one — skips them. Identifier checks fail open on purpose: a caller that forgets its page type gets no identifier checking rather than a false error on every file it lints.
Variables ¶
var ErrSessionBusy = stderrors.New(
"claude session is busy — another process is already working on this session",
)
ErrSessionBusy indicates another claude process already holds the per-session lock for the requested session id (a second work-on or resume raced a live session). Hard failure — the caller spawns no second writer.
"claude session starter unavailable — claude script not found in PATH",
)
ErrStarterUnavailable indicates the claude session starter is nil (typically because the configured claude script is not on PATH). This is intentionally a soft failure — work-on still marks the task in_progress on disk; the CLI exits 0 with the error recorded as a warning.
Functions ¶
func IsBlocked ¶ added in v0.131.0
IsBlocked reports whether the entity that declares blockedBy is blocked.
blockedBy is the raw blocked_by frontmatter list: plain names or [[wikilinks]]. entities is every page of the same kind — the same directory the listing came from, BEFORE any status filter is applied. An empty blockedBy is unblocked. Otherwise the entity is blocked iff at least one named blocker cannot be confirmed completed: a blocker whose page is absent, unreadable, or carries no parseable status counts as not completed, so "cannot verify it is done" reads as blocked rather than as permission to start. Resolution is a single status read per blocker — a blocker's own blockedBy is never followed, so a dependency cycle terminates immediately.
func IsOwnDailyNoteEntry ¶ added in v0.102.5
IsOwnDailyNoteEntry reports whether checkboxText is the daily-note entry that belongs to taskName.
checkboxText is capture group 3 of storage.CheckboxRegex — everything after the `- [x] ` marker on a daily-note checkbox line.
A checkbox line is a task's own entry iff its text, after stripping any leading decoration, begins with a wikilink resolving to that task. Decoration is any leading run of runes that are not letters, digits, or the wikilink opener `[`. Category emoji, symbols such as section-sign or double-dagger, and markdown emphasis markers such as `**` are all decoration by character class. Because the test is Unicode-aware, a leading letter in any script — Latin, CJK, Cyrillic — ends the decoration run and makes the line a mention, so `作業 [[Some Task]]` and `Задача по [[Some Task]]` are mentions. A digit also ends the run, so a keycap prefix such as `1️⃣ [[Some Task]]` is not recognised as an own entry. Trailing prose after the wikilink does not disqualify it, so `[[Some Task]] — due today` is Some Task's own entry. A wikilink to the task appearing anywhere else in the text is a mention, never an own entry, so `Chain — [[Other]] → [[Some Task]].` is not Some Task's own entry.
Alias (`[[Task|label]]`) and heading (`[[Task#Section]]`) link forms resolve to the same task. Comparison is case-insensitive and literal — the task name is never interpreted as a pattern.
func ResolveLauncher ¶ added in v0.167.0
func ResolveLauncher( ctx context.Context, vaultScript string, taskLauncher string, goalLaunchers []string, ) (string, error)
ResolveLauncher picks the launcher script for a task from its own value, else its goals' values, else the vault's configured claude_script.
Precedence: a non-empty taskLauncher wins outright. Otherwise the distinct non-empty goalLaunchers are consulted: none means the vault script, exactly one means that one, and more than one is refused with an error naming every distinct value (picking one by frontmatter order would be arbitrary).
A bare name (no slash) resolves next to the vault's own launcher, so vault script "claude" + launcher "cc-x" yields "cc-x" and vault script "/s/cc-private" + launcher "cc-private-claude" yields "/s/cc-private-claude". A value containing a slash is used as given.
func ResolveTaskLauncher ¶ added in v0.167.0
func ResolveTaskLauncher( ctx context.Context, goalStorage storage.GoalStorage, vaultPath string, vaultScript string, task *domain.Task, ) (resolved string, warnings []string, err error)
ResolveTaskLauncher resolves the launcher for a task, consulting its goals when the task carries no launcher of its own.
A goal link that no longer resolves — or any FindGoalByName error — is skipped and reported as a warning naming the goal, so a stale link never blocks work-on. The task's own launcher short-circuits the goal lookups entirely.
Types ¶
type AppendMetricsSessionOperation ¶ added in v0.147.0
type AppendMetricsSessionOperation interface {
Execute(ctx context.Context, vaultPath, taskName, sessionID string) error
}
AppendMetricsSessionOperation appends one metrics entry to a task.
func NewAppendMetricsSessionOperation ¶ added in v0.147.0
func NewAppendMetricsSessionOperation( taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, ) AppendMetricsSessionOperation
NewAppendMetricsSessionOperation creates a new append-metrics-session operation.
type BackfillResult ¶ added in v0.51.0
type BackfillResult struct {
// ModifiedFiles is the list of absolute file paths that were written during backfill.
ModifiedFiles []string
// SkippedFiles is the count of files skipped due to errors.
SkippedFiles int
}
BackfillResult holds the outcome of an EnsureAllTaskIdentifiers run.
type ClaudeResumer ¶ added in v0.16.0
type ClaudeResumer interface {
// ResumeSession replaces the current process with an interactive
// claude --resume session.
//
// A non-empty prompt is appended to argv as the resumed session's first
// interactive turn. An empty or whitespace-only prompt is omitted
// entirely, so argv is identical to a plain `claude --resume <id>` —
// callers that have nothing to say must not produce a trailing empty
// positional argument.
ResumeSession(ctx context.Context, sessionID string, cwd string, prompt string) error
}
ClaudeResumer resumes an existing Claude session.
func NewClaudeResumer ¶ added in v0.16.0
func NewClaudeResumer(claudeScript string, locker SessionLocker) ClaudeResumer
NewClaudeResumer creates a ClaudeResumer using the given claude script. Returns nil if the binary is not found.
func NewClaudeResumerForTesting ¶ added in v0.16.0
func NewClaudeResumerForTesting( claudePath string, chdir func(string) error, execFn func(string, []string, []string) error, locker SessionLocker, ) ClaudeResumer
NewClaudeResumerForTesting creates a ClaudeResumer with injectable dependencies. Intended for testing.
type ClaudeSessionStarter ¶ added in v0.16.0
type ClaudeSessionStarter interface {
// StartSession runs claude in headless mode to create a session with the given
// session id and returns only an error. The session id is minted by the caller
// (not by claude) so it can be persisted before the child process exists.
// When name is non-empty, the session is created with -n <name> so its
// custom-title and agent-name are set from turn 1.
// Both branches block until the headless turn completes and validate its JSON
// result; they differ in how. The interactive branch runs the child under the
// request context (bounded by a 5m timeout). The non-interactive branch spawns
// the child detached from the request context and waits for its exit, bounded by
// sessionTurnTimeout — a wait bound, not a kill. The turn is judged by its
// validated result: a non-zero child exit is not itself a failure when the result
// validates, and the caller persists no session id only when the turn genuinely
// failed. That way the UI never offers Resume against a live or failed transcript.
// See docs/work-on-session-lifecycle.md.
StartSession(ctx context.Context, sessionID string, prompt string, cwd string, name string, isInteractive bool) error
}
ClaudeSessionStarter starts a new headless Claude session.
func NewClaudeSessionStarter ¶ added in v0.16.0
func NewClaudeSessionStarter(claudeScript string, locker SessionLocker) ClaudeSessionStarter
NewClaudeSessionStarter creates a ClaudeSessionStarter using the given claude script. Returns nil if the binary is not found.
func NewClaudeSessionStarterWithRunner ¶ added in v0.16.0
func NewClaudeSessionStarterWithRunner( claudePath string, runCmd func(ctx context.Context, args []string, dir string) ([]byte, error), detachRun func(args []string, dir string, stdout *os.File) (<-chan error, error), waiter libtime.WaiterDuration, locker SessionLocker, ) ClaudeSessionStarter
NewClaudeSessionStarterWithRunner creates a ClaudeSessionStarter with an injectable command runner. Intended for testing.
type CompleteOperation ¶
type CompleteOperation interface {
// Execute marks a task as complete. When force is true the incomplete-subtask
// guard is bypassed, mirroring the --force flag on goal complete.
// reason and gateSuccessor are the one-step close-out fields (aborted_reason /
// gate_successor) and are persisted with the status in a single write when
// non-empty; they are ignored for recurring tasks, whose status never changes.
Execute(
ctx context.Context,
vaultPath string,
taskName string,
vaultName string,
force bool,
reason string,
gateSuccessor string,
) (MutationResult, error)
}
func NewCompleteOperation ¶
func NewCompleteOperation( taskStorage storage.TaskStorage, dailyNoteStorage storage.DailyNoteStorage, currentDateTime libtime.CurrentDateTime, interactionCounter InteractionCounter, ) CompleteOperation
NewCompleteOperation creates a new complete operation.
No GoalStorage: completion no longer writes the goal's `# Tasks` list. The dependency is absent rather than ignored so that nothing can quietly start writing it again — see the comment in Execute for why.
type DecisionAckOperation ¶ added in v0.24.0
type DecisionAckOperation interface {
Execute(
ctx context.Context,
vaultPath string,
vaultName string,
decisionName string,
statusOverride string,
) (MutationResult, error)
}
func NewDecisionAckOperation ¶ added in v0.24.0
func NewDecisionAckOperation( decisionStorage storage.DecisionStorage, currentDateTime libtime.CurrentDateTime, ) DecisionAckOperation
NewDecisionAckOperation creates a new decision ack operation.
type DecisionListItem ¶ added in v0.23.0
type DecisionListItem struct {
Name string `json:"name"`
Reviewed bool `json:"reviewed"`
ReviewedDate string `json:"reviewed_date,omitempty"`
Status string `json:"status,omitempty"`
Type string `json:"type,omitempty"`
PageType string `json:"page_type,omitempty"`
Vault string `json:"vault"`
}
DecisionListItem represents a decision in list output.
type DecisionListOperation ¶ added in v0.23.0
type DecisionListOperation interface {
Execute(
ctx context.Context,
vaultPath string,
vaultName string,
showReviewed bool,
showAll bool,
) ([]DecisionListItem, error)
}
func NewDecisionListOperation ¶ added in v0.23.0
func NewDecisionListOperation(decisionStorage storage.DecisionStorage) DecisionListOperation
NewDecisionListOperation creates a new decision list operation.
type DeferOperation ¶
type DeferOperation interface {
Execute(
ctx context.Context,
vaultPath string,
taskName string,
dateStr string,
vaultName string,
) (MutationResult, error)
}
func NewDeferOperation ¶
func NewDeferOperation( taskStorage storage.TaskStorage, dailyNoteStorage storage.DailyNoteStorage, currentDateTime libtime.CurrentDateTime, ) DeferOperation
NewDeferOperation creates a new defer operation.
type EnsureAllTaskIdentifiersOperation ¶ added in v0.51.0
type EnsureAllTaskIdentifiersOperation interface {
Execute(ctx context.Context, vaultPath string) (BackfillResult, error)
}
func NewEnsureAllTaskIdentifiersOperation ¶ added in v0.51.0
func NewEnsureAllTaskIdentifiersOperation( taskStorage storage.TaskStorage, ) EnsureAllTaskIdentifiersOperation
NewEnsureAllTaskIdentifiersOperation creates a new backfill operation.
type EntityClearOperation ¶ added in v0.30.0
type EntityClearOperation interface {
Execute(ctx context.Context, vaultPath, entityName, key string) error
}
EntityClearOperation clears a single frontmatter field value on an entity.
func NewGoalClearOperation ¶ added in v0.30.0
func NewGoalClearOperation(goalStorage storage.GoalStorage) EntityClearOperation
NewGoalClearOperation creates an EntityClearOperation for goals.
func NewObjectiveClearOperation ¶ added in v0.30.0
func NewObjectiveClearOperation(objectiveStorage storage.ObjectiveStorage) EntityClearOperation
NewObjectiveClearOperation creates an EntityClearOperation for objectives.
func NewThemeClearOperation ¶ added in v0.30.0
func NewThemeClearOperation(themeStorage storage.ThemeStorage) EntityClearOperation
NewThemeClearOperation creates an EntityClearOperation for themes.
func NewTopicClearOperation ¶ added in v0.142.0
func NewTopicClearOperation(topicStorage storage.TopicStorage) EntityClearOperation
NewTopicClearOperation creates an EntityClearOperation for topics.
func NewVisionClearOperation ¶ added in v0.30.0
func NewVisionClearOperation(visionStorage storage.VisionStorage) EntityClearOperation
NewVisionClearOperation creates an EntityClearOperation for visions.
type EntityGetOperation ¶ added in v0.30.0
type EntityGetOperation interface {
Execute(ctx context.Context, vaultPath, entityName, key string) (string, error)
}
EntityGetOperation retrieves a single frontmatter field value from an entity.
func NewGoalGetOperation ¶ added in v0.30.0
func NewGoalGetOperation(goalStorage storage.GoalStorage) EntityGetOperation
NewGoalGetOperation creates an EntityGetOperation for goals.
func NewObjectiveGetOperation ¶ added in v0.30.0
func NewObjectiveGetOperation(objectiveStorage storage.ObjectiveStorage) EntityGetOperation
NewObjectiveGetOperation creates an EntityGetOperation for objectives.
func NewThemeGetOperation ¶ added in v0.30.0
func NewThemeGetOperation(themeStorage storage.ThemeStorage) EntityGetOperation
NewThemeGetOperation creates an EntityGetOperation for themes.
func NewTopicGetOperation ¶ added in v0.142.0
func NewTopicGetOperation(topicStorage storage.TopicStorage) EntityGetOperation
NewTopicGetOperation creates an EntityGetOperation for topics.
func NewVisionGetOperation ¶ added in v0.30.0
func NewVisionGetOperation(visionStorage storage.VisionStorage) EntityGetOperation
NewVisionGetOperation creates an EntityGetOperation for visions.
type EntityListAddOperation ¶ added in v0.33.0
type EntityListAddOperation interface {
Execute(ctx context.Context, vaultPath, entityName, field, value string) error
}
EntityListAddOperation appends a value to a list frontmatter field on an entity.
func NewGoalListAddOperation ¶ added in v0.33.0
func NewGoalListAddOperation(goalStorage storage.GoalStorage) EntityListAddOperation
NewGoalListAddOperation creates an EntityListAddOperation for goals.
func NewObjectiveListAddOperation ¶ added in v0.33.0
func NewObjectiveListAddOperation( objectiveStorage storage.ObjectiveStorage, ) EntityListAddOperation
NewObjectiveListAddOperation creates an EntityListAddOperation for objectives.
func NewTaskListAddOperation ¶ added in v0.33.0
func NewTaskListAddOperation(taskStorage storage.TaskStorage) EntityListAddOperation
NewTaskListAddOperation creates an EntityListAddOperation for tasks.
func NewThemeListAddOperation ¶ added in v0.33.0
func NewThemeListAddOperation(themeStorage storage.ThemeStorage) EntityListAddOperation
NewThemeListAddOperation creates an EntityListAddOperation for themes.
func NewTopicListAddOperation ¶ added in v0.142.0
func NewTopicListAddOperation(topicStorage storage.TopicStorage) EntityListAddOperation
NewTopicListAddOperation creates an EntityListAddOperation for topics.
func NewVisionListAddOperation ¶ added in v0.33.0
func NewVisionListAddOperation(visionStorage storage.VisionStorage) EntityListAddOperation
NewVisionListAddOperation creates an EntityListAddOperation for visions.
type EntityListRemoveOperation ¶ added in v0.33.0
type EntityListRemoveOperation interface {
Execute(ctx context.Context, vaultPath, entityName, field, value string) error
}
EntityListRemoveOperation removes a value from a list frontmatter field on an entity.
func NewGoalListRemoveOperation ¶ added in v0.33.0
func NewGoalListRemoveOperation(goalStorage storage.GoalStorage) EntityListRemoveOperation
NewGoalListRemoveOperation creates an EntityListRemoveOperation for goals.
func NewObjectiveListRemoveOperation ¶ added in v0.33.0
func NewObjectiveListRemoveOperation( objectiveStorage storage.ObjectiveStorage, ) EntityListRemoveOperation
NewObjectiveListRemoveOperation creates an EntityListRemoveOperation for objectives.
func NewTaskListRemoveOperation ¶ added in v0.33.0
func NewTaskListRemoveOperation(taskStorage storage.TaskStorage) EntityListRemoveOperation
NewTaskListRemoveOperation creates an EntityListRemoveOperation for tasks.
func NewThemeListRemoveOperation ¶ added in v0.33.0
func NewThemeListRemoveOperation(themeStorage storage.ThemeStorage) EntityListRemoveOperation
NewThemeListRemoveOperation creates an EntityListRemoveOperation for themes.
func NewTopicListRemoveOperation ¶ added in v0.142.0
func NewTopicListRemoveOperation(topicStorage storage.TopicStorage) EntityListRemoveOperation
NewTopicListRemoveOperation creates an EntityListRemoveOperation for topics.
func NewVisionListRemoveOperation ¶ added in v0.33.0
func NewVisionListRemoveOperation(visionStorage storage.VisionStorage) EntityListRemoveOperation
NewVisionListRemoveOperation creates an EntityListRemoveOperation for visions.
type EntitySetOperation ¶ added in v0.30.0
type EntitySetOperation interface {
Execute(ctx context.Context, vaultPath, entityName, key, value, reason, gateSuccessor string) error
}
EntitySetOperation sets a single frontmatter field value on an entity.
func NewGoalSetOperation ¶ added in v0.30.0
func NewGoalSetOperation(goalStorage storage.GoalStorage) EntitySetOperation
NewGoalSetOperation creates an EntitySetOperation for goals.
func NewObjectiveSetOperation ¶ added in v0.30.0
func NewObjectiveSetOperation(objectiveStorage storage.ObjectiveStorage) EntitySetOperation
NewObjectiveSetOperation creates an EntitySetOperation for objectives.
func NewThemeSetOperation ¶ added in v0.30.0
func NewThemeSetOperation(themeStorage storage.ThemeStorage) EntitySetOperation
NewThemeSetOperation creates an EntitySetOperation for themes.
func NewTopicSetOperation ¶ added in v0.142.0
func NewTopicSetOperation(topicStorage storage.TopicStorage) EntitySetOperation
NewTopicSetOperation creates an EntitySetOperation for topics.
func NewVisionSetOperation ¶ added in v0.30.0
func NewVisionSetOperation(visionStorage storage.VisionStorage) EntitySetOperation
NewVisionSetOperation creates an EntitySetOperation for visions.
type EntityShowOperation ¶ added in v0.30.0
type EntityShowOperation interface {
Execute(ctx context.Context, vaultPath, vaultName, entityName string) (EntityShowResult, error)
}
EntityShowOperation returns full detail for a single entity.
func NewGoalShowOperation ¶ added in v0.30.0
func NewGoalShowOperation(goalStorage storage.GoalStorage) EntityShowOperation
NewGoalShowOperation creates an EntityShowOperation for goals.
func NewObjectiveShowOperation ¶ added in v0.30.0
func NewObjectiveShowOperation(objectiveStorage storage.ObjectiveStorage) EntityShowOperation
NewObjectiveShowOperation creates an EntityShowOperation for objectives.
func NewThemeShowOperation ¶ added in v0.30.0
func NewThemeShowOperation(themeStorage storage.ThemeStorage) EntityShowOperation
NewThemeShowOperation creates an EntityShowOperation for themes.
func NewTopicShowOperation ¶ added in v0.142.0
func NewTopicShowOperation(topicStorage storage.TopicStorage) EntityShowOperation
NewTopicShowOperation creates an EntityShowOperation for topics.
func NewVisionShowOperation ¶ added in v0.30.0
func NewVisionShowOperation(visionStorage storage.VisionStorage) EntityShowOperation
NewVisionShowOperation creates an EntityShowOperation for visions.
type EntityShowResult ¶ added in v0.48.4
type EntityShowResult struct {
Name string `json:"name"`
FilePath string `json:"file_path"`
Vault string `json:"vault"`
Fields map[string]string `json:"fields"`
FieldOrder []string `json:"field_order,omitempty"`
Content string `json:"content"`
}
EntityShowResult is the structured result from EntityShowOperation.
type Escalation ¶ added in v0.134.0
type Escalation struct {
// TaskIdentifier is the task's task_identifier frontmatter value.
TaskIdentifier string
// TaskName is the task's filename without the .md extension.
TaskName string
// PreviousAssignee is the assignee value the task held before the clear.
PreviousAssignee string
// Status is the task's status after the clear, as the normalizing Status()
// accessor reads it. Empty when the frontmatter carries no recognizable
// status — the peer renders the same empty string in that case.
Status string
// Phase is the task's phase after the clear, or the empty string when the
// frontmatter carries no phase. The peer renders an absent phase the same
// way, so this is deliberately not defaulted to anything.
Phase string
// VaultName is the vault's configured name — the lowercased slug the peer's
// VAULT_NAME carries — and is what the Obsidian link opens.
VaultName string
// TasksDir is the vault's configured tasks directory, joined with the task
// name to form the vault-relative path the link points at.
TasksDir string
}
Escalation describes one assignee-clear transition to announce.
type EscalationPublisher ¶ added in v0.134.0
type EscalationPublisher interface {
PublishEscalation(ctx context.Context, escalation Escalation)
}
EscalationPublisher announces an assignee-clear transition. It returns no error on purpose: the notification is a side effect, and a failed publish must never fail the write that triggered it.
func NewEscalationPublisher ¶ added in v0.134.0
func NewEscalationPublisher( brokers, topicPrefix string, factory NotificationSenderFactory, ) EscalationPublisher
NewEscalationPublisher creates the publisher the frontmatter write paths use. brokers is the operator's comma-separated broker list and topicPrefix the deployment's topic prefix; an empty brokers value yields a publisher that publishes nothing and opens no connection.
type FrontmatterClearOperation ¶ added in v0.9.0
type FrontmatterClearOperation interface {
Execute(ctx context.Context, vaultPath, taskName, key string) error
}
func NewFrontmatterClearOperation ¶ added in v0.9.0
func NewFrontmatterClearOperation( taskStorage storage.TaskStorage, publisher EscalationPublisher, vaultName, tasksDir string, ) FrontmatterClearOperation
NewFrontmatterClearOperation creates a new frontmatter clear operation.
type FrontmatterEntity ¶ added in v0.55.0
type FrontmatterEntity interface {
GetField(key string) string
SetField(ctx context.Context, key, value string) error
ClearField(key string)
Keys() []string
}
FrontmatterEntity is implemented by all refactored entity types (Goal, Theme, Objective, Vision, Task).
type FrontmatterGetOperation ¶ added in v0.9.0
type FrontmatterGetOperation interface {
Execute(ctx context.Context, vaultPath, taskName, key string) (string, error)
}
func NewFrontmatterGetOperation ¶ added in v0.9.0
func NewFrontmatterGetOperation(taskStorage storage.TaskStorage) FrontmatterGetOperation
NewFrontmatterGetOperation creates a new frontmatter get operation.
type FrontmatterSetOperation ¶ added in v0.9.0
type FrontmatterSetOperation interface {
// Execute sets one frontmatter field on a task.
//
// actor names who is performing the write. It is consulted only for the
// "flag" key, where it is recorded as flag_set_by in the same write that sets
// the flag; every other key ignores it. A truthy flag write with a blank
// actor is refused with nothing written, because a present-but-blank
// flag_set_by is worse than no record at all.
Execute(ctx context.Context, vaultPath, taskName, key, value, reason, gateSuccessor, actor string, force bool) error
}
func NewFrontmatterSetOperation ¶ added in v0.9.0
func NewFrontmatterSetOperation( taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, publisher EscalationPublisher, vaultName, tasksDir string, ) FrontmatterSetOperation
NewFrontmatterSetOperation creates a new frontmatter set operation.
type GoalCompleteOperation ¶ added in v0.36.0
type GoalCompleteOperation interface {
Execute(
ctx context.Context,
vaultPath string,
goalName string,
vaultName string,
force bool,
reason string,
gateSuccessor string,
) (MutationResult, error)
}
func NewGoalCompleteOperation ¶ added in v0.36.0
func NewGoalCompleteOperation( goalStorage storage.GoalStorage, taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, ) GoalCompleteOperation
NewGoalCompleteOperation creates a new goal complete operation.
type GoalDeferOperation ¶ added in v0.50.0
type GoalDeferOperation interface {
Execute(
ctx context.Context,
vaultPath string,
goalName string,
dateStr string,
vaultName string,
) (MutationResult, error)
}
func NewGoalDeferOperation ¶ added in v0.50.0
func NewGoalDeferOperation( goalStorage storage.GoalStorage, currentDateTime libtime.CurrentDateTime, ) GoalDeferOperation
NewGoalDeferOperation creates a new goal defer operation.
type GoalWorkOnOperation ¶ added in v0.99.0
type GoalWorkOnOperation interface {
Execute(
ctx context.Context,
vaultPath string,
goalName string,
assignee string,
vaultName string,
isInteractive bool,
sessionDir string,
vault *config.Vault,
) (MutationResult, error)
}
func NewGoalWorkOnOperation ¶ added in v0.99.0
func NewGoalWorkOnOperation( goalStorage storage.GoalStorage, uuidGenerator func() string, starter ClaudeSessionStarter, resumer ClaudeResumer, ) GoalWorkOnOperation
NewGoalWorkOnOperation creates a new goal work-on operation.
type InteractionCounter ¶ added in v0.116.0
type InteractionCounter interface {
// Count returns the total number of type:"user" entries across the session JSONL
// logs for the given session ids. Missing, unreadable, malformed, or unsafe session
// ids contribute 0. It never returns an error and never blocks completion.
Count(ctx context.Context, sessionIDs []string) int
}
InteractionCounter counts user interactions from a task's recorded Claude session logs.
func NewInteractionCounter ¶ added in v0.116.0
func NewInteractionCounter(projectsDir string, sessionDir string) InteractionCounter
NewInteractionCounter creates an InteractionCounter that reads session logs under projectsDir/<encoded sessionDir>/. projectsDir is the Claude Code projects base (typically <home>/.claude/projects); sessionDir is the cwd the sessions were started in (the vault path or its session_project_dir override).
type IssueType ¶
type IssueType string
IssueType represents the type of lint issue found.
const ( IssueTypeMissingFrontmatter IssueType = "MISSING_FRONTMATTER" IssueTypeInvalidPriority IssueType = "INVALID_PRIORITY" IssueTypeDuplicateKey IssueType = "DUPLICATE_KEY" IssueTypeInvalidStatus IssueType = "INVALID_STATUS" IssueTypeOrphanGoal IssueType = "ORPHAN_GOAL" IssueTypeStatusCheckboxMismatch IssueType = "STATUS_CHECKBOX_MISMATCH" IssueTypeStatusPhaseMismatch IssueType = "STATUS_PHASE_MISMATCH" IssueTypeMissingTaskIdentifier IssueType = "MISSING_TASK_IDENTIFIER" IssueTypeStatusDateMismatch IssueType = "STATUS_DATE_MISMATCH" IssueTypeInvalidTaskIdentifier IssueType = "INVALID_TASK_IDENTIFIER" IssueTypeBlockedByScalar IssueType = "BLOCKED_BY_SCALAR" )
type LauncherFactory ¶ added in v0.167.0
type LauncherFactory func(script string) (ClaudeSessionStarter, ClaudeResumer)
LauncherFactory builds the starter/resumer pair for a resolved launcher script. It is the injection seam that lets a task open on a different launcher than the vault's configured claude_script without the operation knowing how a launcher is constructed. A nil member means the resolved script could not be found.
type LintIssue ¶
type LintIssue struct {
FilePath string
IssueType IssueType
Description string
Fixable bool
Fixed bool
}
LintIssue represents a single lint issue found in a file.
type LintIssueJSON ¶ added in v0.8.0
type LintIssueJSON struct {
File string `json:"file"`
Type string `json:"type"`
Description string `json:"description"`
Fixed bool `json:"fixed,omitempty"`
}
LintIssueJSON represents a lint issue in JSON format.
type LintOperation ¶
type LintOperation interface {
Execute(
ctx context.Context,
pageType string,
vaultPath string,
tasksDir string,
goalsDir string,
fix bool,
) ([]LintIssue, error)
ExecuteFile(
ctx context.Context,
pageType string,
filePath string,
taskName string,
vaultName string,
) ([]LintIssue, error)
}
func NewLintOperation ¶
func NewLintOperation() LintOperation
NewLintOperation creates a new lint operation.
type ListOperation ¶
type ListOperation interface {
Execute(
ctx context.Context,
vaultPath string,
vaultName string,
pagesDir string,
statusFilters []string,
showAll bool,
assigneeFilter string,
goalFilter string,
) ([]TaskListItem, error)
}
func NewListOperation ¶
func NewListOperation( pageStorage storage.PageStorage, ) ListOperation
NewListOperation creates a new list operation.
type MutationResult ¶ added in v0.8.0
type MutationResult struct {
Success bool `json:"success"`
Name string `json:"name,omitempty"`
Vault string `json:"vault,omitempty"`
Error string `json:"error,omitempty"`
Warnings []string `json:"warnings,omitempty"`
SessionID string `json:"session_id,omitempty"`
Message string `json:"message,omitempty"`
// Subtask blocking fields (used when a task cannot be completed due to incomplete subtasks)
Reason string `json:"reason,omitempty"`
Pending int `json:"pending,omitempty"`
InProgress int `json:"inprogress,omitempty"`
Completed int `json:"completed,omitempty"`
Total int `json:"total,omitempty"`
}
MutationResult represents the result of a mutation operation.
type NotificationPublishCommandSender ¶ added in v0.134.0
type NotificationPublishCommandSender interface {
SendPublishNotificationCommand(ctx context.Context, command notifcmd.NotificationPublishCommand) error
}
NotificationPublishCommandSender is the subset of the shared notification core's command sender this repository uses. It mirrors the interface github.com/bborbe/notification/command/notification declares, so this layer depends on an interface it owns rather than on the client type directly.
type NotificationSenderFactory ¶ added in v0.134.0
type NotificationSenderFactory interface {
Create(ctx context.Context, brokers, topicPrefix string) (NotificationPublishCommandSender, error)
}
NotificationSenderFactory builds the command sender for a broker configuration. Calling Create is what opens the broker connection, so a test that counts Create calls observes connection attempts directly.
func NewKafkaNotificationSenderFactory ¶ added in v0.134.0
func NewKafkaNotificationSenderFactory() NotificationSenderFactory
NewKafkaNotificationSenderFactory returns the production factory. It mirrors the working peer bborbe/agent-task-controller: a sync producer from github.com/bborbe/kafka, the shared core's publish sender on top of it, and the deployment's topic prefix, which the consumer derives from its branch.
type ObjectiveCompleteOperation ¶ added in v0.36.0
type ObjectiveCompleteOperation interface {
Execute(
ctx context.Context,
vaultPath string,
objectiveName string,
vaultName string,
) (MutationResult, error)
}
func NewObjectiveCompleteOperation ¶ added in v0.36.0
func NewObjectiveCompleteOperation( objectiveStorage storage.ObjectiveStorage, currentDateTime libtime.CurrentDateTime, ) ObjectiveCompleteOperation
NewObjectiveCompleteOperation creates a new objective complete operation.
type RemoveMetricsSessionOperation ¶ added in v0.150.0
type RemoveMetricsSessionOperation interface {
Execute(ctx context.Context, vaultPath, taskName, sessionID string) error
}
RemoveMetricsSessionOperation removes every metrics entry carrying one session id from a task.
func NewRemoveMetricsSessionOperation ¶ added in v0.150.0
func NewRemoveMetricsSessionOperation( taskStorage storage.TaskStorage, ) RemoveMetricsSessionOperation
NewRemoveMetricsSessionOperation creates a new remove-metrics-session operation.
type ResolveOperation ¶ added in v0.95.0
type ResolveOperation interface {
Execute(ctx context.Context, vaultPath string, name string) (domain.ResolveResult, error)
}
ResolveOperation resolves a name to a task or goal for a single vault.
func NewResolveOperation ¶ added in v0.95.0
func NewResolveOperation( taskStorage storage.TaskStorage, goalStorage storage.GoalStorage, ) ResolveOperation
NewResolveOperation creates a new resolve operation.
type RollupBaseline ¶ added in v0.149.0
type RollupBaseline struct {
Captured string `json:"captured"`
HumanTotal int `json:"human_total"`
Median int `json:"median"`
Weeks map[string]int `json:"weeks"`
AgentCoverage string `json:"agent_coverage"`
Deltas RollupBaselineDeltas `json:"deltas"`
}
RollupBaseline is a vault's stored baseline: the five figures the file records, echoed verbatim, plus the delta from each computed figure to its analogue here. It is nil on a RollupWeeklyResult whose vault has no baseline configured.
type RollupBaselineDelta ¶ added in v0.149.0
type RollupBaselineDelta struct {
Computed float64 `json:"computed"`
Baseline float64 `json:"baseline"`
Delta float64 `json:"delta"`
Mismatch bool `json:"mismatch,omitempty"`
}
RollupBaselineDelta is one computed-versus-stored movement. Computed is the rollup's own figure parsed from its rendered string, Baseline the stored analogue, Delta their difference, and Mismatch marks a row whose two figures measure different things — the JSON form of the plain report's frozen `[definitional mismatch]` marker.
type RollupBaselineDeltas ¶ added in v0.149.0
type RollupBaselineDeltas struct {
HumanInteractions *RollupBaselineDelta `json:"human_interactions,omitempty"`
PerFamilyMedian *RollupBaselineDelta `json:"per_family_median,omitempty"`
}
RollupBaselineDeltas holds one row per computed figure that has a baseline analogue. A figure with no analogue — the unattended-delivery count, the stored total, the stored agent coverage — has no field here, and a figure whose row is omitted (the requested week is absent from Weeks, or the computed figure is not a number) leaves its pointer nil.
type RollupFamily ¶ added in v0.147.0
RollupFamily is one task family's median within the week's task set.
type RollupWeeklyOperation ¶ added in v0.147.0
type RollupWeeklyOperation interface {
// Execute computes the rollup for one ISO week of one vault. week is the raw
// --week token (YYYY-Wnn); an empty token means the last complete ISO week,
// taken from the injected clock. vaultName is carried for error messages only.
Execute(
ctx context.Context,
vaultPath string,
vaultName string,
week string,
) (RollupWeeklyResult, error)
}
RollupWeeklyOperation computes the weekly unattended-delivery rollup for one vault.
func NewRollupWeeklyOperation ¶ added in v0.147.0
func NewRollupWeeklyOperation( taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, ) RollupWeeklyOperation
NewRollupWeeklyOperation creates a new weekly rollup operation.
func NewRollupWeeklyOperationWithBaseline ¶ added in v0.149.0
func NewRollupWeeklyOperationWithBaseline( taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, baselinePath string, ) RollupWeeklyOperation
NewRollupWeeklyOperationWithBaseline creates a weekly rollup operation that also reads the baseline file at baselinePath. baselinePath is vault-relative and is resolved against the vault path passed to Execute; an empty baselinePath means no baseline, and the result then carries no Baseline and no delta rows, exactly as before this feature existed.
type RollupWeeklyResult ¶ added in v0.147.0
type RollupWeeklyResult struct {
Year int `json:"year"`
Week int `json:"week"`
WeekStart string `json:"week_start"`
WeekEnd string `json:"week_end"`
HumanInteractions string `json:"human_interactions"`
UnattendedDeliveries string `json:"unattended_deliveries"`
PerFamilyMedian string `json:"per_family_median"`
Families []RollupFamily `json:"families"`
Baseline *RollupBaseline `json:"baseline,omitempty"`
}
RollupWeeklyResult is the computed weekly rollup for one vault.
type SearchOperation ¶
type SearchOperation interface {
Execute(
ctx context.Context,
vaultPath string,
scopeDir string,
query string,
topK int,
) ([]string, error)
}
func NewSearchOperation ¶
func NewSearchOperation() SearchOperation
NewSearchOperation creates a new search operation.
type SessionLock ¶ added in v0.118.1
type SessionLock interface {
// Release releases the lock by closing the fd. Idempotent; the kernel also
// releases it on process death, so Release is never strictly required.
Release() error
// File returns the underlying open file. FD_CLOEXEC is cleared on it so the
// fd survives syscall.Exec on the interactive resume path (the resumed
// claude holds the lock until it exits). Exposed for that exec-survival proof.
File() *os.File
}
SessionLock is a held per-session lock.
type SessionLocker ¶ added in v0.118.1
type SessionLocker interface {
// Acquire takes the exclusive, non-blocking per-session lock for sessionID,
// creating the lock directory on demand. On contention it fails immediately
// and returns ErrSessionBusy (errors.Is true) wrapped with a message naming
// the session id. The lock is held until Release or process death.
Acquire(ctx context.Context, sessionID string) (SessionLock, error)
}
SessionLocker acquires per-session locks.
func NewSessionLocker ¶ added in v0.118.1
func NewSessionLocker() SessionLocker
NewSessionLocker returns a SessionLocker using the default lock directory under the user's home.
func NewSessionLockerWithDir ¶ added in v0.118.1
func NewSessionLockerWithDir(dir string) SessionLocker
NewSessionLockerWithDir returns a SessionLocker using the given lock directory. Tests inject a temp dir.
type ShowOperation ¶ added in v0.19.0
type ShowOperation interface {
Execute(
ctx context.Context,
vaultPath string,
vaultName string,
taskName string,
) (TaskDetail, error)
}
ShowOperation returns full detail for a single task.
func NewShowOperation ¶ added in v0.19.0
func NewShowOperation(taskStorage storage.TaskStorage) ShowOperation
NewShowOperation creates a new show operation.
type TaskAnswerOperation ¶ added in v0.163.0
type TaskAnswerOperation interface {
// Execute records the operator's answers into the named task's `Open
// Questions` section, one answer per named item, and writes the task back in
// a single write.
//
// Each answer names an item by its 1-based index and is rendered as
// `<original marker and indentation><question text> → **<answer>**`, so the
// file's own list style is preserved and each question keeps its answer on
// the same line. Answering the same item again replaces the previous answer
// rather than adding a second one, so the command is safe to re-run.
//
// Every other line — the frontmatter, the heading, the other sections, and
// the items the caller did not answer — is left byte-identical. An index that
// names no item in the section, and any answer for a task that has no such
// section, is refused with nothing written; the error names the offending
// index and the task.
Execute(
ctx context.Context,
vaultPath string,
taskName string,
vaultName string,
answers []domain.OpenAnswer,
) (MutationResult, error)
}
func NewTaskAnswerOperation ¶ added in v0.163.0
func NewTaskAnswerOperation(taskStorage storage.TaskStorage) TaskAnswerOperation
NewTaskAnswerOperation creates a new task answer operation.
type TaskApproveOperation ¶ added in v0.153.0
type TaskApproveOperation interface {
// Execute approves the named task: it moves a task waiting in the approval
// inbox (phase todo) to phase planning and records, in the same write, who
// approved it, the instant of the transition, and the task's owner. Any task
// that is not waiting in the inbox, and any task that already carries an
// approval record, is refused with nothing written.
//
// The owner is resolved once, at approval time, by precedence: assignee when
// non-empty, else the task's existing assignee, else currentUser. An empty
// assignee means the --assignee flag was not given (a blank flag value is
// never a request for an unowned task); an empty currentUser means no current
// user could be resolved. When none of the three names an owner the approval
// is refused and nothing is written, so a task can never enter planning
// ownerless. An existing assignee that neither the flag nor currentUser
// matches is preserved untouched and silently.
Execute(
ctx context.Context,
vaultPath string,
taskName string,
vaultName string,
approvedBy string,
assignee string,
currentUser string,
) (MutationResult, error)
}
func NewTaskApproveOperation ¶ added in v0.153.0
func NewTaskApproveOperation( taskStorage storage.TaskStorage, currentDateTime libtime.CurrentDateTime, ) TaskApproveOperation
NewTaskApproveOperation creates a new task approve operation.
type TaskDetail ¶ added in v0.19.0
type TaskDetail struct {
Name string `json:"name"`
Status string `json:"status"`
Phase string `json:"phase,omitempty"`
Assignee string `json:"assignee,omitempty"`
Priority int `json:"priority,omitempty"`
Category string `json:"category,omitempty"`
Recurring string `json:"recurring,omitempty"`
DeferDate string `json:"defer_date,omitempty"`
PlannedDate string `json:"planned_date,omitempty"`
DueDate string `json:"due_date,omitempty"`
ClaudeSessionID string `json:"claude_session_id,omitempty"`
Goals []string `json:"goals,omitempty"`
Description string `json:"description,omitempty"`
Content string `json:"content"`
ModifiedDate string `json:"modified_date,omitempty"`
CompletedDate string `json:"completed_date,omitempty"`
FilePath string `json:"file_path"`
Vault string `json:"vault"`
Flag bool `json:"flag,omitempty"`
FlagSetBy string `json:"flag_set_by,omitempty"`
FlagSetAt string `json:"flag_set_at,omitempty"`
// OpenQuestions lists the task's Open Questions section items in section
// order. It is always non-nil so `--output json` emits `[]`, not `null`, for
// a task with no such section.
OpenQuestions []domain.OpenQuestion `json:"open_questions"`
}
TaskDetail contains full task information for JSON output.
type TaskListItem ¶ added in v0.8.0
type TaskListItem struct {
Name string `json:"name"`
Status string `json:"status"`
Assignee string `json:"assignee,omitempty"`
Priority int `json:"priority,omitempty"`
Vault string `json:"vault"`
Category string `json:"category,omitempty"`
Recurring string `json:"recurring,omitempty"`
DeferDate string `json:"defer_date,omitempty"`
PlannedDate string `json:"planned_date,omitempty"`
DueDate string `json:"due_date,omitempty"`
ClaudeSessionID string `json:"claude_session_id,omitempty"`
Phase string `json:"phase,omitempty"`
ModifiedDate string `json:"modified_date,omitempty"`
CompletedDate string `json:"completed_date,omitempty"`
Goals []string `json:"goals,omitempty"`
Flag bool `json:"flag,omitempty"`
FlagSetBy string `json:"flag_set_by,omitempty"`
FlagSetAt string `json:"flag_set_at,omitempty"`
BlockedBy []string `json:"blocked_by,omitempty"`
Blocked *bool `json:"blocked,omitempty"`
}
TaskListItem represents a task in list output.
type TopicCompleteOperation ¶ added in v0.142.0
type TopicCompleteOperation interface {
Execute(
ctx context.Context,
vaultPath string,
topicName string,
vaultName string,
) (MutationResult, error)
}
func NewTopicCompleteOperation ¶ added in v0.142.0
func NewTopicCompleteOperation(topicStorage storage.TopicStorage) TopicCompleteOperation
NewTopicCompleteOperation creates a new topic complete operation.
type TopicDeferOperation ¶ added in v0.142.0
type TopicDeferOperation interface {
Execute(
ctx context.Context,
vaultPath string,
topicName string,
dateStr string,
vaultName string,
) (MutationResult, error)
}
func NewTopicDeferOperation ¶ added in v0.142.0
func NewTopicDeferOperation( topicStorage storage.TopicStorage, currentDateTime libtime.CurrentDateTime, ) TopicDeferOperation
NewTopicDeferOperation creates a new topic defer operation.
type TopicWorkOnOperation ¶ added in v0.142.0
type TopicWorkOnOperation interface {
Execute(
ctx context.Context,
vaultPath string,
topicName string,
assignee string,
vaultName string,
isInteractive bool,
sessionDir string,
vault *config.Vault,
) (MutationResult, error)
}
func NewTopicWorkOnOperation ¶ added in v0.142.0
func NewTopicWorkOnOperation( topicStorage storage.TopicStorage, uuidGenerator func() string, starter ClaudeSessionStarter, resumer ClaudeResumer, ) TopicWorkOnOperation
NewTopicWorkOnOperation creates a new topic work-on operation.
type UpdateOperation ¶
type UpdateOperation interface {
Execute(
ctx context.Context,
vaultPath string,
taskName string,
vaultName string,
) (MutationResult, error)
}
func NewUpdateOperation ¶
func NewUpdateOperation( taskStorage storage.TaskStorage, goalStorage storage.GoalStorage, ) UpdateOperation
NewUpdateOperation creates a new update operation.
type ValidateIssueJSON ¶ added in v0.48.6
type ValidateIssueJSON struct {
Type string `json:"type"`
IssueType string `json:"issue_type"`
Description string `json:"description"`
}
ValidateIssueJSON is the per-issue structure used in validate JSON output.
type ValidateResult ¶ added in v0.48.6
type ValidateResult struct {
Name string `json:"name"`
Vault string `json:"vault"`
Issues []ValidateIssueJSON `json:"issues"`
}
ValidateResult is the structured result from ExecuteFile used in CLI JSON output.
type VaultDispatcher ¶ added in v0.27.3
type VaultDispatcher interface {
FirstSuccess(
ctx context.Context,
vaults []*config.Vault,
fn func(vault *config.Vault) error,
) error
}
VaultDispatcher tries a callback against each vault until one succeeds.
func NewVaultDispatcher ¶ added in v0.27.3
func NewVaultDispatcher() VaultDispatcher
NewVaultDispatcher creates a new VaultDispatcher.
type WatchDir ¶ added in v0.62.0
WatchDir pairs a vault-relative directory name with the entity kind it contains.
type WatchEvent ¶ added in v0.20.0
type WatchEvent struct {
Event string `json:"event"`
Name string `json:"name"`
Vault string `json:"vault"`
Path string `json:"path"`
Type string `json:"type"`
}
WatchEvent is the JSON-encoded event emitted on stdout.
type WatchOperation ¶ added in v0.20.0
type WatchOperation interface {
Execute(ctx context.Context, vaults []WatchTarget, handler func(WatchEvent) error) error
}
WatchOperation watches vault directories and streams change events.
func NewWatchOperation ¶ added in v0.20.0
func NewWatchOperation() WatchOperation
NewWatchOperation creates a new WatchOperation.
type WatchTarget ¶ added in v0.20.0
WatchTarget describes a vault and the directories to watch within it.
type WorkOnOperation ¶ added in v0.6.0
type WorkOnOperation interface {
Execute(
ctx context.Context,
vaultPath string,
taskName string,
assignee string,
vaultName string,
isInteractive bool,
sessionDir string,
vault *config.Vault,
) (MutationResult, error)
}
func NewWorkOnOperation ¶ added in v0.6.0
func NewWorkOnOperation( taskStorage storage.TaskStorage, dailyNoteStorage storage.DailyNoteStorage, goalStorage storage.GoalStorage, currentDateTime libtime.CurrentDateTime, uuidGenerator func() string, starter ClaudeSessionStarter, resumer ClaudeResumer, launcherFactory LauncherFactory, ) WorkOnOperation
NewWorkOnOperation creates a new work-on operation.
starter/resumer are the vault-default pair (the vault's configured claude_script). launcherFactory builds the equivalent pair for a task that resolves to a different launcher; it is only consulted when the resolved launcher differs from the vault default.
Source Files
¶
- baseline.go
- blocked_by.go
- blocked_by_write.go
- claude_resume.go
- claude_session.go
- complete.go
- daily_note_entry.go
- decision_ack.go
- decision_list.go
- defer.go
- defer_date_parser.go
- ensure_task_identifiers.go
- errors.go
- escalation.go
- frontmatter.go
- frontmatter_entity.go
- goal_complete.go
- goal_defer.go
- goal_workon.go
- interaction_count.go
- launcher.go
- lint.go
- list.go
- metrics_session_append.go
- metrics_session_remove.go
- metrics_session_write.go
- objective_complete.go
- resolve.go
- rollup_weekly.go
- search.go
- session_lock.go
- show.go
- task_answer.go
- task_approve.go
- topic_complete.go
- topic_defer.go
- topic_workon.go
- update.go
- vault_dispatcher.go
- watch.go
- workon.go