Skip to content

Publish the Actions SDK under the Railgrid npm scope - #1073

Merged
cwilhit merged 2 commits into
mainfrom
codex/railgrid-actions-npm-scope
Nov 11, 2026
Merged

cwilhit merged 2 commits into
mainfrom
codex/railgrid-actions-npm-scope

Conversation

@cwilhit

@cwilhit cwilhit commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Publish the Actions SDK under the Railgrid npm scope and pin generated server apps to @railgrid/[email protected]. The package name and import path now match.
  • Update the release workflow, package smoke test, App Studio prompt, and skill examples to use the direct package.
  • Guide the Auth skill through the API component’s normal dependency install and verify /api/me through the preview before sign-in, after sign-in, and after logout.

Verification

  • Actions SDK unit tests, clean tarball install, and npm pack --dry-run
  • App Studio prompt tests for projects with and without an active action grant, and the bundled Auth skill test
  • make verify-workflows and git diff --check
  • make fix-lint, make lint, and targeted App Studio lint

Rollout

Publish @railgrid/[email protected] from provider-sdk/actions-node with an npm account authorized for the railgrid scope. Verify a clean install from the public npm registry before deploying the updated App Studio provider or distributing the updated skill to railgrid-dev. See the SDK release instructions. Existing apps can update their dependency and lockfile through their normal dependency update flow.

@cwilhit
cwilhit requested a review from mjudeikis as a code owner November 11, 2026 12:43
@cwilhit

cwilhit commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@mjudeikis-bot review

@mjudeikis mjudeikis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three findings, none Critical. The one that matters is ordering: the registry has no @railgrid/[email protected] today.

Not anchored

None.

Checked

Read beyond the diff

  • providers/app-studio/api/llm.go projectSystemPromptForMode around the grant branch (initialBuild and existing-project paths) and projectHasProviderActionGrant.
  • llm_test.go positive and negative prompt tests.
  • providers/app-studio/skills/bundled_test.go (what the auth skill test asserts).
  • providers/app-studio/api/assistant_mode_prompt.go:42 (restart_runtime rule).
  • providers/infrastructure/install/templates/application.yaml (the api component's reload.rules for package.json).
  • The release workflow in full, provider-sdk/actions-node/{package.json,install-test.mjs,README.md}, .github/workflows/ci.yaml job.
  • A repo-wide grep for crwilhit and actions-node. The only remaining crwilhit hit is an unrelated evidence string in docs/design/components/model-connections.md. No stale 0.2.1 pins remain.
  • Registry state via npm view: @railgrid/actions-node returns E404, @crwilhit/railgrid-actions-node is at 0.2.1, @railgrid/auth-node is at 0.1.1.

Hunt categories

  • Correctness: the pin is consistent across package.json, docs, README, skill reference and prompt. The existing-project branch now covers the old alias. The negative test now keys on "@railgrid/actions-node":; the old needle never matched anything. Finding 1 is the exception.
  • Concurrency: n/a, no code paths with shared state changed.
  • Tenancy and kcp: n/a, no client, lister, APIExport or claim changes.
  • Provider contract: n/a, no verbs, manifest, chart or route changes. The prompt still routes through the project-scoped gateway.
  • API, codegen, storage: n/a, no apis/ changes, so codegen is not affected. Existing apps keep resolving the old alias package, which is still published.
  • Security: the release workflow keeps OIDC trusted publishing and --provenance, with no long-lived token. No credential or header handling changed. The SDK is still described as server-only.
  • Portal: n/a.
  • Tests: the prompt tests cover the new pin and the alias-aware wording. The install smoke test covers the packed name. Nothing asserts the new auth-skill text (finding 3).

Commands run

  • cd providers/app-studio && go build ./... passed; go vet ./api/ ./skills/ passed.
  • go test -count=1 ./skills/ passed.
  • go test -count=1 -run TestProjectPrompt ./api/ passed.
  • cd provider-sdk/actions-node && npm test passed (21/21); npm run test:install passed; npm pack --dry-run shows @railgrid/[email protected].
  • make verify-workflows exited 0; make verify-boilerplate passed; git diff --check is clean.
  • Not run: make lint (only strings and Markdown changed in Go, and go vet passed), make verify-provider-contract and make verify-codegen (no manifest, chart, route or apis/ change), and e2e (no server-path code changed; the e2e suites cannot exercise a package that is not yet on npm).

}
if projectHasProviderActionGrant(p) {
b.WriteString("When an active integration action grant is listed above, server code may import the server-only SDK as `import { createActionsClient } from '@railgrid/actions-node';` using the exact dependency alias `\"@railgrid/actions-node\": \"npm:@crwilhit/railgrid-actions-node@0.2.1\"`. Never use a monorepo-relative path, provider-specific SDK, or browser import.\n")
b.WriteString("When an active integration action grant is listed above, server code may import the server-only SDK as `import { createActionsClient } from '@railgrid/actions-node';` using the exact dependency `\"@railgrid/actions-node\": \"0.2.2\"`. Never use a monorepo-relative path, provider-specific SDK, or browser import.\n")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Prompt pins a version that is not on npm yet
npm view @railgrid/actions-node returns E404 right now, and the @crwilhit/[email protected] package is the only published copy. The first publish is manual and the Rollout section says to publish before deploying, but nothing enforces that order. If this merges and App Studio is deployed first, every new project with an active action grant is told to write "@railgrid/actions-node": "0.2.2". The component's npm install reload then fails with ETARGET. The same prompt tells the model not to run npm itself and to stop on a failed dependency reload, so these projects are stuck.
Land the pin only after the first publish is confirmed. Either keep the old alias pin in this PR and flip it in a follow-up, or gate the merge on npm view @railgrid/[email protected] version succeeding. The same applies to docs/provider-actions.md, providers/app-studio/README.md and skills/railgrid/references/app-studio.md, which now document the new pin as current.

// follow-up PR, after `npm view @railgrid/[email protected] version` succeeds
using the exact dependency `\"@railgrid/actions-node\": \"0.2.2\"`

For the `application` template, edit `api/package.json` and let App Studio sync
the change. The API component's dependency reload runs the install when the
manifest changes, and the production build uses the same manifest. A separate
registry lookup or install command is unnecessary for the normal setup.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Install guidance contradicts the general runtime prompt and refers to an undefined command
assistant_mode_prompt.go:42 tells the assistant to call restart_runtime after any dependency-manifest change because file sync does not reload process configuration. This text says to rely on the api component's reload rule alone. That rule exists in application.yaml (api.reload.rules for package.json), but only for the application template, and the two instructions will pull the model in different directions. "If a command shows Unverified with no output" does not say which command, so the model cannot act on it.
Name the tool (verify_development_runtime) and state whether restart_runtime is still required after the manifest sync.

becomes `displayName`. Do not return or persist the assertion, use email as a
key, or create a second auth cookie inside the app.

Use `get_project_authentication` to confirm `enabled` for the project and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: New auth-skill guidance has no test that would fail without it
The PR lists "the bundled Auth skill test" as verification. skills/bundled_test.go:54 only asserts @railgrid/auth-node, X-Railgrid-App-Identity and RAILGRID_AUTH_AUDIENCE for express.md, and get_project_authentication etc. for SKILL.md. It passes identically with or without the /api/me 401, sign-in, 401 sequence added here, so the new guidance can be deleted or reworded without a failure.

"express.md": {"@railgrid/auth-node", "X-Railgrid-App-Identity", "RAILGRID_AUTH_AUDIENCE", "get_project_authentication", "/api/me"},

@cwilhit
cwilhit merged commit 507da61 into main Nov 11, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants