Skip to content

Commit 49772f4

Browse files
committed
fix(lfg): prepare 0.1.6 setup release
1 parent 3599a5c commit 49772f4

40 files changed

Lines changed: 648 additions & 236 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ Not a Grok plugin. Not a runtime. Not a replacement for `lazycodex-ai`.
1919
| Situation | Command |
2020
|---|---|
2121
| First install | `npx @islee23520/lfg setup` |
22-
| Reinstall or repair | `npx @islee23520/lfg setup --run` |
22+
| Sync models / preserve healthy existing install | `npx @islee23520/lfg setup --run` |
23+
| Force reinstall or repair adapter tree | `npx @islee23520/lfg setup --run --force` |
2324
| Automation | `npx @islee23520/lfg --json setup --run` |
24-
| Inspect install state | `npx @islee23520/lfg --json doctor` |
25-
| Show commands | `npx @islee23520/lfg help` |
2625

2726
During interactive setup, `lfg` can read an OpenAI-compatible base URL, fetch `/v1/models`, map model aliases, and ask before writing files.
2827

@@ -32,10 +31,11 @@ During interactive setup, `lfg` can read an OpenAI-compatible base URL, fetch `/
3231
npx @islee23520/lfg setup
3332
npx @islee23520/lfg --json setup
3433
npx @islee23520/lfg --json setup --base-url http://127.0.0.1:11434
34+
npx @islee23520/lfg --json setup --preset grok
35+
npx @islee23520/lfg --json setup --preset gpt
3536
npx @islee23520/lfg --json setup --run
3637
npx @islee23520/lfg setup --run
37-
npx @islee23520/lfg --json doctor
38-
npx @islee23520/lfg help
38+
npx @islee23520/lfg setup --run --force
3939
```
4040

4141
## Development

docs/grok-adapter-ownership.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
**`@islee23520/lfg` is the single npm surface** for this **omo Grok adapter** (+ built-in extensions). Registry publish contract: [`docs/npm-publish.md`](npm-publish.md) (closes #22).
1313

14-
1. **omo-style Grok adapter** — install/verify semantics comparable to `omo-codex` on `~/.grok` (plugin tree, config merge, agents, hooks, doctor).
14+
1. **omo-style Grok adapter** — install/verify semantics comparable to `omo-codex` on `~/.grok` (adapter tree, config merge, agents, hooks, verification).
1515
2. **LFP-equivalent extensions** — capabilities from legacy `@islee23520/lfp` (hooks, agent overrides, optional extra agents) are **re-implemented for Grok** inside lfg — **not** a copy-paste vendor of the LFP package. See `docs/lfp-capability-port.md`.
1616

1717
**`@islee23520/lfp`** remains a separate npm package only if needed for **Codex-only** or legacy consumers; **Grok Build path is `npx @islee23520/lfg setup` only.**
@@ -21,7 +21,7 @@
2121
| Term | Meaning |
2222
|------|---------|
2323
| **`lfgIsPlugin: false`** (JSON) | The **npm CLI** `@islee23520/lfg` is not registered as a Grok plugin name. |
24-
| **Grok plugin payload** | What `setup --run` installs under `~/.grok`**omo core + ported extension features**, shipped **by** lfg. |
24+
| **Grok adapter payload** | What `setup --run` installs under `~/.grok`**omo core + ported extension features**, shipped **by** lfg. |
2525
| **LFP (legacy name)** | Reference for **which features to port**; not a subtree copied into this repo. |
2626

2727
## Homes
@@ -37,7 +37,7 @@ Dual-home is allowed; Grok users are not required to run Codex.
3737

3838
| Capability | Where it lives (target) |
3939
|------------|-------------------------|
40-
| Grok install + doctor + cleanup | `plugins/lfg/bin/` + `plugins/lfg/grok-install/` |
40+
| Grok install + verification + cleanup | `plugins/lfg/bin/` + `plugins/lfg/grok-install/` |
4141
| Extension hooks / agent overrides | **Ported** per `docs/lfp-capability-port.md` into `plugins/lfg/extensions/` (or grok-install modules) — **new Grok-native code** |
4242
| omo component parity | Vendor or sync from `oh-my-openagent/packages/omo-codex/plugin` — not duplicate maintenance in lfg forever without sync script |
4343
| Model discovery | Existing `lfg-models.ts` + `lfg-grok-config.ts` until install owns full merge |
@@ -57,4 +57,4 @@ Dual-home is allowed; Grok users are not required to run Codex.
5757

5858
- Plan: `plans/lfg-omo-grok-build-adapter.md`
5959
- Port map: `docs/lfp-capability-port.md`
60-
- Upstream reference: `oh-my-openagent/packages/omo-codex` (Codex); Grok parity owned here
60+
- Upstream reference: `oh-my-openagent/packages/omo-codex` (Codex); Grok parity owned here

docs/grok-adapter-parity.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Status column updated during `plans/lfg-omo-grok-adapter.md` execution.
77
| Plugin cache install | `~/.codex/plugins/cache/sisyphuslabs/omo/` | `plugins/lfg/grok-install/` | Implemented (`plugin-cache-install.acceptance.test.ts` #27; `setup-doctor-parity.test.ts` postInstallVerify #21) |
88
| `config.toml` merge | `install/config.mjs` | `grok-install` + `lfg-grok-config.ts` | Implemented (`config-single-writer.acceptance.test.ts` #29; `lfg-installer.contract.test.ts`; `lfg-grok-config.endpoints` #24; `grok-config-endpoints-doc.test.ts`; `docs/grok-config-endpoints.md`; `LFG_OWNED_GROK_CONFIG_SECTIONS`) |
99
| Agent TOML + preserve reasoning | `install/agents.mjs` | `grok-install/apply-agent-tomls.ts` | Implemented (`agent-tomls.acceptance.test.ts` #30; `apply-agent-tomls.test.ts`; `no-linalab-branding.test.ts`) |
10-
| Hook trust | `install/hook-trust.mjs` | `grok-install/hook-trust.ts` | Implemented (`hook-trust.acceptance.test.ts` #28; `post-install-verify.test.ts`; doctor `hooksRegistered`) |
10+
| Hook trust | `install/hook-trust.mjs` | `grok-install/hook-trust.ts` | Implemented (`hook-trust.acceptance.test.ts` #28; `post-install-verify.test.ts`; internal verifier `hooksRegistered`) |
1111
| Install version stamp | `lazycodex-install.json` | `lfg-install.json` (Grok plugin root) | Implemented (`plugin-cache-install.acceptance.test.ts` #27; `npm-publish-root-contract.test.ts` #22; `publish-gap-evidence-shape.test.ts`) |
12-
| `doctor` | `src/cli/doctor/checks/codex.ts` | `lfg doctor` | Implemented (`doctor-pack-layout.acceptance.test.ts` #25; `doctor-json-contract.test.ts` #31; `setup-doctor-parity.test.ts` #21; `publish-owner-checklist.test.ts`; `registry-bin-publish-gap.test.ts`; `publishGap` #22) |
13-
| `cleanup` / `update` | passthrough CLI | `docs/grok-cleanup-update.md` | N/A (`grok-cleanup-update-doc.test.ts` #34; re-run `setup --run` / `doctor`) |
12+
| Internal verifier | `src/cli/doctor/checks/codex.ts` | `grok-install/doctor.ts` (not public CLI) | Implemented (`doctor-pack-layout.acceptance.test.ts` #25; `doctor-json-contract.test.ts` #31; `setup-doctor-parity.test.ts` #21; `publish-owner-checklist.test.ts`; `registry-bin-publish-gap.test.ts`; `publishGap` #22) |
13+
| `cleanup` / `update` | passthrough CLI | `docs/grok-cleanup-update.md` | N/A (`grok-cleanup-update-doc.test.ts` #34; re-run `setup --run`) |
1414
| ulw-loop / start-work skills | plugin components | Grok plugin tree | N/A (brownfield vendored; not owned by `grok-install` adapter) |
15-
| Project-local `.grok` repair | `project-local-cleanup.mjs` | `grok-install/project-local.ts` | N/A (`lfg project-local` inspect; automated repair deferred — `repair` field in JSON; `lfg-project-local.test.ts` #28) |
15+
| Project-local `.grok` repair | `project-local-cleanup.mjs` | `grok-install/project-local.ts` | N/A (internal inspect helper; public CLI remains setup-only; automated repair deferred — `repair` field in JSON; `lfg-project-local.test.ts` #28) |
1616
| Model catalog | `model-catalog.json` | `lfg-models.ts` + `LAZYCODEX_*` | Implemented (`lfg-models.mapping.test.ts`; `lfg-models.urls.test.ts`; setup discovery env) |
1717
| Autonomous permissions | `permissions.mjs` | N/A or Grok permissions | N/A |
1818
| Telemetry | plugin telemetry | vendored in tree | N/A (upstream plugin telemetry; lfg does not emit) |
@@ -21,4 +21,4 @@ Status column updated during `plans/lfg-omo-grok-adapter.md` execution.
2121
| Per-agent model overrides (LFP-style) | LFP `omo-agent-model-overrides` + `agent-config` | `lazycodex-agent-overrides.ts` + `sync-lazycodex-agents-to-grok.ts` | Implemented (`lazycodex-agent-overrides.test.ts`; `~/.grok/lazycodex-agent-overrides.json`; interactive setup) |
2222

2323
**Normative port map:** `docs/lfp-capability-port.md`
24-
**Ownership:** `docs/grok-adapter-ownership.md` (ADR; tested in `grok-adapter-ownership-doc.test.ts`)
24+
**Ownership:** `docs/grok-adapter-ownership.md` (ADR; tested in `grok-adapter-ownership-doc.test.ts`)

docs/grok-cleanup-update.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ Codex exposes passthrough cleanup/update on `~/.codex`. Grok Build uses `~/.grok
1010

1111
| Action | Surface |
1212
|--------|---------|
13-
| Re-install / refresh stamp + fixture tree | `npx @islee23520/lfg --json setup --run` (idempotent internal `runGrokInstall`) |
14-
| Verify install | `npx @islee23520/lfg --json doctor` |
13+
| Sync models / preserve healthy stamped adapter tree | `npx @islee23520/lfg --json setup --run` (idempotent internal `runGrokInstall`) |
14+
| Force re-install / replace adapter tree | `npx @islee23520/lfg --json setup --run --force` |
15+
| Verify install | Re-run `npx @islee23520/lfg --json setup --run` and inspect the JSON result |
1516
| Model/config merge | Same `setup --run` with `--base-url` when discovery needed |
1617

1718
## Not implemented (by design)
1819

1920
- `lfg cleanup` — no automatic wipe of user `~/.grok` blocks; manual edit per Grok user guide.
2021
- `lfg update` — no separate version pin fetch; use npm bump + `setup --run` after upgrading `@islee23520/lfg`.
2122

22-
Future: optional `lfg --json cleanup --dry-run` reporting paths only (non-destructive).
23+
Future: optional `lfg --json cleanup --dry-run` reporting paths only (non-destructive).

docs/grok-host-auth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
| 1 | Fix config warnings: re-run `npx @islee23520/lfg --json setup --run` so `endpoints.api_key` is removed — see [`grok-config-endpoints.md`](grok-config-endpoints.md) (#24) |
1717
| 2 | Interactive: run `grok` and complete sign-in to refresh `~/.grok/auth.json` |
1818
| 3 | Headless BYOK: set `XAI_API_KEY` or `OPENAI_API_KEY` (and discovery base URL via `lfg setup --run`) |
19-
| 4 | Verify adapter: `npx @islee23520/lfg --json doctor` on fixture or real HOME after install |
19+
| 4 | Verify adapter plan: `npx @islee23520/lfg --json setup`; materialize only with explicit `setup --run` |
2020

2121
## lfg scope
2222

23-
Adapter install (`runGrokInstall`, plugin tree, `config.toml` merge) is independent of Grok OIDC health. Issue #23 tracks **Grok CLI auth infrastructure**, not missing lfg code paths.
23+
Adapter install (`runGrokInstall`, plugin tree, `config.toml` merge) is independent of Grok OIDC health. Issue #23 tracks **Grok CLI auth infrastructure**, not missing lfg code paths.

docs/lfp-capability-port.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| Extra helper agents (artistry, visual-engineering, etc.) | **Port selectively** — only agents that make sense on Grok Build; rewrite configs, don’t copy TOML verbatim if model IDs differ |
1212
| `codex-plugin-install.mjs` / Codex marketplace `linalab` | **Do not port** — Grok uses `~/.grok` plugin layout from `grok-install` |
1313
| OpenAI-compat / cliproxy provider blocks for **Codex** | **Replace** with lfg `LAZYCODEX_*` + `lfg-grok-config.ts` / Grok `[model.*]` |
14-
| `cli.mjs` setup/doctor for Codex `CODEX_HOME` | **Replace** with `lfg setup` / `lfg doctor` targeting `~/.grok` |
14+
| `cli.mjs` setup/doctor for Codex `CODEX_HOME` | **Replace** with `lfg setup` targeting `~/.grok`; doctor-style checks stay internal |
1515
| Sync scripts (`sync-agent-overrides.mjs`, etc.) | **Reimplement** as part of `runGrokInstall()` idempotent merge |
1616

1717
## Implementation home
@@ -21,4 +21,4 @@
2121

2222
## Tests
2323

24-
- Each ported capability gets a **new** vitest/node:test in lfg — do not depend on running legacy LFP test files unchanged.
24+
- Each ported capability gets a **new** vitest/node:test in lfg — do not depend on running legacy LFP test files unchanged.

docs/npm-publish.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,16 @@ npm publish --access public # must ship 0.1.4+ with `plugins/lfg/lfg` (registr
1919

2020
`npm run assert-pack` runs `npm pack --dry-run` (triggers `prepack``npm run build`) then checks root `bin.lfg` and required dist paths.
2121

22-
After publish, set `LFG_DOCTOR_REGISTRY_VERSION` to the registry version when checking publish gap locally:
23-
24-
```sh
25-
LFG_DOCTOR_REGISTRY_VERSION=$(npm view @islee23520/lfg version) npx lfg --json doctor
26-
```
27-
2822
Verify from a clean directory:
2923

3024
```sh
3125
mkdir /tmp/lfg-smoke && cd /tmp/lfg-smoke && npm init -y
3226
npm install @islee23520/lfg@latest
33-
npx @islee23520/lfg --json doctor
27+
npx @islee23520/lfg --json setup
3428
```
3529

36-
Expected: `bin` resolves to `plugins/lfg/lfg``dist/lfg.js`; doctor `cli.ok: true` when `~/.grok` has stamp after `setup --run`.
30+
Expected: `bin` resolves to `plugins/lfg/lfg``dist/lfg.js`; setup returns a non-mutating JSON plan unless `setup --run` is explicit.
3731

3832
`@0.1.1` on npm has **no** `bin``npx @islee23520/lfg` fails with *could not determine executable* (`registry-install-smoke.integration.test.ts`).
3933

40-
Registry `0.1.3` uses legacy `bin.lfg: plugins/lfg/dist/lfg.js` and does **not** ship the `plugins/lfg/lfg` shell shim (0.1.4+ pack does); `npx @islee23520/lfg` runs but republish `0.1.4+` with `plugins/lfg/lfg` is required for full doctor `cli` / `publishGap` parity (`registry-install-smoke.integration.test.ts`).
41-
42-
`lfg --json doctor` with `LFG_DOCTOR_REGISTRY_VERSION` includes `publishGap`; broken npm layouts (missing or wrong `bin.lfg`) set `cli.ok: false` and `publishGap.publishReady: false`.
34+
Registry `0.1.3` uses legacy `bin.lfg: plugins/lfg/dist/lfg.js` and does **not** ship the `plugins/lfg/lfg` shell shim (0.1.4+ pack does); republish `0.1.4+` with `plugins/lfg/lfg` is required for the stable setup bin contract (`registry-install-smoke.integration.test.ts`).

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@islee23520/lfg",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "omo / lazycodex Grok Build adapter: npx @islee23520/lfg setup --run installs ~/.grok via internal grok-install (not a Grok plugin).",
55
"publishConfig": {
66
"access": "public"
@@ -38,7 +38,7 @@
3838
"plugins/lfg"
3939
],
4040
"scripts": {
41-
"setup": "sh plugins/lfg/lfg setup",
41+
"setup": "sh plugins/lfg/lfg --json setup",
4242
"test": "npm run build && vitest run plugins/lfg/bin/*.test.ts plugins/lfg/grok-install/*.test.ts",
4343
"verify": "npm run assert-pack && npm test && npm run typecheck && npm run self-test",
4444
"self-test": "npm run build && node plugins/lfg/dist/self-test.js",

plugins/lfg/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ npx @islee23520/lfg setup
1515
| 상황 | 명령 |
1616
|------|------|
1717
| 처음 | `npx @islee23520/lfg setup` — (선택) OpenAI-compatible base URL, `/v1/models` 매핑, 역할 조정 후 `Install now?` **y** |
18-
| 다시 설치 | `npx @islee23520/lfg setup --run` |
18+
| 모델 동기화 / 기존 정상 설치 보존 | `npx @islee23520/lfg setup --run` |
19+
| 강제 재설치 / 어댑터 트리 복구 | `npx @islee23520/lfg setup --run --force` |
1920
| CI / 스크립트 | `npx @islee23520/lfg --json setup --run` |
20-
| 명령 목록 | `npx @islee23520/lfg help` |
2121
| 모델만 변경 | `setup` 다시 실행, 또는 `~/.grok``models_base_url` 변경 후 `setup --run` |
2222

2323
## What lfg does
@@ -32,9 +32,11 @@ npx @islee23520/lfg setup
3232
npx @islee23520/lfg setup
3333
npx @islee23520/lfg --json setup
3434
npx @islee23520/lfg --json setup --base-url http://127.0.0.1:11434
35+
npx @islee23520/lfg --json setup --preset grok
36+
npx @islee23520/lfg --json setup --preset gpt
3537
npx @islee23520/lfg --json setup --run
3638
npx @islee23520/lfg setup --run
37-
npx @islee23520/lfg help
39+
npx @islee23520/lfg setup --run --force
3840
```
3941

4042
`lfg` is not a plugin, not a runtime, and not a replacement for `lazycodex-ai`.

0 commit comments

Comments
 (0)