Skip to content

agent-cli / Exports

agent-cli

Table of contents

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

TPermissionMode

Ƭ TPermissionMode: "plan" | "default" | "acceptEdits" | "bypassPermissions"

Permission modes (Claude Code compatible)

  • plan: read-only tools only
  • default: reads auto, writes/bash need approval
  • acceptEdits: reads + writes auto, bash needs approval
  • bypassPermissions: all tools auto

Defined in

agent-core/dist/node/index.d.ts:4073


TTrustLevel

Ƭ TTrustLevel: "safe" | "moderate" | "full"

Friendly trust level aliases

  • safe → plan
  • moderate → default
  • full → acceptEdits

Defined in

agent-core/dist/node/index.d.ts:4080


TPermissionDecision

Ƭ TPermissionDecision: "auto" | "approve" | "deny"

Outcome of a permission evaluation

  • auto: proceed without prompting
  • approve: prompt user for approval
  • deny: block the action

Defined in

agent-core/dist/node/index.d.ts:4088


TToolArgs

Ƭ TToolArgs: Record<string, string | number | boolean | object>

Tool arguments passed from the LLM invocation. The values relevant to permission matching are strings.

Defined in

agent-core/dist/node/index.d.ts:4109


TPermissionHandler

Ƭ TPermissionHandler: (toolName: string, toolArgs: TToolArgs) => Promise<TPermissionResult>

Custom permission handler — called when a tool needs user approval. Returns true to allow, false to deny, or 'allow-session' to remember for the session.

Type declaration

▸ (toolName, toolArgs): Promise<TPermissionResult>

Parameters
NameType
toolNamestring
toolArgsTToolArgs
Returns

Promise<TPermissionResult>

Defined in

agent-sessions/dist/node/index.d.ts:113

Variables

TRUST_TO_MODE

Const TRUST_TO_MODE: Record<TTrustLevel, TPermissionMode>

Defined in

agent-core/dist/node/index.d.ts:4081

Functions

startCli

startCli(): Promise<void>

Main CLI orchestration function. Called from bin.ts as the top-level entry.

Returns

Promise<void>

Defined in

agent-cli/src/cli.ts:177


query

query(prompt, options?): Promise<string>

query() — single entry point for running an AI agent conversation. Equivalent to Claude Agent SDK's query() function. Automatically loads config, context, and project info.

Parameters

NameType
promptstring
options?IQueryOptions

Returns

Promise<string>

Defined in

agent-sdk/dist/node/index.d.ts:340

Released under the MIT License.