chore(cli): make CLI publishable as @zaks-io/agent-paste#142
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR renames the CLI package from ChangesCLI Package Publishing and Documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/cli/README.md`:
- Around line 139-141: The fenced code block showing the error "agent-paste:
not_authenticated: Set AGENT_PASTE_API_KEY or pass an auth provider." is missing
a language tag; update that fence to use a language (e.g., add "text" after the
opening backticks) so the block becomes ```text ... ``` to satisfy markdownlint
MD040 and improve rendering. Locate the exact block containing the error string
and add the language identifier to the opening fence.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 471b64fb-a8f7-49a9-b83d-96ecbbd8a669
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
apps/apex/src/agents.tsapps/apex/src/copy.tsapps/apex/src/index.test.tsapps/apex/src/llms.tsapps/cli/README.mdapps/cli/build.mjsapps/cli/package.jsonapps/web/src/components/dashboard/FirstRunKeyCard.tsxapps/web/src/routes/_authed.artifacts.index.tsxapps/web/src/routes/_authed.dashboard.tsxapps/web/src/routes/_authed.keys.tsxdocs/marketing-brand-guide.mdpackage.jsonscripts/smoke-hosted.mjsscripts/smoke-local-mvp.mjsscripts/smoke-web-api.mjs
ca83c3d to
2342262
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/cli/README.md (1)
96-113:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winJSON example looks inconsistent with the human-readable output.
In the human output,
Viewis ausercontent.agent-paste.sh/v/...URL whileAgent Viewisapi.agent-paste.sh/v1/artifacts/.../agent-view. In the JSON example,view_urlandagent_view_urlare identical (.../v1/public/agent-view/...), which both contradicts the humanViewURL and looks like a copy-paste. Please confirm the documentedview_urlmatches the actual publish result shape.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/cli/README.md` around lines 96 - 113, The README's JSON example is inconsistent with the human-readable output: update the JSON snippet so the view_url key matches the human "View" URL (the usercontent.agent-paste.sh/v/... style shown under "View") and the agent_view_url key matches the human "Agent View" URL (the api.agent-paste.sh/v1/artifacts/<artifact_id>/agent-view style shown under "Agent View"); edit the JSON example in apps/cli/README.md to replace the duplicated "/v1/public/agent-view/..." values with the correct view_url and agent_view_url values that reflect the actual publish result shape.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/cli/README.md`:
- Around line 96-113: The README's JSON example is inconsistent with the
human-readable output: update the JSON snippet so the view_url key matches the
human "View" URL (the usercontent.agent-paste.sh/v/... style shown under "View")
and the agent_view_url key matches the human "Agent View" URL (the
api.agent-paste.sh/v1/artifacts/<artifact_id>/agent-view style shown under
"Agent View"); edit the JSON example in apps/cli/README.md to replace the
duplicated "/v1/public/agent-view/..." values with the correct view_url and
agent_view_url values that reflect the actual publish result shape.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7bf72cd0-7b7b-4c30-8dbd-e0a8935a07cd
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
apps/apex/src/agents.tsapps/apex/src/copy.tsapps/apex/src/index.test.tsapps/apex/src/llms.tsapps/cli/README.mdapps/cli/build.mjsapps/cli/package.jsonapps/web/src/components/dashboard/FirstRunKeyCard.tsxapps/web/src/routes/_authed.artifacts.index.tsxapps/web/src/routes/_authed.dashboard.tsxapps/web/src/routes/_authed.keys.tsxdocs/marketing-brand-guide.mdpackage.jsonscripts/smoke-hosted.mjsscripts/smoke-local-mvp.mjsscripts/smoke-web-api.mjs
✅ Files skipped from review due to trivial changes (5)
- apps/web/src/routes/_authed.dashboard.tsx
- apps/web/src/components/dashboard/FirstRunKeyCard.tsx
- package.json
- docs/marketing-brand-guide.md
- apps/apex/src/agents.ts
🚧 Files skipped from review as they are similar to previous changes (9)
- apps/apex/src/llms.ts
- apps/web/src/routes/_authed.artifacts.index.tsx
- scripts/smoke-hosted.mjs
- scripts/smoke-web-api.mjs
- apps/apex/src/index.test.ts
- apps/web/src/routes/_authed.keys.tsx
- apps/cli/build.mjs
- apps/apex/src/copy.ts
- scripts/smoke-local-mvp.mjs
|
agent-paste PR preview is ready. API: https://agent-paste-api-pr-142.isaac-a46.workers.dev |
Rename apps/cli from private agent-paste@0.0.0 to public @zaks-io/agent-paste@0.1.0 and switch the build from tsc to an esbuild bundle so the published package has no workspace:* runtime deps. - build.mjs bundles src/index.ts plus the @agent-paste/* workspace deps into a single ESM dist/index.js, resolving deps from TS source via the "types" export condition; @napi-rs/keyring stays external (native). - Move @agent-paste/* to devDependencies; @napi-rs/keyring is the sole runtime dependency. Add files/repository/homepage/publishConfig and a prepublishOnly build guard. Drop the dead "exports" field. - Output path dist/src/index.js -> dist/index.js; update bin and the three smoke scripts. - Replace all "npx agent-paste" references with "npx @zaks-io/agent-paste" across apex copy/llms/agents, web dashboard UI, and the brand guide. - Rewrite the CLI README for public npm: drop internal SDK/ADR rationale and repo-relative links, fix the not_authenticated error string, and document --artifact-id and AGENT_PASTE_API_URL. No license field by design: the package stays UNLICENSED until the open-core licensing decision lands, so it is not yet meant for publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2342262 to
8b08285
Compare
|
Rebased onto main (resolved a Also: making the CLI public tripped the |
|
agent-paste PR preview is ready. API: https://agent-paste-api-pr-142.isaac-a46.workers.dev |
The pre-push hook ran only knip + test:coverage, and pre-commit typechecked only changed packages. Neither ran `pnpm lint`, so repo-lint policy failures (and anything else in `verify`) only surfaced in CI. Run `pnpm verify` (lint, typecheck, test, knip, openapi:check, db:check, docs format) plus test:coverage on pre-push so the local gate matches CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
agent-paste PR preview is ready. API: https://agent-paste-api-pr-142.isaac-a46.workers.dev |
|
agent-paste PR preview resources were cleaned up. The shared Preview GitHub Environment is retained for future preview deploys. |
Summary
Makes the CLI publishable to npm as
@zaks-io/agent-paste. The package was previously private (agent-paste@0.0.0) and built with plaintsc, leaving@agent-paste/*workspace deps as bareworkspace:*imports that are uninstallable once published. This bundles those deps into a single self-containeddist/index.js.The npm name was settled as
@zaks-io/agent-paste(a reserved0.0.0placeholder already exists, maintainerisuttell); the unscopedagent-pasteis blocked by a similarly-named package. The installed binary staysagent-paste.Changes
@zaks-io/agent-paste@0.1.0, dropprivate, adddescription/homepage/repository/files/publishConfig.access:public/prepublishOnly. Drop the deadexportsfield (nothing imports the CLI as a module).tscwithbuild.mjs(esbuild). Bundlessrc/index.ts+ the@agent-paste/*workspace deps into one ESM file, resolving deps from TS source via thetypesexport condition (no dep pre-compile needed).@napi-rs/keyringstays external (ships native.nodebinaries).@agent-paste/*moved todevDependencies(bundled, not runtime);@napi-rs/keyringis the sole runtime dependency.dist/src/index.js->dist/index.js;binand the three smoke scripts updated to match.npx agent-paste->npx @zaks-io/agent-pasteacross apex copy/llms/agents, web dashboard UI, and the brand guide (incl. the apex test assertions).not_authenticatederror string, documented--artifact-idandAGENT_PASTE_API_URL.Not in scope / follow-up
licensefield, by design. The package stays UNLICENSED until the open-core licensing decision lands. It builds and packs correctly but is not yet meant to actually publish —npm publishis gated on that decision.0.1.0(placeholder burned0.0.0).Risk
LOW. Mechanical rename + bundler swap + doc/copy churn. No auth, secrets, or data-path logic touched; the keyring and credential code is unchanged.
Test plan
pnpm --filter @zaks-io/agent-paste build-> self-containeddist/index.js(verified no@agent-paste/*imports leak; one shebang; runs from a fully wiped dist tree)pnpm --filter @zaks-io/agent-paste typecheckclean; CLI tests 40/40; apex tests 17/17; lint clean; knip cleannpm packships exactlydist/,README.md,package.json; isolated install of the tarball into a temp dir adds only@napi-rs/keyring(no@agent-paste/*), and the installedagent-pastebinary runs (--helpexit 0,whoamireturns the proper not_authenticated error)workflow-code-review: READY FOR PR, no blockers🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
@zaks-io/agent-pastev0.1.0).Documentation