Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithCommands ¶
func RunWithCommands(args []string)
RunWithCommands is kept for symmetry with scy CLI.
func SetVersion ¶ added in v0.2.6
func SetVersion(v string)
SetVersion initializes the version string if non-empty.
Types ¶
type ChatCmd ¶
type ChatCmd struct {
AgentID string `short:"a" long:"agent-id" description:"agent id"`
Query []string `short:"q" long:"query" description:"user query (repeatable)"`
ConvID string `short:"c" long:"conv" description:"conversation ID (optional)"`
ResetLogs bool `long:"reset-logs" description:"truncate/clean log files before each run"`
Timeout int `short:"t" long:"timeout" description:"timeout in seconds for the agent response (0=none)"`
User string `short:"u" long:"user" description:"user id for the chat" default:"devuser"`
API string `long:"api" description:"Agently base URL (skips auto-detect)"`
Token string `long:"token" description:"Bearer token for API requests (overrides AGENTLY_TOKEN)"`
OOB string `long:"oob" description:"Use server-side OAuth2 out-of-band login with the supplied secrets URL"`
OAuthCfg string `long:"oauth-config" description:"scy OAuth config URL for client-side OOB login (unused for server OOB)"`
OAuthScp string `long:"oauth-scopes" description:"comma-separated OAuth scopes for OOB login"`
Stream bool `long:"stream" description:"reserved for compatibility; CLI output streams automatically"`
ElicitDef string `long:"elicitation-default" description:"JSON or @file to auto-accept elicitations when stdin is not a TTY"`
Context string `long:"context" description:"inline JSON object or @file with context data"`
Attach []string `long:"attach" description:"file to attach (repeatable). Format: <path>"`
}
ChatCmd handles interactive/chat queries.
type ChatGPTLoginCmd ¶ added in v0.2.30
type ChatGPTLoginCmd struct {
ClientURL string `long:"clientURL" description:"scy resource for OAuth client config (must contain client_id, optional client_secret)"`
TokensURL string `long:"tokensURL" description:"scy resource where ChatGPT OAuth token state will be stored (default: derived from clientURL)"`
Issuer string `long:"issuer" description:"OAuth issuer base URL (default: from client config, else https://auth.openai.com)"`
AllowedWorkspaceID string `long:"allowedWorkspaceID" description:"restrict login to a specific ChatGPT workspace/account id"`
Originator string `long:"originator" description:"originator query param used by OpenAI auth (default: codex_cli_rs)" default:"codex_cli_rs"`
Port int `long:"port" description:"local callback server port (must match OAuth redirect allowlist; default: 1455)" default:"1455"`
NoOpenBrowser bool `long:"no-open-browser" description:"do not open the authorization URL in the default browser"`
NoMintAPIKey bool `long:"no-mint-api-key" description:"do not mint and cache an OpenAI API key after login"`
RequireMint bool `long:"require-mint-api-key" description:"fail the command if API key minting fails"`
TimeoutSec int `long:"timeout" description:"callback wait timeout in seconds" default:"300"`
}
func (*ChatGPTLoginCmd) Execute ¶ added in v0.2.30
func (c *ChatGPTLoginCmd) Execute(_ []string) error
type ListToolsCmd ¶
type ListToolsCmd struct {
Name string `short:"n" long:"name" description:"Tool name (service_method) to show full definition"`
JSON bool `long:"json" description:"Print result as JSON instead of table/plain text"`
}
ListToolsCmd prints all registered tools (service/method) with optional description.
Without any flags it prints a table containing tool name and description.
When -n/--name is supplied it looks up that specific tool and prints its definition. Use --json to emit the definition as prettified JSON rather than a human-readable format. When --json is provided without --name the full catalogue is printed as JSON.
func (*ListToolsCmd) Execute ¶
func (c *ListToolsCmd) Execute(_ []string) error
type Options ¶
type Options struct {
Version bool `short:"v" long:"version" description:"Show agently version and exit"`
Serve *ServeCmd `command:"serve" description:"Start HTTP server"`
Scheduler *SchedulerCmd `command:"scheduler" description:"Scheduler runner and utilities"`
Query *ChatCmd `command:"query" description:"Query an agent (single turn or continuation)"`
Chat *ChatCmd `command:"chat" description:"Deprecated alias of query"`
ListTools *ListToolsCmd `command:"list-tools" description:"List available tools"`
ChatGPTLogin *ChatGPTLoginCmd `command:"chatgpt-login" description:"Login via ChatGPT OAuth and persist tokens for OpenAI providers"`
}
Options is the root command that groups sub-commands. The struct tags are interpreted by github.com/jessevdk/go-flags.
type SchedulerCmd ¶ added in v0.2.31
type SchedulerCmd struct {
Run SchedulerRunCmd `command:"run" description:"Run the scheduler watchdog loop"`
}
SchedulerCmd groups scheduler-related subcommands.
type SchedulerRunCmd ¶ added in v0.2.31
type SchedulerRunCmd struct {
Interval string `long:"interval" description:"RunDue polling interval (e.g. 30s, 1m)" default:"30s"`
Once bool `long:"once" description:"Run one RunDue cycle and exit"`
}
SchedulerRunCmd starts the scheduler watchdog loop as a dedicated process. Usage: agently scheduler run --interval 30s
func (*SchedulerRunCmd) Execute ¶ added in v0.2.31
func (s *SchedulerRunCmd) Execute(_ []string) error
type ServeCmd ¶
type ServeCmd struct {
Addr string `short:"a" long:"addr" description:"listen address" default:":8080"`
Policy string `short:"p" long:"policy" description:"tool policy: auto|ask|deny" default:"auto"`
Workspace string `short:"w" long:"workspace" description:"workspace root path (overrides AGENTLY_WORKSPACE when set)"`
ExposeMCP bool `` /* 130-byte string literal not displayed */
UIDist string `long:"ui-dist" description:"Optional local UI dist directory override"`
Debug bool `short:"d" long:"debug" description:"Enable debug mode"`
}
ServeCmd starts the HTTP server.