Skip to content

feat: ship the grok-bot plugin + gbot-install bin inside the npm package - #47

Closed
ScriptedAlchemy wants to merge 1 commit into
mainfrom
feat/gbot-install-dist
Closed

ScriptedAlchemy wants to merge 1 commit into
mainfrom
feat/gbot-install-dist

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

npm install --global grok-bot-cli now delivers both halves: the gbot CLI and the Agent Bundle plugin (MCP server gbot_send/gbot_thread + talk-to-grok-bot Skill) with a package-bound installer, mirroring cargo-hauler's cargo-hauler-install.

  • plugin/agent-bundle.config.ts: bin: { 'gbot-install': './src/gbot-install.ts' }runInstallCli from agent-bundle/install bound to the emitted npm root.
  • plugin/package.json: prepack: agent-bundle prepack emits plugin/dist (artifact + generated manifest + bin/gbot-install.js); bundled deps moved to devDependencies so the pack gate (AB7014/AB7015) passes; plugin/README.md added for the pack inventory.
  • root package.json: files += plugin/dist, bin.gbot-install, build:plugin script, prepack runs it (stderr-only so npm pack --json stays parseable).
  • CI + Release: build the plugin distribution before publint; after the global install smoke, run gbot-install install cursor into a scratch HOME and assert the receipt + plugin.json exist.
  • README: install/upgrade/uninstall/doctor via gbot-install; clone-and-build path kept for development.

Changeset: patch (additive bin).

Verification

  • npx agent-bundle prepack --json in plugin/ → 0 diagnostics, 22 files validated.
  • npm pack --jsongrok-bot-cli-0.3.1.tgz, 36 files; stdout is clean JSON (nested build goes to stderr).
  • publint → All good.
  • Clean-prefix install of the tarball: gbot --help, gbot-install --help; HOME=<scratch> gbot-install install cursor --jsonstate: installed, receipt written; gbot-install doctor exit 0; the installed mcp/mcp-grok-bot-*.mjs handshakes and lists gbot_send, gbot_thread.
  • npm test 108/108 (release-config test updated), cd plugin && npm run check 11/11.
  • ripwire --quality-delta: regressions 0, gating 0.

@changeset-bot

changeset-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b444f42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T05:53:20.365772Z b469294 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.

…ckage

- plugin: package-bound installer `gbot-install` (agent-bundle/install
  runInstallCli), `agent-bundle prepack` emits plugin/dist as the npm root;
  bundled deps moved to devDependencies so prepack's AB7014/AB7015 pass
- root: files += plugin/dist, bin gbot-install, prepack -> npm run build:plugin
  (stderr only so `npm pack --json` stays parseable)
- CI/release: build the plugin distribution before publint; smoke
  `gbot-install install cursor` into a scratch HOME after the global install
- README: install the plugin from the package instead of a clone
ScriptedAlchemy added a commit that referenced this pull request Sep 15, 2026
* feat: collapse grok-bot-cli into one root Agent Bundle project (#24)

One dispatcher, one CI gate. The generated `gbot` CLI (`dist/bin/gbot.mjs`)
replaces the hand-written `src/cli.js`; the nested private `plugin/` project
and its `file:..` hatch are deleted. `gbot-install` binds `runInstallCli`
to the same npm `dist/` so Codex, Claude Code, and Cursor install the
`grok-bot` MCP tools and `talk-to-grok-bot` skill from one package.

- Domain JS moves to `src/core/`; #46 exit-code derivation and failure
  document flattening live in `src/core/codex/contract.js`, and
  `sendToCodexThread` / `codexStatus` return documents instead of throwing.
- `src/cli/**` routes: bots, groups, doctor, history, send, thread (dedicated
  CLI routes, not MCP projections) and codex status/list-threads/send/queue.
- `send`, `codex send`, and `codex status` use `exitCode: 'result'`: one JSON
  document on stdout with `exitCode`; refusals keep `reason`/`delivery`.
- Gateway-backed routes redact thrown error text before the framework prints
  it, matching the MCP tools and the old `fail()`.
- Breaking (pre-1.0 minor): Node >= 22.19.0, command-local options only,
  `--json` reserved before `--`, failure JSON on stdout, usage errors exit 2.

Supersedes #47.

* chore: reference #50 in the changeset

* fix: address change-risk review of the root collapse

- withRedactedErrors keeps the error name and own fields (reason, mode,
  delivery, envelope) so failure documents still classify; `gbot send`
  usage refusals report reason "usage" again.
- codex list-threads / queue return the flat failure document on stdout
  (reason "bad-response", "experimental-disabled", ...) instead of letting
  the framework print a stack trace; shared failureDocumentSchema.
- bots list / groups list --json are bare arrays again, as before.
- codex queue human output uses the old formatter (formatCodexQueue).
- README/changeset: drop the removed --instructions alias, name the on|off
  narrowing, the `chat` history event, stderr failures for non-send
  commands, and the gbot vs grok-bot bundle rename.
- Tests cover send `--` protection, usage reason, and list-threads
  bad-response documents.

---------

Co-authored-by: Ubuntu <zack@ubuntu-main.local>
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Superseded by #50.

@ScriptedAlchemy
ScriptedAlchemy deleted the feat/gbot-install-dist branch September 15, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant