Summary
The framework currently provides no built-in/optional tool definitions. Plugin authors must re-declare harness-native capabilities (e.g. ask_question/ask_user, shell execution, notifications, confirmations) themselves. This issue tracks adding a typed registry of built-in tools plus a per-harness compatibility matrix so users can reference them straightaway.
Motivation
- Users want to invoke harness-native tools without manually declaring them in every plugin manifest.
- Plugin authors need to know which tools are available on which harnesses.
- A compatibility matrix prevents build-time surprises when targeting multiple platforms.
Current State
ToolDefinition in packages/core/src/types.ts only covers user-declared tools.
- No built-in tool registry exists.
PlatformConstraints in packages/core/src/validation.ts documents hook compatibility only.
- Harness-native capabilities vary widely:
- Pi Mono:
ctx.ui.notify, ctx.ui.confirm, ctx.ui.select, ctx.ui.input, pi.exec, etc.
- OpenCode:
$ (Bun shell), tui.toast.show, tui.prompt.append, tui.command.execute.
- Claude Code: intercept built-in tools via matchers (
Bash, Edit, Write, Read, Grep, Glob).
- Codex, Copilot CLI, Gemini, Kimi: only interceptors and MCP servers.
Proposed Direction
Add a typed registry and compatibility helpers.
Core types
export type HarnessCapability =
| 'native'
| 'via-mcp'
| 'via-matcher'
| 'emulated'
| 'unsupported';
export interface BuiltInToolDefinition {
readonly name: string;
readonly description: string;
readonly parameters: ToolParameterSchema;
readonly platforms: Partial<Record<TargetPlatform, HarnessCapability>>;
readonly harnessApi?: Partial<Record<TargetPlatform, HarnessApiRef>>;
readonly category?: 'ui' | 'shell' | 'io' | 'context' | 'navigation';
readonly required?: boolean;
}
export interface HarnessApiRef {
readonly method: string;
readonly args?: string[];
}
export declare const BUILTIN_TOOLS: ReadonlyMap<string, BuiltInToolDefinition>;
export function getBuiltinTool(name: string): BuiltInToolDefinition | undefined;
export function isBuiltinAvailable(
toolName: string,
platform: TargetPlatform
): HarnessCapability | undefined;
Compatibility matrix
Add a public compatibility table (e.g. in docs-site/guide/tools.md) showing which built-in tools work on each harness and how they are invoked.
Validation
Extend PlatformConstraints with ToolConstraints:
export interface ToolConstraints {
readonly builtinTools: Readonly<Record<string, HarnessCapability>>;
readonly knownToolNames: readonly string[];
readonly emitsToolDefinitions: boolean;
}
Add a lint rule that warns when a plugin references a built-in tool that is unsupported on a declared target.
Acceptance Criteria
Classification
- Type: feature
- Effort: M
- Status: Scheduled
Related
- Research plan:
.agents/plans/2026-06-15-builtins-ui-research.md
Summary
The framework currently provides no built-in/optional tool definitions. Plugin authors must re-declare harness-native capabilities (e.g.
ask_question/ask_user, shell execution, notifications, confirmations) themselves. This issue tracks adding a typed registry of built-in tools plus a per-harness compatibility matrix so users can reference them straightaway.Motivation
Current State
ToolDefinitioninpackages/core/src/types.tsonly covers user-declared tools.PlatformConstraintsinpackages/core/src/validation.tsdocuments hook compatibility only.ctx.ui.notify,ctx.ui.confirm,ctx.ui.select,ctx.ui.input,pi.exec, etc.$(Bun shell),tui.toast.show,tui.prompt.append,tui.command.execute.Bash,Edit,Write,Read,Grep,Glob).Proposed Direction
Add a typed registry and compatibility helpers.
Core types
Compatibility matrix
Add a public compatibility table (e.g. in
docs-site/guide/tools.md) showing which built-in tools work on each harness and how they are invoked.Validation
Extend
PlatformConstraintswithToolConstraints:Add a lint rule that warns when a plugin references a built-in tool that is
unsupportedon a declared target.Acceptance Criteria
BuiltInToolDefinition,HarnessCapability, andHarnessApiReftypes added topackages/core/src/types.ts.BUILTIN_TOOLSregistry seeded with at leastshell,notify,confirm,select,input.getBuiltinToolandisBuiltinAvailablehelpers exported.PlatformConstraintsextended withToolConstraints.Classification
Related
.agents/plans/2026-06-15-builtins-ui-research.md