MCPcopy Create free account

hub / github.com/Facets-cloud/flow / functions

Functions972 in github.com/Facets-cloud/flow

↓ 6 callersMethodSpawnBackground
SpawnBackground starts a fresh background session in workDir, running prompt, displayed as name. workDir is where the agent begins (and what its trans
internal/harness/harness.go:93
↓ 6 callersFunctionSpawnTab
SpawnTab opens a new kitty tab in the current OS window, sets its title and cwd, and types `command` into the new window's PTY. envVars are attached
internal/kitty/kitty.go:67
↓ 6 callersFunctionambientHarness
ambientHarness probes the current process env for each known harness's session-id env var. Returns the matching adapter if exactly one is set; returns
internal/app/harness.go:86
↓ 6 callersFunctionboolStr
boolStr renders booleans as "true"/"" so empty TSV cells stay visually quiet and don't clutter the grep'able stream.
internal/app/list.go:451
↓ 6 callersFunctionbuildOwnerTickPrompt
buildOwnerTickPrompt is the bootstrap prompt for one headless owner tick. The owner reads its charter, reviews what it owns, acts, and parks any human
internal/app/owner_tick.go:523
↓ 6 callersFunctionenumerateAuxFiles
enumerateAuxFiles returns absolute paths to top-level *.md files in dir, excluding brief.md. Subdirectories (notably updates/) are not descended. Retu
internal/app/aux.go:17
↓ 6 callersFunctiongenerateRunSlug
generateRunSlug computes the unique slug for a new playbook run. Cascade: 1. <pb>--YYYY-MM-DD-HH-MM (default; minute precision) 2. <pb>-
internal/app/run.go:213
↓ 6 callersFunctionhumanInt
humanInt formats n with thousands separators (e.g. 1041234 → "1,041,234"). Pure Go, no third-party deps.
internal/app/stats.go:162
↓ 6 callersFunctionopenConcurrentDB
openConcurrentDB opens flow.db with a generous busy_timeout so that two concurrent `flow do` processes (or two goroutines in the tests) will serialize
internal/app/do.go:66
↓ 6 callersFunctionrunJSON
runJSON is a thin wrapper that reports errors as exit code 1.
internal/app/list.go:908
↓ 6 callersFunctionstubAllRunners
stubAllRunners replaces every backend's Runner (plus warp's OpenURL/WriteScript and kitty's RunnerOutput) with no-op stubs that flip a per-backend boo
internal/spawner/spawner_test.go:490
↓ 6 callersFunctionwithVersion
withVersion temporarily overrides the package-level Version for the duration of a test.
internal/app/version_test.go:11
↓ 5 callersMethodAutoRunArgv
AutoRunArgv builds the argv for a headless, self-completing autonomous run (`flow do --auto`) pinned to sessionID. This is a third execution shape dis
internal/harness/harness.go:207
↓ 5 callersMethodBackgroundAgents
BackgroundAgents returns the current background-agent registry (claude: `claude agents --json --all`, so exited / failed / completed sessions are incl
internal/harness/harness.go:114
↓ 5 callersFunctionFocusSession
FocusSession tries to focus an existing tab/pane that is already running the named harness binary with the given session UUID. The `binary` arg is the
internal/spawner/spawner.go:140
↓ 5 callersMethodLaunchCmd
Launching -------------------------------------------------------- LaunchCmd builds the shell command to start a fresh session with the given session
internal/harness/harness.go:175
↓ 5 callersFunctionParseSince
ParseSince converts a --since value to a lower-bound time. "all"/"" → zero (no bound); "<N>d" → now minus N days; otherwise RFC3339.
internal/stats/report.go:224
↓ 5 callersFunctionShellQuote
ShellQuote wraps s in single quotes with proper escaping.
internal/ghostty/ghostty.go:80
↓ 5 callersFunctionShellQuote
ShellQuote wraps s in single quotes with proper escaping. Identical to iterm.ShellQuote / terminal.ShellQuote / zellij.ShellQuote.
internal/warp/warp.go:126
↓ 5 callersFunctionSpawnTab
SpawnTab opens a new Terminal.app tab with the given title, cwd, and command. envVars are attached as an inline prefix to `command` only — so they are
internal/terminal/terminal.go:61
↓ 5 callersFunctionSpawnTab
SpawnTab opens a new zellij tab in the current session, sets its name and cwd, and types `command` into the new pane's PTY. envVars are attached as a
internal/zellij/zellij.go:63
↓ 5 callersFunctionaddListFlags
addListFlags registers the common --format / --no-color / --no-truncate flags on fs. Slugs are never truncated — only the freeform waiting field has a
internal/app/list.go:31
↓ 5 callersFunctionappendStaleVersionHint
appendStaleVersionHint returns a short suffix to add to SessionStart hint payloads when the local flow binary is older than the latest GitHub release.
internal/app/hook.go:103
↓ 5 callersFunctionbgAgentStatus
bgAgentStatus returns the live background-agent entry for a task's bound session, or nil if the task isn't bg-bound, has no session, the harness can't
internal/app/harness.go:196
↓ 5 callersFunctioncaptureStderr
captureStderr redirects os.Stderr through an os.Pipe for the duration of the test and returns a closure that drains and returns whatever was written.
internal/app/do_test.go:277
↓ 5 callersFunctioncmdTranscript
cmdTranscript implements `flow transcript <task-slug>`. It delegates to the task's harness for both path resolution and on-disk format decoding — each
internal/app/transcript.go:15
↓ 5 callersFunctioncurrentSessionID
currentSessionID returns this process's harness session id, or "" if not running inside any known harness. Probes every implemented harness's session-
internal/app/helpers.go:21
↓ 5 callersFunctiondimHeaders
dimHeaders wraps each header label in dim ANSI when color is enabled so the header line reads as supporting text rather than a row of data.
internal/app/list.go:918
↓ 5 callersFunctionemptyResult
emptyResult prints the conventional "(no X)" line and returns 0. Honors the requested format: JSON emits "[]", TSV emits a header-only stream, table e
internal/app/list.go:116
↓ 5 callersFunctionfakeHTTPResponse
fakeHTTPResponse builds a *http.Response with the given JSON body.
internal/app/release_test.go:15
↓ 5 callersFunctionhookEventReferencesCommand
(hooks map[string]any, event, command string)
internal/app/skill_test.go:24
↓ 5 callersFunctionmaybeAutoUpgradeSkill
maybeAutoUpgradeSkill checks the recorded skill version against the running binary's version and, if they differ, refreshes the skill + SessionStart h
internal/app/skill.go:70
↓ 5 callersFunctionreconcileAutoRun
reconcileAutoRun promotes a stale 'running' row to 'dead' when its supervisor pid is no longer alive (crash, kill -9, reboot — anything that prevented
internal/app/auto.go:193
↓ 5 callersFunctionresolveWorkDir
resolveWorkDir canonicalizes path to an absolute path, verifies it exists (or mkdirs it if create=true). Returns the abs path.
internal/app/add.go:302
↓ 5 callersFunctionseedRunningAuto
seedRunningAuto creates an in-progress task already in auto 'running' state, as if a supervisor had just launched it.
internal/app/auto_test.go:184
↓ 5 callersFunctionstubAutoLauncher
stubAutoLauncher replaces autoLauncher with a recorder that returns a fixed pid and never spawns a real supervisor. Returns accessors for the captured
internal/app/auto_test.go:15
↓ 5 callersFunctionstubPS
(t *testing.T, out string, retErr error)
internal/terminal/terminal_test.go:271
↓ 5 callersFunctionstubPS
stubPS replaces claude.PSRunner with a canned-output stub so the live-session guard in cmdDo can be exercised without touching the real process table.
internal/app/do_test.go:23
↓ 5 callersFunctionwriteFakeEditor
writeFakeEditor writes an executable script into dir that appends the text "edited by test" to any file path passed as its first argument. Returns the
internal/app/edit_test.go:15
↓ 5 callersFunctionwriteFakeGitConfig
writeFakeGitConfig creates a .git/config under dir with the given origin URL. Returns the absolute dir path.
internal/app/workdir_test.go:13
↓ 4 callersFunctionBuildStats
BuildStats derives a Stats from flow.db + transcripts + on-disk dirs.
internal/stats/report.go:53
↓ 4 callersFunctionLoadConstants
LoadConstants reads ~/.flow/stats.json. A missing file yields defaults silently; a corrupt file yields defaults with a stderr notice. Any field ≤ 0 (i
internal/stats/model.go:29
↓ 4 callersMethodResumeCmd
ResumeCmd builds the shell command to continue an existing session by id. opts.Inject (if any) is appended as the first turn after resume.
internal/harness/harness.go:180
↓ 4 callersFunctionRetireOwner
RetireOwner permanently stops an owner: sets status='retired' and archives it. It no longer ticks (DueOwners requires active) and is hidden from the d
internal/flowdb/owners.go:184
↓ 4 callersMethodScanFile
ScanFile returns the rollup for a jsonl file, reusing the cached result when the file's mod time and size are unchanged.
internal/stats/cache.go:46
↓ 4 callersFunctionScanTask
(row interface{ Scan(dest ...any) error })
internal/flowdb/db.go:731
↓ 4 callersFunctionShellQuote
ShellQuote wraps s in single quotes with proper escaping.
internal/terminal/terminal.go:269
↓ 4 callersFunctionShellQuote
ShellQuote wraps s in single quotes with proper escaping.
internal/iterm/iterm.go:193
↓ 4 callersMethodSkillInstallPath
Skill / rules file ----------------------------------------------- SkillInstallPath returns where flow's skill markdown lives for this harness (e.g. ~
internal/harness/harness.go:242
↓ 4 callersFunctionTaskBySessionID
TaskBySessionID returns the task bound to the given Claude session UUID, or sql.ErrNoRows if none. The partial unique index on tasks(session_id) WHERE
internal/flowdb/db.go:757
↓ 4 callersMethodValidateSessionID
ValidateSessionID rejects strings that can't be a session id for this harness. Used by `flow do --here` to gate the env-var- supplied id before writin
internal/harness/harness.go:147
↓ 4 callersFunctionbuildOwnerTickPromptInteractive
buildOwnerTickPromptInteractive is the prompt for a hand-triggered tick run WITH the user present (often the first tick). Same orchestrate + journal d
internal/app/owner_tick.go:501
↓ 4 callersFunctionbuildPlaybookRunBootstrapPrompt
buildPlaybookRunBootstrapPrompt is the prompt for playbook-run tasks. Adds an explicit `flow show playbook <slug>` context-load step and frames the ru
internal/app/do.go:777
↓ 4 callersFunctioncmdAutoExec
cmdAutoExec is the hidden `flow __auto-exec <slug>` supervisor. It runs inside the detached process the launcher started: build the autonomous prompt,
internal/app/auto.go:219
↓ 4 callersFunctioncmdStats
cmdStats implements `flow stats` — usage & ROI analytics derived from flow.db, session transcripts, and on-disk auto-runs/owner/kb dirs.
internal/app/stats.go:17
↓ 4 callersFunctioncmdUnarchive
cmdUnarchive clears archived_at.
internal/app/archive.go:15
↓ 4 callersFunctioncontains
contains is a tiny strings.Contains shim so done_test.go doesn't need a strings import just for this.
internal/app/done_test.go:280
↓ 4 callersFunctiondetectGitRemote
detectGitRemote reads <path>/.git/config (if present) and extracts the origin remote URL. Returns "" on any error or if the section isn't present. Han
internal/app/workdir.go:432
↓ 4 callersFunctionharnessByName
harnessByName looks up an adapter by stored Name. - Empty/NULL name → returns (claude, nil). Back-compat for pre-harness-column DB rows where the col
internal/app/harness.go:49
↓ 4 callersFunctioninsertProject
(t *testing.T, db *sql.DB, slug, name, wd, priority string)
internal/flowdb/db_test.go:21
↓ 4 callersFunctionisValidPriority
(p string)
internal/app/add.go:353
↓ 4 callersFunctionopenFlowDBForWorkdir
openFlowDBForWorkdir opens the flow DB and returns (db, rc). On error, it prints and returns a non-nil error rc.
internal/app/workdir.go:41
↓ 4 callersFunctionopenTempDB
(t *testing.T)
internal/app/testhelpers_test.go:12
↓ 4 callersFunctionparseDueDate
parseDueDate converts a human-friendly date expression to a time.Time. Accepts: YYYY-MM-DD, today, tomorrow, weekday names (next occurrence), Nd (N da
internal/app/update.go:405
↓ 4 callersFunctionreadSettings
(t *testing.T, path string)
internal/app/skill_test.go:11
↓ 4 callersFunctionrenderCardHTML
renderCardHTML writes a self-contained HTML card for the stats.
internal/app/card.go:66
↓ 4 callersFunctionrenderReport
renderReport prints the terminal analytics report.
internal/app/stats.go:111
↓ 4 callersFunctionrenderToString
renderToString is a tiny test helper around RenderJSONL.
internal/harness/claude/transcript_test.go:28
↓ 4 callersFunctionresolveTranscriptPath
resolveTranscriptPath locates a session's jsonl under ~/.claude/projects. It first tries the deterministic cwd-encoded path (~/.claude/projects/<Encod
internal/harness/claude/transcript.go:50
↓ 4 callersFunctionsparkline
sparkline renders ints as a unicode bar string (one rune per value).
internal/app/stats.go:206
↓ 4 callersFunctionstubAllFocusBackends
stubAllFocusBackends replaces the per-backend PSRunner / RunnerOutput vars with stubs that flip a bool when the backend's FocusSession path runs. Rest
internal/spawner/spawner_test.go:415
↓ 4 callersFunctionstubRunnerOutput
(t *testing.T, fn func([]string) ([]byte, error))
internal/terminal/terminal_test.go:278
↓ 4 callersFunctiontruncate
(s string, max int)
internal/harness/claude/transcript.go:324
↓ 4 callersFunctionuniqueSlug
uniqueSlug returns base if no row with that slug exists in table; otherwise appends -2, -3, ... until it finds an unused one.
internal/app/add.go:331
↓ 3 callersMethodBinary
Binary returns the executable name (e.g. "claude", "codex"). Exposed so flow's process-table scan can filter to lines that mention the right binary.
internal/harness/harness.go:127
↓ 3 callersFunctionDeleteOwner
DeleteOwner removes the owner row entirely. The caller is responsible for removing the on-disk owners/<slug>/ directory. Errors if no such owner. Owne
internal/flowdb/owners.go:206
↓ 3 callersMethodInstallSessionStartHook
Hooks ------------------------------------------------------------ InstallSessionStartHook idempotently registers `command` as a SessionStart hook (ma
internal/harness/harness.go:262
↓ 3 callersMethodInstallSkill
InstallSkill writes content to SkillInstallPath, creating parent dirs as needed. Idempotent — callers gate "already installed" themselves.
internal/harness/harness.go:252
↓ 3 callersFunctionListProjects
(db *sql.DB, filter ProjectFilter)
internal/flowdb/db.go:696
↓ 3 callersFunctionNullIfEmpty
NullIfEmpty returns a *string pointing to s, or nil if s is empty.
internal/flowdb/db.go:218
↓ 3 callersFunctionScanOwner
(row interface{ Scan(dest ...any) error })
internal/flowdb/owners.go:47
↓ 3 callersMethodSet
(v string)
internal/app/update.go:328
↓ 3 callersFunctionShellQuote
ShellQuote wraps s in single quotes with proper escaping. Same implementation as iterm.ShellQuote and terminal.ShellQuote.
internal/zellij/zellij.go:172
↓ 3 callersFunctionShellQuote
ShellQuote is re-exported so callers don't need to import the chosen backend just to quote a value before handing it to SpawnTab. All backends quote i
internal/spawner/spawner.go:157
↓ 3 callersMethodSkillInstallPath
---------- skill install ---------- SkillInstallPath returns ~/.claude/skills/flow/SKILL.md.
internal/harness/claude/claude.go:273
↓ 3 callersFunctionSpawnTab
SpawnTab opens a new Ghostty tab with the given title, cwd, and command. envVars are attached as an inline prefix to `command` only — so they are pres
internal/ghostty/ghostty.go:44
↓ 3 callersFunctionaffectedOwnerRow
affectedOwnerRow checks an UPDATE result for the "exactly one owner matched" contract shared by the targeted owner-mutation helpers below.
internal/flowdb/owners.go:131
↓ 3 callersFunctionapplyMotionPreference
(reduce)
site/script.js:21
↓ 3 callersFunctionautoChildEnv
autoChildEnv builds the environment for the detached supervisor. It inherits the parent's environment (so PATH finds claude and FLOW_ROOT points at th
internal/app/auto.go:130
↓ 3 callersFunctionbackgroundLauncherFor
backgroundLauncherFor returns the harness's BackgroundLauncher capability, or a clean error if the harness can't host background sessions. This is the
internal/app/do.go:538
↓ 3 callersFunctionbuildBootstrapPromptForKind
buildBootstrapPromptForKind dispatches to the right prompt variant based on task kind. For kind='playbook_run' the playbook variant is used; otherwise
internal/app/do.go:743
↓ 3 callersFunctionbuildBootstrapPromptForKindV2
buildBootstrapPromptForKindV2 is the kind-aware dispatcher with first- run awareness for playbook runs. When isFirstRun=true on a playbook run, a rich
internal/app/do.go:752
↓ 3 callersFunctioncmdHookSessionStart
cmdHookSessionStart emits a Claude Code SessionStart hook response. Wired via ~/.claude/settings.json with a matcher of "startup|resume" so it fires f
internal/app/hook.go:54
↓ 3 callersFunctioncmdHookUserPromptSubmit
cmdHookUserPromptSubmit implements `flow hook user-prompt-submit`, wired as a Claude Code UserPromptSubmit hook that fires on every user prompt but do
internal/app/hook.go:236
↓ 3 callersFunctioncurrentSessionTask
currentSessionTask returns the task bound to this Claude session via tasks.session_id. Returns sql.ErrNoRows if the current session is unbound (dispat
internal/app/helpers.go:33
↓ 3 callersFunctionescapeAppleScriptString
(s string)
internal/terminal/terminal.go:273
↓ 3 callersFunctionfinalizeAutoRun
finalizeAutoRun records a terminal auto-run status ('completed' or 'dead') and clears the supervisor pid. Best-effort: errors are returned for the cal
internal/app/auto.go:179
↓ 3 callersFunctionfindTask
findTask resolves a user-supplied ref to exactly one non-archived task. Exact alias match first, then exact slug match.
internal/app/do.go:841
↓ 3 callersFunctionharnessForSpawn
harnessForSpawn returns the harness to use when bootstrapping a new session for a task: 1. If the task already has a harness set, look it up by name
internal/app/harness.go:114
↓ 3 callersFunctioninsertRunTaskForSlug
(t *testing.T, db *sql.DB, slug, pbSlug, wd string)
internal/app/run_test.go:81
← previousnext →101–200 of 972, ranked by callers