From 574879a9366db4187cbaa85002a1fe111017a02e Mon Sep 17 00:00:00 2001 From: agorischek <6295280+agorischek@users.noreply.github.com> Date: Fri, 4 Dec 2026 21:21:39 +0000 Subject: [PATCH 1/5] Rename the npm package to @githubnext/projections-sdk Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .github/actions/package/action.yml | 2 +- .github/ci-rules.json | 4 +-- .github/projections/agent-tools/extract.mjs | 2 +- .../self-authoring-api/extract.mjs | 4 +-- .github/projections/self-authoring-sdk.json | 2 +- .github/projections/self-topology/extract.mjs | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/publish-npm.yml | 6 ++-- .github/workflows/release-proof.yml | 2 +- CONTRIBUTING.md | 6 ++-- changelog.d/README.md | 2 +- .../review-sentence-renderer-authors.md | 2 +- dist-workspace.toml | 6 ++-- docs/README.md | 2 +- docs/agents/create-projection.md | 16 ++++----- docs/contracts.md | 4 +-- docs/contracts/extractors.md | 4 +-- docs/contracts/packages.md | 26 +++++++------- docs/contracts/scenarios.md | 4 +-- docs/design/desktop-surfaces.md | 2 +- docs/design/generated-values.md | 8 ++--- docs/design/proposals/skills-distribution.md | 2 +- docs/guides/change-emphasis.md | 8 ++--- docs/guides/develop-a-renderer.md | 36 +++++++++---------- docs/guides/first-extractor.md | 6 ++-- docs/guides/how-it-works.md | 4 +-- docs/guides/renderer-kit-components.md | 12 +++---- docs/guides/renderer-kit.md | 26 +++++++------- docs/guides/renderer-sdk.md | 4 +-- docs/maintainers/npm-publishing.md | 12 +++---- docs/maintainers/releasing.md | 12 +++---- docs/models/domain-model.md | 4 +-- docs/reference/renderer-kit.md | 10 +++--- docs/reference/renderer-messages.md | 4 +-- docs/reference/renderer-sdk.md | 28 +++++++-------- docs/runner/commands.md | 4 +-- docs/setup/early-access.md | 8 ++--- docs/setup/first-projection.md | 10 +++--- examples/extractors/README.md | 2 +- examples/extractors/class-summaries/README.md | 2 +- .../extractors/class-summaries/extract.mjs | 2 +- .../test/class-summaries.test.mjs | 2 +- examples/extractors/package.json | 2 +- examples/extractors/test-support.mjs | 2 +- .../extractors/typescript-common/basics.mjs | 2 +- .../minimal/.github/workflows/renderer.yml | 2 +- examples/renderers/minimal/README.md | 16 ++++----- .../minimal/browser/renderer.spec.ts | 2 +- examples/renderers/minimal/package.json | 2 +- examples/renderers/minimal/src/main.ts | 4 +-- examples/renderers/minimal/vite.config.ts | 2 +- packages/cli/browser/starter.ts | 2 +- packages/cli/node/extractor.mjs | 2 +- packages/cli/node/register.cjs | 4 +-- packages/cli/package.json | 2 +- packages/cli/src/check/renderer.rs | 2 +- packages/cli/src/commands/authoring.rs | 4 +-- .../cli/src/commands/help/init.after-help.md | 8 ++--- packages/cli/src/doctor.rs | 2 +- packages/cli/src/main.rs | 2 +- packages/cli/src/node.rs | 6 ++-- packages/cli/src/runtime/extract.rs | 4 +-- packages/cli/src/scaffold/package.rs | 22 ++++++------ packages/cli/src/scaffold/tests.rs | 18 +++++----- packages/cli/templates/SKILL.md | 16 ++++----- packages/cli/templates/extract.mjs | 4 +-- .../renderer/browser/renderer.spec.ts | 2 +- packages/cli/templates/renderer/package.json | 2 +- packages/cli/templates/renderer/src/diff.tsx | 8 ++--- packages/cli/templates/renderer/src/view.tsx | 6 ++-- .../cli/templates/renderer/vite.config.ts | 2 +- packages/cli/test/extractor-helpers.test.mjs | 2 +- .../cli/test/extractor-helpers/driver.mjs | 4 +-- packages/cli/tests/authoring.rs | 10 +++--- packages/integrations/vscode/README.md | 2 +- packages/renderers/README.md | 18 +++++----- packages/renderers/kit/README.md | 10 +++--- packages/renderers/kit/src/palette.ts | 2 +- packages/renderers/kit/src/timeline.ts | 2 +- packages/renderers/sdk/README.md | 12 +++---- packages/renderers/sdk/build/notices.mjs | 2 +- packages/renderers/sdk/src/vite.ts | 6 ++-- packages/renderers/sdk/test/notices.test.mjs | 4 +-- packages/renderers/sdk/test/vite.test.mjs | 2 +- packages/renderers/testing/README.md | 10 +++--- packages/renderers/testing/src/checks.ts | 2 +- .../schemas/fixtures/extractor-helpers.json | 2 +- packages/sdk/README.md | 28 +++++++-------- packages/sdk/package.json | 2 +- packages/sdk/scripts/check-pack.mjs | 2 +- packages/sdk/scripts/extractor-module.mjs | 4 +-- packages/sdk/scripts/release-asset.mjs | 4 +-- packages/sdk/src/extractor.ts | 2 +- packages/sdk/src/workbench.ts | 2 +- packages/sdk/tsdown.config.ts | 2 +- tools/cli/README.md | 2 +- tools/cli/src/commands/install.ts | 4 +-- tools/cli/src/lib/changelog-notes.ts | 4 +-- tools/cli/src/lib/changelog.ts | 2 +- tools/cli/src/lib/generated.ts | 4 +-- tools/cli/src/lib/install.ts | 8 ++--- tools/cli/src/setup.ts | 4 +-- tools/cli/test/changelog.test.ts | 4 +-- tools/cli/test/install.test.ts | 20 +++++------ tools/scripts/check-boundaries/layers.mjs | 2 +- tools/scripts/check-change-hues.test.mjs | 2 +- tools/scripts/reference-docs/renderer-sdk.mjs | 10 +++--- 107 files changed, 330 insertions(+), 330 deletions(-) diff --git a/.github/actions/package/action.yml b/.github/actions/package/action.yml index 999258f16..c3acf4245 100644 --- a/.github/actions/package/action.yml +++ b/.github/actions/package/action.yml @@ -1,5 +1,5 @@ name: Check the npm package -description: Build @githubnext/projections and check it as it would be published, including a scaffolded custom renderer +description: Build @githubnext/projections-sdk and check it as it would be published, including a scaffolded custom renderer inputs: workspace: description: Workspace path relative to the repository checkout diff --git a/.github/ci-rules.json b/.github/ci-rules.json index 140f0f61a..9d1d13755 100644 --- a/.github/ci-rules.json +++ b/.github/ci-rules.json @@ -93,7 +93,7 @@ "include": ["packages/cli"] }, "sdk": { - "description": "The SDK, @githubnext/projections", + "description": "The SDK, @githubnext/projections-sdk", "include": ["packages/sdk"] }, "inspector": { @@ -255,7 +255,7 @@ ] }, "package": { - "description": "@githubnext/projections as published, with a scaffolded renderer the CLI checks in the Inspector: the SDK, Rust, or the CLI and what it serves", + "description": "@githubnext/projections-sdk as published, with a scaffolded renderer the CLI checks in the Inspector: the SDK, Rust, or the CLI and what it serves", "when": { "any": [ { diff --git a/.github/projections/agent-tools/extract.mjs b/.github/projections/agent-tools/extract.mjs index a92872599..57c8d9cde 100644 --- a/.github/projections/agent-tools/extract.mjs +++ b/.github/projections/agent-tools/extract.mjs @@ -15,7 +15,7 @@ // so a reworded description is no change here. Deterministic for a revision: it reads only files. import {readFileSync} from 'node:fs' import path from 'node:path' -import {request, result} from '@githubnext/projections/extractor' +import {request, result} from '@githubnext/projections-sdk/extractor' import {appTools, canvasActions, catalogTools, paths, vscodeTools} from './surfaces.mjs' import {keyLines} from './rust-literals.mjs' import {parameterDifferences, parameterRow, surfaceRow, toolRow} from './rows.mjs' diff --git a/.github/projections/self-authoring-api/extract.mjs b/.github/projections/self-authoring-api/extract.mjs index 5f73fdcca..ac5e5e81a 100644 --- a/.github/projections/self-authoring-api/extract.mjs +++ b/.github/projections/self-authoring-api/extract.mjs @@ -7,7 +7,7 @@ // - The comparator rules language (`rules.mjs`): the standard library, macros and types CEL expressions use. // - The CLI's commands and arguments (`cli.mjs`), from the generated CLI reference. // -// The TypeScript SDK (`@githubnext/projections`) is its own projection, self-authoring-sdk, drawn from the built-in +// The TypeScript SDK (`@githubnext/projections-sdk`) is its own projection, self-authoring-sdk, drawn from the built-in // typescript-public-api extractor. // // Inputs (definition `inputs`), paths relative to the project: @@ -20,7 +20,7 @@ // files, and output is sorted. import {readFileSync} from 'node:fs' import path from 'node:path' -import {request, result} from '@githubnext/projections/extractor' +import {request, result} from '@githubnext/projections-sdk/extractor' import {cliDeclarations} from './cli.mjs' import {rulesDeclarations} from './rules.mjs' import {schemaDeclarations} from './schemas.mjs' diff --git a/.github/projections/self-authoring-sdk.json b/.github/projections/self-authoring-sdk.json index 0fe6d33f1..facf8f366 100644 --- a/.github/projections/self-authoring-sdk.json +++ b/.github/projections/self-authoring-sdk.json @@ -1,7 +1,7 @@ { "id": "self-authoring-sdk", "title": "Authoring SDK", - "description": "The public TypeScript API of @githubnext/projections, the package renderer and extractor authors import: the renderer SDK and its React hooks, the renderer kit, the Vite build, the document types and the extractor helpers, by entry point. Changes are classified by TypeScript's compatibility rules.", + "description": "The public TypeScript API of @githubnext/projections-sdk, the package renderer and extractor authors import: the renderer SDK and its React hooks, the renderer kit, the Vite build, the document types and the extractor helpers, by entry point. Changes are classified by TypeScript's compatibility rules.", "extractor": "typescript-public-api", "comparator": "packages/comparators/api-compatibility/api-compatibility.comparator.yaml", "renderer": "api", diff --git a/.github/projections/self-topology/extract.mjs b/.github/projections/self-topology/extract.mjs index 1c99e2e64..3a1239049 100644 --- a/.github/projections/self-topology/extract.mjs +++ b/.github/projections/self-topology/extract.mjs @@ -32,7 +32,7 @@ // // Deterministic for a revision and toolchain: files are listed the way Git does, output is sorted, and nothing reads // the clock, the network or randomness. `cargo metadata --no-deps --offline` reads only manifests. -import {request, result} from '@githubnext/projections/extractor' +import {request, result} from '@githubnext/projections-sdk/extractor' import {unitFacts} from './facts.mjs' import {releaseChannels} from './releases.mjs' import {byText, listFiles, reader, sortedUnique} from './files.mjs' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ce950848..658789bd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,7 +266,7 @@ jobs: shard: ${{ matrix.shard }} grep-invert: ${{ matrix.grepInvert }} sharded: ${{ matrix.except }} - # @githubnext/projections, the one npm package, as it would be published (docs/contracts/packages.md). + # @githubnext/projections-sdk, the one npm package, as it would be published (docs/contracts/packages.md). package: needs: changes if: needs.changes.outputs.package == 'true' diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 45c0f1b7d..c40b39827 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,6 +1,6 @@ name: Publish npm package # A dist post-announce job (post-announce-jobs in dist-workspace.toml): once a release is announced, publishes -# @githubnext/projections (packages/sdk/) to npm at the release's version, with provenance. The package's version is the +# @githubnext/projections-sdk (packages/sdk/) to npm at the release's version, with provenance. The package's version is the # CLI's: a release whose tag, Cargo.toml and packages/sdk/package.json disagree publishes nothing. Run it by hand to publish # a release again; a version already on npm is left as it is. # @@ -116,8 +116,8 @@ jobs: exit 1 fi registry=https://registry.npmjs.org/ - if npm view "@githubnext/projections@$VERSION" version --registry "$registry" > /dev/null 2>&1; then - echo "::notice title=Already published::@githubnext/projections@$VERSION is already on npm; versions are immutable." + if npm view "@githubnext/projections-sdk@$VERSION" version --registry "$registry" > /dev/null 2>&1; then + echo "::notice title=Already published::@githubnext/projections-sdk@$VERSION is already on npm; versions are immutable." exit 0 fi # A prerelease such as 0.3.0-beta.1 is published under the next tag, so latest stays the latest stable. diff --git a/.github/workflows/release-proof.yml b/.github/workflows/release-proof.yml index ed7ffbfc1..8f959ecdf 100644 --- a/.github/workflows/release-proof.yml +++ b/.github/workflows/release-proof.yml @@ -5,7 +5,7 @@ name: Release proof # .sha256. Beside it, the VS Code extension is packaged with that executable # inside, installed by VS Code's own CLI, and published as # projections-vscode--.vsix (not on the Marketplace), with its -# .sha256. The package job packs @githubnext/projections, which renderers depend +# .sha256. The package job packs @githubnext/projections-sdk, which renderers depend # on by the release asset's URL until npm publishing is approved # (docs/contracts/packages.md), and proves it with the release's Linux executable; # it too is attached with its .sha256. dist hosts and announces the release only diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5da4beb32..4910e89bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ private repositories, machine-specific paths, or credentials. Anything that ships, or that shipped code depends on, lives under `packages/`. That includes the CLI, Engine, schemas, comparators, extractors, renderers, the host (`packages/host/core`, its VS Code UI `packages/host/vscode-ui`, and the -Inspector `packages/host/inspector`), `@githubnext/projections` +Inspector `packages/host/inspector`), `@githubnext/projections-sdk` (`packages/sdk`), the VS Code extension, the GitHub Action's scripts, and the agent integrations. @@ -304,7 +304,7 @@ packages/ comparators/ the default comparator, the comparator rules interpreter and its sandboxed runtime, and the API compatibility and runtime policy rules extractors/ one Rust crate per built-in extractor, with shared support, the catalog and helpers renderers/ one package per built-in renderer (sandboxed frame bundles) and renderers/sdk for authors - sdk/ @githubnext/projections, the one package renderer and extractor authors install + sdk/ @githubnext/projections-sdk, the one package renderer and extractor authors install host/core/ the browser host: renderer frames, playback, selection, in-browser comparison, table and text views host/vscode-ui/ the host's optional VS Code UI (VSCode Elements, codicons, VS Code's theme variables) host/inspector/ the Inspector UI, a mountable package (its assets are embedded in the CLI) @@ -527,7 +527,7 @@ The versioned [contracts](docs/contracts.md) define our wire formats. Their JSON Schemas only evolve additively within a major version, and each release publishes them to their own host (see [schema publishing](docs/maintainers/schema-publishing.md)). Our single npm -package, `@githubnext/projections` (`packages/sdk/`), bundles the renderer SDK, +package, `@githubnext/projections-sdk` (`packages/sdk/`), bundles the renderer SDK, kit, testing, and schemas workspaces for renderer authors; every other workspace stays private (see [Packages](docs/contracts/packages.md) and [npm publishing](docs/maintainers/npm-publishing.md)). Whenever you change its diff --git a/changelog.d/README.md b/changelog.d/README.md index ad81a9d61..e58616dc9 100644 --- a/changelog.d/README.md +++ b/changelog.d/README.md @@ -43,7 +43,7 @@ The release notes list sections in this order: | `intro` | (none) | Opening paragraphs under the version heading, usually written at release time | | `security` | Security in _version_ | Security fixes and what users need to do | | `behaviour-changes` | Behaviour changes in _version_ | Anything that might make a passing check, command or workflow fail or act differently, and what to adjust | -| `renderer-authors` | For renderer authors in _version_ | Required or optional changes for custom renderers using `@githubnext/projections` | +| `renderer-authors` | For renderer authors in _version_ | Required or optional changes for custom renderers using `@githubnext/projections-sdk` | | `highlights` | Highlights | The release's biggest features | | `built-ins` | New built-ins | New built-in extractors, renderers, comparators and themes | | `viewer` | Viewer and hosts | The viewer, the Inspector, VS Code and the Copilot canvas | diff --git a/changelog.d/review-sentence-renderer-authors.md b/changelog.d/review-sentence-renderer-authors.md index 3241a1a5a..aac912a95 100644 --- a/changelog.d/review-sentence-renderer-authors.md +++ b/changelog.d/review-sentence-renderer-authors.md @@ -2,4 +2,4 @@ section: renderer-authors --- -- **Comparison `init` carries the engine's review** (#338). `init.review` (`{status, reviewable, content, identity, variation}`) reports whether the comparison changed and how many changes are reviewable. Format change counts with `reviewSentence(init.review)` from `@githubnext/projections/renderer` instead of counting `comparison.changes`, which also lists changes that only varied within tolerance. Older hosts omit it, so show no count when absent. `isComparisonReview` validates the shape; an `init` with a malformed review is rejected. +- **Comparison `init` carries the engine's review** (#338). `init.review` (`{status, reviewable, content, identity, variation}`) reports whether the comparison changed and how many changes are reviewable. Format change counts with `reviewSentence(init.review)` from `@githubnext/projections-sdk/renderer` instead of counting `comparison.changes`, which also lists changes that only varied within tolerance. Older hosts omit it, so show no count when absent. `isComparisonReview` validates the shape; an `init` with a malformed review is rejected. diff --git a/dist-workspace.toml b/dist-workspace.toml index 2e5ad6b54..afe1b10b5 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -37,14 +37,14 @@ publish-prereleases = true plan-jobs = ["./release-inputs"] github-build-setup = "../release-build-setup.yml" # Each native executable is proved on its own platform and published under its gh -# precompiled-extension name; @githubnext/projections is packed, proved and attached -# as githubnext-projections-.tgz, which renderers depend on by URL. +# precompiled-extension name; @githubnext/projections-sdk is packed, proved and attached +# as githubnext-projections-sdk-.tgz, which renderers depend on by URL. global-artifacts-jobs = ["./release-proof"] # Once every artifact is proved, the release waits for a person to approve the `release` environment, which # attests the assets; dist announces only then (release-approval.yml, docs/maintainers/releasing.md). publish-jobs = ["./release-approval"] # Once the release is announced, its JSON Schemas are published to the schemas host -# (publish-schemas.yml, docs/maintainers/schema-publishing.md) and @githubnext/projections to npm +# (publish-schemas.yml, docs/maintainers/schema-publishing.md) and @githubnext/projections-sdk to npm # (publish-npm.yml, docs/maintainers/npm-publishing.md; inert until npm publishing is approved), and a stable # release moves its major version tag, v0, which `uses: githubnext/projections@v0` follows (move-major-tag.yml). post-announce-jobs = ["./publish-schemas", "./publish-npm", "./move-major-tag"] diff --git a/docs/README.md b/docs/README.md index 787662b21..b6208058d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -63,7 +63,7 @@ the same tasks: [explore](agents/explore.md), [install](agents/install.md), [renderer SDK API](reference/renderer-sdk.md), [renderer messages](reference/renderer-messages.md), and [theme tokens](reference/theme-tokens.md). All of these ship in - [`@githubnext/projections`](../packages/sdk/README.md). + [`@githubnext/projections-sdk`](../packages/sdk/README.md). - **Embedding** lets you host Projections inside your own application. Start with [embedding Projections](guides/embedding.md#embedding-projections-in-your-own-app) diff --git a/docs/agents/create-projection.md b/docs/agents/create-projection.md index b2232453d..10940fa73 100644 --- a/docs/agents/create-projection.md +++ b/docs/agents/create-projection.md @@ -481,15 +481,15 @@ result(entities={"service:payments": {"kind": "service", "label": "Payments"}}, ``` **In JavaScript or TypeScript, don't either.** For an extractor it runs with -`node`, Projections provides `@githubnext/projections/extractor` (nothing to -install; install the `@githubnext/projections` package only for its types): +`node`, Projections provides `@githubnext/projections-sdk/extractor` (nothing to +install; install the `@githubnext/projections-sdk` package only for its types): the same `request`, with camelCase accessors (`request.root`, `request.checkout`, `request.inputs`, `request.files()`), and `result({entities, relationships})`, with `schema`, `metadata`, `volatile` and `missingInputs`: ```js -import {request, result} from '@githubnext/projections/extractor' +import {request, result} from '@githubnext/projections-sdk/extractor' result({entities: {'service:payments': {kind: 'service', label: 'Payments'}}}) ``` @@ -567,7 +567,7 @@ In other languages, write the JSON above. a model upgrade should count, the pinned model ID (`model`, verbatim). Never seeds, timestamps or credentials. Equal bases make a rewording unchanged; a moved part makes the item modified, saying which part. In JavaScript, - `basis()` and `generations()` from `@githubnext/projections/extractor` hash + `basis()` and `generations()` from `@githubnext/projections-sdk/extractor` hash the basis and reuse the generation store's text for an equal one, so reruns are identical. Such an extractor needs `execution.network`, its credential variables in `execution.environment`, `--trust`, and `environmental` @@ -612,9 +612,9 @@ view, with a notice. ### Custom renderer A custom renderer is web development: an npm package in `/renderer/` -written in TypeScript and React with one dependency, `@githubnext/projections`. +written in TypeScript and React with one dependency, `@githubnext/projections-sdk`. Build on the renderer kit (the shell, comparison model, step timeline, layout -and status components the built-in renderers use): `@githubnext/projections/kit` +and status components the built-in renderers use): `@githubnext/projections-sdk/kit` is its framework-free half, `/kit/react` its React components and hooks, and `/kit/react.css` their styles. Use it rather than your own markup and CSS: the kit already meets the checks the host holds every renderer to. The starter has @@ -636,12 +636,12 @@ token, and name the token to use. `/renderer` is the host protocol client underneath it (`/renderer/react` its React hooks), `/vite` the build, `/testing` the checks and `/schemas` the document types. It needs Node and npm, like any front end. (npm 11 may warn that esbuild's install script isn't covered by -`allowScripts`; the build doesn't need it.) `@githubnext/projections` isn't on +`allowScripts`; the build doesn't need it.) `@githubnext/projections-sdk` isn't on npm yet: `package.json` depends on the tarball attached to the CLI's GitHub release, by URL, at `projections --version`; keep the two at one version (`projections doctor` warns when they differ). If `npm install` can't download it, the person can build it from a Git submodule -([Install @githubnext/projections](https://github.com/githubnext/projections/blob/main/docs/guides/develop-a-renderer.md#install-githubnextprojections)); +([Install @githubnext/projections-sdk](https://github.com/githubnext/projections/blob/main/docs/guides/develop-a-renderer.md#install-githubnextprojections-sdk)); never replace it with a `file:` link to a package directory. **Declare what it does first**, in `vite.config.ts`: `rendererConfig({view: diff --git a/docs/contracts.md b/docs/contracts.md index 68730cd62..c9511f4cb 100644 --- a/docs/contracts.md +++ b/docs/contracts.md @@ -75,7 +75,7 @@ details. CI verifies that every `$id` and `$ref` points to the schemas host and that the published set is complete. TypeScript types for every document are available publicly from -`@githubnext/projections/schemas` (see [Packages](contracts/packages.md)). These +`@githubnext/projections-sdk/schemas` (see [Packages](contracts/packages.md)). These are the static types of the TypeBox definitions that generate the schemas, while the source definitions and generated `packages/schemas//v.json` files stay in this repository's internal `packages/schemas/` workspace. @@ -203,7 +203,7 @@ Viewers render code spans in monospace and the surrounding prose in the body font (via the renderer kit's `Prose` component and the host's table and text views). Plain-text attributes like tooltips and accessible labels strip the backtick markers using `plainProse`, while plain-text outputs like the CLI's -text view keep them. `@githubnext/projections/schemas` exports `proseSpans`, +text view keep them. `@githubnext/projections-sdk/schemas` exports `proseSpans`, `plainProse`, and `codeSpan` (which escapes a string into a single span). ## Trust diff --git a/docs/contracts/extractors.md b/docs/contracts/extractors.md index 03102c841..32a223c46 100644 --- a/docs/contracts/extractors.md +++ b/docs/contracts/extractors.md @@ -166,12 +166,12 @@ prepends `--require` pointing to a preload script unpacked into its cache (and when the command enables Node's permission model with `--permission`, grants read access to that directory; before Node 22.15 the hook also requires `--allow-worker`, otherwise the import resolves normally). The preload registers -a resolve hook for a single specifier, `@githubnext/projections/extractor`, +a resolve hook for a single specifier, `@githubnext/projections-sdk/extractor`, loading the module bundled with the runner ahead of any installed copy while leaving every other import untouched. Because ES modules don't search `NODE_PATH`, extractors in `.mjs`, `.js`, or `.ts` can import `{request, result}` without installing anything. Installing -`@githubnext/projections` adds its TypeScript types and lets other runners such +`@githubnext/projections-sdk` adds its TypeScript types and lets other runners such as `npx tsx` import it. Run `projections __node-require` to print the preload script's path when running an extractor by hand. Both the Python and Node modules share the same behavior and error messages, enforced by diff --git a/docs/contracts/packages.md b/docs/contracts/packages.md index f88be3412..885a82971 100644 --- a/docs/contracts/packages.md +++ b/docs/contracts/packages.md @@ -1,7 +1,7 @@ # Packages The first open-source release ships the CLI, the VS Code extension, and the -GitHub Action, along with a single npm package—**`@githubnext/projections`**—for +GitHub Action, along with a single npm package—**`@githubnext/projections-sdk`**—for developers building custom renderers. > [!NOTE] @@ -9,29 +9,29 @@ developers building custom renderers. > still awaiting security approval, the npm publishing workflow remains inert > (see [npm publishing](../maintainers/npm-publishing.md)). In the meantime, > every GitHub release attaches the packed tarball, -> `githubnext-projections-.tgz`, alongside the CLI executables with a +> `githubnext-projections-sdk-.tgz`, alongside the CLI executables with a > `.sha256` checksum and a build provenance attestation. Renderers depend on it > by URL -> (`https://github.com/githubnext/projections/releases/download/v/githubnext-projections-.tgz`), +> (`https://github.com/githubnext/projections/releases/download/v/githubnext-projections-sdk-.tgz`), > which `projections init --renderer custom` writes automatically. If your > environment cannot download release assets, you can add this repository as a > Git submodule and build and pack the tarball locally. -> [Install @githubnext/projections](../guides/develop-a-renderer.md#install-githubnextprojections) +> [Install @githubnext/projections-sdk](../guides/develop-a-renderer.md#install-githubnextprojections-sdk) > walks through both approaches. -Here is what each entry point in `@githubnext/projections` exports: +Here is what each entry point in `@githubnext/projections-sdk` exports: | Entry | Contents | |---|---| -| `@githubnext/projections/kit` | The renderer kit's framework-free half: the comparison model, step timeline and staged motion, graph layout, diff mode, change status, colors and presentation helpers. Neither it nor anything it loads imports React | -| `@githubnext/projections/kit/react` | The renderer kit's React half, the default way to write a renderer: the shell (`mountRenderer`), graph canvas, components and hooks | -| `@githubnext/projections/kit/base.css` and `/kit/react.css` | The kit's plain CSS: `base.css`, the shared look for any renderer, and `react.css`, `base.css` plus the React components' rules | -| `@githubnext/projections/renderer` and `/renderer/icons.css` | The renderer SDK: the [frame protocol](renderer-frames.md) client, presentation and interpolation helpers, interactions, rings and languages, and the icon tokens. It imports no React | -| `@githubnext/projections/renderer/react` | The renderer SDK's React hooks (`useRenderer`, `useInteractions`) | -| `@githubnext/projections/vite` | The renderer build (Node) | -| `@githubnext/projections/testing` | The built-in renderer checks and Playwright fixtures (Node; loads Playwright) | -| `@githubnext/projections/schemas` | The document types | +| `@githubnext/projections-sdk/kit` | The renderer kit's framework-free half: the comparison model, step timeline and staged motion, graph layout, diff mode, change status, colors and presentation helpers. Neither it nor anything it loads imports React | +| `@githubnext/projections-sdk/kit/react` | The renderer kit's React half, the default way to write a renderer: the shell (`mountRenderer`), graph canvas, components and hooks | +| `@githubnext/projections-sdk/kit/base.css` and `/kit/react.css` | The kit's plain CSS: `base.css`, the shared look for any renderer, and `react.css`, `base.css` plus the React components' rules | +| `@githubnext/projections-sdk/renderer` and `/renderer/icons.css` | The renderer SDK: the [frame protocol](renderer-frames.md) client, presentation and interpolation helpers, interactions, rings and languages, and the icon tokens. It imports no React | +| `@githubnext/projections-sdk/renderer/react` | The renderer SDK's React hooks (`useRenderer`, `useInteractions`) | +| `@githubnext/projections-sdk/vite` | The renderer build (Node) | +| `@githubnext/projections-sdk/testing` | The built-in renderer checks and Playwright fixtures (Node; loads Playwright) | +| `@githubnext/projections-sdk/schemas` | The document types | - **Why one package.** Authors—mostly of custom renderers—only need to install a single dependency at a single version. Running diff --git a/docs/contracts/scenarios.md b/docs/contracts/scenarios.md index 2fb66e873..c127d3fa2 100644 --- a/docs/contracts/scenarios.md +++ b/docs/contracts/scenarios.md @@ -5,8 +5,8 @@ placed beside a renderer's `package.json`) defines fixture scenarios for developing and testing renderers and comparators. You can inspect these scenarios interactively in the fixtures workbench—using **Projections: Open Renderer Scenarios…** in VS Code, or `projections-renderer-workbench` from -`@githubnext/projections` in a browser (both backed by -`projections serve --stdio --fixtures`)—and `@githubnext/projections/testing` +`@githubnext/projections-sdk` in a browser (both backed by +`projections serve --stdio --fixtures`)—and `@githubnext/projections-sdk/testing` runs the built-in renderer checks against them. ```json diff --git a/docs/design/desktop-surfaces.md b/docs/design/desktop-surfaces.md index fb27b11b8..2ce929ae5 100644 --- a/docs/design/desktop-surfaces.md +++ b/docs/design/desktop-surfaces.md @@ -45,7 +45,7 @@ had four milestones: `projections explore` runs headlessly, printing candidates and pointing to **Projections: Explore Repository**. Renderer authors who want a browser with hot updates can use the fixtures workbench via `npm run workbench` - (`projections-renderer-workbench` in `@githubnext/projections`) instead of + (`projections-renderer-workbench` in `@githubnext/projections-sdk`) instead of `inspect --fixtures`. 4. **Docs and the agent skill** (done). The quick start now leads with installing the VS Code extension and exploring your repository. The agent diff --git a/docs/design/generated-values.md b/docs/design/generated-values.md index 9f55ec313..2de76aeae 100644 --- a/docs/design/generated-values.md +++ b/docs/design/generated-values.md @@ -285,10 +285,10 @@ string, that boils down to UTF-16-sorted keys, `JSON.stringify`-style string escaping, and no whitespace. The SDK provides helpers for this. In JavaScript, they live at -`@githubnext/projections/extractor`: +`@githubnext/projections-sdk/extractor`: ```js -import {basis, generations, readRequest} from '@githubnext/projections/extractor' +import {basis, generations, readRequest} from '@githubnext/projections-sdk/extractor' const request = await readRequest() const store = await generations(request) @@ -516,7 +516,7 @@ TypeScript classes with a deterministic stub model (`fake-summarizer@1`) via `typescript-common`, making zero network or paid calls. The stub picks among several phrasings by hashing the input with `FAKE_SUMMARIZER_SAMPLE`, letting tests exercise equal-basis rewording without randomness. It uses -`@githubnext/projections/extractor` for `basis()` and the store, declaring: +`@githubnext/projections-sdk/extractor` for `basis()` and the store, declaring: ```json {"kinds": ["class"], "path": "/data/summary", "generated": true, "basis": "/data/summaryBasis"} @@ -611,7 +611,7 @@ These were open in the first draft and decided before implementation: | Engine `vary` | `within` and `beyond` entries gain `generated` and `because` | | Rules | `Varied.generated`, `Varied.because`, `generated.because`, `generated.only` | | Renderer SDK and kit | The `generated` icon, `generatedPaths`, `generatedWords` and `GeneratedText` | -| Package | `@githubnext/projections/extractor`: `basis`, `basisDigest`, `generations`, `readRequest` | +| Package | `@githubnext/projections-sdk/extractor`: `basis`, `basisDigest`, `generations`, `readRequest` | | CLI | The generation store, harvesting, `--regenerate` and `PROJECTIONS_GENERATION_CACHE_BYTES` | | Agent tools | `compare`, `current_view` and `check` mention generated values | diff --git a/docs/design/proposals/skills-distribution.md b/docs/design/proposals/skills-distribution.md index 7586771f5..d37c8e2de 100644 --- a/docs/design/proposals/skills-distribution.md +++ b/docs/design/proposals/skills-distribution.md @@ -108,7 +108,7 @@ Next, before making the repository public: - Publish an Agent Plugins 1.0 plugin (bundling the skill with an `mcp.json` that runs `projections mcp`) and list it in a marketplace once the CLI is publicly installable. -- Ship a renderer-authoring skill inside `@githubnext/projections` once npm +- Ship a renderer-authoring skill inside `@githubnext/projections-sdk` once npm skill sync stabilizes. ## Open questions diff --git a/docs/guides/change-emphasis.md b/docs/guides/change-emphasis.md index c1cc3fd32..79caec5e9 100644 --- a/docs/guides/change-emphasis.md +++ b/docs/guides/change-emphasis.md @@ -53,10 +53,10 @@ The recipe: borders, padding and sizes the same at every emphasis. ```tsx -import type {Entity} from '@githubnext/projections/schemas' -import type {EntityChange} from '@githubnext/projections/renderer' -import {describeChange, isChanged, presentedEmphasis} from '@githubnext/projections/kit' -import {StatusTab, type RendererProps} from '@githubnext/projections/kit/react' +import type {Entity} from '@githubnext/projections-sdk/schemas' +import type {EntityChange} from '@githubnext/projections-sdk/renderer' +import {describeChange, isChanged, presentedEmphasis} from '@githubnext/projections-sdk/kit' +import {StatusTab, type RendererProps} from '@githubnext/projections-sdk/kit/react' type Row = EntityChange & {label: string} diff --git a/docs/guides/develop-a-renderer.md b/docs/guides/develop-a-renderer.md index aedbddb9b..e8d985d8d 100644 --- a/docs/guides/develop-a-renderer.md +++ b/docs/guides/develop-a-renderer.md @@ -36,21 +36,21 @@ Running `projections init --renderer custom` scaffolds a renderer wired up this way, and `projections check` will warn you if a renderer does not provide a diff mode. -## Install @githubnext/projections +## Install @githubnext/projections-sdk Your renderer only needs one Projections dependency: -[`@githubnext/projections`](../../packages/sdk/README.md). Keep it on the same +[`@githubnext/projections-sdk`](../../packages/sdk/README.md). Keep it on the same version as `projections --version`, since the CLI and package release together. The package is not on npm yet while security approval is pending (see [npm publishing](../maintainers/npm-publishing.md)). Instead, each [GitHub release](https://github.com/githubnext/projections/releases) attaches it -as `githubnext-projections-.tgz` alongside the CLI, complete with a +as `githubnext-projections-sdk-.tgz` alongside the CLI, complete with a `.sha256` checksum and a build provenance attestation. Reference it by URL in `package.json`: ```json "dependencies": { - "@githubnext/projections": "https://github.com/githubnext/projections/releases/download/v0.1.0/githubnext-projections-0.1.0.tgz" + "@githubnext/projections-sdk": "https://github.com/githubnext/projections/releases/download/v0.1.0/githubnext-projections-sdk-0.1.0.tgz" } ``` @@ -76,7 +76,7 @@ A few practical details to keep in mind with URL dependencies: `projections doctor` instead. You can verify a downloaded tarball against its provenance attestation with -`gh attestation verify githubnext-projections-0.1.0.tgz --repo githubnext/projections`. +`gh attestation verify githubnext-projections-sdk-0.1.0.tgz --repo githubnext/projections`. ### Or build it from a Git submodule @@ -97,7 +97,7 @@ node packages/sdk/scripts/release-asset.mjs ../packs # npm pack, as the releas Point your renderer's `package.json` at the resulting tarball using a relative path—for example, -`"@githubnext/projections": "file:../../../../vendor/packs/githubnext-projections-0.1.0.tgz"`. +`"@githubnext/projections-sdk": "file:../../../../vendor/packs/githubnext-projections-sdk-0.1.0.tgz"`. You can also scaffold new renderers with `PROJECTIONS_RENDERER_PACKAGES` set to `vendor/packs` so `init` wires up that dependency automatically. Whenever you bump the submodule to a new release, rebuild and repack the tarball. Stick to @@ -108,23 +108,23 @@ two copies of React. ### With or without React -The [renderer kit](renderer-kit.md) ships inside `@githubnext/projections`, so +The [renderer kit](renderer-kit.md) ships inside `@githubnext/projections-sdk`, so there is nothing extra to install. Its entry points are split so you can work with or without React: - **With React** (the default scaffold): add `react` and `react-dom` (v19) to your renderer's dependencies. Import model utilities from - `@githubnext/projections/kit` and the shell, components, and hooks from - `@githubnext/projections/kit/react`. When you use `rendererConfig({view})`, it + `@githubnext/projections-sdk/kit` and the shell, components, and hooks from + `@githubnext/projections-sdk/kit/react`. When you use `rendererConfig({view})`, it automatically imports `/kit/react.css` and mounts your view. If you write a - custom entry instead, import `@githubnext/projections/kit/react.css` and call + custom entry instead, import `@githubnext/projections-sdk/kit/react.css` and call `mountRenderer` yourself. -- **Without React**: depend only on `@githubnext/projections` and Vite. Because +- **Without React**: depend only on `@githubnext/projections-sdk` and Vite. Because React and react-dom are optional peer dependencies, npm skips them. Import the - framework-free kit (`@githubnext/projections/kit` for the comparison model, + framework-free kit (`@githubnext/projections-sdk/kit` for the comparison model, timeline, layout, diff mode, status, and colors) alongside its plain - stylesheet (`@githubnext/projections/kit/base.css`). Connect to the host with - `connectRenderer` from `@githubnext/projections/renderer` (see the + stylesheet (`@githubnext/projections-sdk/kit/base.css`). Connect to the host with + `connectRenderer` from `@githubnext/projections-sdk/renderer` (see the [minimal template](../../examples/renderers/minimal/README.md)), put `class="pk"` on the root element so the kit's scoped styles apply, and build with `rendererConfig({entry: 'src/main.ts', …})`. Nothing on this path imports @@ -314,7 +314,7 @@ The full run stays the default, and it's what CI should run. ## 4. Test it in CI You can run the exact same checks in Playwright inside the real host frame using -`@githubnext/projections/testing`. Renderers created with +`@githubnext/projections-sdk/testing`. Renderers created with `projections init --renderer custom` come preconfigured with this in `browser/renderer.spec.ts` and run it via `npm test`: @@ -324,7 +324,7 @@ import { openStage, scenarioKeys, test, -} from "@githubnext/projections/testing"; +} from "@githubnext/projections-sdk/testing"; test.use({ projections: { fixtures: "scenarios.json", renderers: "." } }); @@ -367,7 +367,7 @@ package; this layout is one you set up by hand from there: ``` The workspace's `package.json` lists the members and holds the dependencies they -all use, `@githubnext/projections`, React and Vite among them, which npm +all use, `@githubnext/projections-sdk`, React and Vite among them, which npm installs once at the workspace's root: ```json @@ -376,7 +376,7 @@ installs once at the workspace's root: "workspaces": ["shared", "turn-cost", "blast-radius"], "scripts": {"build": "npm run build --workspaces --if-present"}, "dependencies": { - "@githubnext/projections": "https://github.com/githubnext/projections/releases/download/v0.2.0/githubnext-projections-0.2.0.tgz", + "@githubnext/projections-sdk": "https://github.com/githubnext/projections/releases/download/v0.2.0/githubnext-projections-sdk-0.2.0.tgz", "react": "^19.1.0", "react-dom": "^19.1.0" }, diff --git a/docs/guides/first-extractor.md b/docs/guides/first-extractor.md index b90c5846a..05a3daee3 100644 --- a/docs/guides/first-extractor.md +++ b/docs/guides/first-extractor.md @@ -81,7 +81,7 @@ helper module on `PYTHONPATH` and pipe in a request: (or in PowerShell, `$env:PYTHONPATH = projections __python-path; Get-Content request.json | python tools/extract-flags.py`). -In JavaScript or TypeScript, `@githubnext/projections/extractor` gives you the +In JavaScript or TypeScript, `@githubnext/projections-sdk/extractor` gives you the same helpers, and Projections injects it automatically for extractors run with `node`—so there's nothing to install here either. Its accessors use camelCase (`request.root`, `request.repositoryRoot`), and `result()` takes a single @@ -91,7 +91,7 @@ object. With the flags stored in JSON, which Node reads natively: // tools/extract-flags.mjs import {readFileSync} from 'node:fs' import {join} from 'node:path' -import {request, result} from '@githubnext/projections/extractor' +import {request, result} from '@githubnext/projections-sdk/extractor' const flags = JSON.parse(readFileSync(join(request.root, 'flags.json'), 'utf8')) result({ @@ -104,7 +104,7 @@ result({ }) ``` -You only need to install `@githubnext/projections` as a development dependency +You only need to install `@githubnext/projections-sdk` as a development dependency if you want its TypeScript types. To run the extractor by hand while debugging, preload the module the same way Projections does: `node --require "$(projections __node-require)" tools/extract-flags.mjs < request.json`. diff --git a/docs/guides/how-it-works.md b/docs/guides/how-it-works.md index 75b49d0cc..47ce8ab38 100644 --- a/docs/guides/how-it-works.md +++ b/docs/guides/how-it-works.md @@ -359,10 +359,10 @@ a **generation store** of previously generated values keyed by path and basis, and passes a read-only snapshot to the extractor at `request.generations.file`. When an extractor finds a matching basis in the store, it can reuse the stored value without calling the model again. In JavaScript, -`@githubnext/projections/extractor` handles both hashing and lookup: +`@githubnext/projections-sdk/extractor` handles both hashing and lookup: ```js -import {basis, generations, request} from '@githubnext/projections/extractor' +import {basis, generations, request} from '@githubnext/projections-sdk/extractor' const store = await generations(request) const summaryBasis = basis({input: classSource, prompt: PROMPT, model: 'gpt-4o-2024-08-06'}) diff --git a/docs/guides/renderer-kit-components.md b/docs/guides/renderer-kit-components.md index efc41642f..86aae9dd4 100644 --- a/docs/guides/renderer-kit-components.md +++ b/docs/guides/renderer-kit-components.md @@ -178,7 +178,7 @@ to 160% of its sides, and no stacking context sits between a group and its runs. ## Item rings Hover, keyboard focus, and selection appear as a single ring per unit, drawn by -the renderer SDK's rings module (in `@githubnext/projections/renderer`, started +the renderer SDK's rings module (in `@githubnext/projections-sdk/renderer`, started by `connectRenderer`) for every renderer. Because the ring is **styling on the unit's own element**, it moves, scales, scrolls, clips, and fades on the exact same frame through any transform, zoom, or animation: @@ -364,7 +364,7 @@ for domain meaning that isn't a change between revisions: `Text`, `Chip` and `DataTable` (`tone={item => …}`, from the version a row shows) take a `tone`. Anything else spreads `toneAttributes(tone)` (from -`@githubnext/projections/kit`), which sets `data-projections-tone` on an HTML +`@githubnext/projections-sdk/kit`), which sets `data-projections-tone` on an HTML element or SVG text. A tone stays neutral: it never uses a change hue, a dashed edge, or opacity, so it never reads as added, removed, or modified. Change marking still wins: a value change or a removed item's struck-through text keeps @@ -485,10 +485,10 @@ hand-rolling table markup—it handles sorting, diffing, folding, and theme chec out of the box: ```tsx -import {tableSortControls} from '@githubnext/projections/kit' -import {DataTable, useTableProps} from '@githubnext/projections/kit/react' -import type {DataTableColumn, RendererProps, ViewOptions} from '@githubnext/projections/kit/react' -import type {Entity} from '@githubnext/projections/schemas' +import {tableSortControls} from '@githubnext/projections-sdk/kit' +import {DataTable, useTableProps} from '@githubnext/projections-sdk/kit/react' +import type {DataTableColumn, RendererProps, ViewOptions} from '@githubnext/projections-sdk/kit/react' +import type {Entity} from '@githubnext/projections-sdk/schemas' const columns: DataTableColumn[] = [ {id: 'name', label: 'Service', value: entity => entity.label ?? entity.id, font: 'code'}, diff --git a/docs/guides/renderer-kit.md b/docs/guides/renderer-kit.md index c0fbb3aff..ca67f2e27 100644 --- a/docs/guides/renderer-kit.md +++ b/docs/guides/renderer-kit.md @@ -2,15 +2,15 @@ The renderer kit is the shared foundation behind Projections' built-in renderers and the recommended way to build custom ones. You import it from -[`@githubnext/projections`](../../packages/sdk/README.md) across three entry +[`@githubnext/projections-sdk`](../../packages/sdk/README.md) across three entry points: | Entry | What it is | |---|---| -| `@githubnext/projections/kit` | Framework-free: the comparison model, step timeline and staged motion, graph layout and arrow routing, diff mode, card text metrics, change status, palettes and presentation helpers. It imports no React, so any renderer can use it | -| `@githubnext/projections/kit/react` | The React half: the renderer shell (`mountRenderer`, `RendererProps`), the graph canvas, presentation and layout components, and the hooks. React and react-dom are (optional) peer dependencies | -| `@githubnext/projections/kit/base.css` and `/kit/react.css` | Plain CSS: `base.css` is the shared look (the `.pk` root's aliases of the theme tokens, change regions, badges, status lines, icons and text), usable without React; `react.css` is `base.css` plus the rules of the React components | +| `@githubnext/projections-sdk/kit` | Framework-free: the comparison model, step timeline and staged motion, graph layout and arrow routing, diff mode, card text metrics, change status, palettes and presentation helpers. It imports no React, so any renderer can use it | +| `@githubnext/projections-sdk/kit/react` | The React half: the renderer shell (`mountRenderer`, `RendererProps`), the graph canvas, presentation and layout components, and the hooks. React and react-dom are (optional) peer dependencies | +| `@githubnext/projections-sdk/kit/base.css` and `/kit/react.css` | Plain CSS: `base.css` is the shared look (the `.pk` root's aliases of the theme tokens, change regions, badges, status lines, icons and text), usable without React; `react.css` is `base.css` plus the rules of the React components | These entries are bundled from the internal workspace [`packages/renderers/kit`](../../packages/renderers/kit/README.md) @@ -26,8 +26,8 @@ shell and components from the React entry: ```tsx // src/view.tsx of a renderer package, with rendererConfig({view: 'src/view.tsx', …}) in vite.config.ts import './styles.css' -import {isChanged} from '@githubnext/projections/kit' -import type {RendererProps} from '@githubnext/projections/kit/react' +import {isChanged} from '@githubnext/projections-sdk/kit' +import type {RendererProps} from '@githubnext/projections-sdk/kit/react' export function View(props: RendererProps) { /* … */ } ``` @@ -39,19 +39,19 @@ entry point that loads `/kit/react.css` and calls capabilities from `vite.config.ts` along with your view module's `options` export (`ViewOptions`: `nouns`, `facts`, `controls`, `steps`, `interactions`). If you supply a custom entry (`rendererConfig({entry})`), import -`@githubnext/projections/kit/react.css` and invoke `mountRenderer` yourself. +`@githubnext/projections-sdk/kit/react.css` and invoke `mountRenderer` yourself. If you prefer to skip React (see the [minimal template](../../examples/renderers/minimal/README.md)), combine the framework-free entry and `base.css` with `connectRenderer` from -`@githubnext/projections/renderer`, and place `class="pk"` on your root element +`@githubnext/projections-sdk/renderer`, and place `class="pk"` on your root element just as `mountRenderer` does: ```ts // src/main.ts, with rendererConfig({entry: 'src/main.ts', …}) in vite.config.ts -import '@githubnext/projections/kit/base.css' -import {comparisonModel, describeChange, statusParts} from '@githubnext/projections/kit' -import {connectRenderer} from '@githubnext/projections/renderer' +import '@githubnext/projections-sdk/kit/base.css' +import {comparisonModel, describeChange, statusParts} from '@githubnext/projections-sdk/kit' +import {connectRenderer} from '@githubnext/projections-sdk/renderer' ``` The shell, timeline hooks, and graph canvas live in the React entry, while the @@ -65,7 +65,7 @@ are strongly typed with the `data` the engine guarantees. Use `RendererProps<'database/v0'>` (or `RendererProps` alongside `accepts` in `rendererConfig` or `mountRenderer(Component, {name, accepts, capabilities})`), then narrow entities -by kind with `isKind` from `@githubnext/projections/schemas`: +by kind with `isKind` from `@githubnext/projections-sdk/schemas`: ```tsx function Columns({model}: RendererProps<'database/v0'>) { @@ -493,7 +493,7 @@ so a category never changes color between Before and After: - **Programming and markup languages** use their theme-calibrated GitHub Linguist hue from the SDK's languages module - (`@githubnext/projections/renderer`), so TypeScript is the same muted blue in + (`@githubnext/projections-sdk/renderer`), so TypeScript is the same muted blue in both file packing and code statistics. - **Other categories** (data, config, prose, assets like JSON, YAML, TOML, Markdown, and images) take slots from the categorical palette (`chart-1` … diff --git a/docs/guides/renderer-sdk.md b/docs/guides/renderer-sdk.md index c506767c1..9e88fb4d1 100644 --- a/docs/guides/renderer-sdk.md +++ b/docs/guides/renderer-sdk.md @@ -305,7 +305,7 @@ any nested `document-request`s through your client, and passes every child message back to you: ```ts -import {connectRenderer, embedRenderer} from '@githubnext/projections/renderer' +import {connectRenderer, embedRenderer} from '@githubnext/projections-sdk/renderer' const client = connectRenderer(handlers, {capabilities: {changeHighlighting: 'supported'}}) const nested = embedRenderer(client, card, { @@ -447,7 +447,7 @@ browser suite (`packages/renderers/kit/browser/badges.spec.ts`) verifies in pixels. To render an icon inside a frame, put `data-icon=""` on an element and -include `@githubnext/projections/renderer/icons.css` (already bundled with the +include `@githubnext/projections-sdk/renderer/icons.css` (already bundled with the kit's styles). It masks `--projections-icon-` in `currentColor` at 1em square so the icon automatically inherits the adjacent text's size and color. Always set `aria-hidden="true"` and pair the icon with visible text—never rely diff --git a/docs/maintainers/npm-publishing.md b/docs/maintainers/npm-publishing.md index 0085efeae..fe60c09f4 100644 --- a/docs/maintainers/npm-publishing.md +++ b/docs/maintainers/npm-publishing.md @@ -1,6 +1,6 @@ # npm publishing -This guide explains how `@githubnext/projections` is published to npm and what +This guide explains how `@githubnext/projections-sdk` is published to npm and what needs to be configured before the first release goes out. See [Packages](../contracts/packages.md) for what the package includes and why it is the only one we publish. @@ -9,12 +9,12 @@ the only one we publish. > **npm publishing awaits security approval.** Until approval comes through, > leave the workflow unconfigured (no `npm` environment and no `NPM_PUBLISHING` > variable) so it stays inactive. In the meantime, every GitHub release attaches -> the package tarball (`githubnext-projections-.tgz`) so renderers can +> the package tarball (`githubnext-projections-sdk-.tgz`) so renderers can > install it by URL. The release proof job packs it with > `node packages/sdk/scripts/release-asset.mjs`, verifies it inside a renderer > scaffolded by the release CLI, and uploads it alongside a `.sha256` checksum; > it is attested with the other assets once the release is approved (see -> [Install @githubnext/projections](../guides/develop-a-renderer.md#install-githubnextprojections)). +> [Install @githubnext/projections-sdk](../guides/develop-a-renderer.md#install-githubnextprojections-sdk)). > Once npm publishing is turned on, update > `packages/cli/templates/renderer/package.json` so `projections init` points > back to the npm version. @@ -58,7 +58,7 @@ Until publishing is configured, the job simply logs a notice and exits cleanly. 1. **Reserve the package name.** Publishing requires access to the `@githubnext` scope on npm with an account or team permitted to publish - `@githubnext/projections`. The first publish creates the package. If you plan + `@githubnext/projections-sdk`. The first publish creates the package. If you plan to use trusted publishing, someone with publish rights (or a scope owner) must publish the initial version manually from a release checkout first: run `npm run build`, then `node packages/sdk/scripts/manifest.mjs strip`, then @@ -82,7 +82,7 @@ Until publishing is configured, the job simply logs a notice and exits cleanly. token is stored. Once a publish succeeds, lock down the package's publishing access to require two-factor authentication and disallow tokens. - **Granular access token.** Create a token on npmjs.com scoped to read and - write `@githubnext/projections` only, store it as the `NPM_TOKEN` secret in + write `@githubnext/projections-sdk` only, store it as the `NPM_TOKEN` secret in the `npm` environment, and set the repository variable `NPM_PUBLISHING` to `token` (the variable is needed because the gating job can't read environment secrets). Remember to rotate the token before it expires. @@ -96,6 +96,6 @@ the npm package page. Note that provenance requires a public repository. - Run `npm run build && npm run check:pack --workspace packages/sdk` locally and verify it passes (it prints the tarball's file list and size). - Confirm the `package` CI job passes on the release commit. -- Run `npm view @githubnext/projections` to verify the scope is reachable. Once +- Run `npm view @githubnext/projections-sdk` to verify the scope is reachable. Once setup is complete, a manual run of **Publish npm package** against an existing release tag should either publish or report that the version is already live. diff --git a/docs/maintainers/releasing.md b/docs/maintainers/releasing.md index 43734ddfb..c8e60abf4 100644 --- a/docs/maintainers/releasing.md +++ b/docs/maintainers/releasing.md @@ -14,7 +14,7 @@ the rule is automatic and needs no manual allowlist: by every crate in `packages/` via `version.workspace = true`. This is the version `projections --version` prints and the version dist releases. - The `version` field of every npm workspace in `packages/` — - `@githubnext/projections` (`packages/sdk`), the renderers along with their + `@githubnext/projections-sdk` (`packages/sdk`), the renderers along with their harness and testing workspaces, the host, the Inspector, the schemas, the JavaScript packages for the Engine and comparator runtime, the CLI wrapper, the VS Code extension (whose `.vsix` is named @@ -70,7 +70,7 @@ fails and prints the exact file and line. `npm run check` runs this automatically via `npm run check:versions` (the `versions` gate of `tools check`), so CI catches partial bumps right away. The release workflow also runs it against the release tag before building (in the -release inputs job), before packing `@githubnext/projections` (in the release +release inputs job), before packing `@githubnext/projections-sdk` (in the release proof), and before publishing to npm (`publish-npm.yml`). dist itself rejects any tag that doesn't match the CLI's version. @@ -169,7 +169,7 @@ first release: `dist generate` from `dist-workspace.toml`) plans the release, verifies the version matches the tag, builds the CLI for every target, verifies each binary on its native platform, packages the VS Code extension, and packs - `@githubnext/projections`. Once all checks pass, it pauses at **Release + `@githubnext/projections-sdk`. Once all checks pass, it pauses at **Release approval / Approve and attest** (`release-approval.yml`, a dist publish job) until a `release` environment reviewer approves it. Only after approval does it attest the assets and create the `v0.2.0` GitHub release containing: @@ -180,7 +180,7 @@ first release: | `projections-cli-installer.sh`, `projections-cli-installer.ps1` | the installers | | `gh-projections--`, `.exe` on Windows | the executable as a `gh` precompiled extension, which the Action installs | | `projections-vscode--.vsix` | the VS Code extension with that platform's executable inside | - | `githubnext-projections-.tgz` | `@githubnext/projections`, which renderers install by URL | + | `githubnext-projections-sdk-.tgz` | `@githubnext/projections-sdk`, which renderers install by URL | Every asset receives an attestation in the approved job, and dist also attests its archives as they are built. Every asset except the installers @@ -190,7 +190,7 @@ first release: version number so installers, `gh extension install`, and the Action can locate them reliably in any release; the release tag carries the version. - `githubnext-projections-.tgz` bundles both the renderer SDK and all + `githubnext-projections-sdk-.tgz` bundles both the renderer SDK and all three renderer kit entry points (`/kit`, framework-free; `/kit/react`; `/kit/base.css` and `/kit/react.css`), so the kit doesn't need its own release asset. Before attaching it, the release proof validates the tarball @@ -201,7 +201,7 @@ first release: 4. After the announcement, post-announce jobs publish the JSON Schemas ([schema publishing](schema-publishing.md)), publish - `@githubnext/projections` to npm once approved + `@githubnext/projections-sdk` to npm once approved ([npm publishing](npm-publishing.md)), and — for stable releases — advance the major-version tag (`v0`) that `uses: githubnext/projections@v0` tracks. That last step runs in `move-major-tag.yml` inside the `major-tag` diff --git a/docs/models/domain-model.md b/docs/models/domain-model.md index 324fc714e..19b7504c3 100644 --- a/docs/models/domain-model.md +++ b/docs/models/domain-model.md @@ -273,7 +273,7 @@ This design has three practical consequences: - Built-in renderers use the exact same protocol and nothing else. Each ships as a static bundle built with the public renderer SDK and kit, loads into the same `sandbox="allow-scripts"` frame under the same CSP, receives the same - messages, and is tested via `@githubnext/projections/testing` — no in-process + messages, and is tested via `@githubnext/projections-sdk/testing` — no in-process shortcuts. The only difference is provenance: a built-in ships with the host, so it needs no trust, can serve as a schema fallback, and is the only kind hosted views run (since hosted views never execute code from artifacts). @@ -420,7 +420,7 @@ packages/ catalog/ the registry of built-in extractors comparators/ default comparator, the rules interpreter and its sandboxed runtime, first-party rules renderers/ one package per built-in renderer, plus renderers/sdk and renderers/testing for authors - sdk/ @githubnext/projections, the npm package renderer authors install + sdk/ @githubnext/projections-sdk, the npm package renderer authors install host/core/ browser host: renderer frames, playback, selection, built-in table and text views host/vscode-ui/ the host's VS Code UI host/inspector/ the Inspector UI, a mountable package whose assets the CLI embeds diff --git a/docs/reference/renderer-kit.md b/docs/reference/renderer-kit.md index a2089ed36..3457e86bb 100644 --- a/docs/reference/renderer-kit.md +++ b/docs/reference/renderer-kit.md @@ -2,13 +2,13 @@ # Renderer kit API -The public API of the renderer kit the built-in renderers use, by entry: `@githubnext/projections/kit`, +The public API of the renderer kit the built-in renderers use, by entry: `@githubnext/projections-sdk/kit`, framework-free (the comparison model, step timeline, staged motion, graph layout, diff mode, status and colors), and -`@githubnext/projections/kit/react` (the shell, graph canvas, components and hooks). Read with the +`@githubnext/projections-sdk/kit/react` (the shell, graph canvas, components and hooks). Read with the `typescript-public-api` extractor; descriptions are the sources' documentation comments. Start with [the kit's guide](../guides/renderer-kit.md). -## Framework-free (`@githubnext/projections/kit`) +## Framework-free (`@githubnext/projections-sdk/kit`) ### `ArrowBox` @@ -515,7 +515,7 @@ Colors for categories of files and languages, shared by every built-in renderer so a language is the same color everywhere: - Programming and markup languages take their GitHub Linguist color - (`@githubnext/projections/renderer`), adjusted per theme + (`@githubnext/projections-sdk/renderer`), adjusted per theme for contrast. TypeScript is Linguist's blue in file packing and in code statistics alike. Two languages whose colors look alike (TSX is drawn as TypeScript) don't share it: the heavier keeps it and the other takes a @@ -3943,7 +3943,7 @@ the most is `max` times the fit or `readable` (CSS px per content unit), whichever is larger, so a fit too small to read can always be zoomed to a legible size. -## React (`@githubnext/projections/kit/react`) +## React (`@githubnext/projections-sdk/kit/react`) ### `Badge` diff --git a/docs/reference/renderer-messages.md b/docs/reference/renderer-messages.md index 4fa61e6b1..c85558b17 100644 --- a/docs/reference/renderer-messages.md +++ b/docs/reference/renderer-messages.md @@ -3,11 +3,11 @@ # Renderer messages The messages between a host and a renderer's sandboxed frame, as the renderer SDK's -protocol module (exported by `@githubnext/projections/renderer`) defines and validates them. The +protocol module (exported by `@githubnext/projections-sdk/renderer`) defines and validates them. The [renderer frame protocol](../contracts/renderer-frames.md) explains the exchange; most renderers use the SDK's client instead of these messages directly. -## Protocol (`@githubnext/projections/renderer`) +## Protocol (`@githubnext/projections-sdk/renderer`) ### `AcceptedExtraction` diff --git a/docs/reference/renderer-sdk.md b/docs/reference/renderer-sdk.md index d087995a3..737ccbdd0 100644 --- a/docs/reference/renderer-sdk.md +++ b/docs/reference/renderer-sdk.md @@ -2,12 +2,12 @@ # Renderer SDK API -The public API of the renderer SDK: `@githubnext/projections/renderer` (the frame protocol client, presentation -helpers, interactions, rings and languages), `@githubnext/projections/renderer/react` (the React hooks) and -`@githubnext/projections/vite` (the build), by the SDK module that defines each export. Read with the `typescript-public-api` extractor, the same one that shows your own packages' +The public API of the renderer SDK: `@githubnext/projections-sdk/renderer` (the frame protocol client, presentation +helpers, interactions, rings and languages), `@githubnext/projections-sdk/renderer/react` (the React hooks) and +`@githubnext/projections-sdk/vite` (the build), by the SDK module that defines each export. Read with the `typescript-public-api` extractor, the same one that shows your own packages' APIs; descriptions are the sources' documentation comments. Start with [the renderer SDK guide](../../packages/renderers/sdk/README.md). -## Client (`@githubnext/projections/renderer`) +## Client (`@githubnext/projections-sdk/renderer`) ### `afterPaint` @@ -182,7 +182,7 @@ Handlers for host messages. Each is optional; unknown or foreign messages never | `select` | `"select"?: { (message: { path?: string; id: string \| null; }): void }` | The host's selection: an item ID or `null`, and optionally a property of it (`path`, an RFC 6901 pointer). | | `viewport` | `"viewport"?: { (message: { height: number; width: number; }): void }` | The frame's size in CSS px, on load and whenever it changes. | -## Interactions (`@githubnext/projections/renderer`) +## Interactions (`@githubnext/projections-sdk/renderer`) ### `annotatedAttribute` @@ -357,7 +357,7 @@ Marks the entity element that is one visual unit (a card, a table) when entity elements nest inside it. The SDK rings units (see `rings.ts`); nested parts are tinted by the renderer, never ringed. -## Languages (`@githubnext/projections/renderer`) +## Languages (`@githubnext/projections-sdk/renderer`) ### `Language` @@ -417,7 +417,7 @@ linguistRelease: string The Linguist release the language table was generated from, for example `v9.7.0`. -## Presentation (`@githubnext/projections/renderer`) +## Presentation (`@githubnext/projections-sdk/renderer`) ### `adjectivalKind` @@ -1716,7 +1716,7 @@ One run of a word diff: text both passages share, or text only one has. | `op` | `"op": "added" \| "removed" \| "same"` | `same` for text both passages have, `removed` for text only `before` has, `added` for text only `after` has. | | `text` | `"text": string` | The run's text, never empty: the `same` and `removed` runs spell `before`, the `same` and `added` runs `after`. | -## Protocol (`@githubnext/projections/renderer`) +## Protocol (`@githubnext/projections-sdk/renderer`) ### `AcceptedExtraction` @@ -2794,7 +2794,7 @@ tokenVar(name: ThemeTokenName): string `var(--projections-)`: a theme token as a CSS value, for the rare inline style. -## React (`@githubnext/projections/renderer/react`) +## React (`@githubnext/projections-sdk/renderer/react`) ### `ExtractionAccepted` @@ -2894,7 +2894,7 @@ What `useRenderer` declares and how it behaves. | `capabilities` | `"capabilities": RendererCapabilities` | What the renderer supports, posted in `ready`. Read once on mount: later changes are ignored. | | `onAction` | `"onAction"?: { (id: string): void }` | Called when the person activates one of the declared `action` controls. | -## Renderer (`@githubnext/projections/renderer`) +## Renderer (`@githubnext/projections-sdk/renderer`) ### `withFragment` @@ -2906,7 +2906,7 @@ The document with its URL fragment set first thing, before its own scripts: a `s to carry the channel, so it sets the fragment from inside, as a host's frame URL would have it. A host whose policy admits scripts by nonce (an editor webview) supplies documents whose scripts carry it, and this one carries it too. -## Rings (`@githubnext/projections/renderer`) +## Rings (`@githubnext/projections-sdk/renderer`) ### `connectRings` @@ -3035,7 +3035,7 @@ unitSelector(attribute?: string): string The units' selector, for an entity attribute. -## Vite build (`@githubnext/projections/vite`) +## Vite build (`@githubnext/projections-sdk/vite`) ### `lintRendererStyles` @@ -3068,7 +3068,7 @@ A renderer bundle's build. Give exactly one of `view` and `entry`: | `comparisonModes` | `"comparisonModes"?: Array<"animated" \| "diff" \| "side-by-side" \| "swipe">` | Comparison modes the bundle supports, written to `renderer.json` and, with `view`, to the generated entry's capabilities. With `entry`, declare the same list in its `mountRenderer` capabilities. Omit it for the default (`animated`, `side-by-side`, `swipe`). | | `entry` | `"entry"?: string` | Script entry of your own, for example `src/main.tsx`, in place of `view`. | | `handles` | `"handles"?: Array` | Definition renderer names this bundle presents, for example `["graph", "dag"]`. | -| `kit` | `"kit"?: string` | With `view`: the renderer kit the generated entry mounts with (default `@githubnext/projections/kit`): it imports `mountRenderer` from its `/react` entry and its styles from `/react.css`. | +| `kit` | `"kit"?: string` | With `view`: the renderer kit the generated entry mounts with (default `@githubnext/projections-sdk/kit`): it imports `mountRenderer` from its `/react` entry and its styles from `/react.css`. | | `name` | `"name": string` | Bundle name, a lowercase identifier; the host serves the bundle at `renderers//`. | | `outDir` | `"outDir"?: string` | Output directory (default `dist`). | | `title` | `"title": string` | Human-readable title the host shows when this renderer is active. | @@ -3104,7 +3104,7 @@ the generated entry both take them from these options. ```ts // vite.config.ts import {defineConfig} from 'vite' -import {rendererConfig} from '@githubnext/projections/vite' +import {rendererConfig} from '@githubnext/projections-sdk/vite' export default defineConfig( rendererConfig({view: 'src/view.tsx', name: 'flags', title: 'Feature flags', comparisonModes: ['diff', 'side-by-side']}), ) diff --git a/docs/runner/commands.md b/docs/runner/commands.md index c551cba80..c5113614f 100644 --- a/docs/runner/commands.md +++ b/docs/runner/commands.md @@ -104,12 +104,12 @@ projections validate /tmp/services.extraction.json For an existing projection, only the requested parts are added and only their definition fields are updated. Calling it without `ID` writes only the skill. It never overwrites existing projection files and never runs code. Because - `@githubnext/projections` isn't published to npm yet, custom renderers depend + `@githubnext/projections-sdk` isn't published to npm yet, custom renderers depend on the tarball attached to this CLI's GitHub release by URL; setting `PROJECTIONS_RENDERER_PACKAGES=DIR` installs it from an `npm pack` tarball in `DIR` (for instance, one built from a Git submodule), while a development build from a clone (`npm run tools -- install`) uses a `file:` reference to - `dist/dogfood/githubnext-projections.tgz`. + `dist/dogfood/githubnext-projections-sdk.tgz`. - `check [-p ID]...` verifies projections end to end (all projections defined in the working tree by default). It confirms that the definition is valid, the working tree extracts cleanly, and a rerun produces the same extraction up to diff --git a/docs/setup/early-access.md b/docs/setup/early-access.md index cce6145e7..0b915ed45 100644 --- a/docs/setup/early-access.md +++ b/docs/setup/early-access.md @@ -22,8 +22,8 @@ CLI) and sets up three things: `code --install-extension`. Pass `--editor code-insiders` for Insiders, or `--editor none` to only write `dist/dogfood/projections-vscode.vsix`. Reload VS Code afterward to pick up the new build. -- It packs `@githubnext/projections`, the package custom renderers depend on, - into a stable path at `dist/dogfood/githubnext-projections.tgz`. +- It packs `@githubnext/projections-sdk`, the package custom renderers depend on, + into a stable path at `dist/dogfood/githubnext-projections-sdk.tgz`. You can limit what gets installed with `--only cli,vscode,npm`, or pass `--dry-run` to preview the plan without making changes. When you want to update, @@ -46,7 +46,7 @@ npm run tools -- install --only npm --project ../my-repo/.github/projections/fla ``` That command sets -`"@githubnext/projections": "file:…/dist/dogfood/githubnext-projections.tgz"` +`"@githubnext/projections-sdk": "file:…/dist/dogfood/githubnext-projections-sdk.tgz"` (using a relative path when the project lives beside your clone) and clears out any conflicting `overrides` entry. Re-run it after every update—each pack bumps the version so npm reinstalls cleanly. Always use the tarball rather than @@ -59,5 +59,5 @@ leave the renderer with duplicate copies. To remove the source install, delete the binary with `rm ~/.local/bin/projections`, uninstall the extension with `code --uninstall-extension githubnext.projections-vscode`, and in any renderer -project switch back with `npm install @githubnext/projections@` once +project switch back with `npm install @githubnext/projections-sdk@` once the package is published on npm. diff --git a/docs/setup/first-projection.md b/docs/setup/first-projection.md index 690494a51..a078e35f0 100644 --- a/docs/setup/first-projection.md +++ b/docs/setup/first-projection.md @@ -136,23 +136,23 @@ npm install npm run build ``` -Because `@githubnext/projections` isn't published to npm yet, the scaffolded +Because `@githubnext/projections-sdk` isn't published to npm yet, the scaffolded renderer points directly to the tarball URL attached to your CLI's GitHub release, and `npm install` fetches it from there. If your environment can't download release assets, you can build it from a Git submodule instead—see -[Install @githubnext/projections](../guides/develop-a-renderer.md#install-githubnextprojections). +[Install @githubnext/projections-sdk](../guides/develop-a-renderer.md#install-githubnextprojections-sdk). When you're running a development build from a clone ([Early access (from source)](early-access.md)), `init` points to the tarball packed by `npm run tools -- install` at -`dist/dogfood/githubnext-projections.tgz` via a `file:` reference instead; after +`dist/dogfood/githubnext-projections-sdk.tgz` via a `file:` reference instead; after pulling updates to the clone, run `npm run tools -- install --only npm --project ` to refresh the package. A custom renderer is a standard front-end package inside your repository built with TypeScript, React, and Vite, with a single Projections dependency: -[`@githubnext/projections`](../../packages/sdk/README.md). Its kit -(`@githubnext/projections/kit`, with the React shell and components under +[`@githubnext/projections-sdk`](../../packages/sdk/README.md). Its kit +(`@githubnext/projections-sdk/kit`, with the React shell and components under `/kit/react`) provides the exact comparison model, step timeline, shell, and UI components that the built-in renderers use. Building on the kit means your renderer satisfies the host's checks out of the box. Running `npm run build` diff --git a/examples/extractors/README.md b/examples/extractors/README.md index f225c15ed..399025969 100644 --- a/examples/extractors/README.md +++ b/examples/extractors/README.md @@ -10,7 +10,7 @@ on stdin and writes one `architecture/v0` extraction on stdout. They examine TypeScript projects with the project's own `typescript` package (TypeScript 5 or 6) through its compiler API, so they resolve imports, aliases and re-exports by symbol rather than by spelling. They read the request and write the -extraction with `@githubnext/projections/extractor`, which Projections provides +extraction with `@githubnext/projections-sdk/extractor`, which Projections provides to the extractors it runs with `node`, so no Projections package is required. diff --git a/examples/extractors/class-summaries/README.md b/examples/extractors/class-summaries/README.md index 5438dd679..48bd1ddda 100644 --- a/examples/extractors/class-summaries/README.md +++ b/examples/extractors/class-summaries/README.md @@ -19,7 +19,7 @@ moved part makes the class `modified`, saying which part moved. See [generated values](../../../docs/design/generated-values.md). The sample uses `basis()` and `generations()` from -`@githubnext/projections/extractor`. `generations()` reads the runner's +`@githubnext/projections-sdk/extractor`. `generations()` reads the runner's **generation store**: summaries earlier extractions generated, keyed by the declared path and the basis. When the basis is equal, the extractor reuses the stored text instead of asking the model again, so reruns and pull request diff --git a/examples/extractors/class-summaries/extract.mjs b/examples/extractors/class-summaries/extract.mjs index b116745d8..d6150b090 100644 --- a/examples/extractors/class-summaries/extract.mjs +++ b/examples/extractors/class-summaries/extract.mjs @@ -4,7 +4,7 @@ // network or paid calls: replace `summarize` with a call to your model. import {createHash} from 'node:crypto' import path from 'node:path' -import {basis, generations} from '@githubnext/projections/extractor' +import {basis, generations} from '@githubnext/projections-sdk/extractor' import {architecture, inputs, main, project, visit} from '../typescript-common/program.mjs' /** The system prompt. A change to it regenerates every summary, as a prompt change should. */ diff --git a/examples/extractors/class-summaries/test/class-summaries.test.mjs b/examples/extractors/class-summaries/test/class-summaries.test.mjs index e3c5ac837..f23e9aa07 100644 --- a/examples/extractors/class-summaries/test/class-summaries.test.mjs +++ b/examples/extractors/class-summaries/test/class-summaries.test.mjs @@ -4,7 +4,7 @@ import {mkdtempSync, readFileSync, rmSync, writeFileSync} from 'node:fs' import {tmpdir} from 'node:os' import path from 'node:path' import test from 'node:test' -import {basisDigest} from '@githubnext/projections/extractor' +import {basisDigest} from '@githubnext/projections-sdk/extractor' import {checkout, compare, fixture, isolated} from '../../test-support.mjs' import {createNativeEngine} from '@githubnext/projections-engine/native' diff --git a/examples/extractors/package.json b/examples/extractors/package.json index af13a53d5..c36569171 100644 --- a/examples/extractors/package.json +++ b/examples/extractors/package.json @@ -9,7 +9,7 @@ "test": "node --test */test/*.test.mjs" }, "devDependencies": { - "@githubnext/projections": "0.3.2", + "@githubnext/projections-sdk": "0.3.2", "@githubnext/projections-engine": "0.3.2", "typescript": "^5.9.3" }, diff --git a/examples/extractors/test-support.mjs b/examples/extractors/test-support.mjs index 546735887..758d07c95 100644 --- a/examples/extractors/test-support.mjs +++ b/examples/extractors/test-support.mjs @@ -10,7 +10,7 @@ import {createNativeEngine} from '@githubnext/projections-engine/native' const here = path.dirname(fileURLToPath(import.meta.url)) const engine = createNativeEngine() -/** What the runner preloads into an extractor run with `node`: `@githubnext/projections/extractor`, with nothing installed. */ +/** What the runner preloads into an extractor run with `node`: `@githubnext/projections-sdk/extractor`, with nothing installed. */ const preload = path.join(here, '../../packages/cli/node/register.cjs') /** A working checkout with `typescript` installed: this workspace. */ diff --git a/examples/extractors/typescript-common/basics.mjs b/examples/extractors/typescript-common/basics.mjs index 749418e45..bbf184066 100644 --- a/examples/extractors/typescript-common/basics.mjs +++ b/examples/extractors/typescript-common/basics.mjs @@ -1,6 +1,6 @@ // The samples' basics: the extractor request and process protocol, IDs and paths. import path from 'node:path' -import {readRequest, result} from '@githubnext/projections/extractor' +import {readRequest, result} from '@githubnext/projections-sdk/extractor' export {readRequest} diff --git a/examples/renderers/minimal/.github/workflows/renderer.yml b/examples/renderers/minimal/.github/workflows/renderer.yml index c8c975e09..934b432b8 100644 --- a/examples/renderers/minimal/.github/workflows/renderer.yml +++ b/examples/renderers/minimal/.github/workflows/renderer.yml @@ -14,7 +14,7 @@ jobs: - run: npm ci - run: npm run build # The checks run the native `projections` CLI, which isn't on npm: install the release whose version matches - # @githubnext/projections (docs/setup/install.md) and put it on PATH, or set PROJECTIONS_CLI to its path. + # @githubnext/projections-sdk (docs/setup/install.md) and put it on PATH, or set PROJECTIONS_CLI to its path. - run: npx playwright install --with-deps chromium - run: npx playwright test - uses: actions/upload-artifact@v4 diff --git a/examples/renderers/minimal/README.md b/examples/renderers/minimal/README.md index ed7d78841..167ea73f9 100644 --- a/examples/renderers/minimal/README.md +++ b/examples/renderers/minimal/README.md @@ -25,8 +25,8 @@ A renderer is a static web bundle. The host loads its `index.html` into `