deployangel 0.1.27 → 0.1.28

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: 480a4d0a0e8ff4206659a86d40ea0fbfb2c5cc20f55e205aa5a724914add1acf
4
- data.tar.gz: bdd81c91faac1642d5f78633ab48bd2efb80e15d6a8b3022d4a0d8e18c967f4f
3
+ metadata.gz: fde8310f8129827b4b759369146c2346542a776ab13ac91fe7001617e93a7ebb
4
+ data.tar.gz: 15a216435704ea45fce03e0a1433d615dc28f6c07fdd6e33c90bebed23361779
5
5
  SHA512:
6
- metadata.gz: e669f7ad136b1328c7f672120dc00b7f5afb20a09a6ca7b27a37c25e26709f678aec6c5fb24dcc1de68c2ffd04a73e1687d2132f09c94ea95cabf72d4731c597
7
- data.tar.gz: 88e02d9c250287ac051b233bada6a7469507860aa62cc03390dee8b566770eba38c79431b0e882778b9351a9ca59d03c68b26c8d9cd188c390ee65ad0a4093e8
6
+ metadata.gz: e6e7ae24a04e3999af5865e2cf5be14054cdfc92b5644b1a4f5d8bd56c407faf874b122db23508bbcb3b268e461a89d68a16a3a235e166cf457e10e063a4c3f9
7
+ data.tar.gz: 3e2bb9e11c4d8b35134fdb9088beabcaf0ba5b99b484c9e4b0e2dfc3b710aa544507b55f6a3a222c0446d4b6edbec0f935f0049f03e2039cc19e253767560530
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.28 (2026-10-12)
4
+
5
+ - Clearer setup for coding agents, from a first-day rehearsal: `setup` says
6
+ the running app reads its token only from `DEPLOYANGEL_TOKEN` and points to
7
+ the per-host steps instead of printing Fly and Heroku examples; `install
8
+ agents` says the saved token is used here once `setup` has run; `doctor`'s
9
+ fix for an agent that hasn't reported says how to pass a saved app token;
10
+ and the help says `release` defaults to the current commit and when
11
+ `--format` defaults to json.
12
+
3
13
  ## 0.1.27 (2026-10-12)
4
14
 
5
15
  - The MCP server's instructions, and the ones `deployangel install agents`
@@ -49,7 +49,8 @@ module DeployAngel
49
49
  into a host's or CI's secrets
50
50
  mcp Run the MCP server over stdio (for coding agents)
51
51
 
52
- With no target, verify, plan, and check use the current git HEAD commit.
52
+ With no target, release, verify, plan, and check use the current git HEAD commit.
53
+ --format defaults to text in a terminal and json otherwise, such as in a pipe or an agent.
53
54
  In GitHub Actions, GitLab CI, CircleCI, and Buildkite, release fills in the
54
55
  commit, a build label (e.g. run-123), and a link to the run automatically.
55
56
  In a Kamal hook, it registers Kamal's release (KAMAL_VERSION).
@@ -123,10 +124,19 @@ module DeployAngel
123
124
  #{AGENTS_END}
124
125
  MARKDOWN
125
126
 
127
+ # After `deployangel setup`, the MCP server and CLI here use its saved token.
128
+ AGENTS_SAVED_TOKEN_HELP = <<~HELP.chomp
129
+ Here, the MCP server and CLI use the token `deployangel setup` saved in .deployangel/.
130
+ Teammates redeem their own setup code, or set DEPLOYANGEL_API_TOKEN to a
131
+ "CLI & coding agents" token from the app's Settings, for example in an .envrc
132
+ with direnv. These files hold no token and are meant to be committed.
133
+ Codex reads .codex/config.toml only in projects you've marked as trusted.
134
+ HELP
126
135
  AGENTS_TOKEN_HELP = <<~HELP.chomp
127
136
  The MCP server and CLI need DEPLOYANGEL_API_TOKEN, a "CLI & coding agents" token
128
137
  from the app's Settings, in the environment your agent runs in (for example in
129
- an .envrc with direnv). Never put it in these files: they're meant to be committed.
138
+ an .envrc with direnv), or a token saved here by `deployangel setup`.
139
+ Never put it in these files: they're meant to be committed.
130
140
  Codex reads .codex/config.toml only in projects you've marked as trusted.
131
141
  HELP
132
142
 
@@ -414,7 +424,7 @@ module DeployAngel
414
424
  install_codex_mcp(command),
415
425
  *install_agent_instructions
416
426
  ]
417
- @stdout.puts(*lines, "", AGENTS_TOKEN_HELP)
427
+ @stdout.puts(*lines, "", Credentials.find(@root) ? AGENTS_SAVED_TOKEN_HELP : AGENTS_TOKEN_HELP)
418
428
  0
419
429
  end
420
430
 
@@ -621,11 +631,11 @@ module DeployAngel
621
631
  Set up DeployAngel for #{app["name"]} (#{app["environment"]}). Saved its app token and a "CI deploys" token to
622
632
  #{relative}, kept out of git and not shown here. The deployangel command and MCP server here use them.
623
633
 
624
- Give production the app token without printing it, for example:
625
- fly secrets set DEPLOYANGEL_TOKEN=$(#{command_name} token app)
626
- heroku config:set DEPLOYANGEL_TOKEN=$(#{command_name} token app)
627
- and CI the "CI deploys" token:
628
- #{command_name} token api | gh secret set DEPLOYANGEL_API_TOKEN
634
+ The running app reads its token only from DEPLOYANGEL_TOKEN in its environment, so give it the app
635
+ token without printing it: $(#{command_name} token app) in the command that starts it or sets your
636
+ host's secrets, or #{command_name} token app | <a command that reads a secret>. The same goes for CI and
637
+ the "CI deploys" token (#{command_name} token api). Steps for each host:
638
+ https://www.deployangel.com/setup-for-agents.md
629
639
  TEXT
630
640
  0
631
641
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "time"
4
4
  require_relative "configuration"
5
+ require_relative "credentials"
5
6
  require_relative "metadata"
6
7
  require_relative "rails/metadata"
7
8
  require_relative "core/release"
@@ -99,8 +100,20 @@ module DeployAngel
99
100
  Check.new(status: :warn, message: "The agent last reported #{time(agent["last_received_at"])}, and nothing since",
100
101
  fix: "Check the app is running, and that DEPLOYANGEL_TOKEN is still set on its processes.")
101
102
  else
102
- Check.new(status: :warn, message: "The agent hasn't reported yet",
103
- fix: "Deploy with DEPLOYANGEL_TOKEN set to the app's agent token (Settings, Tokens: \"Deployed application\").")
103
+ Check.new(status: :warn, message: "The agent hasn't reported yet", fix: token_fix)
104
+ end
105
+ end
106
+
107
+ # The running app reads its token only from DEPLOYANGEL_TOKEN in its
108
+ # environment, never from the file `deployangel setup` saves.
109
+ def token_fix
110
+ if Credentials.find(@root)
111
+ command = File.exist?(File.join(@root, "Gemfile")) ? "bundle exec deployangel" : "deployangel"
112
+ "Start or deploy the app with DEPLOYANGEL_TOKEN in its processes' environment. The app token is saved here, " \
113
+ "so pass it without printing it: $(#{command} token app) in the start command or your host's secrets command."
114
+ else
115
+ "Start or deploy the app with DEPLOYANGEL_TOKEN in its processes' environment, set to its app token " \
116
+ "(\"Deployed application\" in the app's Settings, under API tokens)."
104
117
  end
105
118
  end
106
119
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployAngel
4
- VERSION = "0.1.27"
4
+ VERSION = "0.1.28"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployangel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Owens
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 4.0.0
89
+ rubygems_version: 3.6.9
90
90
  specification_version: 4
91
91
  summary: 'DeployAngel agent for Rails: production verification for every deployment.'
92
92
  test_files: []