build: removed generation of docs index
- Remove the `gen:docs` step from the Docker build process and the developer documentation. - Update documentation in `docs-index.ts` to reflect that the index is now injected via environment variable instead of a generated file. - Update error messaging to point to binary or bundle rebuilds rather than the deprecated generation script.
This commit is contained in:
+3
-5
@@ -184,11 +184,9 @@ RUN bun install --frozen-lockfile --ignore-scripts
|
||||
# hoisted node_modules that `bun install` just produced.
|
||||
COPY . /pi/
|
||||
|
||||
# Regenerate the docs index and tool views that `--ignore-scripts` skipped
|
||||
# above. The root package.json's `prepare` script normally handles these on a
|
||||
# vanilla install.
|
||||
RUN bun --cwd=packages/coding-agent run gen:docs \
|
||||
&& bun --cwd=/pi/packages/coding-agent run gen:tool-views
|
||||
# Regenerate the tool views that `--ignore-scripts` skipped above. The root
|
||||
# package.json's `prepare` script normally handles these on a vanilla install.
|
||||
RUN bun --cwd=packages/coding-agent run gen:tool-views
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/omp"]
|
||||
CMD ["--help"]
|
||||
|
||||
@@ -19,9 +19,7 @@ Run from `packages/coding-agent/` (or add `--cwd=packages/coding-agent`):
|
||||
| Types only | `bun run check:types` |
|
||||
| Lint only | `bun run lint` |
|
||||
| Tests | `bun run test` |
|
||||
| Autofix: lint + format prompts + docs index | `bun run fix` |
|
||||
| Reformat prompt `.md` assets | `bun run format-prompts` |
|
||||
| Regenerate the `docs://` index | `bun run gen:docs` |
|
||||
| Autofix: lint + format prompts | `bun run fix` |
|
||||
| Build the `dist/omp` binary | `bun run build` |
|
||||
|
||||
Never invoke `tsc`/`npx tsc` directly — `bun run check` is the typecheck gate. After
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Harness documentation index for the `omp://` protocol.
|
||||
*
|
||||
* Compiled binaries and the prepacked npm bundle inline a compressed index from
|
||||
* `docs-index.generated.txt` (populated by `gen:docs` at build time). The format is two lines:
|
||||
* Compiled binaries and the prepacked npm bundle inline a compressed index of the
|
||||
* docs (injected via `process.env.PI_DOCS_EMBED` at build time). The format is two lines:
|
||||
* 1. a plain JSON array of the sorted doc file names, and
|
||||
* 2. a base64 gzip blob of the index-aligned doc bodies (`string[]`).
|
||||
* Listing/completion (`getDocFilenames`) parses only the small first line and
|
||||
@@ -83,8 +83,8 @@ function getIndex(): DocsIndex {
|
||||
const decoded = decodeDocsIndex(docsEmbed);
|
||||
if (decoded === null) {
|
||||
throw new Error(
|
||||
"Malformed embedded docs index (docs-index.generated.txt): non-empty payload without a newline separator. " +
|
||||
"Rebuild with `bun run gen:docs`.",
|
||||
"Malformed embedded docs index: non-empty payload without a newline separator. " +
|
||||
"Rebuild the binary or bundle.",
|
||||
);
|
||||
}
|
||||
index = decoded;
|
||||
|
||||
Reference in New Issue
Block a user