Skip to content

feat(cli): ops commands plus wait/tail/login - #5

Merged
jonathanong merged 3 commits into
mainfrom
feat/cli-ops
Nov 10, 2026
Merged

jonathanong merged 3 commits into
mainfrom
feat/cli-ops

Conversation

@jonathanong

@jonathanong jonathanong commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • hook-harness CLI (packages/cli): deploy, update, teardown, status, token create|list|revoke against the relay CloudFormation stack (AWS SDK v3, SDK waiters, dependency-free zip writer, 0600 state file).
  • wait and tail are the primary consumer interface (a long-running agent runs hook-harness wait as a background command). wait prints one JSON object and always exits 0 (match, gap, or timedOut); login stores the relay URL and token.
  • Self-contained cursors: every output carries cursor (base64url JSON {v,sk,seen}); pass it back as --after. Precedence: --after > --cursor state file > --since > now.
  • Payloads: deploy/update take --payload-drop and --payload-max-bytes (keep previous values on update unless passed). wait/tail include payloads by default; --no-payload sends payload=0. payload/payloadOmitted pass through untouched; help warns payload text is untrusted.
  • Org-wide / multi-repo: --owner plus repeatable --repo sent as one repos=a/b,a/c param.
  • Polling sits behind an EventSource interface (watch/types.ts) so a future local serve can replace the relay poller. bin.ts dispatches via a command table; the runner adds run/service through main(argv, ctx, extra).

Relay contract

  • Rebased on main with the real relay. Tests use the real packages/relay/template.yaml and assert every deploy flag maps to a real template parameter and the three outputs exist. A test asserts the local sha256Hex equals relay tokenHash. Smoke check is GET events?owner=x expecting 401.
  • after is the relay cursor or a bare epoch-ms string. The bundle is still a fixture in tests (dist is built by pnpm build).

Test plan

  • pnpm check passes (165 tests, 100% coverage). Nothing was run against real AWS.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MaU9o1s775q1DoiNSPtC4b

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T05:48:48.984749Z
We couldn’t complete this review. Comment @codex review to try again.
54a722f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Free
  • Run ID: c20f75fd-da15-4976-a4d8-d183125b9fbd
Commits

Reviewing files that changed from the base of the PR and between 951ef6c and 89be005.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 48

  • packages/cli/package.json
  • packages/cli/src/args.ts
  • packages/cli/src/aws/cfn.test.ts
  • packages/cli/src/aws/cfn.ts
  • packages/cli/src/aws/clients.ts
  • packages/cli/src/aws/lambda.ts
  • packages/cli/src/aws/tokens.ts
  • packages/cli/src/bin.ts
  • packages/cli/src/client.ts
  • packages/cli/src/commands/common.test.ts
  • packages/cli/src/commands/common.ts
  • packages/cli/src/commands/deploy-params.ts
  • packages/cli/src/commands/deploy.test.ts
  • packages/cli/src/commands/deploy.ts
  • packages/cli/src/commands/login.ts
  • packages/cli/src/commands/ops.test.ts
  • packages/cli/src/commands/payload.test.ts
  • packages/cli/src/commands/status.ts
  • packages/cli/src/commands/tail.test.ts
  • packages/cli/src/commands/tail.ts
  • packages/cli/src/commands/teardown.ts
  • packages/cli/src/commands/token.test.ts
  • packages/cli/src/commands/token.ts
  • packages/cli/src/commands/wait-errors.test.ts
  • packages/cli/src/commands/wait-flags.test.ts
  • packages/cli/src/commands/wait.test.ts
  • packages/cli/src/commands/wait.ts
  • packages/cli/src/contract.test.ts
  • packages/cli/src/ctx.ts
  • packages/cli/src/duration.ts
  • packages/cli/src/main.test.ts
  • packages/cli/src/main.ts
  • packages/cli/src/state.test.ts
  • packages/cli/src/state.ts
  • packages/cli/src/test-helpers/ctx.ts
  • packages/cli/src/test-helpers/watch.ts
  • packages/cli/src/types.ts
  • packages/cli/src/watch/cursor.ts
  • packages/cli/src/watch/flags.ts
  • packages/cli/src/watch/session.ts
  • packages/cli/src/watch/source.ts
  • packages/cli/src/watch/store.ts
  • packages/cli/src/watch/types.ts
  • packages/cli/src/watch/watch.test.ts
  • packages/cli/src/zip.test.ts
  • packages/cli/src/zip.ts
  • pnpm-workspace.yaml
  • vitest.config.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

@jonathanong
jonathanong merged commit a57ef21 into main Nov 10, 2026
7 checks passed
@jonathanong
jonathanong deleted the feat/cli-ops branch November 10, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant