Module: AgentCliRuntime
- Defined in:
- lib/agent_cli_runtime.rb,
lib/agent_cli_runtime.rb,
lib/agent_cli_runtime/cli.rb,
lib/agent_cli_runtime/probe.rb,
lib/agent_cli_runtime/errors.rb,
lib/agent_cli_runtime/values.rb,
lib/agent_cli_runtime/profile.rb,
lib/agent_cli_runtime/runtime.rb,
lib/agent_cli_runtime/version.rb,
lib/agent_cli_runtime/profiles.rb,
lib/agent_cli_runtime/redactor.rb,
lib/agent_cli_runtime/opencode/probe.rb,
lib/agent_cli_runtime/opencode/overlay.rb,
lib/agent_cli_runtime/usage_extractors.rb,
lib/agent_cli_runtime/opencode/inspection.rb,
lib/agent_cli_runtime/opencode/result_parser.rb
Defined Under Namespace
Modules: OpenCode, Probe, Profiles, Redactor, Runtime, UsageExtractors
Classes: AuthConfiguration, AuthenticationError, BinaryUnavailable, CLI, CapabilityEvidence, CapturedResult, CompilationError, CompiledInvocation, ConfigurationError, Error, IdentityArguments, InspectionCommand, MalformedOutput, NormalizedOutcome, NormalizedUsage, ObservableResult, OpenCodePermissionPolicy, OpenCodePreparationRequest, ParsedRun, PreparationError, PreparedInvocation, ProbeError, ProbeRequest, ProbeResult, Profile, Request, ResultError, Route, RouteIdentity, RouteProbeResult, RouteUnavailable, TerminationEvidence, UnknownProvider, UnsafePathError, UnsupportedCapability, VersionError
Constant Summary
collapse
- DIAGNOSTIC_BYTES =
512
- OPENCODE_OVERLAY_ENVIRONMENT_KEYS =
%w[
XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME TMPDIR
OPENCODE_CONFIG OPENCODE_DISABLE_PROJECT_CONFIG
OPENCODE_DISABLE_CLAUDE_CODE OPENCODE_DISABLE_MODELS_FETCH
OPENCODE_DISABLE_AUTOUPDATE OPENCODE_PURE
].freeze
- VERSION =
"0.2.0".freeze
Class Method Summary
collapse
-
.compile(request) ⇒ Object
-
.extract_usage(profile, event) ⇒ Object
-
.normalize(profile, captured, requested_route:) ⇒ Object
-
.observe(profile, result) ⇒ Object
-
.parse_run(profile, stdout:) ⇒ Object
-
.prepare!(profile, env: ENV) ⇒ Object
-
.prepare_inspection(prepared, parsed_run) ⇒ Object
-
.probe(profile, home: nil, env: ENV) ⇒ Object
-
.probe_all(home: nil, env: ENV) ⇒ Object
-
.require_capability!(profile, capability) ⇒ Object
Class Method Details
.compile(request) ⇒ Object
24
25
26
|
# File 'lib/agent_cli_runtime.rb', line 24
def compile(request)
Runtime.compile(request)
end
|
36
37
38
|
# File 'lib/agent_cli_runtime.rb', line 36
def (profile, event)
Runtime.(profile, event)
end
|
.normalize(profile, captured, requested_route:) ⇒ Object
52
53
54
|
# File 'lib/agent_cli_runtime.rb', line 52
def normalize(profile, captured, requested_route:)
Runtime.normalize(profile, captured, requested_route:)
end
|
.observe(profile, result) ⇒ Object
40
41
42
|
# File 'lib/agent_cli_runtime.rb', line 40
def observe(profile, result)
Runtime.observe(profile, result)
end
|
.parse_run(profile, stdout:) ⇒ Object
44
45
46
|
# File 'lib/agent_cli_runtime.rb', line 44
def parse_run(profile, stdout:)
Runtime.parse_run(profile, stdout:)
end
|
.prepare!(profile, env: ENV) ⇒ Object
28
29
30
|
# File 'lib/agent_cli_runtime.rb', line 28
def prepare!(profile, env: ENV)
Runtime.prepare!(profile, env:)
end
|
.prepare_inspection(prepared, parsed_run) ⇒ Object
48
49
50
|
# File 'lib/agent_cli_runtime.rb', line 48
def prepare_inspection(prepared, parsed_run)
OpenCode::Inspection.compile(prepared, parsed_run)
end
|
.probe(profile, home: nil, env: ENV) ⇒ Object
56
57
58
59
60
61
62
|
# File 'lib/agent_cli_runtime.rb', line 56
def probe(profile, home: nil, env: ENV)
if profile.is_a?(ProbeRequest)
OpenCode::Probe.call(profile, env: env)
else
Probe.call(profile, home: home, env: env)
end
end
|
.probe_all(home: nil, env: ENV) ⇒ Object
64
65
66
|
# File 'lib/agent_cli_runtime.rb', line 64
def probe_all(home: nil, env: ENV)
Probe.all(home: home, env: env)
end
|
.require_capability!(profile, capability) ⇒ Object
32
33
34
|
# File 'lib/agent_cli_runtime.rb', line 32
def require_capability!(profile, capability)
Runtime.require_capability!(profile, capability)
end
|