Skip to content

Commit c851d59

Browse files
Merge pull request #4 from godaddy/codex/agent-first-cli-retrofit
feat(cli): retrofit commands to agent-first JSON envelopes
2 parents bfe4e35 + 936ed58 commit c851d59

File tree

100 files changed

+12840
-7724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+12840
-7724
lines changed

.agents/skills/cli-design/SKILL.md

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
interface:
2+
icon_small: "./assets/small-logo.svg"
3+
icon_large: "./assets/large-logo.png"
5.11 KB
Loading
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@godaddy/cli": minor
3+
---
4+
5+
Replace keytar native addon with cross-platform OS keychain (macOS security CLI, Linux secret-tool, Windows PasswordVault). No native Node addons required.
6+
7+
Fix CLI error routing: validation guard no longer misclassifies AuthenticationError and NetworkError as input validation errors.
8+
9+
Fix `application list` to use Relay connection syntax (edges/node) matching the updated GraphQL schema.
10+
11+
Add `--scope` option to `auth login` for requesting additional OAuth scopes beyond the defaults.
12+
13+
Add `--scope` option to `api` command with automatic re-authentication on 403: decodes the JWT to detect missing scopes, triggers the browser auth flow, and retries the request.

.changeset/quiet-foxes-divide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@godaddy/cli": patch
3+
---
4+
5+
Fix `application deploy` by using the correct GraphQL enum casing when requesting the latest release.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,6 @@ schema.graphql
197197
graphql-env.d.ts
198198

199199
# Alternative package manager lockfiles
200-
bun.lock
200+
bun.lock
201+
202+
.pnpm-store

AGENTS.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Agent Notes
2+
3+
## Effect-First Patterns (Required)
4+
- Command handlers must use `Command.action(...)` with `Effect` values.
5+
- Do not use `actionAsync` anywhere.
6+
- Prefer `Effect.gen` for multi-step flows and `Effect.sync` for pure sync handlers.
7+
- Use `Effect.catchAll` at command boundaries to map runtime errors into structured CLI envelopes.
8+
9+
## API Layer Pattern
10+
- Public module APIs use this shape:
11+
1. Internal Promise implementation: `async function fooPromise(...)`.
12+
2. Effect API: `export function fooEffect(...) => Effect.tryPromise(...)`.
13+
3. Promise boundary wrapper (for compatibility): `export function foo(...) => Effect.runPromise(fooEffect(...))`.
14+
- Keep `Effect.runPromise` usage at boundaries only (CLI entrypoint and compatibility wrappers).
15+
16+
## Imports and Dependencies
17+
- Use `import * as Effect from "effect/Effect"` directly.
18+
- Do not reintroduce `toEffect`/`effect-interop`; wrappers are explicit per function.
19+
- Prefer static imports of `*Effect` APIs over dynamic imports in commands.
20+
21+
## Streaming / Long-Running Commands
22+
- For streamed command output, emit:
23+
1. start event,
24+
2. progress/step events,
25+
3. final result event,
26+
4. mapped stream error event on failure.
27+
- Keep stream callbacks best-effort and non-fatal.
28+
29+
## Verification Checklist
30+
- `pnpm exec tsc --noEmit`
31+
- `pnpm run build`
32+
- `pnpm test tests/integration/cli-smoke.test.ts tests/unit/application-deploy-security.test.ts tests/unit/cli/deploy-stream.test.ts`
33+
- `rg "export async function" src` should be `0`.
34+
- `rg "toEffect|effect-interop" src` should be `0`.
35+
36+
## Migration Pitfalls Seen
37+
- Name collisions: if a file already has a hand-written `*Effect` (example: deploy), do not route compatibility wrappers to the wrong effect signature.
38+
- Codemods can break import blocks; run typecheck immediately after broad transforms.
39+
- Keep command-level error emission consistent (`mapRuntimeError` + `nextActionsFor(...)`).

CLAUDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# CLAUDE.md
1+
# CLAUDE.md - GoDaddy CLI
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## Local Development Ports
6+
7+
This is a command-line application that does not run on a network port.
8+
59
# GoDaddy CLI Development Guide
610

711
## Commands

0 commit comments

Comments
 (0)