Artifacts: runner-internal turn files move to a Debugging files group
Each recorded artifact now carries a server group (deliverable or debug). public/ files are deliverables; input/memory/history/output.md, session exports and private/ scratch are debugging files. The app's Artifacts tab lists deliverables and the Debug toggle reveals a separate Debugging files group (older servers fall back to the filename rule); the TUI lists deliverables first and marks debug rows; artifact search excludes debug files unless include_debug / --debug-files is set.
This commit is contained in:
+3
-1
@@ -50,6 +50,7 @@ type options struct {
|
||||
keep int
|
||||
keepSet bool
|
||||
all bool
|
||||
debugFiles bool
|
||||
json, source, noOpen, yes, allow, createOnly, force, wait bool
|
||||
version, expected, limit, retryVisit int
|
||||
timeout, waitTimeout time.Duration
|
||||
@@ -166,6 +167,7 @@ func (a App) flags(command string) (*flag.FlagSet, *options) {
|
||||
case "search":
|
||||
f.StringVar(&o.kind, "type", "", "Narrow to one kind: "+strings.Join(protocol.SearchKinds, ", "))
|
||||
f.IntVar(&o.limit, "limit", 0, "Maximum results (default 50, max 200)")
|
||||
f.BoolVar(&o.debugFiles, "debug-files", false, "Also match runner-internal debugging artifacts (turn files, private/ scratch)")
|
||||
case "retry":
|
||||
f.BoolVar(&o.yes, "yes", false, "Confirm retry without an interactive prompt")
|
||||
f.StringVar(&o.key, "request-key", "", "Idempotency key (default: generated unique key)")
|
||||
@@ -853,7 +855,7 @@ func (a App) Run(ctx context.Context, args []string) error {
|
||||
if strings.TrimSpace(query) == "" {
|
||||
return fmt.Errorf("search requires a query; use pipelines help search")
|
||||
}
|
||||
r, err := call(protocol.Message{Type: protocol.Search, Search: &protocol.SearchRequest{Query: query, Kind: o.kind, Limit: o.limit}})
|
||||
r, err := call(protocol.Message{Type: protocol.Search, Search: &protocol.SearchRequest{Query: query, Kind: o.kind, Limit: o.limit, IncludeDebug: o.debugFiles}})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ var usage = map[string]string{
|
||||
"validate": "validate <draft.md> [--json]",
|
||||
"submit": "submit <draft.md> [--name NAME] [--create-only] [--yes] [--json]",
|
||||
"list": "list [--json]",
|
||||
"search": "search QUERY [--type KIND] [--limit N] [--json]",
|
||||
"search": "search QUERY [--type KIND] [--limit N] [--debug-files] [--json]",
|
||||
"show": "show <name|id> [--version N] [--json]",
|
||||
"versions": "versions <name|id> [--json]",
|
||||
"export": "export [name|id ...] [--output FILE.zip] [--all] [--version N]",
|
||||
@@ -60,7 +60,7 @@ var notes = map[string]string{
|
||||
"rpc": "Accepts a JSON protocol envelope; '-' reads stdin. Every TUI server operation is available here too. Mutating commands are not dry runs. The omni-search command is `search` (fields query, optional kind and limit) and answers with ranked `search_results`.",
|
||||
"chat-adopt": "Adopt a session that already exists on a chat harness (an OpenCode session, or a Claude Code or Codex session by its id) so it appears in chat_sessions and can be continued from any client. Without --harness each available harness is asked in turn. The directory and title come from the harness's own record (never guessed; --title names a chat whose harness records none), and a missing id records nothing. Do not keep using the session elsewhere once it is continued here.",
|
||||
"retention": "Local, explicit run-history retention; never automatic and never a side effect of another command. `report` is strictly read-only and prints what a policy would remove; `apply` removes it after approval (--yes for scripted use). Policy: --older-than DURATION selects runs created before now minus that rolling UTC duration (Go durations plus d/w; not a calendar boundary), --keep N keeps the newest N runs by run id and selects older ranks (--keep 0 keeps none). Both together are the conservative intersection; at least one is required. Protected and never removed: queued/running runs, runs waiting on a person (waiting run or step), runs with an active cleanup agent, and any run referenced by a retained run's retry provenance (transitively). A run that becomes protected before deletion aborts the whole apply. Artifacts at <root>/<run> are removed with their run and kept with protected/retained runs; the database is VACUUMed and its WAL checkpointed, with measured reclaimed bytes. Definitions and versions are immutable and never touched. --db must name an existing database (default: the standard data directory); --artifacts defaults to artifacts/ beside --db. Works without a running server.",
|
||||
"search": "One read-only query over pipelines, versions, runs, steps, field text and artifacts. QUERY is free text, a bare status word (queued, running, succeeded, failed, canceled, interrupted) selecting those runs, or a lone date expression (today, yesterday, this week [Monday 00:00 local], or YYYY-MM-DD) selecting the runs created in that window. --type is the only narrowing mechanism and takes one kind: pipeline, version, run, step, field or artifact; an unknown kind is an error. Ranking: an exact name match (3) beats a name substring (2) beats a body-text match (1); equal tiers break by recency, then a stable kind/target tie-break, and every hit reports score, matched_field and recency so a client can re-rank. Bounds: the result cap defaults to 50 and clamps to 200 (0 = default); every kind scans at most 2000 rows and field-text scanning is additionally capped at 2000 steps / 1 MiB; Truncated plus scanned_steps, scanned_bytes and scan_bound_bytes report when a bound applied. Targets are stable: pipeline:<id>, pipeline:<id>:v<version>, run:<id>, run:<id>:<sequence>, run:<id>:<sequence>:<field>, or an artifact URL.",
|
||||
"search": "One read-only query over pipelines, versions, runs, steps, field text and artifacts. QUERY is free text, a bare status word (queued, running, succeeded, failed, canceled, interrupted) selecting those runs, or a lone date expression (today, yesterday, this week [Monday 00:00 local], or YYYY-MM-DD) selecting the runs created in that window. --type is the only narrowing mechanism and takes one kind: pipeline, version, run, step, field or artifact; an unknown kind is an error. Ranking: an exact name match (3) beats a name substring (2) beats a body-text match (1); equal tiers break by recency, then a stable kind/target tie-break, and every hit reports score, matched_field and recency so a client can re-rank. Bounds: the result cap defaults to 50 and clamps to 200 (0 = default); every kind scans at most 2000 rows and field-text scanning is additionally capped at 2000 steps / 1 MiB; Truncated plus scanned_steps, scanned_bytes and scan_bound_bytes report when a bound applied. Targets are stable: pipeline:<id>, pipeline:<id>:v<version>, run:<id>, run:<id>:<sequence>, run:<id>:<sequence>:<field>, or an artifact URL. Artifact hits are deliverables only; runner-internal debugging files (input.md, memory.md, history.md, output.md, session.html, private/ scratch) are matched only with --debug-files.",
|
||||
}
|
||||
|
||||
var serviceHelp = map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user