Programs source categories

The Programs explorer follows the installed Python source hierarchy. Regular Functions are physically grouped by purpose under openprogram/programs/tools/; the UI reads that hierarchy instead of rebuilding unrelated folders from runtime tool metadata.

Source-backed, callable-first

web/browser/ remains a multi-file source package, but it registers one callable named playwright_browser. The explorer therefore shows one callable row instead of a redundant browser → playwright_browser pair. A source package becomes an expandable row only when it exports several callables.

source-backed directories registry-backed callables read-only existing row style existing card style

Verified current implementation and gap

Current boundaryVerified behaviorGap
toolsPurpose directories under openprogram/programs/tools/ hold deterministic @function packages.None — public callable names stay unchanged.
GET /api/toolsReturns runtime callables, including MCP-backed tools and display groups.It remains a runtime/configuration endpoint and no longer defines Programs folders.
GET /api/programs/explorerLists tools/, workflow/, and packages/ as callable-first rows.None — leaf Workflow packages are not expandable.

Classification contract

Sidebar rowCanonical evidenceItems shownMutation
toolsPhysical directories beneath the installed packagefiles, web, knowledge, planning, agents, jobs, code, interaction, and runtime.Read-only catalog
tools/<purpose>/<module-or-package>Physical Python source plus registration metadataA singleton source is one callable row. A source that registers several callables is one expandable group containing those callable rows.Favorite and Use operate on the callable
workflowPhysical directories and modules under openprogram/programs/workflow/Each registered Workflow by its callable name, including multiple exports from one package.Favorite and Use remain available
packages/api/programs/explorerInstalled Program packages.Existing call tree and graph

Reference comparison and decisions

ReferenceRelevant modelDecision here
OpenProgram registryRegular functions and agentic functions register into one callable surface while retaining source-layer metadata.Adopt the unified runtime catalog; add read-only source filters only in the management UI.
Hermes toolsetsNamed toolsets represent selection, not source ownership.Keep tool profiles separate from source categories.
Claude CodeThe official repository does not publish the product's internal tool implementation tree, so its visible UI cannot establish a source-layout contract.Do not copy an unverifiable one-folder-per-tool assumption.
OpenAI CodexThe public tool implementation uses both handler files and submodules.Adopt the same complexity-based distinction, without copying Rust-specific names.

Adopted: purpose directories are ordinary Python packages. A Function with one implementation file is a module; a Function or subsystem with providers, prompts, actions, workers, shared state, or several cooperating entry points is a package. A source package can register several callables, so packages such as agent and memory remain cohesive. Rejected: forcing every callable into a directory, forcing every source into one file, frontend-only categories, a second category registry, compatibility copies at old import paths, raw source-file browsing, and duplicating external MCP tools in Programs.

Physical source plan

DirectoryPackages moved into it
filesapply_patch, bash, edit, glob, grep, list, process, read, write, worktree
webagent_browser, browser, image_analyze, image_generate, pdf, web_fetch, web_search
knowledgememory, read_conversation
planningplan_mode, todo
agentsagent, mixture_of_agents, send_message
jobscron
codeexecute_code, lsp, semble
interactioncanvas, clarify, send_file
runtimemcp_meta, program, skill

Single-file modules: apply_patch, edit, glob, grep, list, process, read, write, agent_browser, pdf, web_fetch, read_conversation, mixture_of_agents, execute_code, canvas, clarify, send_file, program, and skill. The remaining entries stay packages because they already contain cooperating implementation files or multiple registered callables.

Behavior, compatibility, and failures

Task brief and gate manifest

Production files: physical vanilla packages, their imports, the Programs explorer endpoint, and the existing Programs page. Test files: explorer public-entry tests, registry/import tests, and the Programs UI contract. Excluded: public callable renames, tool-profile policy changes, card restyling, dependencies, and external MCP catalog changes.

Acceptance: every shipped vanilla source lives under exactly one purpose directory; simple sources are modules and complex sources are packages; no old top-level source remains; playwright_browser is directly visible and retains tools/web/browser as its logic path; all registered vanilla callable names remain available; Workflows and Applications are unchanged.

Verification: focused explorer and registry RED/GREEN tests, import smoke test, Programs UI check, TypeScript compile, build, default 18100 packaged-App DOM and screenshot, and git diff --check.

Application import compatibility

Program packages loaded from openprogram/programs/packages must import built-in Agentic Functions through the canonical openprogram.programs.workflow namespace. The removed openprogram.programs.Agents namespace is not restored as a second compatibility package.

Acceptance: the packaged gui_agent public entry can begin a desktop run without a module-import error; the GUI, research, and wiki application packages contain no production import of the removed namespace.

Implementation status

In implementation: the physical purpose directories and callable registry are present. The remaining work is mixed module/package discovery, singleton-row projection, and final packaged-App verification.

Application function calls

The Application view reads current package source on each request. It starts at decorated public functions and follows local function calls and package imports, rather than treating every repository import as an execution edge. Tests, benchmarks and unrelated files do not enter the graph.

Conditional calls are labelled as conditional, not as a fixed execution sequence. The existing tree and graph share the same source-derived nodes. Unresolved calls and analysis limits are reported; the analyzer never executes package code to discover relationships. The visible page refreshes its analysis while open. The call tree initially expands the first three levels, keeping capability functions visible and their internals collapsed. Branch rows toggle with a click, Enter or Space. Expansion choices survive source refreshes for the selected Program; leaves and repeated references have no toggle.

Implementation status

Source tracing, conditional edges and visible-page refresh are implemented. Regression tests cover source edits, entry selection and unresolved callable aliases. Installed-App visual acceptance remains unverified. No Archify integration or Harness execution changes are included.

Direct function replies and input

A manually invoked function retains its execution tree and renders its persisted final answer as a separate Markdown body below the tree, visible even when the tree is collapsed. This adds no model call or persisted conversation node. Summaries and takeover instructions remain readable; other values use text or JSON. Nested calls retain their current presentation. The same selected execution detail follows incoming status updates without opening the sidebar.

Empty function forms size from visible fields. Closed Advanced sections contribute only their summary row, not hidden parameter labels. Explicit expansion remains available. Regression and default-App checks verify these presentation contracts.

Workflow discovery does not advertise documentation-only directories as callable leaves. Registered nested workflows remain visible through their registered category paths; the legacy source fallback requires a Python source file in the directory.

App refresh preserves the existing valid explicit owner Programs catalog across build checkouts. A missing configured catalog requires repair and is not silently replaced with an empty build directory. Explicit catalog relocation remains available; first installation may establish its initial catalog.