Commit Graph

101 Commits

Author SHA1 Message Date
Maxim f0f8a7a16d ci(release): add release-scope dropdown drift guard
Compares the workflow_dispatch scope choice dropdowns in
publish-release.yml, stable-release.yml, and canary.yml against the
authoritative .scopes keys in release.config.json, failing CI on drift.
Also validates that every explicitly-named arm in publish-release.yml's
notify-job npm-url case statement is a valid scope (catch-all makes
full coverage unnecessary). Parsers fail loud and distinct on shape
changes (anchored case detection, loose-vs-strict cross-check,
zero-options and zero-block guards) rather than silently passing.

Ported from ag-ui-protocol/ag-ui (PR #1914 wiring); config lives at
the repo root in CopilotKit.
2026-06-11 01:28:35 +02:00
Maxim adaeda2dc6 fix(release): enforce GHA-safe output keys and tighten publish guards
Round-2 review fixes for the GITHUB_OUTPUT helper and the release scripts
that emit through it.

emitGithubOutputs (scripts/release/lib/github-output.ts):
- Replace the key newline/CR check with a full GitHub-Actions-safe charset
  check: /^[A-Za-z_][A-Za-z0-9_-]*$/. A key containing "=" or whitespace
  would silently corrupt the key=value line; rejecting up-front is
  strictly safer. Value validation (single-line) is unchanged — "=" in
  values is legal because GitHub splits on the first "=".
- Update the docblock accordingly.

prerelease.ts:
- Remove the dead `?? getCurrentVersion(scope)` fallback. The empty-list
  guard above makes packages[0] guaranteed, and the fallback would have
  masked a package.json missing its version field by emitting a version
  divergent from what the loop publishes. Fail loudly with an explicit
  exit instead.
- Drop the now-unused getCurrentVersion import.
- Add a comment above the dry-run emitGithubOutputs call explaining that
  emitting in dry-run is safe — the publish workflow gates publish + the
  verify guard on inputs.dry-run != true, so the dry-run emission only
  serves local/e2e contract verification.

publish-release.ts:
- Hoist getPackagesForScope + empty-list guard above the prerelease-suffix
  and registry checks. A misconfigured scope now fails with the clear
  "no packages found" error instead of a misleading "not greater than
  published" one. Loop is unchanged.

github-output.test.ts:
- Loosen the key-newline assertion from the JSON.stringify-coupled
  /bad\\nkey/ to the stable /alphanumeric/ phrase from the new message.
- Add tests: "=" in key throws, space in key throws, empty key throws,
  and "=" in value is accepted and written verbatim (note=a=b).
- Move vi.restoreAllMocks() to the top of afterEach so spies cannot leak
  into env restore + rmSync cleanup.

Call sites audited:
- emitGithubOutputs: only ever called with {version, scope} (prerelease,
  publish-release) — all valid under the new charset.
- publishVersion derivation: only used inside prerelease.ts main().
- getCurrentVersion: still imported by publish-release.ts, bump-prerelease.ts,
  prepare-release.ts; only the prerelease.ts import was removed.
- getPackagesForScope hoist in publish-release.ts: `packages` was only
  read inside the publish loop below; nothing earlier depended on it.
2026-06-10 22:58:03 +02:00
Maxim e8fa74ce45 fix(release): validate GITHUB_OUTPUT values and fail loudly on empty package lists
Hardens the new GITHUB_OUTPUT emission path so a malformed value can't smuggle
extra `key=value` lines into the workflow's step outputs, and so the workflow's
"Verify publish step emitted version" guard can't be fooled by a publish that
did nothing.

emitGithubOutputs now validates every key/value for `\n`/`\r` BEFORE the
GITHUB_OUTPUT early-return — a malformed value is a caller bug and should fail
loudly even when running locally. A multi-line value would need the heredoc
form, which this helper deliberately does not support.

prerelease.ts and publish-release.ts now fail loud when getPackagesForScope
returns an empty list. Without this, the new GITHUB_OUTPUT emission would make
the workflow's "Verify publish step emitted version" guard pass on a run that
published nothing — previously the missing output made such a run fail. The
guard runs BEFORE the dry-run branch in prerelease.ts. In publish-release.ts,
the inline iteration of getPackagesForScope(scope) is hoisted to a `packages`
const so the same guard fires before the publish loop.

The "no-op when GITHUB_OUTPUT is unset" test now spies on fs.appendFileSync
and asserts it wasn't called (the previous read of the unrelated temp file
was vacuously true). New tests cover newline/CR in value and newline in key.

The prerelease.ts usage string previously advertised `[--suffix <label>]`,
but the script never parses --suffix (suffix handling lives in
bump-prerelease.ts per the header comment). Removed.

Call sites enumerated:
- emitGithubOutputs: prerelease.ts (dry-run + post-publish), publish-release.ts
- getPackagesForScope: prerelease.ts, publish-release.ts (this commit);
  bump-prerelease.ts, prepare-release.ts, versions.ts (not changed — out of
  scope for this hardening)

Verification:
- npx vitest run --config scripts/release/vitest.config.mts → 91 passed
- Red-green for the newline validation: temporarily removed the validation,
  the 3 new newline/CR tests failed (assertion: expected fn to throw); restored,
  back to green.
- E2E: GITHUB_OUTPUT="$OUT" pnpm release:prerelease:dry succeeded and the
  output file contained `version=1.59.5` and `scope=monorepo`.

Note: Fix 2's empty-list guard fires only on a misconfigured scope (no unit
test reachable — prerelease.ts is outside the vitest include glob and the
guard is boundary validation against a misconfigured scope, not a behavior
worth contriving a test harness for).
2026-06-10 22:58:02 +02:00
Maxim afef53de65 fix(release): emit version/scope to GITHUB_OUTPUT from prerelease.ts
prerelease.ts published canaries successfully but never wrote the
version output the publish-release workflow's "Verify publish step
emitted version" guard reads, so every canary dispatch ended red after
a successful publish. Extract the GITHUB_OUTPUT append (previously
inline in publish-release.ts) into a shared lib/github-output.ts helper
and call it from both publish scripts.

Call-site enumeration:
- emitGithubOutputs: declared lib/github-output.ts; called from
  prerelease.ts (dry-run path + after publish) and publish-release.ts
  (replaces the inline appendFileSync block, same version=/scope= keys).
- No symbols removed; fs import in publish-release.ts still used (3
  remaining call sites).
2026-06-10 22:58:02 +02:00
Tyler Slaton fe685eb46f feat(release): npm release scopes for bot(+bot-ui) and bot-slack
- release.config.json: 'bot' scope versions @copilotkit/bot and
  @copilotkit/bot-ui together (sharedVersion: true, source: bot);
  'bot-slack' is its own scope, mirroring the angular precedent
- ReleaseScope type + VALID_SCOPES arrays + usage strings extended across
  release scripts
- stable-release.yml / publish-release.yml: scope choice options
- bot, bot-ui, bot-slack manifests: drop private, add publishConfig (public),
  repository/homepage/keywords, publint/attw targets; first release v0.0.1
- internal bot-package deps use workspace:~ (tilde): caret on a 0.0.x version
  pins the exact patch, tilde tracks the 0.0.x line; core/shared stay
  workspace:^ (caret is correct at 1.x)

Verified: release-script tests 85/85; prepare-release --scope bot --dry-run
bumps bot AND bot-ui in lockstep; actionlint clean on touched lines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 12:57:13 -07:00
Benjamin Taylor 26ea1187e7 Merge ben1/intelligence-threads-examples-rollout into codex/ent-734-crewai-crews
Graft resolution (her branch predates the crewai-crews rebuild on main):
- page.tsx: jpr5's rebuilt full demo (setThemeColor/updateProverb/
  get_weather tools, seed effect, delete buttons, WeatherCard) is the
  base; her threads shell (drawer + gate + provider) grafted around it;
  agent key AGENT_ID=default (was starterAgent on her branch)
- layout/route/package.json: rollout side (default key, AGENT_URL
  normalization, 1.59.3) + her drawer deps + intelligence route block
- contract test: crewai-crews added to the parameterized array (66/66)
- lockfile regenerated; .gitignore !.env.example negation added

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 10:26:23 -05:00
Benjamin Taylor 5071060eac Merge ben1/intelligence-threads-examples-rollout into codex/ent-734-strands-python
Conflict resolutions:
- contract test: keep the rollout's parameterized version and add
  strands-python to migratedIntegrations/appRoots (60/60 passing) in
  place of her bespoke MIGRATED_INSTANCES file
- parity manifest: rollout's version with strands' three threads-shield
  allowances removed (mirrors the langgraph-fastapi migration); parity
  verify green — strands now 88 tracked files, zero drift
- package-lock: regenerated at 1.59.3 (a2ui-renderer stays 1.56.5,
  the family-wide pin shared with the north-star)

Also rides: her react-core A2UIMessageRenderer test flake fix
(act -> waitFor), kept intentionally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 10:22:53 -05:00
Benjamin Taylor 7b4e5d1169 Merge ben1/intelligence-threads-examples-rollout into codex/ent-734-agentcore
Conflict resolution: take the rollout's contract test and append the
agentcore describe block (CDK lambda runtime gate, Vite frontend with
import.meta.env gate, docker env wiring). Bump both agentcore
package.jsons 1.59.1 -> 1.59.3 + regen lockfiles. 54/54.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:57:10 -05:00
Benjamin Taylor da45029d70 Merge ben1/intelligence-threads-examples-rollout into codex/ent-734-a2a-a2ui
Conflict resolution: take the rollout's parameterized contract test and
append the a2a-a2ui bespoke tests (namespaced helper, 1.59.3 pins).
Bump a2a-a2ui @copilotkit/* 1.59.1 -> 1.59.3 + regen lockfile. 49/49.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:53:16 -05:00
Benjamin Taylor 3de8146d5d chore(integrations): unify all threads examples on CopilotKit 1.59.3
- bump a2a-middleware, mcp-apps, agent-spec from 1.59.1 (their verified
  pre-revert state) to 1.59.3 to match the starters
- regenerate package-lock.json for the 11 examples whose package.json
  changed (drawer deps re-added on starters, version bumps on the three)
- update the migration contract test's version assertions to 1.59.3
  (43/43 passing); oxfmt pass

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:33:20 -05:00
Benjamin Taylor 041a561381 Revert "Revert "feat(integrations): add Intelligence threads to agent-spec" (#5216)"
This reverts commit ec856ab314, reversing
changes made to 9e7e7e653d.
2026-06-04 09:25:37 -05:00
Benjamin Taylor 4243bd0fa7 Revert "Revert "feat(integrations): add Intelligence threads to langgraph-fastapi" (#5215)"
This reverts commit 9e7e7e653d, reversing
changes made to 11e18e378a.

# Conflicts:
#	examples/integrations/langgraph-fastapi/package-lock.json
2026-06-04 09:25:37 -05:00
Benjamin Taylor 7762c43863 Reapply the ENT-679 Intelligence threads rollout (revert of #5217)
Restores #5151 (north-star + batch 1 + crewai-flows + llamaindex),
#5196 (pydantic-ai), #5205 (a2a-middleware), #5211 (mcp-apps), reconciled
onto the current main baseline rather than the pre-revert tree:

- keep main's 1.59.3 pins, AGENT_URL normalization, default agent keys,
  useConfigureSuggestions, available:false, useRenderTool
  status/parameters API, call-time agent.state reads, and crewai-crews'
  rebuilt page (not yet threads-migrated)
- graft the threads layer (drawer/gate/provider, env-gated route
  intelligence block, next.config gate, env docs, drawer deps) on top
- drop threads-era sidebar suggestions props where main now registers
  suggestions via useConfigureSuggestions (or omits them)
- fix the stale pydantic-ai doc link main reintroduced in ms-af-dotnet

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:25:16 -05:00
Jordan Ritter b11e87c33f fix(release): route release notifications to #engr instead of #oss-alerts
Release alerts belong in #engr per corrected routing. SLACK_WEBHOOK_ENGR
is the org-wide secret (visibility=all), so no provisioning is needed.
2026-06-03 20:58:57 -07:00
Jordan Ritter 76bbac5073 feat(release): add tested #oss-alerts release-notification builder
Add a pure builder that renders one concise #oss-alerts Slack message
per release from a unit-tested truth table: suppresses canary/dry-run
runs, gates npm/PyPI failure arms on event-derived release intent, and
pages on uncertain state. The CLI wrapper serializes env input to the
builder and writes the result to GITHUB_OUTPUT, failing loud on any
malformed or missing input.
2026-06-03 20:30:57 -07:00
Benjamin Taylor 3721e7b36b Revert "feat(integrations): Intelligence threads — north-star foundation + batch 1 (7 examples on 1.59.1) [ENT-679] (#5151)"
This reverts commit f3ec5ddcec, reversing
changes made to be20a389cf.

# Conflicts:
#	examples/integrations/adk/src/app/layout.tsx
#	examples/integrations/adk/src/app/page.tsx
#	examples/integrations/agno/src/app/layout.tsx
#	examples/integrations/agno/src/app/page.tsx
#	examples/integrations/crewai-crews/src/app/layout.tsx
#	examples/integrations/llamaindex/src/app/api/copilotkit/[[...slug]]/route.ts
#	examples/integrations/llamaindex/src/app/layout.tsx
#	examples/integrations/llamaindex/src/app/page.tsx
#	examples/integrations/mastra/src/app/layout.tsx
#	examples/integrations/mastra/src/app/page.tsx
#	examples/integrations/ms-agent-framework-dotnet/src/app/layout.tsx
#	examples/integrations/ms-agent-framework-dotnet/src/app/page.tsx
#	examples/integrations/ms-agent-framework-python/src/app/layout.tsx
#	examples/integrations/ms-agent-framework-python/src/app/page.tsx
#	examples/integrations/pydantic-ai/src/app/layout.tsx
2026-06-03 20:47:46 -05:00
Benjamin Taylor 1ef370440b Revert "feat(integrations): add Intelligence threads to pydantic-ai (#5196)"
This reverts commit f4fa8e5c02, reversing
changes made to f3ec5ddcec.

# Conflicts:
#	examples/integrations/pydantic-ai/src/app/page.tsx
2026-06-03 20:46:08 -05:00
Benjamin Taylor 5dfafcbfcf Revert "feat(examples): add Intelligence threads to a2a-middleware (#5205)"
This reverts commit a5fbb5c2b5, reversing
changes made to a9d807d8e7.
2026-06-03 20:44:00 -05:00
Benjamin Taylor 797511f9e3 Revert "feat(integrations): add Intelligence threads to mcp-apps (#5211)"
This reverts commit bc8cec6092, reversing
changes made to 2103d0c875.
2026-06-03 20:43:51 -05:00
Mike Ryan 806c35e4af Revert "feat(integrations): add Intelligence threads to agent-spec" 2026-06-03 18:33:49 -07:00
Mike Ryan 1e1aadbad8 Revert "feat(integrations): add Intelligence threads to langgraph-fastapi" 2026-06-03 18:28:56 -07:00
Benjamin Taylor f26e4b1d81 Merge origin/main into codex/ent-734-agent-spec
Conflict resolution (contract test): keep main's 6-entry array + appRoots
map, add agent-spec (src/app), and merge her REST-transport relaxation
(layout+page concat — agent-spec's provider is page-level) with main's
appRoots-based paths. 43/43 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:21:57 -05:00
Benjamin Taylor a42eb45997 Merge origin/main into codex/ent-734-mcp-apps
Post-merge fix: add the missing examples/integrations/mcp-apps/.env.example
(+ .gitignore negation, crewai-flows precedent) — the contract test
'mcp-apps documents the local Intelligence environment' was failing
because the file was never added. 37/37 passing on the merged tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 18:03:32 -05:00
Benjamin Taylor a8ca87a597 Merge origin/main into codex/ent-734-a2a-middleware
Conflict resolution: take main's 4-entry migratedIntegrations array and
keep the a2a-middleware-specific contract tests + helper (a2a-middleware
uses app/ root + custom chat, so it doesn't fit the parameterized
src/app contract). 31/31 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 17:51:49 -05:00
Martha Schumann 1c4d2d4951 fix(integrations): restore mcp-apps thread replay 2026-06-03 15:43:48 -07:00
Martha Schumann 811458931f feat(integrations): add Intelligence threads to mcp-apps 2026-06-03 15:39:47 -07:00
Martha Schumann 4a2fdb611b feat(integrations): add Intelligence threads to agent-spec 2026-06-03 15:33:25 -07:00
Benjamin Taylor d38bac48d4 Merge origin/main into codex/ent-734-langgraph-fastapi
Conflict + post-merge resolutions:
- integration test (add/add): fold into the parameterized batch-2 contract
  test; migratedIntegrations now includes langgraph-fastapi (24/24 pass).
- _parity/manifest.json: keep her langgraph-fastapi allowance removals
  (threads-drawer/page.tsx/next.config now fully tracked), but drop the
  stale strands-python shielding her branch added (example-layout +
  docker-route-override divergence, @copilotkit 1.56.5 packageJsonOverrides)
  — strands is already parity-synced at 1.59.1 on main; those overrides
  would have made the next parity:sync rewrite it back to 1.56.5.
- parity verify on the merged tree: langgraph-js 82 ok / langgraph-fastapi
  91 ok / strands-python 83 ok, zero drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 17:30:16 -05:00
Martha Schumann 691afa5890 feat(examples): add Intelligence threads to agentcore 2026-06-03 15:24:40 -07:00
Benjamin Taylor 62c5489614 Merge origin/main into codex/ent-734-pydantic-ai
Conflict resolutions:
- page.tsx: keep the threads layout; swap the dead v1 sidebar labels
  (title/initial) for the v2 keys (modalHeaderTitle 'Popup Assistant' +
  welcomeMessageText) the starter smoke asserts, and carry over main's
  disableSystemMessage + clickOutsideToClose. Keep her useRenderTool
  render({ parameters }) — that is the actual v2 RenderToolProps shape;
  main's render({ args }) was a latent runtime bug (args is not a prop).
- package.json: keep the drawer UI deps (class-variance-authority, clsx).
- integration test: fold into the parameterized batch-2 contract test;
  migratedIntegrations now crewai-flows + llamaindex + pydantic-ai (18/18).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 17:18:04 -05:00
Martha Schumann fc6f8e4503 feat(examples): add intelligence threads to a2a-middleware 2026-06-03 15:04:42 -07:00
Benjamin Taylor 8b04e695bd Merge ben1/ent-679-intelligence-ready-north-star into codex/ent-734-llamaindex
Conflict resolutions:
- page.tsx: keep the threads layout (drawer + gate + provider) and restore
  the v2 sidebar labels (modalHeaderTitle 'Popup Assistant' +
  welcomeMessageText) the starter smoke asserts, plus clickOutsideToClose.
- layout.tsx: keep the REST-transport explainer comment.
- integration test: keep the parameterized batch-2 contract test from
  crewai-flows and add llamaindex to migratedIntegrations (12/12 pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 17:03:04 -05:00
Martha Schumann f481672be0 feat(integrations): add strands-python intelligence threads 2026-06-03 14:29:50 -07:00
Martha Schumann 516cea5f04 feat(examples): add intelligence threads to a2a-a2ui 2026-06-03 14:28:57 -07:00
Martha Schumann 03159f2e87 feat(integrations): add Intelligence threads to llamaindex 2026-06-03 13:51:33 -07:00
Martha Schumann a42a44a882 feat(integrations): add Intelligence threads to crewai-crews 2026-06-03 13:51:15 -07:00
Martha Schumann 9f495e6c69 feat(integrations): add Intelligence threads to langgraph-fastapi 2026-06-03 13:37:20 -07:00
Martha Schumann d5aaf6e9db feat(integrations): add Intelligence threads to pydantic-ai 2026-06-03 13:21:02 -07:00
Martha Schumann a736b29306 feat(integrations): add Intelligence threads to crewai-flows 2026-06-03 11:26:24 -07:00
Jordan Ritter f3365d8603 ci(sdk-python): zero-pad version compare, drop yanked releases, fail loud on bad PyPI JSON
Right-pad version tuples so 0.2 and 0.2.0 compare equal (PEP 440), avoiding a
duplicate-version publish that PyPI rejects. Exclude fully-yanked releases when
computing the published max so a yanked high version can't block real bumps.
Fail loud when a 200 response lacks a releases key instead of assuming the
package is new. Surface curl transport errors and add red-green coverage.
2026-05-28 16:38:54 -07:00
Jordan Ritter 8b758ac806 ci(sdk-python): harden py-version detection — max-over-releases + numeric-local-only
Compare against the max numeric version in PyPI `releases` rather than
`info.version` (latest-uploaded, not highest). Apply strict dotted-numeric
validation to the LOCAL version only; non-numeric published versions
(prereleases) are filtered out instead of aborting the script. Add curl
--max-time/--retry hardening and red-green test coverage for both cases.
2026-05-28 16:38:54 -07:00
Jordan Ritter 227365a708 ci(sdk-python): add testable PyPI version-change detection script 2026-05-28 16:38:54 -07:00
Austin Merrick ff4e58f704 fix(skills): update sync tests to reflect new RESERVED_LIFECYCLE_SLUGS 2026-05-22 11:32:31 -07:00
Austin Merrick 2838e002a5 fix(skills): remove deleted lifecycle slugs from RESERVED_LIFECYCLE_SLUGS 2026-05-22 10:50:26 -07:00
Austin Merrick 0560247fec feat(skills): replace lifecycle skills with copilotkit-* from CopilotKit/skills
- Remove 6 old auto-generated lifecycle skills (0-to-working-chat,
  debug-and-troubleshoot, go-to-production, scale-to-multi-agent,
  spa-without-runtime, v1-to-v2-migration)
- Add 8 canonical skills verbatim from github.com/CopilotKit/skills:
  copilotkit-setup, copilotkit-develop, copilotkit-agui,
  copilotkit-integrations, copilotkit-debug, copilotkit-upgrade,
  copilotkit-contribute, copilotkit-self-update
- Update copilotkit-self-update install command to reference CopilotKit/CopilotKit
- Add .claude-plugin/{plugin,marketplace}.json and .mcp.json (repo URL and
  version updated to match monorepo: CopilotKit/CopilotKit, v1.57.3)
- Exempt copilotkit-* slugs from sync orphan detection in sync-plugin-skills.ts;
  runtime/react-core/a2ui-renderer remain synced from packages/*/skills as before
2026-05-22 10:04:41 -07:00
Jordan Ritter 3df3179663 fix(ci): skip already-published packages + remove one-shot workflow
publish-release.ts now checks npm for each package before publishing
and skips versions that already exist. Makes publish idempotent —
safe to retry after partial failures. Removes the publish-remaining
one-shot workflow that's no longer needed.
2026-05-21 15:29:12 -07:00
Jordan Ritter 49685a6cc4 fix(ci): format publish scripts 2026-05-21 14:07:35 -07:00
Jordan Ritter 3fcd98f2f5 fix(ci): use OIDC trusted publishers via npx npm@11 on Node 22
Replace pnpm publish with pnpm pack + npx npm@11.15.0 publish to
enable OIDC authentication. Set NODE_AUTH_TOKEN='' to prevent the
expired secret from blocking OIDC. Removes test workflow.
2026-05-21 14:02:36 -07:00
Alem Tuzlak 65928b9ca3 Merge remote-tracking branch 'origin/main' into worktree-lucky-popping-wren
# Conflicts:
#	package.json
2026-05-20 10:54:04 +02:00
github-actions[bot] 228ea6175c style: auto-fix formatting 2026-05-15 16:14:44 +00:00