Commit Graph

6858 Commits

Author SHA1 Message Date
Jordan Ritter 0ff68241ae fix(vscode-extension): use ovsx verify-pat for Open VSX auth check 2026-04-21 19:10:24 -07:00
Jordan Ritter 7971aafe53 docs(showcase/template): correct Node and Temurin version references in README
Template actually pins node:22-slim for both builder and runner stages,
and eclipse-temurin:21-jre (not -jre-alpine) for spring-ai runner. README
called out node:24 + temurin:21-jre-alpine. Align docs with reality.
Node 24 bump is a separate decision not made in this body of work.
2026-04-21 19:05:50 -07:00
Jordan Ritter 98a6167de2 fix(showcase/packages): remove image-scope NODE_ENV=production from mastra/spring-ai, scope to next-start in langgraph-python entrypoint
Completes the NODE_ENV scope cleanup started in the prior Python
packages commit. Image-scope ENV NODE_ENV=production leaks into every
child process (agent subprocesses, healthchecks, shell scripts) —
several frameworks change behavior under NODE_ENV and should NOT see
'production' when running as an agent backend.

- mastra: Dockerfile drops image ENV; entrypoint.sh now invokes
  'env NODE_ENV=production npx next start' (was relying on image ENV).
- spring-ai: Dockerfile drops image ENV; entrypoint.sh now scopes
  NODE_ENV=production to the Next.js child only (Java agent never
  interpreted NODE_ENV but the scoping matches every other package).
- langgraph-python entrypoint: 'npx next start' now inherits
  NODE_ENV=production via 'env' wrapper (Dockerfile already removed
  image ENV in prior commit).
2026-04-21 19:05:45 -07:00
Jordan Ritter b9bcf2e6b6 fix(showcase/packages-python): drop to USER app across 11 Python packages, add missing /app/public COPY to langgraph-python
All 11 Python runners previously executed as root. Bring them into parity
with langroid (the one Python package that already had the pattern):

- Create uid/gid 1001 'app' user/group before any COPY
- Add --chown=app:app to runner-stage COPY directives
- USER app before EXPOSE/CMD
- langgraph-python: add the missing COPY --from=frontend /app/public line
  (every other Python package has it) plus an empty public/.gitkeep so
  the copy resolves

Packages touched: ag2, agno, claude-sdk-python, crewai-crews, google-adk,
langgraph-fastapi, langgraph-python, llamaindex, ms-agent-python,
pydantic-ai, strands.
2026-04-21 19:05:23 -07:00
Jordan Ritter 400fe8a1ae fix(showcase/starters): regenerate after generator fixes (watchdog cleanup + tsc rootDir + strip langgraph-ts server.mjs)
Mechanical regen; no hand edits. Changes:
- All 17 entrypoint.sh: add '|| true' to cleanup kill (trap + final)
- claude-sdk-typescript Dockerfile: tsc now passes --rootDir .
- langgraph-typescript/agent: remove server.mjs + prune its transitive
  deps from package-lock.json
2026-04-21 19:01:30 -07:00
Jordan Ritter c6437b3443 fix(showcase/scripts/generate-starters): emit || true on watchdog cleanup kill, preserve --rootDir ., strip dead langgraph-ts server.mjs, guard AGENT_DIR expansion
- entrypoint.template.sh: cleanup trap + final kill now tolerate no-match
  (|| true) so trap doesn't abort shell when one of the three PIDs has
  already exited. Package-level entrypoint.sh already had this shape.
- generate-starters.ts: claude-sdk-typescript tsc now uses --rootDir .
  so emitted artifact is /app/dist/agent/index.js (matches entrypoint
  expectation + runner-stage COPY). tsc was inferring agent/ as rootDir
  and stripping the prefix.
- generate-starters.ts: drop server.mjs from langgraph-typescript starter
  output. The starter uses 'npx @langchain/langgraph-cli dev' and never
  invokes server.mjs; the file imports @langchain/langgraph-api/server
  which is not in the starter's extraDependencies (resolution relied on
  transitive hoist via @langchain/langgraph-cli). The file stays in the
  PACKAGE where prod mode does use it.
- generate-starters.ts: assert agentDir non-empty / non-absolute before
  Dockerfile substitution so the 'rm -f {{AGENT_DIR}}/package*.json' line
  can never degrade into 'rm -f /package*.json' across /app.
2026-04-21 19:01:10 -07:00
Jordan Ritter 050cb9085b fix(vscode-extension): run azure/login in dry-run mode (#4144)
Verify Marketplace credential expects an active Azure session via
azure/login, but login was gated only on published==false. When
dry_run=true and version is already published, the verify step ran
without a session and failed. Widening the guard to include dry_run.
2026-04-21 18:50:38 -07:00
Jordan Ritter 5ab3a81468 chore(showcase/starter-langgraph-typescript): sync package-lock.json after prod-mode deps 2026-04-21 18:44:03 -07:00
Jordan Ritter 1638c6f845 ci(showcase): pin linux/amd64 for showcase Docker builds
Add platforms: linux/amd64 to the depot/build-push-action invocation in
showcase_deploy.yml. Railway and GHCR serve x86 hosts, so an arm64-only
image crashes on pull. Matches the platform requirement enforced for
local docker build invocations (documented in
showcase/starters/template/README.md).
2026-04-21 18:42:00 -07:00
Jordan Ritter b64980d0aa style(vscode-extension): preformat workflow yaml and RELEASING.md to match CI formatter 2026-04-21 18:41:48 -07:00
Jordan Ritter bff45416e7 docs(showcase): document multi-stage Dockerfile conventions
Add showcase/starters/template/README.md covering the multi-stage build
convention (builder + runtime split), the >=40% image-size reduction
target, the linux/amd64 platform requirement for local builds, and the
dockerfile_hygiene probe rules (>=2 FROM stages, no dev-dep installs in
the runtime stage).

Expand the header comment on showcase/scripts/generate-starters.ts to
document the >=40% size target, the getAgentBuildSteps/getAgentBuildCopy
handoff in more detail, and the linux/amd64 platform pin in the deploy
workflow.
2026-04-21 18:41:48 -07:00
Jordan Ritter 7febc5cf5d chore(showcase/package-claude-sdk-typescript): add cold-start instrumentation
Package-level service claims to listen on :8000 but Railway health probes
fail. Narrow the cold-start window by timestamping each phase from
entrypoint exec to first /health-serving moment:

- entrypoint.sh: print `[entrypoint] pre-node <ISO>` immediately before
  `node /app/agent_server.js`, pairing with the agent_server.ts prints
  below to chain timestamps across the exec boundary.
- agent_server.ts: print `[agent_server] module loaded <ISO>` before any
  side-effect imports (so import-time hangs surface distinctly from
  init-time hangs), `[agent_server] pre-Anthropic <ISO>` right before
  `new Anthropic(...)`, and include an ISO timestamp in the existing
  app.listen() callback so we can read the delta directly.

No behavior change — only logs added. Next deploy cycle should reveal
which phase consumes the budget and whether the failure mode is
listen-but-unreachable vs. listen-never-reached.
2026-04-21 18:39:48 -07:00
Jordan Ritter 8da71c4a0c merge: Task 3 Lane D — llamaindex/ms-agent-py/pydantic-ai/strands Dockerfiles 2026-04-21 18:38:44 -07:00
Jordan Ritter 46e0571b4c merge: Task 3 Lane C — google-adk/langgraph-fastapi/langgraph-python/langroid Dockerfiles 2026-04-21 18:38:43 -07:00
Jordan Ritter 23f4759ff3 merge: Task 3 Lane B — ag2/agno/claude-sdk-py/crewai-crews Dockerfiles 2026-04-21 18:38:43 -07:00
Jordan Ritter e7322b07c1 merge: Task 3 Lane A — TS+Java+.NET package Dockerfiles 2026-04-21 18:38:37 -07:00
Jordan Ritter 6f5578d647 fix(showcase/package-ms-agent-dotnet): multi-stage Dockerfile with unprivileged user and scoped NODE_ENV 2026-04-21 18:37:59 -07:00
Jordan Ritter 95db0b8cfc fix(showcase/package-spring-ai): multi-stage Dockerfile with unprivileged user and Temurin 21 2026-04-21 18:34:46 -07:00
Jordan Ritter 7784802884 fix(vscode-extension): run azure/login in dry-run mode
Verify Marketplace credential expects an active Azure session via azure/login, but login was gated only on published==false. When dry_run=true and version is already published, the verify step ran without a session and failed. Widening the guard to include dry_run.
2026-04-21 18:31:11 -07:00
Jordan Ritter 67882698ea fix(showcase/package-mastra): multi-stage Dockerfile with unprivileged user 2026-04-21 18:30:52 -07:00
Jordan Ritter 55cf628341 fix(showcase/package-strands): multi-stage Dockerfile with venv builder
Split the runner image into three stages:
- frontend (node:22-slim) builds Next.js artifacts
- agent-builder (python:3.12.13) builds /opt/venv from requirements.txt
- runner (python:3.12.13-slim) installs Node.js + copies artifacts, with no
  pip and no build-essential

Mirrors the pattern already used by showcase/starters/strands/Dockerfile.
2026-04-21 18:28:57 -07:00
Jordan Ritter accfb49036 fix(showcase/package-pydantic-ai): multi-stage Dockerfile with venv builder
Split the runner image into three stages:
- frontend (node:22-slim) builds Next.js artifacts
- agent-builder (python:3.12.13) builds /opt/venv from requirements.txt
- runner (python:3.12.13-slim) installs Node.js + copies artifacts, with no
  pip and no build-essential

Mirrors the pattern already used by showcase/starters/pydantic-ai/Dockerfile.
2026-04-21 18:28:53 -07:00
Jordan Ritter a2736034c0 fix(showcase/package-ms-agent-python): multi-stage Dockerfile with venv builder
Split the runner image into three stages:
- frontend (node:22-slim) builds Next.js artifacts
- agent-builder (python:3.12.13) builds /opt/venv from requirements.txt
- runner (python:3.12.13-slim) installs Node.js + copies artifacts, with no
  pip and no build-essential

Mirrors the pattern already used by showcase/starters/ms-agent-python/Dockerfile.
2026-04-21 18:28:50 -07:00
Jordan Ritter 3fa53a5d35 fix(showcase/package-llamaindex): multi-stage Dockerfile with venv builder
Split the runner image into three stages:
- frontend (node:22-slim) builds Next.js artifacts
- agent-builder (python:3.12.13) builds /opt/venv from requirements.txt
- runner (python:3.12.13-slim) installs Node.js + copies artifacts, with no
  pip and no build-essential

Mirrors the pattern already used by showcase/starters/llamaindex/Dockerfile.
2026-04-21 18:28:47 -07:00
Jordan Ritter 55c37e48bf chore(vscode-extension): release automation (Marketplace + Open VSX) (#4139)
## Summary

- Local `scripts/release/vscode-extension-release.sh` — bumps
`packages/vscode-extension/package.json`, commits, tags
`vscode-extension-v<ver>`, and pushes. Supports `patch` / `minor` /
`major` / explicit SemVer, plus `--dry-run`.
- `.github/workflows/publish-vscode-extension.yml` — tag-triggered
workflow that builds once, packages a single VSIX, and dual-publishes to
VS Code Marketplace + Open VSX. Partial-failure-aware.
- `packages/vscode-extension/RELEASING.md` — runbook covering
prerequisites, first-time Open VSX setup, cutting a release,
verification, and rollback.

## Why this shape

- **Independent of PR #3935.** The extension package itself lives on
#3935's branch and is not yet on `main`. This PR adds the release
*pipeline* only — the workflow references `packages/vscode-extension/`
which will be a valid path once #3935 merges.
- **Outside the existing npm release scope.** The monorepo's
`scripts/release/` pipeline (driven by `release.config.json` scopes
`monorepo` / `cli` / `angular`) is npm-only. VSIX publishing doesn't fit
that model, so this lives next to it as a sibling tag-triggered workflow
rather than being bolted onto `publish-release.ts`.
- **Immutable-artifact pattern.** `vsce package` runs once; the same
`.vsix` is uploaded as a workflow artifact *and* published to both
registries. No version arg is passed to `vsce publish` / `ovsx publish`
— `--packagePath` ensures we ship the exact bits we packaged.
- **Partial-failure visibility.** Both registry publishes use
`continue-on-error` with a final reconciliation step that fails the job
if either failed. You will never end up in \"Marketplace succeeded, Open
VSX silently skipped.\"

## One-time setup required before first CI publish

1. Create Open VSX account + personal access token at
<https://open-vsx.org/user-settings/tokens>.
2. Claim the publisher namespace (one-time): `npx --yes ovsx
create-namespace copilotkit -p <token>`
3. Add `OVSX_PAT` to GH repo → Settings → Environments → `production` →
Environment secrets.
4. Confirm `VSCE_PAT` is already in the same environment (used for the
manual v0.1.0 publish).

Until step 3 lands, tag pushes will fail loudly at the \"Publish to Open
VSX\" step with a clear error — no silent skip.

## Test plan

- [ ] Dry-run the local helper (already verified against the #3935
worktree): `scripts/release/vscode-extension-release.sh patch --dry-run`
previews `0.1.0 → 0.1.1`, `minor` previews `0.2.0`, explicit `1.2.3` is
honored.
- [ ] Once #3935 merges and an `OVSX_PAT` is set, maintainer runs
`scripts/release/vscode-extension-release.sh patch` on `main` and
watches
<https://github.com/CopilotKit/CopilotKit/actions/workflows/publish-vscode-extension.yml>.
- [ ] Workflow triggers on the `vscode-extension-v*` tag, builds,
packages, uploads artifact.
- [ ] VSIX published to both registries; listings update within minutes.
- [ ] `code --install-extension copilotkit.copilotkit-vscode-extension
--force` installs the new version.

## Caveats

- This PR will have a minor merge conflict with #3935 if #3935 adds its
own `RELEASING.md` (it does not today). Otherwise the paths are
disjoint: this PR only touches `scripts/release/`, `.github/workflows/`,
and creates a new file in `packages/vscode-extension/`.
- Azure DevOps long-lived Marketplace PATs retire on 2026-12-01 — OIDC
migration is out of scope for this PR and tracked separately in the
Notion playbook.
2026-04-21 18:27:14 -07:00
Jordan Ritter 64421cde1f fix(showcase/package-langgraph-typescript): multi-stage Dockerfile with unprivileged user and scoped NODE_ENV 2026-04-21 18:26:36 -07:00
Jordan Ritter e0db520506 fix(showcase/package-crewai-crews): multi-stage Dockerfile with venv builder
Split Python install into a dedicated agent-builder stage (python:3.12.13)
that produces /opt/venv, which the slim runner COPYs in. The runner no
longer runs pip install, so no compiler toolchain or build-essential bloats
the final image.

Preserves behavior: entrypoint.sh, port 10000, src/aimock_toggle.py,
shared_python/ -> /app/shared/python/ + PYTHONPATH. No image-level
NODE_ENV (entrypoint.sh scopes it to Next.js only).
2026-04-21 18:26:24 -07:00
Jordan Ritter e97096c397 fix(showcase/package-claude-sdk-python): multi-stage Dockerfile with venv builder
Split Python install into a dedicated agent-builder stage (python:3.12.13)
that produces /opt/venv, which the slim runner COPYs in. The runner no
longer runs pip install, so no compiler toolchain or build-essential bloats
the final image.

Preserves behavior: entrypoint.sh, port 10000, ENV NODE_ENV=production,
shared_python/ -> /app/shared/python/ + PYTHONPATH.
2026-04-21 18:24:15 -07:00
Jordan Ritter a94bb8bfc0 fix(showcase/package-claude-sdk-typescript): multi-stage Dockerfile with unprivileged user and scoped NODE_ENV 2026-04-21 18:22:35 -07:00
github-actions[bot] f97698bdda chore(vscode-extension): sync description from README 2026-04-22 01:22:20 +00:00
Jordan Ritter e4c567bf15 fix(showcase/package-agno): multi-stage Dockerfile with venv builder
Split Python install into a dedicated agent-builder stage (python:3.12.13)
that produces /opt/venv, which the slim runner COPYs in. The runner no
longer runs pip install, so no compiler toolchain or build-essential bloats
the final image.

Preserves behavior: entrypoint.sh, port 10000, ENV NODE_ENV=production,
shared_python/ -> /app/shared/python/ + PYTHONPATH.
2026-04-21 18:22:11 -07:00
Jordan Ritter 0f76dc11f2 ci(vscode-extension): sync package.json description from README 2026-04-21 18:21:42 -07:00
Jordan Ritter 35dedcb961 fix(showcase/package-langroid): multi-stage Dockerfile with venv builder 2026-04-21 18:20:20 -07:00
Jordan Ritter bc264aee95 fix(showcase/package-langgraph-python): multi-stage Dockerfile with venv builder 2026-04-21 18:20:17 -07:00
Jordan Ritter ebeb6d7069 fix(showcase/package-langgraph-fastapi): multi-stage Dockerfile with venv builder 2026-04-21 18:20:11 -07:00
Jordan Ritter f527a4ae38 fix(showcase/package-google-adk): multi-stage Dockerfile with venv builder 2026-04-21 18:20:09 -07:00
Jordan Ritter 28cdb4d19b fix(showcase/package-ag2): multi-stage Dockerfile with venv builder
Split Python install into a dedicated agent-builder stage (python:3.12.13)
that produces /opt/venv, which the slim runner COPYs in. The runner no
longer runs pip install, so no compiler toolchain or build-essential bloats
the final image.

Preserves behavior: entrypoint.sh, port 10000, ENV NODE_ENV=production,
shared_python/ -> /app/shared/python/ + PYTHONPATH.
2026-04-21 18:20:00 -07:00
Jordan Ritter 8145f0699a ci(vscode-extension): fix stale script reference in dry-run summary
The dry-run summary referenced scripts/release/vscode-extension-release.sh,
which was removed in 17c4daee3 (drop release helper script). Point
maintainers at the new CHANGELOG-edit flow instead.
2026-04-21 18:19:20 -07:00
Jordan Ritter bb983470f6 docs(vscode-extension): describe one-file-edit release flow
Rewrites the 'Cutting a release' section to match the new
changelog-sync automation: maintainers prepend a CHANGELOG entry,
commit with any message, open a PR, and the sync workflow auto-bumps
package.json with 'chore: release vX.Y.Z'. Adds a manual escape hatch
for when the sync workflow is unavailable.

Other sections (Prerequisites, Open VSX setup, CI publish flow,
Rollback, Notes) are unchanged.
2026-04-21 18:19:20 -07:00
Jordan Ritter b4ed648b21 ci(vscode-extension): auto-sync package.json version from CHANGELOG top entry
Adds .github/workflows/vscode-extension-changelog-sync.yml: on PRs that
touch packages/vscode-extension/CHANGELOG.md, read the top '## X.Y.Z'
entry and bump packages/vscode-extension/package.json to match via an
auto-committed 'chore: release vX.Y.Z' on the PR branch.

Collapses the release maintainer flow to a single CHANGELOG edit.
Forks are skipped (GITHUB_TOKEN can't push to fork branches). A
guardrail rejects CHANGELOG entries older than the current package.json
version (catches history edits vs. prepends).
2026-04-21 18:19:20 -07:00
Jordan Ritter bfb17691bb chore(vscode-extension): drop release helper script; match aimock manual flow 2026-04-21 18:19:19 -07:00
Jordan Ritter 1fe8a83343 ci(vscode-extension): add workflow_dispatch dry-run for auth validation
Lets us validate the Marketplace-OIDC and Open VSX auth chains end-to-end
without actually publishing. workflow_dispatch now accepts a dry_run input
(default true); when set, the job runs checkout, Azure login,
vsce verify-pat, and a new Open VSX /api/user token introspection, then
stops before any publish, tag, release, or Slack success notify.

Push trigger is unchanged — dry_run is only meaningful for manual runs.
2026-04-21 18:19:19 -07:00
github-actions[bot] 9031b95757 style: auto-fix formatting 2026-04-21 18:19:19 -07:00
Jordan Ritter 7e23c5bf93 ci(vscode-extension): align Slack notification with canonical pattern
- Use slackapi/slack-github-action@v2.1.0 matching 8+ existing workflows
- Switch from SLACK_WEBHOOK to SLACK_WEBHOOK_OSS_ALERTS (the secret
  actually wired up in the repo, routed to #oss-alerts)
- Guard with env.SLACK_WEBHOOK_OSS_ALERTS != '' for repo-fork safety
- Add failure-path notification with failed job + per-registry outcomes
  + run URL (follows memory rule: red alerts carry actionable detail)
- Expose publisher as a step output to construct Open VSX URL cleanly
  (https://open-vsx.org/extension/<publisher>/<name>) instead of inline
  tr substitution
2026-04-21 18:19:19 -07:00
Jordan Ritter b018869676 ci(vscode-extension): swap Marketplace auth to OIDC (Entra federated SP)
- Use azure/login@v2 + vsce --azure-credential instead of VSCE_PAT
- Add id-token: write permission on publish job
- Add verify-pat --azure-credential pre-flight to catch auth issues before publish
- Retain OVSX_PAT for Open VSX (OIDC not yet supported there)
- Update RELEASING.md: new auth flow + rollback guidance
2026-04-21 18:19:19 -07:00
github-actions[bot] 51c967b9f5 style: auto-fix formatting 2026-04-21 18:19:19 -07:00
Jordan Ritter 4d354415b2 docs(vscode-extension): document main-push release flow
Rewrite the 'Cutting a release' + 'CI publish flow' sections to describe
the aimock-pattern flow (hand-bump + PR-merge + self-gated CI publish)
and the new multi-bullet --summary/--type CLI. Retain the Open VSX
one-time-setup block, the transient-failure handling notes, verification
steps, rollback guidance, and ADO PAT retirement note.
2026-04-21 18:19:19 -07:00
Jordan Ritter 8bfef15d8c chore(vscode-extension): aimock-style release helper + CHANGELOG seed
Rewrite vscode-extension-release.sh to cut an aimock-style release commit
(bump package.json + prepend CHANGELOG.md section) without tagging or
pushing — CI now owns tag/release creation on main-push. Takes one or
more --summary bullets grouped by --type (Added/Changed/Fixed/Removed/
Deprecated/Security, Keep-a-Changelog style). Supports --dry-run.

Seed packages/vscode-extension/CHANGELOG.md with a retroactive v0.1.0
entry covering the three launch surfaces (A2UI Preview, Hook Explorer,
AG-UI Inspector) so the first real release has prior history to anchor
against and the GH Release step has notes to pull from.
2026-04-21 18:19:18 -07:00
Jordan Ritter 7c31fd077f ci(vscode-extension): switch to main-push self-gated publish (aimock pattern)
Replace tag-triggered publish with push-to-main + version-on-Marketplace
self-gate, matching CopilotKit/aimock. CI reads version from package.json,
queries vsce show for that version, and no-ops if already published. On a
new version it builds once, dual-publishes (Marketplace + Open VSX with
the existing retry wrappers and idempotent 'already exists' handling),
tags vscode-extension-vX.Y.Z, cuts a GitHub Release from the CHANGELOG
section, and posts to SLACK_WEBHOOK if configured. Path-scoped to
packages/vscode-extension/** so unrelated pushes don't trigger the job.
2026-04-21 18:19:18 -07:00
Jordan Ritter 2670b041db chore(vscode-extension): retry publish on transient registry failures
Wrap both registry publish steps in a bash retry helper that retries up
to 5 times with staggered backoff (10s/20s/40s/60s/90s) on transient
conditions (5xx, timeouts, connection resets, DNS). Auth and validation
errors still fail fast with no retry.

Critically, 'version already exists' is treated as idempotent success:
if attempt N-1 landed on the registry but its response was lost to a
502 after commit, attempt N sees the already-published version and
short-circuits rather than failing the job.

Motivated by Open VSX /publish returning intermittent 502 Bad Gateway
errors from Eclipse Foundation infra. Each attempt is wrapped in
::group:: markers so per-attempt logs are collapsible in the Actions
UI. Reconciliation step updated to reflect retry semantics and to
tell the operator to rerun the job (not bump the version) on exhausted
retries. RELEASING.md gets a 'Transient registry failures' section
documenting the behavior for both CI and manual publish paths.
2026-04-21 18:19:18 -07:00