omaship 0.4.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb563c444317757eeb0a2a8907d0c6b6b26bd1dc03e2373124270430e8565949
4
- data.tar.gz: cbee20a1cd5b4e9e7c3e6af65246f632e4c024522d0caff7a68027bc8c43a0c5
3
+ metadata.gz: 3d81bc50d3e9969bd22559309c3523b9c26e52433a4d000d1818f3ce4ea29b36
4
+ data.tar.gz: eed39eca2611487699ea309ffca562b8567c20f9b37e40fd134e135352bce773
5
5
  SHA512:
6
- metadata.gz: 70ac4ca7b97b49bdfd46b0ac34d9193f183c57cad9c72a695434c705f92e342246d28ff2cf27a5d5b321bad22fe2ada28102c9277de888b131689c39bf66f147
7
- data.tar.gz: 0432cb652ead9e22d92898bb17bd8d9babf45525b6f2e273248fdd55d47ce2deadf54a014002c9184dce302c024d4bad59abc4d7f2c371aa73217b964e981534
6
+ metadata.gz: 374cff8ff4e957f0a0f52203cb9e2b55713b78ac6925f564aa1ad09f95d120ce4e172edd3c1df0f15a969d54e617f6562a0b0f6b759a05821d2f95257d27dcf0
7
+ data.tar.gz: 77a1d48cf9eae912f52137ceb814170d9092180a6722ec2b63a0b5dd25b7f6532e6bbfbcd17ba07fa5958457de3142e7080da5f76159f29caf6049c709921514
data/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.0](https://github.com/bloomedai/omaship/compare/omaship/v0.5.0...omaship/v0.6.0) (2026-04-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * ✨ align cli ship launch naming and progress ([25fb236](https://github.com/bloomedai/omaship/commit/25fb236ac8a18ab6b8300abe37c139be044cb779))
9
+ * ✨ refresh cli ship creation flow ([27dccc3](https://github.com/bloomedai/omaship/commit/27dccc34dd0d66c51c54887fe5084209ca001e24))
10
+ * ✨ split first deploy from scaffolding ([a21f791](https://github.com/bloomedai/omaship/commit/a21f791edf84918f30fdc42ecb271c3f428254c2))
11
+ * ✨ tighten harbor launch flow ([a5f617c](https://github.com/bloomedai/omaship/commit/a5f617c59b483efaab8ea077142460c8341bb31a))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 🐛 align ship surfaces with product naming ([811b8d2](https://github.com/bloomedai/omaship/commit/811b8d2099c76cc962ab008e80ea30b6d3edc19d))
17
+ * 🐛 fail fast on free plan ship limit ([a2c155b](https://github.com/bloomedai/omaship/commit/a2c155b1e63e688bb5ecd8510c8d80c27b59fd6a))
18
+ * 🐛 honor cli ship capabilities ([19d01f3](https://github.com/bloomedai/omaship/commit/19d01f3b282705248afd890eea9e7a23e0a22bbe))
19
+ * 🐛 improve cli ship type prompt ([779c7bf](https://github.com/bloomedai/omaship/commit/779c7bfa967437cda7db6b9d5a7c0afc04c766bc))
20
+ * 🐛 label admin cli access as master ([27851b0](https://github.com/bloomedai/omaship/commit/27851b0289f0e4fbe5467a88163552cba654895f))
21
+ * 🐛 redraw cli activity on one line ([b6036fe](https://github.com/bloomedai/omaship/commit/b6036fea38389231ded894b38db408b9c5b890e3))
22
+ * 🐛 refine CLI landing page flow ([bfbf661](https://github.com/bloomedai/omaship/commit/bfbf661d451e1b1a673ec5f81203d6e5bf29dce1))
23
+
24
+ ## [0.5.0](https://github.com/bloomedai/omaship/compare/omaship/v0.4.0...omaship/v0.5.0) (2026-04-04)
25
+
26
+
27
+ ### Features
28
+
29
+ * ✨ enforce cli semver gate ([39952c0](https://github.com/bloomedai/omaship/commit/39952c0e855043acd1f1bcb3c4f963457032de4c))
30
+ * adopt run-first ship flow and terminology ([#381](https://github.com/bloomedai/omaship/issues/381)) ([8bc857f](https://github.com/bloomedai/omaship/commit/8bc857fe3fcec6213f7d9d90fc9e8511411c8b00))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * 🐛 align onboarding cli flow ([611425a](https://github.com/bloomedai/omaship/commit/611425a8d84446312daa33afb0c5ed49e8500e01))
36
+ * 🐛 HTML-escape landing page inputs, prompt injection defense, regenerate on rename ([#353](https://github.com/bloomedai/omaship/issues/353)) ([85822df](https://github.com/bloomedai/omaship/commit/85822dfdc4dba3758ff506b4e08422d9c8be3187))
37
+ * 🐛 move cli ship identity into api ([c331548](https://github.com/bloomedai/omaship/commit/c331548e8953de09524aa780b550bf2100cab502))
38
+ * 🐛 remove cli skip-purpose flag ([b815ff7](https://github.com/bloomedai/omaship/commit/b815ff767430a5301012a1ba44583e305446f1a8))
39
+ * 🐛 support landing ships in cli ([1a2f7fe](https://github.com/bloomedai/omaship/commit/1a2f7fecfa1f1b1ad277e6e007dd7303a1d2420a))
40
+
41
+
42
+ ### Code Refactoring
43
+
44
+ * ♻️ rename LandingPage to Landingpage ([#337](https://github.com/bloomedai/omaship/issues/337)) ([16e9467](https://github.com/bloomedai/omaship/commit/16e9467dceea8e9a595f4be2edf8b89e9759bdfa))
45
+
3
46
  ## [0.4.0](https://github.com/bloomedai/omaship/compare/omaship/v0.3.0...omaship/v0.4.0) (2026-03-14)
4
47
 
5
48
 
data/README.md CHANGED
@@ -27,20 +27,20 @@ omaship info
27
27
  Examples for `SHIP_REF` (from `omaship list` output):
28
28
 
29
29
  ```bash
30
- omaship use omaship/acme
30
+ omaship use acme.omaship.app
31
31
  omaship use 17
32
32
  ```
33
33
 
34
34
  ## Ship Selection
35
35
 
36
- `info` and `deploy` resolve the target ship in this order:
36
+ `info` resolves the target ship in this order:
37
37
 
38
38
  1. `--ship <ship-ref>`
39
39
  2. saved default from `omaship use <ship-ref>`
40
40
  3. if exactly one accessible ship exists: auto-select it and persist it as default
41
41
  4. otherwise: command fails and asks you to run `omaship list` + `omaship use ...`
42
42
 
43
- Preferred ship reference format is full ship name (`org/repo`).
43
+ Preferred ship reference format is the ship domain from `omaship list`.
44
44
  Numeric ids are also accepted.
45
45
 
46
46
  ## Commands
@@ -51,18 +51,32 @@ Numeric ids are also accepted.
51
51
  - `omaship use <ship-ref>`
52
52
  - `omaship info [--ship <ship-ref>]` (`status` and `ship` are aliases)
53
53
  - `omaship new <name>` (requires Full CLI access)
54
- - `omaship deploy [--ship <ship-ref>]` (requires Full CLI access)
55
54
  - `omaship complete <bash|zsh|fish>` (print shell completion script)
56
55
  - `omaship logout`
57
56
 
58
- ## Local Development Provisioning
57
+ ## Product Direction
59
58
 
60
- When you run `omaship new <name>` against local Omaship development (`OMASHIP_HOST=http://localhost:3000`), provisioning first installs gems from `https://packages.omaship.com`.
59
+ Omaship CLI is evolving to support two complementary use cases:
60
+
61
+ - standalone Omaship users launching and operating ship runs directly
62
+ - Sokrates-orchestrated workflows where Sokrates calls Omaship capabilities
63
+
64
+ Related docs:
65
+
66
+ - [Sokrates × Omaship Vision](../docs/sokrates-omaship-vision.md)
67
+ - [Sokrates Integration Task List](../docs/sokrates-integration-tasklist.md)
68
+ - [Landing Pages Improvement Plan](../docs/landingpages-improvement-plan.md)
69
+
70
+ ## Local Development Run Execution
71
+
72
+ When you run `omaship new <name>` against local Omaship development (`OMASHIP_HOST=http://localhost:3000`), the initial run first installs gems from `https://packages.omaship.com`.
61
73
 
62
74
  If that registry endpoint is unavailable, Omaship automatically retries `bundle install` through the local package proxy mirror at `http://build.localhost:3000/packages`.
63
75
 
64
76
  ## Shell Completion
65
77
 
78
+ Homebrew installs completions automatically. For RubyGems installs, local repo usage, or other manual setups, install the generated script yourself:
79
+
66
80
  Bash:
67
81
 
68
82
  ```bash
@@ -107,14 +121,14 @@ omaship complete fish > ~/.config/fish/completions/omaship.fish
107
121
  Run from repository root:
108
122
 
109
123
  ```bash
110
- mise exec ruby@4.0.1 -- env BUNDLE_GEMFILE=cli/Gemfile bundle exec ruby cli/bin/omaship -h
124
+ mise exec ruby@4.0.2 -- env BUNDLE_GEMFILE=cli/Gemfile bundle exec ruby cli/bin/omaship -h
111
125
  ```
112
126
 
113
127
  Run all CLI tests:
114
128
 
115
129
  ```bash
116
130
  cd cli
117
- mise exec ruby@4.0.1 -- bundle exec ruby -Itest -e 'Dir.glob("test/**/*_test.rb").sort.each { |f| require "./#{f}" }'
131
+ mise exec ruby@4.0.2 -- bundle exec ruby -Itest -e 'Dir.glob("test/**/*_test.rb").sort.each { |f| require "./#{f}" }'
118
132
  ```
119
133
 
120
134
  ## Release Automation
@@ -8,6 +8,7 @@ module Omaship
8
8
  class UnauthorizedError < Error; end
9
9
  class PermissionDeniedError < Error; end
10
10
  class NotFoundError < Error; end
11
+ class UpgradeRequiredError < Error; end
11
12
 
12
13
  def initialize(host:, token:)
13
14
  @host = host.to_s
@@ -22,13 +23,31 @@ module Omaship
22
23
  get_json("/api/v1/cli/ships").fetch("ships")
23
24
  end
24
25
 
25
- def create_ship(root_domain:, visibility: "private")
26
- post_json("/api/v1/cli/ships", { ship: { root_domain: root_domain, visibility: visibility } })
26
+ def create_ship(
27
+ name:,
28
+ harbor_id:,
29
+ root_domain:,
30
+ bring_own_domain:,
31
+ identifier_suffix:,
32
+ visibility: "private",
33
+ starter_kind: "app"
34
+ )
35
+ post_json("/api/v1/cli/ships", {
36
+ ship: {
37
+ name: name,
38
+ harbor_id: harbor_id,
39
+ root_domain: root_domain,
40
+ visibility: visibility,
41
+ starter_kind: starter_kind,
42
+ bring_own_domain: bring_own_domain,
43
+ identifier_suffix: identifier_suffix
44
+ }
45
+ })
27
46
  end
28
47
 
29
- def create_landing_page(name:, color_scheme: "mono-dark", purpose_profile: {})
48
+ def create_landingpage(name:, color_scheme: "mono-dark", purpose_profile: {})
30
49
  post_json("/api/v1/cli/ships", {
31
- ship: { name: name, landing_page: true, color_scheme: color_scheme },
50
+ ship: { name: name, landingpage: true, color_scheme: color_scheme },
32
51
  purpose_profile: purpose_profile
33
52
  })
34
53
  end
@@ -37,12 +56,8 @@ module Omaship
37
56
  get_json("/api/v1/cli/ships/#{ship_id}")
38
57
  end
39
58
 
40
- def create_deploy(ship_id:)
41
- post_json("/api/v1/cli/ships/#{ship_id}/deploys", {})
42
- end
43
-
44
- def latest_deploy(ship_id:)
45
- get_json("/api/v1/cli/ships/#{ship_id}/deploys/latest")
59
+ def voyage(voyage_id:)
60
+ get_json("/api/v1/cli/voyages/#{voyage_id}")
46
61
  end
47
62
 
48
63
  private
@@ -60,11 +75,9 @@ module Omaship
60
75
  def parse_response(response)
61
76
  case response.status
62
77
  when 200..299
63
- if response.body.to_s.empty?
64
- {}
65
- else
66
- JSON.parse(response.body)
67
- end
78
+ response_json(response)
79
+ when 426
80
+ raise upgrade_required_error(response)
68
81
  when 401
69
82
  raise UnauthorizedError, "Unauthorized"
70
83
  when 403
@@ -80,9 +93,55 @@ module Omaship
80
93
  @connection ||= Faraday.new(url: @host) do |faraday|
81
94
  faraday.request :retry, max: 2, interval: 0.1
82
95
  faraday.adapter Faraday.default_adapter
83
- faraday.headers["Authorization"] = "Bearer #{@token}"
84
- faraday.headers["Accept"] = "application/json"
96
+ faraday.headers.update(request_headers)
97
+ end
98
+ end
99
+
100
+ def request_headers
101
+ {
102
+ "Authorization" => "Bearer #{@token}",
103
+ "Accept" => "application/json",
104
+ "X-Omaship-CLI-Version" => Omaship::VERSION
105
+ }
106
+ end
107
+
108
+ def response_json(response)
109
+ if response.body.to_s.empty?
110
+ {}
111
+ else
112
+ JSON.parse(response.body)
85
113
  end
114
+ rescue JSON::ParserError
115
+ {}
116
+ end
117
+
118
+ def upgrade_required_error(response)
119
+ payload = response_json(response)
120
+ minimum_version = payload["minimum_version"].to_s.strip
121
+ current_version = payload["current_version"].to_s.strip
122
+ upgrade_command = payload["upgrade_command"].to_s.strip
123
+
124
+ message = []
125
+
126
+ if current_version.empty?
127
+ message << "Your CLI is no longer supported."
128
+ else
129
+ message << "CLI #{current_version} is no longer supported."
130
+ end
131
+
132
+ if minimum_version.empty?
133
+ message << "Install the latest version."
134
+ else
135
+ message << "Minimum supported version is #{minimum_version}."
136
+ end
137
+
138
+ if upgrade_command.empty?
139
+ message << "Upgrade your CLI and try again."
140
+ else
141
+ message << "Run `#{upgrade_command}` and try again."
142
+ end
143
+
144
+ UpgradeRequiredError.new(message.join(" "))
86
145
  end
87
146
  end
88
147
  end