oz-agent-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/AGENTS.md +23 -0
- data/CHANGELOG.md +30 -0
- data/CONTRIBUTING.md +60 -0
- data/Gemfile +6 -0
- data/LICENSE +201 -0
- data/Makefile +64 -0
- data/README.md +266 -0
- data/Rakefile +32 -0
- data/docs/api_reference.md +156 -0
- data/docs/configuration.md +84 -0
- data/docs/error_handling.md +87 -0
- data/docs/getting_started.md +92 -0
- data/docs/index.md +56 -0
- data/examples/identities.rb +35 -0
- data/examples/list_runs.rb +31 -0
- data/examples/run_agent.rb +38 -0
- data/examples/schedules.rb +31 -0
- data/lib/oz/client.rb +299 -0
- data/lib/oz/configuration.rb +46 -0
- data/lib/oz/cursor_page.rb +89 -0
- data/lib/oz/errors.rb +72 -0
- data/lib/oz/model.rb +116 -0
- data/lib/oz/resources/agent.rb +95 -0
- data/lib/oz/resources/base.rb +33 -0
- data/lib/oz/resources/conversations.rb +16 -0
- data/lib/oz/resources/identities.rb +46 -0
- data/lib/oz/resources/runs.rb +55 -0
- data/lib/oz/resources/schedules.rb +64 -0
- data/lib/oz/resources/sessions.rb +16 -0
- data/lib/oz/version.rb +5 -0
- data/lib/oz.rb +72 -0
- data/mise.toml +2 -0
- data/oz-agent-sdk.gemspec +55 -0
- metadata +184 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Entry point for running and managing cloud agents, reachable via
|
|
6
|
+
# +client.agent+. Sub-resources hang off it: {#runs}, {#schedules},
|
|
7
|
+
# {#identities}, {#sessions}, and {#conversations}.
|
|
8
|
+
class Agent < Base
|
|
9
|
+
# Start a new agent run.
|
|
10
|
+
#
|
|
11
|
+
# @param prompt [String, nil] instruction for the agent. Required unless a
|
|
12
|
+
# skill is supplied via +skill+, +config[:skill_spec]+, or
|
|
13
|
+
# +config[:skills]+.
|
|
14
|
+
# @param config [Hash, nil] cloud run configuration (+AmbientAgentConfig+):
|
|
15
|
+
# +:environment_id+, +:model_id+, +:name+, +:base_prompt+,
|
|
16
|
+
# +:mcp_servers+, +:harness+, +:skills+, +:memory_stores+, ...
|
|
17
|
+
# @param conversation_id [String, nil] continue an existing conversation
|
|
18
|
+
# @param attachments [Array<Hash>, nil] file attachments (max 5), each
|
|
19
|
+
# +{ data:, file_name:, mime_type: }+ with base64-encoded +data+
|
|
20
|
+
# @param interactive [Boolean, nil] whether the run is interactive
|
|
21
|
+
# @param mode [String, nil] "normal", "plan", or "orchestrate"
|
|
22
|
+
# @param parent_run_id [String, nil] parent run for orchestration trees
|
|
23
|
+
# @param skill [String, nil] skill spec used as the base prompt
|
|
24
|
+
# @param team [Boolean, nil] create a team-owned run
|
|
25
|
+
# @param title [String, nil] custom run title
|
|
26
|
+
# @param agent_identity_uid [String, nil] execution principal (team runs)
|
|
27
|
+
# @return [Oz::Model] +{ run_id, state, task_id, at_capacity }+
|
|
28
|
+
def run(prompt: nil, config: nil, conversation_id: nil, attachments: nil, interactive: nil,
|
|
29
|
+
mode: nil, parent_run_id: nil, skill: nil, team: nil, title: nil,
|
|
30
|
+
agent_identity_uid: nil, **extra)
|
|
31
|
+
body = compact(
|
|
32
|
+
prompt: prompt, config: config, conversation_id: conversation_id,
|
|
33
|
+
attachments: attachments, interactive: interactive, mode: mode,
|
|
34
|
+
parent_run_id: parent_run_id, skill: skill, team: team, title: title,
|
|
35
|
+
agent_identity_uid: agent_identity_uid
|
|
36
|
+
).merge(extra)
|
|
37
|
+
model(@client.post('/agent/runs', body: body))
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List available agents (skills) across accessible environments.
|
|
41
|
+
# @param include_malformed_skills [Boolean, nil]
|
|
42
|
+
# @param refresh [Boolean, nil] clear the agent-list cache first
|
|
43
|
+
# @param repo [String, nil] restrict to a single "owner/repo"
|
|
44
|
+
# @param sort_by [String, nil] "name" (default) or "last_run"
|
|
45
|
+
# @return [Oz::Model] response with an +agents+ array
|
|
46
|
+
def list(include_malformed_skills: nil, refresh: nil, repo: nil, sort_by: nil, **extra)
|
|
47
|
+
query = compact(
|
|
48
|
+
include_malformed_skills: include_malformed_skills, refresh: refresh,
|
|
49
|
+
repo: repo, sort_by: sort_by
|
|
50
|
+
).merge(extra)
|
|
51
|
+
model(@client.get('/agent', query: query))
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Retrieve an artifact produced by a run (plan, screenshot, or file).
|
|
55
|
+
# @param artifact_uid [String]
|
|
56
|
+
# @return [Oz::Model]
|
|
57
|
+
def get_artifact(artifact_uid)
|
|
58
|
+
model(@client.get("/agent/artifacts/#{enc(artifact_uid)}"))
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List cloud environments available to the caller.
|
|
62
|
+
# @param sort_by [String, nil] "last_updated" (default) or "name"
|
|
63
|
+
# @return [Oz::Model] response with an +environments+ array
|
|
64
|
+
def list_environments(sort_by: nil, **extra)
|
|
65
|
+
query = compact(sort_by: sort_by).merge(extra)
|
|
66
|
+
model(@client.get('/agent/environments', query: query))
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @return [Oz::Resources::Runs]
|
|
70
|
+
def runs
|
|
71
|
+
@runs ||= Runs.new(@client)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @return [Oz::Resources::Schedules]
|
|
75
|
+
def schedules
|
|
76
|
+
@schedules ||= Schedules.new(@client)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @return [Oz::Resources::Identities]
|
|
80
|
+
def identities
|
|
81
|
+
@identities ||= Identities.new(@client)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @return [Oz::Resources::Sessions]
|
|
85
|
+
def sessions
|
|
86
|
+
@sessions ||= Sessions.new(@client)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @return [Oz::Resources::Conversations]
|
|
90
|
+
def conversations
|
|
91
|
+
@conversations ||= Conversations.new(@client)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'cgi'
|
|
4
|
+
|
|
5
|
+
module Oz
|
|
6
|
+
module Resources
|
|
7
|
+
# Shared behaviour for API resource wrappers. Holds the {Oz::Client} and
|
|
8
|
+
# provides small helpers for wrapping responses and encoding path segments.
|
|
9
|
+
class Base
|
|
10
|
+
def initialize(client)
|
|
11
|
+
@client = client
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
# Wraps a decoded response body in {Oz::Model} (recursively).
|
|
17
|
+
def model(body)
|
|
18
|
+
Oz::Model.build(body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# URL-encodes a single path segment (run ids, uids, ...).
|
|
22
|
+
def enc(segment)
|
|
23
|
+
CGI.escape(segment.to_s)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds a params hash from keyword arguments, dropping +nil+ values so
|
|
27
|
+
# only explicitly provided options are sent.
|
|
28
|
+
def compact(hash)
|
|
29
|
+
hash.compact
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Look up redirects for agent conversations, reachable via
|
|
6
|
+
# +client.agent.conversations+.
|
|
7
|
+
class Conversations < Base
|
|
8
|
+
# Resolve where a conversation id should redirect to.
|
|
9
|
+
# @param conversation_id [String]
|
|
10
|
+
# @return [Oz::Model]
|
|
11
|
+
def check_redirect(conversation_id)
|
|
12
|
+
model(@client.get("/agent/conversations/#{enc(conversation_id)}/redirect"))
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Manage agent identities (team-owned execution principals), reachable via
|
|
6
|
+
# +client.agent.identities+. These back the +/agent/identities+ endpoints.
|
|
7
|
+
class Identities < Base
|
|
8
|
+
# Create an agent identity.
|
|
9
|
+
# @param name [String] a name for the agent
|
|
10
|
+
# @param params [Hash] optional fields such as +description+, +prompt+,
|
|
11
|
+
# +base_model+, +base_harness+, +environment_id+, +mcp_servers+,
|
|
12
|
+
# +memory_stores+, +secrets+, +skills+, +inference_providers+,
|
|
13
|
+
# +harness_auth_secrets+
|
|
14
|
+
# @return [Oz::Model] the created identity (+AgentResponse+)
|
|
15
|
+
def create(name:, **params)
|
|
16
|
+
model(@client.post('/agent/identities', body: { name: name }.merge(params)))
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Update an agent identity. Accepts the same fields as {#create}.
|
|
20
|
+
# @return [Oz::Model]
|
|
21
|
+
def update(uid, **params)
|
|
22
|
+
model(@client.put("/agent/identities/#{enc(uid)}", body: params))
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# List all agent identities.
|
|
26
|
+
# @return [Oz::Model] response with an +agents+ array
|
|
27
|
+
def list
|
|
28
|
+
model(@client.get('/agent/identities'))
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Retrieve a single agent identity by uid.
|
|
32
|
+
# @return [Oz::Model]
|
|
33
|
+
def retrieve(uid)
|
|
34
|
+
model(@client.get("/agent/identities/#{enc(uid)}"))
|
|
35
|
+
end
|
|
36
|
+
alias get retrieve
|
|
37
|
+
|
|
38
|
+
# Delete an agent identity.
|
|
39
|
+
# @return [nil]
|
|
40
|
+
def delete(uid)
|
|
41
|
+
@client.delete("/agent/identities/#{enc(uid)}")
|
|
42
|
+
nil
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Operations on individual agent runs, reachable via +client.agent.runs+.
|
|
6
|
+
class Runs < Base
|
|
7
|
+
# Retrieve a single run by id.
|
|
8
|
+
# @param run_id [String]
|
|
9
|
+
# @return [Oz::Model] the run (+RunItem+)
|
|
10
|
+
def retrieve(run_id)
|
|
11
|
+
model(@client.get("/agent/runs/#{enc(run_id)}"))
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# List runs with optional filters. Returns a cursor-paginated page.
|
|
15
|
+
#
|
|
16
|
+
# Supported filters include: +ancestor_run_id+, +artifact_type+,
|
|
17
|
+
# +created_after+, +created_before+, +creator+, +cursor+, +environment_id+,
|
|
18
|
+
# +execution_location+, +executor+, +limit+, +model_id+, +name+, +q+,
|
|
19
|
+
# +schedule_id+, +skill+, +skill_spec+, +sort_by+, +sort_order+, +source+,
|
|
20
|
+
# +state+ (an Array of states), and +updated_after+.
|
|
21
|
+
#
|
|
22
|
+
# Time-like filters accept either an ISO-8601 String or a Time/Date.
|
|
23
|
+
# @return [Oz::CursorPage]
|
|
24
|
+
def list(**params)
|
|
25
|
+
body = @client.get('/agent/runs', query: params)
|
|
26
|
+
Oz::CursorPage.new(body, resource: self, params: params, items_key: 'runs')
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Cancel a run that is in progress.
|
|
30
|
+
# @param run_id [String]
|
|
31
|
+
# @return [String] confirmation message returned by the API
|
|
32
|
+
def cancel(run_id)
|
|
33
|
+
@client.post("/agent/runs/#{enc(run_id)}/cancel")
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# List the attachments produced by a run's handoff.
|
|
37
|
+
# @param run_id [String]
|
|
38
|
+
# @return [Oz::Model]
|
|
39
|
+
def list_handoff_attachments(run_id)
|
|
40
|
+
model(@client.get("/agent/runs/#{enc(run_id)}/handoff/attachments"))
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Send a follow-up message to a run (e.g. to answer a blocking question or
|
|
44
|
+
# continue the conversation).
|
|
45
|
+
# @param run_id [String]
|
|
46
|
+
# @param message [String, nil] the follow-up message
|
|
47
|
+
# @param mode [String, nil] "normal", "plan", or "orchestrate"
|
|
48
|
+
# @return [Oz::Model]
|
|
49
|
+
def submit_followup(run_id, message: nil, mode: nil)
|
|
50
|
+
body = compact(message: message, mode: mode)
|
|
51
|
+
model(@client.post("/agent/runs/#{enc(run_id)}/followups", body: body))
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Manage scheduled agents (cron-triggered runs), reachable via
|
|
6
|
+
# +client.agent.schedules+.
|
|
7
|
+
class Schedules < Base
|
|
8
|
+
# Create a scheduled agent.
|
|
9
|
+
# @param cron_schedule [String] cron expression (e.g. "0 9 * * *")
|
|
10
|
+
# @param name [String] human-readable schedule name
|
|
11
|
+
# @param agent_config [Hash, nil] cloud agent run configuration
|
|
12
|
+
# @param agent_uid [String, nil] execution principal for team schedules
|
|
13
|
+
# @param enabled [Boolean, nil] whether the schedule is active immediately
|
|
14
|
+
# @param mode [String, nil] "normal", "plan", or "orchestrate"
|
|
15
|
+
# @param prompt [String, nil] instruction for the agent
|
|
16
|
+
# @param team [Boolean, nil] whether to create a team-owned schedule
|
|
17
|
+
# @return [Oz::Model] the created schedule (+ScheduledAgentItem+)
|
|
18
|
+
def create(cron_schedule:, name:, agent_config: nil, agent_uid: nil, enabled: nil,
|
|
19
|
+
mode: nil, prompt: nil, team: nil, **extra)
|
|
20
|
+
body = compact(
|
|
21
|
+
cron_schedule: cron_schedule, name: name, agent_config: agent_config,
|
|
22
|
+
agent_uid: agent_uid, enabled: enabled, mode: mode, prompt: prompt, team: team
|
|
23
|
+
).merge(extra)
|
|
24
|
+
model(@client.post('/agent/schedules', body: body))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Retrieve a schedule by id.
|
|
28
|
+
# @return [Oz::Model]
|
|
29
|
+
def retrieve(schedule_id)
|
|
30
|
+
model(@client.get("/agent/schedules/#{enc(schedule_id)}"))
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Update a schedule. Accepts the same fields as {#create}.
|
|
34
|
+
# @return [Oz::Model]
|
|
35
|
+
def update(schedule_id, **params)
|
|
36
|
+
model(@client.put("/agent/schedules/#{enc(schedule_id)}", body: params))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List all scheduled agents.
|
|
40
|
+
# @return [Oz::Model] response with a +schedules+ array
|
|
41
|
+
def list
|
|
42
|
+
model(@client.get('/agent/schedules'))
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Delete a schedule.
|
|
46
|
+
# @return [Oz::Model] response with a +success+ flag
|
|
47
|
+
def delete(schedule_id)
|
|
48
|
+
model(@client.delete("/agent/schedules/#{enc(schedule_id)}"))
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Pause a schedule (stops triggering new runs).
|
|
52
|
+
# @return [Oz::Model]
|
|
53
|
+
def pause(schedule_id)
|
|
54
|
+
model(@client.post("/agent/schedules/#{enc(schedule_id)}/pause"))
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Resume a paused schedule.
|
|
58
|
+
# @return [Oz::Model]
|
|
59
|
+
def resume(schedule_id)
|
|
60
|
+
model(@client.post("/agent/schedules/#{enc(schedule_id)}/resume"))
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Oz
|
|
4
|
+
module Resources
|
|
5
|
+
# Look up redirects for agent sessions, reachable via
|
|
6
|
+
# +client.agent.sessions+.
|
|
7
|
+
class Sessions < Base
|
|
8
|
+
# Resolve where a session UUID should redirect to.
|
|
9
|
+
# @param session_uuid [String]
|
|
10
|
+
# @return [Oz::Model]
|
|
11
|
+
def check_redirect(session_uuid)
|
|
12
|
+
model(@client.get("/agent/sessions/#{enc(session_uuid)}/redirect"))
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/oz/version.rb
ADDED
data/lib/oz.rb
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'oz/version'
|
|
4
|
+
require_relative 'oz/errors'
|
|
5
|
+
require_relative 'oz/configuration'
|
|
6
|
+
require_relative 'oz/model'
|
|
7
|
+
require_relative 'oz/cursor_page'
|
|
8
|
+
require_relative 'oz/resources/base'
|
|
9
|
+
require_relative 'oz/resources/runs'
|
|
10
|
+
require_relative 'oz/resources/schedules'
|
|
11
|
+
require_relative 'oz/resources/identities'
|
|
12
|
+
require_relative 'oz/resources/sessions'
|
|
13
|
+
require_relative 'oz/resources/conversations'
|
|
14
|
+
require_relative 'oz/resources/agent'
|
|
15
|
+
require_relative 'oz/client'
|
|
16
|
+
|
|
17
|
+
# Ruby SDK for the Oz API — Warp's cloud agent platform.
|
|
18
|
+
#
|
|
19
|
+
# require "oz"
|
|
20
|
+
#
|
|
21
|
+
# client = Oz::Client.new(api_key: ENV["WARP_API_KEY"])
|
|
22
|
+
# run = client.agent.run(prompt: "Fix the bug in auth.rb")
|
|
23
|
+
# puts run.run_id
|
|
24
|
+
#
|
|
25
|
+
# Or configure once and use the shared client:
|
|
26
|
+
#
|
|
27
|
+
# Oz.configure { |c| c.api_key = ENV["WARP_API_KEY"] }
|
|
28
|
+
# Oz.client.agent.runs.list(limit: 20).each { |r| puts r.title }
|
|
29
|
+
module Oz
|
|
30
|
+
# Alias matching the Python/TypeScript SDKs' +OzAPI+ class name.
|
|
31
|
+
OzAPI = Client
|
|
32
|
+
|
|
33
|
+
class << self
|
|
34
|
+
# Yields the global {Configuration} for mutation.
|
|
35
|
+
# @yieldparam config [Oz::Configuration]
|
|
36
|
+
# @return [Oz::Configuration]
|
|
37
|
+
def configure
|
|
38
|
+
yield(configuration) if block_given?
|
|
39
|
+
configuration
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @return [Oz::Configuration] the global configuration singleton.
|
|
43
|
+
def configuration
|
|
44
|
+
@configuration ||= Configuration.new
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Resets global configuration (mainly for tests).
|
|
48
|
+
# @return [Oz::Configuration]
|
|
49
|
+
def reset_configuration!
|
|
50
|
+
@configuration = Configuration.new
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Builds a new {Client}. Accepts the same keyword arguments as
|
|
54
|
+
# {Oz::Client#initialize}.
|
|
55
|
+
# @return [Oz::Client]
|
|
56
|
+
def new(**kwargs)
|
|
57
|
+
Client.new(**kwargs)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# A lazily-built shared client using the global configuration / environment.
|
|
61
|
+
# @return [Oz::Client]
|
|
62
|
+
def client
|
|
63
|
+
@client ||= Client.new
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Replaces the shared client (mainly for tests).
|
|
67
|
+
# @return [nil]
|
|
68
|
+
def reset_client!
|
|
69
|
+
@client = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
data/mise.toml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'lib/oz/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'oz-agent-sdk'
|
|
7
|
+
spec.version = Oz::VERSION
|
|
8
|
+
spec.authors = ['lagents']
|
|
9
|
+
spec.email = ['sunny@lagents.ai']
|
|
10
|
+
spec.summary = 'Ruby SDK for the Oz API — Warp\'s cloud agent platform'
|
|
11
|
+
spec.description = 'Ruby client library for the Oz API, providing convenient access to run and ' \
|
|
12
|
+
'manage cloud agents: runs, schedules, agent identities, environments, and artifacts.'
|
|
13
|
+
spec.homepage = 'https://github.com/warpdotdev/oz-sdk-ruby'
|
|
14
|
+
spec.license = 'Apache-2.0'
|
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
|
16
|
+
|
|
17
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/warpdotdev/oz-sdk-ruby'
|
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/warpdotdev/oz-sdk-ruby/blob/main/CHANGELOG.md'
|
|
20
|
+
spec.metadata['documentation_uri'] = 'https://rubydoc.info/gems/oz-agent-sdk'
|
|
21
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/warpdotdev/oz-sdk-ruby/issues'
|
|
22
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
23
|
+
|
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
25
|
+
if File.exist?('.git')
|
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
+
f.match(%r{\A(?:test|spec|features)/}) || f.match(/\A\./)
|
|
28
|
+
end
|
|
29
|
+
else
|
|
30
|
+
Dir.glob('**/*').reject do |f|
|
|
31
|
+
File.directory?(f) ||
|
|
32
|
+
f.match(%r{\A(?:test|spec|features)/}) ||
|
|
33
|
+
f.match(/\A\./) ||
|
|
34
|
+
f.match(/\.gem$/)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
spec.bindir = 'exe'
|
|
39
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
40
|
+
spec.require_paths = ['lib']
|
|
41
|
+
|
|
42
|
+
# Runtime dependencies
|
|
43
|
+
spec.add_dependency 'faraday', '>= 2.0', '< 3.0'
|
|
44
|
+
|
|
45
|
+
# Development dependencies
|
|
46
|
+
# NB: bundler is intentionally not listed here — it is the build tool, not a
|
|
47
|
+
# library dependency, and pinning it breaks under Ruby 4 (bundler < 2.7 calls
|
|
48
|
+
# the removed CGI.parse). The environment / CI provides a compatible bundler.
|
|
49
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
50
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
51
|
+
spec.add_development_dependency 'rubocop', '~> 1.0'
|
|
52
|
+
spec.add_development_dependency 'simplecov', '~> 0.22'
|
|
53
|
+
spec.add_development_dependency 'webmock', '~> 3.0'
|
|
54
|
+
spec.add_development_dependency 'yard', '~> 0.9'
|
|
55
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: oz-agent-sdk
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- lagents
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: faraday
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '2.0'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '3.0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '2.0'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '3.0'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: rake
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - "~>"
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '13.0'
|
|
39
|
+
type: :development
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - "~>"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '13.0'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: rspec
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '3.0'
|
|
53
|
+
type: :development
|
|
54
|
+
prerelease: false
|
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
+
requirements:
|
|
57
|
+
- - "~>"
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: '3.0'
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: rubocop
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
- - "~>"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '1.0'
|
|
67
|
+
type: :development
|
|
68
|
+
prerelease: false
|
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - "~>"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '1.0'
|
|
74
|
+
- !ruby/object:Gem::Dependency
|
|
75
|
+
name: simplecov
|
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - "~>"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '0.22'
|
|
81
|
+
type: :development
|
|
82
|
+
prerelease: false
|
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - "~>"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: '0.22'
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: webmock
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '3.0'
|
|
95
|
+
type: :development
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '3.0'
|
|
102
|
+
- !ruby/object:Gem::Dependency
|
|
103
|
+
name: yard
|
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - "~>"
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '0.9'
|
|
109
|
+
type: :development
|
|
110
|
+
prerelease: false
|
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
112
|
+
requirements:
|
|
113
|
+
- - "~>"
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '0.9'
|
|
116
|
+
description: 'Ruby client library for the Oz API, providing convenient access to run
|
|
117
|
+
and manage cloud agents: runs, schedules, agent identities, environments, and artifacts.'
|
|
118
|
+
email:
|
|
119
|
+
- sunny@lagents.ai
|
|
120
|
+
executables: []
|
|
121
|
+
extensions: []
|
|
122
|
+
extra_rdoc_files: []
|
|
123
|
+
files:
|
|
124
|
+
- AGENTS.md
|
|
125
|
+
- CHANGELOG.md
|
|
126
|
+
- CONTRIBUTING.md
|
|
127
|
+
- Gemfile
|
|
128
|
+
- LICENSE
|
|
129
|
+
- Makefile
|
|
130
|
+
- README.md
|
|
131
|
+
- Rakefile
|
|
132
|
+
- docs/api_reference.md
|
|
133
|
+
- docs/configuration.md
|
|
134
|
+
- docs/error_handling.md
|
|
135
|
+
- docs/getting_started.md
|
|
136
|
+
- docs/index.md
|
|
137
|
+
- examples/identities.rb
|
|
138
|
+
- examples/list_runs.rb
|
|
139
|
+
- examples/run_agent.rb
|
|
140
|
+
- examples/schedules.rb
|
|
141
|
+
- lib/oz.rb
|
|
142
|
+
- lib/oz/client.rb
|
|
143
|
+
- lib/oz/configuration.rb
|
|
144
|
+
- lib/oz/cursor_page.rb
|
|
145
|
+
- lib/oz/errors.rb
|
|
146
|
+
- lib/oz/model.rb
|
|
147
|
+
- lib/oz/resources/agent.rb
|
|
148
|
+
- lib/oz/resources/base.rb
|
|
149
|
+
- lib/oz/resources/conversations.rb
|
|
150
|
+
- lib/oz/resources/identities.rb
|
|
151
|
+
- lib/oz/resources/runs.rb
|
|
152
|
+
- lib/oz/resources/schedules.rb
|
|
153
|
+
- lib/oz/resources/sessions.rb
|
|
154
|
+
- lib/oz/version.rb
|
|
155
|
+
- mise.toml
|
|
156
|
+
- oz-agent-sdk.gemspec
|
|
157
|
+
homepage: https://github.com/warpdotdev/oz-sdk-ruby
|
|
158
|
+
licenses:
|
|
159
|
+
- Apache-2.0
|
|
160
|
+
metadata:
|
|
161
|
+
allowed_push_host: https://rubygems.org
|
|
162
|
+
source_code_uri: https://github.com/warpdotdev/oz-sdk-ruby
|
|
163
|
+
changelog_uri: https://github.com/warpdotdev/oz-sdk-ruby/blob/main/CHANGELOG.md
|
|
164
|
+
documentation_uri: https://rubydoc.info/gems/oz-agent-sdk
|
|
165
|
+
bug_tracker_uri: https://github.com/warpdotdev/oz-sdk-ruby/issues
|
|
166
|
+
rubygems_mfa_required: 'true'
|
|
167
|
+
rdoc_options: []
|
|
168
|
+
require_paths:
|
|
169
|
+
- lib
|
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
- - ">="
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: 3.1.0
|
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
|
+
requirements:
|
|
177
|
+
- - ">="
|
|
178
|
+
- !ruby/object:Gem::Version
|
|
179
|
+
version: '0'
|
|
180
|
+
requirements: []
|
|
181
|
+
rubygems_version: 4.0.10
|
|
182
|
+
specification_version: 4
|
|
183
|
+
summary: Ruby SDK for the Oz API — Warp's cloud agent platform
|
|
184
|
+
test_files: []
|