Documentation
¶
Index ¶
- func Run(args []string)
- func RunWithCommands(args []string)
- func SetVersion(v string)
- func StringOrEmpty(value string) string
- func Version() string
- type ChatCmd
- type ChatGPTLoginCmd
- type ListToolsCmd
- type MCPCmd
- type MCPListCmd
- type MCPRunCmd
- type Options
- type SchedulerCmd
- type SchedulerRunCmd
- type ServeCmd
- type TemplateLoadCmd
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.
func StringOrEmpty ¶ added in v0.3.22
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 local scy OAuth2 out-of-band login with the supplied secrets URL"`
OAuthCfg string `long:"oauth-config" description:"Optional scy OAuth config URL override for client-side OOB login"`
OAuthScp string `long:"oauth-scopes" description:"comma-separated OAuth scopes for OOB login"`
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>"`
// contains filtered or unexported fields
}
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 string `` /* 218-byte string literal not displayed */
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:"Exact tool name to show full definition"`
Service string `short:"s" long:"service" description:"Filter tools by service/prefix namespace"`
API string `long:"api" description:"Server URL (skip local auto-detect)"`
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 MCPCmd ¶ added in v0.3.22
type MCPCmd struct {
List *MCPListCmd `command:"list" description:"List tools as MCP-style capabilities"`
Run *MCPRunCmd `command:"run" description:"Run a tool by exact name with JSON arguments"`
}
MCPCmd groups MCP-oriented subcommands.
type MCPListCmd ¶ added in v0.3.22
type MCPListCmd struct {
Name string `short:"n" long:"name" description:"Exact tool name to show full definition"`
Service string `short:"s" long:"service" description:"Filter tools by service/prefix namespace"`
API string `long:"api" description:"Server URL (skip local auto-detect)"`
Token string `long:"token" description:"Bearer token for API requests (overrides AGENTLY_TOKEN)"`
Session string `long:"session" description:"Session cookie value for API requests (agently_session)"`
OOB string `long:"oob" description:"Use local scy OAuth2 out-of-band login with the supplied secrets URL"`
OAuthCfg string `long:"oauth-config" description:"Optional scy OAuth config URL override for client-side OOB login"`
OAuthScp string `long:"oauth-scopes" description:"comma-separated OAuth scopes for OOB login"`
JSON bool `long:"json" description:"Print result as JSON instead of plain text"`
Example bool `long:"example" description:"Include an example request derived from the tool input schema"`
Schema bool `long:"schema" description:"Include input schema in plain-text output"`
SchemaFormat string `` /* 128-byte string literal not displayed */
}
func (*MCPListCmd) Execute ¶ added in v0.3.22
func (c *MCPListCmd) Execute(_ []string) error
type MCPRunCmd ¶ added in v0.3.22
type MCPRunCmd struct {
Name string `short:"n" long:"name" description:"Exact tool name to execute"`
Args string `short:"a" long:"args" description:"Inline JSON object or @file with tool arguments"`
API string `long:"api" description:"Server URL (skip local auto-detect)"`
Token string `long:"token" description:"Bearer token for API requests (overrides AGENTLY_TOKEN)"`
Session string `long:"session" description:"Session cookie value for API requests (agently_session)"`
OOB string `long:"oob" description:"Use local scy OAuth2 out-of-band login with the supplied secrets URL"`
OAuthCfg string `long:"oauth-config" description:"Optional scy OAuth config URL override for client-side OOB login"`
OAuthScp string `long:"oauth-scopes" description:"comma-separated OAuth scopes for OOB login"`
JSON bool `long:"json" description:"Print result as JSON envelope instead of plain text"`
}
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"`
TemplateLoad *TemplateLoadCmd `command:"template-load" description:"Load and validate a template file or workspace template"`
MCP *MCPCmd `command:"mcp" description:"MCP-oriented tool discovery and execution"`
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.
type TemplateLoadCmd ¶ added in v0.3.32
type TemplateLoadCmd struct {
File string `long:"file" description:"Absolute or relative path to a template YAML file to load directly"`
Workspace string `long:"workspace" description:"Workspace root used for repository-style loading (defaults to AGENTLY_WORKSPACE resolution)"`
Name string `long:"name" description:"Template name/id for repository-style loading"`
JSON bool `long:"json" description:"Print the loaded template as JSON"`
}
TemplateLoadCmd loads a template either directly from a file path or through the workspace repository path used by the server.
func (*TemplateLoadCmd) Execute ¶ added in v0.3.32
func (c *TemplateLoadCmd) Execute(_ []string) error