elan-cli 0.1.4__tar.gz → 0.1.5__tar.gz

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.
Files changed (31) hide show
  1. {elan_cli-0.1.4 → elan_cli-0.1.5}/CHANGELOG.md +31 -1
  2. {elan_cli-0.1.4 → elan_cli-0.1.5}/PKG-INFO +1 -1
  3. {elan_cli-0.1.4 → elan_cli-0.1.5}/pyproject.toml +1 -1
  4. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/deploy.py +102 -16
  5. {elan_cli-0.1.4 → elan_cli-0.1.5}/.gitignore +0 -0
  6. {elan_cli-0.1.4 → elan_cli-0.1.5}/LICENSE +0 -0
  7. {elan_cli-0.1.4 → elan_cli-0.1.5}/README.md +0 -0
  8. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/__init__.py +0 -0
  9. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/adk.py +0 -0
  10. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/auth.py +0 -0
  11. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/child.py +0 -0
  12. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/client.py +0 -0
  13. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/config.py +0 -0
  14. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/destroy.py +0 -0
  15. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/doctor.py +0 -0
  16. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/env.py +0 -0
  17. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/files.py +0 -0
  18. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/invoke.py +0 -0
  19. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/logs.py +0 -0
  20. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/main.py +0 -0
  21. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/manifests.py +0 -0
  22. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/project.py +0 -0
  23. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/projects.py +0 -0
  24. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/prompt.py +0 -0
  25. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/rollback.py +0 -0
  26. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/scaffold.py +0 -0
  27. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/secret.py +0 -0
  28. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/stream.py +0 -0
  29. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/tenant.py +0 -0
  30. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/validate.py +0 -0
  31. {elan_cli-0.1.4 → elan_cli-0.1.5}/src/elan_cli/wallet.py +0 -0
@@ -3,7 +3,37 @@
3
3
  Versions follow the tag that published them — `cli/v*`. A version with no date
4
4
  has not been published yet.
5
5
 
6
- ## 0.1.4 — unreleased
6
+ ## 0.1.5 — 2026-11-15
7
+
8
+ ### Added
9
+ - **A successful `elan deploy` ends with "What's Next?"** It links the console's
10
+ Playground, already open on your agent when the deploy has one target, and
11
+ the quickstart for calling the agent from your app. `elan status` does not
12
+ repeat it. Like the scan link, both come from the platform, so they point at
13
+ the right console for the environment you deployed to.
14
+
15
+ ### Changed
16
+ - **`elan deploy` and `elan status` summarise a scan instead of printing all of
17
+ it.** A real image carries hundreds of findings, and every one was printed as
18
+ a raw Python dict, which buried the deploy's outcome. You now get one line of
19
+ counts by severity, then each CRITICAL finding (fixable ones first, at most
20
+ ten) with the version that fixes it. A link to the deployment's Scan tab in
21
+ the console follows, where the full list can be filtered by severity and by
22
+ whether a fix exists. A refused deploy links the same report after its
23
+ problems. The link is one the platform supplies, so it keeps working if the
24
+ console's pages move.
25
+ - **The `image <registry path>` line is gone.** That path is in the platform's
26
+ own registry, which you can neither open nor pull from. The rollout table
27
+ still shows which targets moved to the new digest.
28
+
29
+ ### Fixed
30
+ - **An image that was never scanned now says so.** The CLI looked for
31
+ `skipped` and `reason`, which the platform never sends; it sends
32
+ `completed: false` and `incomplete_reason`. So an unscanned image printed
33
+ nothing, which looked exactly like a clean one. It now prints
34
+ `not scanned: <reason>` and that this is not the same as clean.
35
+
36
+ ## 0.1.4 — 2026-11-13
7
37
 
8
38
  ### Added
9
39
  - A refusal that names a page to fix it now prints that page. `elan project
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: elan-cli
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: The command line a developer deploys an agent with
5
5
  Project-URL: Homepage, https://openelan.ai
6
6
  Project-URL: Documentation, https://openelan.ai/app/docs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "elan-cli"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  description = "The command line a developer deploys an agent with"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -196,12 +196,17 @@ def _follow(api: Api, deployment_id: str, *, sleep=time.sleep) -> int:
196
196
  seen = phase
197
197
 
198
198
  if str(status.get("state")) in TERMINAL:
199
- return report(status)
199
+ return report(status, after_deploy=True)
200
200
  sleep(POLL_SECONDS)
201
201
 
202
202
 
203
- def report(status: dict) -> int:
204
- """What happened, in the shape somebody actually asks about."""
203
+ def report(status: dict, *, after_deploy: bool = False) -> int:
204
+ """What happened, in the shape somebody actually asks about.
205
+
206
+ `after_deploy` adds "What's Next?" to a success — the moment somebody has
207
+ just shipped an agent and wants to use it. `elan status` passes nothing,
208
+ because reading an old deploy is not that moment.
209
+ """
205
210
  state = str(status.get("state"))
206
211
  print()
207
212
 
@@ -212,6 +217,10 @@ def report(status: dict) -> int:
212
217
  for line in str(problem.get("message", "")).splitlines():
213
218
  print(f" {line}")
214
219
  print()
220
+ # A SCAN REFUSAL NAMES ITS FIXES ABOVE; the whole report is a link
221
+ # away, for whatever else the image carries.
222
+ if status.get("scan") and (link := (status.get("links") or {}).get("scan")):
223
+ print(f" full scan report: {link}")
215
224
  return 1
216
225
 
217
226
  if state == "failed":
@@ -224,15 +233,47 @@ def report(status: dict) -> int:
224
233
  print(" Those resources still exist and are still billed.")
225
234
  return 1
226
235
 
236
+ # NO `image <registry path>` LINE. That path is in the PLATFORM's registry,
237
+ # which a developer can neither open nor pull from, so it named nothing
238
+ # they could use; the table below shows which targets moved to the new
239
+ # digest, which is the part that answers a question.
227
240
  digest = status.get("digest") or ""
228
- if digest:
229
- print(f"image {digest}")
230
-
231
241
  _rollout(status.get("rollout") or {}, digest)
232
- _scan(status.get("scan") or {})
242
+ _scan(status.get("scan") or {}, status.get("links") or {})
243
+ if after_deploy and state == "succeeded":
244
+ _next_steps(status.get("links") or {})
233
245
  return 0
234
246
 
235
247
 
248
+ def _next_steps(links: dict) -> None:
249
+ """Where to go once an agent is live: try it, then wire it into an app.
250
+
251
+ ONE AGENT IS NAMED, MORE ARE PICKED. A deploy of one target links the
252
+ playground already open on it; a project of several links the playground
253
+ itself, where the reader chooses — a list of a link per agent is a list
254
+ nobody reads to the end.
255
+
256
+ EVERY URL IS THE PLATFORM'S, from `links` (ADR-0175): this package spells
257
+ no console path, so these keep working when the console's pages move, and
258
+ a platform that offers none gets no section rather than a broken one.
259
+ """
260
+ targets = links.get("playground_targets") or {}
261
+ lines: list[tuple[str, str]] = []
262
+ if len(targets) == 1:
263
+ (slug, link), = targets.items()
264
+ lines.append((f"Try {slug} in the Playground:", link))
265
+ elif links.get("playground"):
266
+ lines.append(("Try your agents in the Playground:", links["playground"]))
267
+ if links.get("quickstart"):
268
+ lines.append(("Integrate it with your app:", links["quickstart"]))
269
+ if not lines:
270
+ return
271
+ width = max(len(label) for label, _ in lines)
272
+ print("\n What's Next?")
273
+ for label, link in lines:
274
+ print(f" {label:<{width}} {link}")
275
+
276
+
236
277
  def _rollout(rollout: dict, digest: str) -> None:
237
278
  """Which targets moved, and which kept what they were running.
238
279
 
@@ -242,24 +283,69 @@ def _rollout(rollout: dict, digest: str) -> None:
242
283
  """
243
284
  if not rollout:
244
285
  return
245
- print("\n target digest")
286
+ print(" target digest")
246
287
  for slug, target_digest in sorted(rollout.items()):
247
288
  shown = str(target_digest).rsplit("@", 1)[-1][:19] or "-"
248
289
  moved = " <- new" if digest and target_digest == digest else ""
249
290
  print(f" {slug:<26} {shown}{moved}")
250
291
 
251
292
 
252
- def _scan(scan: dict) -> None:
253
- """WHETHER IT WAS SCANNED, not only what was found. A tenant reading
254
- nothing cannot tell a clean image from one nobody looked at."""
293
+ #: Worst first, in the platform's own vocabulary, and how each reads here.
294
+ SEVERITIES = {"CRITICAL": "critical", "HIGH": "high", "MEDIUM": "medium",
295
+ "LOW": "low", "MINIMAL": "minimal",
296
+ "SEVERITY_UNSPECIFIED": "unrated"}
297
+
298
+ #: How many CRITICAL findings are listed before the rest is left to the link.
299
+ SHOWN = 10
300
+
301
+
302
+ def _scan(scan: dict, links: dict) -> None:
303
+ """A SUMMARY, THE CRITICAL FINDINGS, AND A LINK — never the whole list.
304
+
305
+ A real image carries hundreds of findings, nearly all of them unfixable
306
+ base-image packages, and printing every one buried the deploy's outcome
307
+ under a page of dicts. What a developer acts on from a terminal is the
308
+ tally and anything CRITICAL; the console's Scan tab has the rest, with
309
+ filters, one link away (`links.scan`, a deep link the platform composes —
310
+ this package spells no console path, ADR-0175).
311
+
312
+ WHETHER IT WAS SCANNED, not only what was found. A tenant reading nothing
313
+ cannot tell a clean image from one nobody looked at. This read `skipped`
314
+ and `reason`, which the API never sent — it sends `completed: false` and
315
+ `incomplete_reason` — so an unscanned image printed nothing at all.
316
+ """
255
317
  if not scan:
256
318
  return
257
- if scan.get("skipped"):
258
- print(f"\n not scanned: {scan.get('reason', 'no reason recorded')}")
319
+ link = links.get("scan", "")
320
+ if not scan.get("completed"):
321
+ reason = scan.get("incomplete_reason") or "no reason recorded"
322
+ print(f"\n not scanned: {reason}")
323
+ print(" this image was deployed without a vulnerability check, "
324
+ "which is not the same as clean")
325
+ if link:
326
+ print(f" {link}")
259
327
  return
260
- findings = scan.get("findings")
261
- if findings:
262
- print(f"\n scan: {findings}")
328
+
329
+ findings = scan.get("findings") or []
330
+ if not findings:
331
+ print("\n scan: nothing found")
332
+ else:
333
+ counts = scan.get("counts") or {}
334
+ tally = ", ".join(f"{counts[name]} {label}"
335
+ for name, label in SEVERITIES.items() if counts.get(name))
336
+ print(f"\n scan: {len(findings)} findings — {tally}")
337
+ # FIXABLE FIRST: those are the ones somebody can act on today.
338
+ critical = sorted((f for f in findings if f.get("severity") == "CRITICAL"),
339
+ key=lambda f: not f.get("fixable"))
340
+ for finding in critical[:SHOWN]:
341
+ fix = (f"fixed in {finding.get('fixed_version')}" if finding.get("fixable")
342
+ else "no fix available")
343
+ print(f" CRITICAL {finding.get('cve')} {finding.get('package')} "
344
+ f"{finding.get('installed_version')} ({fix})")
345
+ if len(critical) > SHOWN:
346
+ print(f" … and {len(critical) - SHOWN} more critical")
347
+ if link:
348
+ print(f" full report: {link}")
263
349
 
264
350
 
265
351
  def status(api: Api, deployment_id: str) -> int:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes