Commit Graph

4305 Commits

Author SHA1 Message Date
Jordan Ritter 8118ff1dea feat(cvdiag): backend 11-boundary instrumentation for 4 TS integrations (L1-E) 2026-06-18 14:27:25 -07:00
Jordan Ritter ef1729244d feat(cvdiag): harness probe 12-boundary instrumentation (L1-A) 2026-06-18 14:24:04 -07:00
Jordan Ritter 1df8e7adba feat(cvdiag): backend 11-boundary instrumentation for spring-ai (L1-G) 2026-06-18 14:23:41 -07:00
Jordan Ritter b101ffe901 feat(cvdiag): LGP backend 11-boundary schema-v1 instrumentation (L1-I) 2026-06-18 14:19:58 -07:00
Jordan Ritter ed7e318034 chore(cvdiag): merge L0-F codegen binding into integration 2026-06-18 14:07:44 -07:00
Jordan Ritter 96ad26dcf6 chore(cvdiag): merge L0-E codegen binding into integration 2026-06-18 14:07:44 -07:00
Jordan Ritter 8cc2eb6f65 chore(cvdiag): merge L0-D codegen binding into integration 2026-06-18 14:07:44 -07:00
Jordan Ritter dc72e9cac8 feat(cvdiag): Python _shared bootstrap module + 12-integration reachability wiring (L0-C) 2026-06-18 14:06:57 -07:00
Jordan Ritter d188e27cf5 feat(cvdiag): .NET codegen binding + emitter (L0-D) 2026-06-18 14:04:22 -07:00
Jordan Ritter a2f81e8b73 feat(cvdiag): Java codegen binding + emitter inlined in spring-ai (L0-E) 2026-06-18 14:02:01 -07:00
Jordan Ritter 9dc3273d87 feat(cvdiag): TS integration emitter binding (L0-F) 2026-06-18 14:01:02 -07:00
Jordan Ritter 2790c8b8e7 chore(cvdiag): merge L0-B PB collections + ACL writer into integration 2026-06-18 13:55:01 -07:00
Jordan Ritter 709787e872 feat(cvdiag): schema foundation + emitter + edge-header filter (L0-A) 2026-06-18 13:52:49 -07:00
Jordan Ritter 5b9faaa457 feat(cvdiag): cvdiag_events + raw_byte_samples PB collections + 3-key ACL writer (L0-B) 2026-06-18 13:52:16 -07:00
Maxim ac8e5ea42a docs: correct v1 missing-config behavior note
The callout claimed the v1 <CopilotKit> wrapper has no dev-only
console.warn branch, but it composes CopilotKitV2Provider, which does
warn in development before the v1 validateProps throw. Drop the
misleading clause and contrast the throw-in-dev behavior instead.

Refs #5417
2026-06-18 22:15:49 +02:00
Austin Merrick 0c59e6bf60 feat(docs): add @copilotkit/vue reference documentation (OSS-323)
Adds the @copilotkit/vue v2 API reference to shell-docs: 9 component pages
(CopilotKitProvider, CopilotChat, CopilotChatView, CopilotChatInput,
CopilotChatMessageView, CopilotChatAssistantMessage, CopilotChatUserMessage,
CopilotPopup, CopilotSidebar) and 14 composable pages (useAgent, useAgentContext,
useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration,
useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop,
useInterrupt, useRenderTool, useSuggestions, useThreads), an index page, and
wiring into the reference version selector. Every documented API was verified
against packages/vue/src/v2.
2026-06-18 13:04:28 -07:00
Maxim 8bed39a033 docs: clarify selfManagedAgents portability note in error reference
The self-managed example sits under the "Fix (v2)" heading and uses
<CopilotKitProvider>, so the prior "works on both ... wrapper and v2"
comment read as if the v2 component itself were v1. Attribute the
portability to the selfManagedAgents prop instead of the component.

Refs #5417
2026-06-18 21:52:42 +02:00
Maxim e841339f89 docs: position selfManagedAgents as Enterprise Intelligence
Note on the self-managed agents page that selfManagedAgents is part of
the Enterprise Intelligence offering, with a pointer to discuss
licensing for production use.

Refs #5417
2026-06-18 21:28:15 +02:00
Maxim 76bfce84bb docs: correct v1 self-managed agents note in error reference
The error-reference callout claimed the v1 <CopilotKit> wrapper throws
unconditionally and does not accept selfManagedAgents. Both are no
longer true now that the wrapper honors local agents; update the note
and drop the "(v2 only)" label on the self-managed example.

Refs #5417
2026-06-18 21:19:21 +02:00
Atai Barkai a87c49db0a fix(shell-docs): resolve frontend markdown routes 2026-06-18 12:15:01 -07:00
Atai Barkai a9b7ec2c01 docs(shell-docs): resize Teams preview assets 2026-06-18 12:15:01 -07:00
Atai Barkai 0a8a4e97ea chore(shell-docs): update MDX remote dependency 2026-06-18 12:15:01 -07:00
Atai Barkai 6598481d8b docs(shell-docs): configure shell docs preview 2026-06-18 12:15:01 -07:00
Atai Barkai 8beaab7b0d docs(shell-docs): refine backend picker ordering 2026-06-18 12:15:01 -07:00
Atai Barkai 3fa0f0dff9 docs(shell-docs): update frontend reference links 2026-06-18 12:15:01 -07:00
Atai Barkai 469afd8f28 docs(shell-docs): add React docs guidance dialog 2026-06-18 12:15:01 -07:00
Atai Barkai c0b1e0a076 docs(shell-docs): split frontend and backend picker 2026-06-18 12:15:01 -07:00
Atai Barkai a49fc266b9 docs(shell-docs): add frontend docs routing 2026-06-18 12:15:01 -07:00
Jordan Ritter e31abd1acd feat(showcase): support --isolate=<N> CLI form as sugar over SHOWCASE_ISO_SLOT (#5547)
## Summary

Follow-up to #5543. Adds `--isolate=<N>` CLI form so users don't need to
set `SHOWCASE_ISO_SLOT=<N>` as an env var prefix.

## Before

```
SHOWCASE_ISO_SLOT=9 bin/showcase test agno --d5 --isolate
```

## After (both forms work)

```
bin/showcase test agno --d5 --isolate=9
# OR
SHOWCASE_ISO_SLOT=9 bin/showcase test agno --d5 --isolate
```

## Implementation

~10 lines in `showcase/scripts/cli/cmd-test.sh` arg parser: a new
`--isolate=*` case sets `use_isolate=true` and exports
`SHOWCASE_ISO_SLOT=<N>`. The existing picker (`_claim_isolate_slot` in
`_common.sh`) handles all validation, slot-0 rejection, port-probe,
liveness, etc. — no logic duplication.

Help text in `cmd-test.sh` and the existing `SHOWCASE_ISO_SLOT`
references in `showcase/TESTING.md` now show both forms as equivalent.

## Tests

Four new bats tests in `showcase/scripts/__tests__/isolate.bats`:

- `--isolate=<N> arg form exports SHOWCASE_ISO_SLOT and pins the slot
through the picker` — replays the parser branch, verifies env export +
picker pinning.
- `--isolate=0 arg form drives the picker's reserved-slot rejection` —
proves `--isolate=0` flows through the same `slot 0 is reserved` die as
the env-var form.
- `--isolate=99 arg form drives the picker's out-of-range rejection` —
proves `--isolate=99` flows through the same `exceeds
ISOLATE_MAX_SLOT=45` die as the env-var form.
- `cmd-test.sh --isolate=<N> actually wires the arg through to
SHOWCASE_ISO_SLOT` — drift guard that sources the REAL `cmd-test.sh`,
stubs `apply_isolation`, and snapshots `SHOWCASE_ISO_SLOT` to catch any
future regression of the parser branch.

All 58 bats tests in `isolate.bats` pass locally (54 pre-existing + 4
new).

## Docs

`showcase/TESTING.md` items 8 and 9 updated to show both forms.
Repo-wide grep confirmed TESTING.md is the only doc that references
`SHOWCASE_ISO_SLOT`.

## Test plan

- [x] `bats showcase/scripts/__tests__/isolate.bats` → 58/58 green
- [x] `--isolate=9` → `SHOWCASE_ISO_SLOT` exported, slot 9 claimed
- [x] `--isolate=0` → picker dies "slot 0 is reserved"
- [x] `--isolate=99` → picker dies "exceeds ISOLATE_MAX_SLOT=45"
- [x] `shellcheck showcase/scripts/cli/cmd-test.sh` → no new warnings
(only the pre-existing SC2034 on `CMD_TEST_DESC`, consumed by dispatcher
parallel arrays)
- [x] `oxfmt --check showcase/` → clean
2026-06-18 11:42:03 -07:00
Sam Julien d7dd0e6154 docs(shell-docs): normalize quickstart CTAs (#5544)
## Summary
- remove duplicated OpsPlatformCTA blocks from A2A, CrewAI Flows, and
LangGraph prebuilt components docs
- add missing production CTA cards to integration quickstarts that only
had the inline signup step
- audit shell-docs CTA usage so each integration quickstart has exactly
one OpsPlatformCTA and no duplicate CTA blocks remain

## Verification
- npm run test (showcase/shell-docs)
- npm run typecheck (showcase/shell-docs)
- npm run lint (showcase/shell-docs; existing warnings only)
- npm run build (showcase/shell-docs; existing Next/Turbopack warning
only)
- duplicate CTA scanner: no duplicate CTA blocks found
- quickstart CTA scanner: every integration quickstart has exactly one
OpsPlatformCTA
2026-06-18 11:16:15 -07:00
Sam Julien 33a79485b6 chore(docs): remove retired docs app 2026-06-18 10:54:16 -07:00
Jordan Ritter 0e7e311692 docs(showcase): document --isolate=<N> CLI form in TESTING.md
Items 8 and 9 now show both the SHOWCASE_ISO_SLOT=<N> env-var form and
the --isolate=<N> CLI sugar as equivalent ways to pin the isolation
slot. The env-var form remains valid — the CLI form is a convenience,
not a replacement.

A repo-wide grep confirmed showcase/TESTING.md is the only doc that
references SHOWCASE_ISO_SLOT, so no other docs need updating.
2026-06-18 10:39:08 -07:00
Jordan Ritter ce2d2bcd91 feat(showcase): support --isolate=<N> CLI form as sugar over SHOWCASE_ISO_SLOT
Adds a sugar form of the --isolate flag that pins the isolation slot
directly from the command line:

    bin/showcase test agno --d5 --isolate=9
    # equivalent to:
    SHOWCASE_ISO_SLOT=9 bin/showcase test agno --d5 --isolate

The arg parser splits --isolate=<N> into setting use_isolate=true plus
exporting SHOWCASE_ISO_SLOT=<N>; the existing picker
(_claim_isolate_slot in _common.sh) handles all validation — positive
integer, slot 0 reserved, 1<=N<=ISOLATE_MAX_SLOT, port probe, liveness.
No validation logic is duplicated.

Tests:
- replays the parser branch and verifies SHOWCASE_ISO_SLOT export +
  picker pinning
- drives the picker's reserved-slot (N=0) and out-of-range (N=99)
  rejections through the arg form to pin the parser->env->picker wiring
- drift guard: sources the REAL cmd-test.sh, stubs apply_isolation, and
  snapshots SHOWCASE_ISO_SLOT to catch any future regression of the
  parser branch

Help text and TESTING.md updated in a follow-up commit.
2026-06-18 10:38:55 -07:00
Sam Julien b7092c49fb docs: fix CrewAI Flows quickstart init command (#5545)
## Summary
- Update the CrewAI Flows quickstart init command to use the
CLI-supported framework flag.

## Verification
- Ran shell-docs predev generation as part of local dev server startup.
- Opened http://localhost:3004/crewai-crews/quickstart and verified the
rendered page snapshot contains: `npx copilotkit@latest init --framework
flows`.
- Commit hook passed: check-binaries, test-and-check-packages,
commitlint.
2026-06-18 10:35:00 -07:00
Sam Julien fcc43cf344 docs: fix CrewAI Flows quickstart init command 2026-06-18 10:27:44 -07:00
Jordan Ritter baf355ee21 feat(showcase): fix --isolate slot picker (pinning, port probe, slot 0 reservation, bin/showcase slots) (#5543)
## Summary

Fixes the `--isolate` slot picker in `showcase/scripts/cli/_common.sh`
and adds a new `bin/showcase slots` inspector subcommand. Resolves five
compounding bugs that made multi-agent local testing unreliable.

## Bugs fixed

1. **`SHOWCASE_ISO_SLOT=<N>` env var was ignored.** The picker walked
0→N regardless. Now: validates input (positive integer, `1 ≤ N ≤ 45`,
slot 0 rejected as base stack), tries exactly that slot, fails loudly on
conflict.
2. **No port-probe before commit.** Picker `mkdir`'d a slot dir without
checking whether the slot's host ports were free. A slot whose dir was
absent but whose ports were taken (foreign Docker project, host service
like macOS AirPlay on 5000) was picked then failed at `docker compose
up`. Now: `lsof`-probe every candidate port before committing the claim;
rmdir + try next on conflict.
3. **Slot 8 / port 5000 collision on macOS.** Base dashboard port `3200`
+ slot 8 offset `+1800` = `5000`, permanently bound by macOS Control
Center's AirPlay Receiver. Shifted dashboard base port `3200 → 3210`
across `docker-compose.local.yml` and `showcase/harness/src/cli/*.ts` so
slot 8 → port `5010` (free).
4. **Slot ownership desync across 3+ independent owners.** Picker
checked only the dir; sweeper checked dir+pid+containers; neither
checked foreign ports. New unified `_slot_state` returns all 4 axes
(dir/pid/liveness/ports/offset/project); new `bin/showcase slots`
exposes the state via table / `--json` / `--free --brief` filters.
5. **Parallel pre-claim deadlock dissolved** by bugs 1+2+4 — per-session
pinning via env var + accurate port-probe + atomic `mkdir` lock
self-resolves contention.

## Implementation

- New helpers in `_common.sh`: `_slot_offset_ports`, `_slot_liveness`
(extracted from sweeper), `_slot_ports_free` (with own-project
docker-listener filter), `_slot_state` (composite axis report).
- Rewritten `_claim_isolate_slot`: pinned-path (validate / try / die
loudly) and auto-pick-path (1..MAX_SLOT, rmdir + skip on port-held).
Slot 0 reserved with explicit die message.
- `ISOLATE_MAX_SLOT=45` centralized as a constant.
- Dashboard host port shift `3200 → 3210` across 6 files (compose + 4
harness TS + comment updates).
- New `cmd-slots.sh` plugin (auto-discovered by `bin/showcase`): default
table, `--json` (JSONL), `--free` (filter to claimable slots), `--brief`
(numeric IDs only).

## Tests

**Bats — 54/54 GREEN** in `showcase/scripts/__tests__/isolate.bats`:

- 12 pre-existing tests updated for slot-0-reservation contract
(reap-evidence assertions preserved; only slot-number / port-offset
expectations updated).
- 11 new tests added:
  - lsof stub + foundation smoke (test #0)
- Pinning behavior tests #1-3 (success, live-die, validation incl.
0/foo/99)
- Port-probe tests #4-7 (stale-reap, `_slot_offset_ports 8 → 5010 ≠
5000`, foreign-process skip, own-project no-skip)
- Composite tests #8-10 (`_slot_state` 5 axes, `bin/showcase slots`
output, concurrent claim distinct slots)
- lsof-graceful test (#54): `_slot_state emits ports=? when lsof is
unavailable`

**Vitest — 17/17 GREEN** in
`showcase/harness/src/cli/control-plane-run.test.ts` (port-shift stub
consistency).

**Value-test (live local, plan §6 scenarios) — all 3 PASS:**

- **Scenario A:** On the test host Docker was holding slot 9's ports, so
the picker correctly REFUSED `SHOWCASE_ISO_SLOT=9` with per-port
diagnostics (proving the fail-loud half of the contract). Re-ran with
`SHOWCASE_ISO_SLOT=15` (first free slot) and the pin was honored
cleanly: `ISOLATE_SLOT=15`, `OFFSET=3200`. Both halves of the pin
contract verified.
- **Scenario B:** Slots 1-7 pre-occupied with live pids + Python
listener on `127.0.0.1:5010` (slot 8's dashboard port) → picker logged
"Slot N ports held" + "trying next" for each conflict, walked past 9..13
(Docker-held), and landed on slot 14 with `OFFSET=3000`. No silent
collision.
- **Scenario C:** `bin/showcase slots` matches reality: slot 0 →
`OFFSET=+0 PROJECT=showcase (base)`; pre-claimed slot 5 → `DIR=present
PID=<pid> LIVE=live PORTS=held OFFSET=+1200 PROJECT=showcase-iso5-test`.
`--free --brief` outputs only fully-claimable slot IDs (44 in this run,
slot 5 excluded).

## Code review

Full 7-agent cr-loop with `pr-review-toolkit` reviewers (Round 1 +
confirmation round). 4 subject-scope load-bearing findings fixed:
- `_reap_isolate_slot` arg shape in pinned-path retry
- `_slot_state` base-stack offset (slot 0 → `+0`, not `+200`)
- TESTING.md item 8/9 column-name accuracy (matches actual `SLOT DIR PID
LIVE PORTS OFFSET PROJECT` header)
- `bin/showcase slots` lsof-graceful degradation (inspector reports
`PORTS=?` instead of dying when `lsof` is missing)

Plus 1 trivial comment-phrasing fix (race-comment wording). ~50
pre-existing harness/compose findings partitioned out-of-subject and
deferred to follow-up PRs (see below). Procedure 3 bucket-(c) promotion
audit returned zero PROMOTE_TO_A items — full convergence.

## Follow-up PRs (out-of-subject, separate subjects)

These coherent subjects surfaced during CR but belong to distinct PRs
(the diff merely brushed against them for the `3200→3210` shift):

- **d1** — Harness `up()` / `doctor` should health-check
`harness-control-plane` (port 8081). `_slot_offset_ports` includes 8081;
`INFRA_PORTS` in `doctor.ts` / `lifecycle.ts` does not.
- **d2** — `doctor.ts` port + image diagnostic loud-failure pass
(`checkStaleImages`, `checkPorts`, `isPortListening`,
`checkDepotInterception` swallow errors).
- **d3** — `lifecycle.ts` error-surfacing pass (broad catches in
`loadPortsFile`, `isRunning`, `compose`, `healthCheck`, `diffLogs`,
etc.).
- **d4** — `docker-compose.local.yml` healthcheck error visibility
(`.catch(() => process.exit(1))` swallows; dashboard `/` returns 307).
- **d5** — `apply_isolation` Python rewriter fail-loud pass (no
`re.subn` count checks, hand-rolled YAML demos parser).
- **d6** — Centralize infra port literals (currently duplicated in 4
places).
- **d7** — `lifecycle.ts:11-13` stale `ops/` path comment (file lives at
`harness/`).
- **d8** — `cmd_slots --json` `pid` field typing (string vs number) —
settle when first JSON consumer appears.

## Test plan

- [x] `bats showcase/scripts/__tests__/isolate.bats` → 54/0
- [x] `pnpm vitest run src/cli/control-plane-run.test.ts` (in
`showcase/harness/`) → 17/0
- [x] `pnpm exec tsc --noEmit` (in `showcase/harness/`) → clean
- [x] `oxfmt --check showcase/` → clean
- [x] `docker compose -f showcase/docker-compose.local.yml config` →
valid YAML
- [x] Local value-test scenarios A/B/C from plan §6 → PASS
2026-06-18 10:25:34 -07:00
Sam Julien ddeeb9c586 docs(shell-docs): add missing quickstart CTAs 2026-06-18 10:16:07 -07:00
Sam Julien 6e301f0247 docs(shell-docs): remove duplicated CTA blocks 2026-06-18 10:12:42 -07:00
Austin Merrick a4c5331e6f docs: fix LangGraph documentation links (#5445)
Closes #3190.

## Summary
- update the configurable guide links to the current LangGraph
use-graph-api documentation
- remove an encoded `%23` fragment from the runtime configuration link
- point the AI travel tutorial Studio setup link directly to the current
LangGraph Studio docs

## Verification
- `npx --yes prettier --check
docs/content/docs/integrations/langgraph/configurable.mdx
docs/content/docs/integrations/langgraph/tutorials/ai-travel-app/step-2-langgraph-agent.mdx`
- `git diff --check`
- checked the updated LangChain/LangGraph URLs with `curl -L -I` and
confirmed HTTP 200

Note: `node scripts/check-broken-links.js` was also attempted from
`docs/`, but this sparse checkout does not include all docs pages and
lacks `fumadocs-mdx`, so it reports pre-existing missing internal pages
unrelated to this docs-only change.
2026-06-18 09:49:05 -07:00
GeneralJerel c94184daf9 docs(cookbook): retitle and sync recipe with the current demo
Retitles to 'Build an Agentic Travel App with Oracle Agent Memory, Agent Spec, and CopilotKit' and syncs the recipe with the latest example: adds the memory-ownership diagram + 'what's CopilotKit, what's Oracle' section, documents memory reconciliation/supersession, and updates booking + multi-turn guidance (follow-ups now work via a server-side history-replace). Keeps the CDN media + clone conventions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 09:18:07 -07:00
Nathan 🔶 Tarbert 62acb88f28 revert(react-core): drop useRenderTool schema-free named overload
Per review, keep this PR docs-only. Restores defineToolCallRenderer and
useRenderTool (and its test) to main. The specific-tool opt-out example
now passes a pass-through schema (parameters: z.any()) since the named
overload requires a schema.
2026-06-18 10:36:41 -04:00
Alem Tuzlak 2698c7efa2 Merge origin/main into feat/bot-whatsapp
Unify WhatsApp with main's Slack+Discord multi-adapter demo: WhatsApp becomes a
third env-gated platform block in examples/slack/app/index.ts (listening on
Railway $PORT, with a malformed-PORT guard). Keep the platform-aware
senderContext (also fixes the Discord 'Slack user' label); drop the superseded
buildAdapters helper for main's inline per-platform pattern. package.json takes
main's ~0.0.2 bumps + bot-discord and adds bot-whatsapp (workspace:~); README
intro + deploy section cover all three surfaces.
2026-06-18 12:24:22 +02:00
Tyler Slaton 406df02991 feat(bot-discord): Discord PlatformAdapter for @copilotkit/bot (#5524)
## Summary

Adds **`@copilotkit/bot-discord`** — a Discord `PlatformAdapter` for
`@copilotkit/bot`, built on **discord.js v14**, mirroring the existing
`@copilotkit/bot-slack`. It lets users build Discord bots on the shared
`@copilotkit/bot` + `@copilotkit/bot-ui` primitives, running on agents
via the AG-UI protocol.

Ships three things: the **package**, a runnable **example**, and
**docs**.

## Package (`packages/bot-discord`)

- **Gateway ingress** via discord.js — intents `Guilds`,
`GuildMessages`, `MessageContent` (privileged), `DirectMessages`,
`GuildMembers` (privileged). Both privileged intents must be enabled in
the Discord Developer Portal; `GuildMembers` powers user lookup.
- **Components V2 egress** — IR → `ContainerBuilder` with
`MessageFlags.IsComponentsV2`; full
`Message`/`Header`/`Section`/`Markdown`/`Fields`/`Context`/`Actions`/`Button`/`Select`/`Image`/`Divider`/`Table`
mapping, budget-clamped via `DISCORD_LIMITS`.
- **Streaming replies** — 1100 ms edit throttle; rollover at a 1900-char
soft limit / 2000 hard limit.
- **Ack-first interactions** (3000 ms deadline) — slash commands ack
with an ephemeral reply; buttons/selects ack via `deferUpdate`.
- **Slash-command registration** — per-guild (instant) when `guildId` is
set, else global (propagates within ~1h).
- **HITL**, **typing + reactions**, **built-in tools**
(`lookup_discord_user`) + **context**, in-memory conversation store.
- Capabilities: `{ supportsModals: false, supportsTyping: true,
supportsReactions: true, supportsStreaming: true, maxBlocksPerMessage:
40 }`.

## Example (`examples/discord`)

Runnable Discord bot — `BuiltInAgent` + Linear/Notion MCP (model
`openai/gpt-5.5`), app tools/components/commands/context/HITL, plus a
**`DISCORD_E2E`-gated manual e2e harness**.

```
DISCORD_E2E=1 pnpm --filter discord-example exec tsx e2e/run.ts
```

## Docs

- `showcase/shell-docs` reference under `reference/bot/discord/` —
`index`, `defaultDiscordTools`, `defaultDiscordContext`,
`renderComponents`, `DISCORD_LIMITS`; bot reference index + nav.
- Package `README.md` + `ARCHITECTURE.md`.

## Review summary

Built and reviewed via a multi-module adversarial CR process:

- **Module 1 (package):** 4 CR rounds, ~22 bugs fixed, **156 tests**.
- **Module 2 (example):** 1 round, ~10 fixes (stale Slack-port residue +
missing error guards), **38 tests**.
- **Module 3 (docs):** 1 round — fixed a blocker (doc invented three
non-existent adapter options) + majors (missing `GuildMembers`, wrong
streaming throttle/rollover numbers).
- **Module 4 (cross-cutting, 7 lenses + promotion audit):** caught &
fixed a **blocker — slash-command interactions were never
acknowledged**, so every slash command showed the user Discord's "The
application did not respond" error. Now acked within the 3 s window.
Also fixed: frozen `_thinking…_` placeholder on mid-stream throw, an
unhandled-rejection window in the chunked stream, an accidental NUL byte
that made a test file binary, and `ARCHITECTURE.md` intent-list
accuracy.

## Deferred follow-ups (not blocking)

- **True modals / multi-step forms** — `supportsModals: false` in v1.
- **Inbound-attachment auto-wiring** — `buildFileContentParts` is
exported + tested but not yet wired into the listener, so a user
attaching a file gets nothing delivered to the agent. Two reviewers
rated this blocker-severity; the promotion audit confirmed there's no
false promise (README claims no upload support) and nothing depends on
it. **Strong fast-follow candidate.**
- **`@copilotkit/bot-slack` port** — bot-discord fixed a latent
`flushNow` ordering bug and a select `custom_id` JSON encode/decode
asymmetry that still exist in bot-slack.
- **Latent (not reachable by shipped example):** select-value JSON
round-trip type coercion; `>5` action-row silent drop (no overflow
marker).
- **Adapter-glue test coverage** —
`post`/`update`/`delete`/`lookupUser`/`getMessages`/`postFile`/ack-ordering/`interruptEventNames`/`custom_id`
round-trip are covered indirectly; direct tests would harden them.
- **Minor:** `getMessages` placeholder filtering (shared with
bot-slack); `buildFileContentParts` config-key/default divergence vs
bot-slack; type-cleanliness (`ChannelLike` `as never` bridge,
barrel-surface trim).
- **e2e harness** is a `DISCORD_E2E`-gated **manual** tool — its
synthetic interaction lacks an Ed25519 signature, so it works only
against a test shim, not real Discord.

## Caveat (pre-existing, unrelated to this PR)

`@copilotkit/core` (tsc error) and `@copilotkit/runtime` (check-types
JS-heap OOM) are already broken on `main`. They are not touched by this
branch; typecheck/build were scoped to `@copilotkit/bot-discord` +
`discord-example`.

## Test plan

- [x] `nx run @copilotkit/bot-discord:test` — 156 passing
- [x] `nx run discord-example:test` — 38 passing
- [x] `tsc --noEmit` (both `tsconfig.json` + `tsconfig.check.json`)
clean
- [x] `nx run @copilotkit/bot-discord:build` succeeds
- [x] oxfmt `--check` clean, oxlint 0 errors, `pnpm-lock.yaml` in sync
- [ ] Manual smoke against a real Discord app (mention, slash command,
button, streaming reply)
2026-06-18 01:52:30 -07:00
Alem Tuzlak 29d5a9d61d chore(discord): remove unrelated PR changes 2026-06-17 18:32:26 -07:00
Jordan Ritter 7823166980 docs(showcase): document --isolate slot pinning and conflict detection in TESTING.md
- Update items 8/9 for slot pinning and conflict detection
- Correct item 8/9 column names to match bin/showcase slots header
2026-06-17 16:44:43 -07:00
Jordan Ritter 8272ca1324 test(showcase): bats coverage for slot pinning, port-probe, slots subcommand, and lsof-graceful inspector
- Update 12 slot-0-assumption tests for slot-0 reservation contract
- Add lsof stub and foundation smoke for isolate.bats
- Tests #1-#3: slot pinning behavior
- Tests #4-#7: port-probe and stale-reap behavior
- Tests #8-#10: slot state, slots subcommand, concurrent claim
- New test for _slot_state ports=? when lsof unavailable
2026-06-17 16:44:37 -07:00
Jordan Ritter 297a3d617e fix(showcase/harness): shift dashboard host port 3200 → 3210
- docker-compose.local.yml: host port mapping
- harness/src/cli/doctor.ts: dashboard probe
- harness/src/cli/lifecycle.ts: dashboard URL
- harness/src/cli/config.ts: default port
- harness/src/cli/control-plane-run.test.ts: test expectations
2026-06-17 16:44:29 -07:00
Jordan Ritter ec33db8249 feat(showcase): add bin/showcase slots inspector subcommand 2026-06-17 16:44:18 -07:00
Jordan Ritter cb197773ee feat(showcase): rewrite --isolate slot picker with pinned slots, port probe, and slot 0 reservation
- Centralize ISOLATE_MAX_SLOT=45 constant
- Add helpers: _slot_offset_ports, _slot_liveness, _slot_ports_free, _slot_state
- Rewrite _claim_isolate_slot to reserve slot 0, honor SHOWCASE_ISO_SLOT, port-probe via lsof
- Document benign mkdir/rmdir race in auto-pick path
- Shift dashboard host port 3200 → 3210 in apply_isolation / restore_isolation
- Pass slot entry path + project to _reap_isolate_slot in pinned-path retry
- _slot_state reports offset=0 for the base stack (slot 0)
- _slot_state degrades gracefully to ports=? when lsof is missing
2026-06-17 16:44:12 -07:00
Jordan Ritter 14138b7d18 fix(showcase/aimock): add generate_a2ui d6 fixtures for 8 slugs (Sales Dashboard probe)
Mirrors LGP's `generate_a2ui` outer-emit fixture into 8 non-LGP slugs to close
the production 503 gap on the "Show me my sales dashboard for this quarter."
userMessage. Per /tmp/staging-journal-diff.md, aimock-staging returns 503 on
shape-B traffic (model=gpt-4.1, stream=true, tools=[generate_a2ui],
UA=AsyncOpenAI/Python) for all 8 slugs because no fixture matched.

Slugs patched (one entry each in d6/<slug>/gen-ui-declarative.json):
  - llamaindex
  - built-in-agent
  - ag2
  - langroid
  - claude-sdk-typescript
  - claude-sdk-python
  - ms-agent-dotnet
  - ms-agent-python

Each entry matches `userMessage` + `context: "<slug>"` and emits a
`generate_a2ui` toolcall with no args, mirroring LGP's sales-dashboard outer
entry. Per-slug unique toolCallId.

Red-green proof (local aimock, ghcr.io/copilotkit/aimock:latest):
  RED (baseline main, 8 slugs):  HTTP=404 no_fixture_match
  GREEN (this branch, 8 slugs):  HTTP=200 tool=generate_a2ui id=call_d6_decl_dash_outer_<slug>_001
  LGP regression (baseline+fix): HTTP=200 (unchanged)

aimock fixture validation: 737/737 tests pass.

PR scope is intentionally narrow per CLAUDE.md "Scope PRs to flagged
findings": this closes ONE userMessage gap. Shape-A 503s (no tools key) and
other userMessage gaps remain as separate follow-ups.
2026-06-17 16:02:37 -07:00